├── Procfile ├── README.md ├── History.markdown ├── Gemfile ├── .github └── dependabot.yml ├── Makefile ├── views ├── error.erb ├── index.erb ├── success.erb └── layout.erb ├── config.ru ├── LICENSE └── Gemfile.lock /Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec rackup -p $PORT 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # teams 2 | 3 | The code behind https://teams.jekyllrb.com 4 | -------------------------------------------------------------------------------- /History.markdown: -------------------------------------------------------------------------------- 1 | ## HEAD 2 | 3 | ### Minor Enhancements 4 | 5 | * Bump sinatra from 2.1.0 to 2.2.0 (#13) 6 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "squad_goals", 4 | git: "https://github.com/benbalter/squad_goals", 5 | ref: "cf62d6384229644823d263a2812954a246ecb77e" 6 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: bundler 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | LE_DOMAIN=teams.jekyllrb.com 2 | 3 | renew-cert: 4 | sudo certbot certonly --manual -d $(LE_DOMAIN) 5 | sudo heroku certs:update /etc/letsencrypt/live/$(LE_DOMAIN)/fullchain.pem /etc/letsencrypt/live/$(LE_DOMAIN)/privkey.pem 6 | -------------------------------------------------------------------------------- /views/error.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Uh oh.

4 |

5 | This is embarassing. It looks like something went wrong. 6 | Try again? 7 |

8 |
9 |
10 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | require "squad_goals" 2 | SquadGoals.views_dir = File.expand_path("./views", File.dirname(__FILE__)) 3 | 4 | # Hey, let's encrypt! 5 | CHALLENGES = { 6 | "UKBjcqWIpvM9EBvGNcbzTNRb3TX4NDVdS1T3A-T0U3A" => "UKBjcqWIpvM9EBvGNcbzTNRb3TX4NDVdS1T3A-T0U3A.0_FB5JN2q3eP2QoJorWBJ10AmdI7syymrX7zhZx_xIc" 7 | }.each do |path, ret| 8 | SquadGoals::App.get "/.well-known/acme-challenge/#{path}" do 9 | ret 10 | end 11 | end 12 | 13 | run SquadGoals::App 14 | -------------------------------------------------------------------------------- /views/index.erb: -------------------------------------------------------------------------------- 1 |
2 | <% teams.each_with_index do |team, index| %> 3 | 8 | <% if index % 3 == 2 %> 9 |
10 | <% end %> 11 | <% end %> 12 |
13 | -------------------------------------------------------------------------------- /views/success.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Success!

4 | <% if organization.member?(user) %> 5 |

6 | You've successsfully joined <%= organization.name %>'s '<%= team_requested.name %>. 7 |

8 | 9 |

10 | Join another team? 11 |

12 | <% else %> 13 |

14 | Almost there. Just one more step. 15 | Please accept this invitation to join <%= organization.name %>, so that we can add you to the <%= team_requested.name %> team. 16 |

17 | <% end %> 18 |
19 |
-------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Jekyll 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/benbalter/squad_goals 3 | revision: cf62d6384229644823d263a2812954a246ecb77e 4 | ref: cf62d6384229644823d263a2812954a246ecb77e 5 | specs: 6 | squad_goals (0.2.0) 7 | dalli (~> 2.7) 8 | dotenv (~> 2.0) 9 | octokit (~> 4.0) 10 | rack-ssl-enforcer (~> 0.2) 11 | sinatra_auth_github (~> 2.0) 12 | warden-github (~> 1.1) 13 | 14 | GEM 15 | remote: https://rubygems.org/ 16 | specs: 17 | activesupport (7.0.7.2) 18 | concurrent-ruby (~> 1.0, >= 1.0.2) 19 | i18n (>= 1.6, < 2) 20 | minitest (>= 5.1) 21 | tzinfo (~> 2.0) 22 | addressable (2.8.0) 23 | public_suffix (>= 2.0.2, < 5.0) 24 | concurrent-ruby (1.2.2) 25 | dalli (2.7.11) 26 | dotenv (2.7.6) 27 | faraday (2.3.0) 28 | faraday-net_http (~> 2.0) 29 | ruby2_keywords (>= 0.0.4) 30 | faraday-net_http (2.0.3) 31 | i18n (1.14.1) 32 | concurrent-ruby (~> 1.0) 33 | minitest (5.19.0) 34 | mustermann (2.0.2) 35 | ruby2_keywords (~> 0.0.1) 36 | octokit (4.25.1) 37 | faraday (>= 1, < 3) 38 | sawyer (~> 0.9) 39 | public_suffix (4.0.7) 40 | rack (2.2.8.1) 41 | rack-protection (2.2.3) 42 | rack 43 | rack-ssl-enforcer (0.2.9) 44 | ruby2_keywords (0.0.5) 45 | sawyer (0.9.2) 46 | addressable (>= 2.3.5) 47 | faraday (>= 0.17.3, < 3) 48 | sinatra (2.2.3) 49 | mustermann (~> 2.0) 50 | rack (~> 2.2) 51 | rack-protection (= 2.2.3) 52 | tilt (~> 2.0) 53 | sinatra_auth_github (2.0.0) 54 | sinatra (~> 2.0) 55 | warden-github (~> 1.3) 56 | tilt (2.0.11) 57 | tzinfo (2.0.6) 58 | concurrent-ruby (~> 1.0) 59 | warden (1.2.9) 60 | rack (>= 2.0.9) 61 | warden-github (1.3.2) 62 | activesupport (> 3.0) 63 | octokit (> 2.1.0) 64 | warden (> 1.0) 65 | 66 | PLATFORMS 67 | ruby 68 | 69 | DEPENDENCIES 70 | squad_goals! 71 | 72 | BUNDLED WITH 73 | 1.17.3 74 | -------------------------------------------------------------------------------- /views/layout.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Join a <%= org_id %> Affinity Team 10 | 11 | 12 |
13 | 32 |
33 | 41 | 59 |
60 |
61 |
62 |
63 |
64 |

Join a <%= org_id %> affinity team.

65 |
66 |
67 | What is this? Read @benbalter's blog post on the Jekyll blog, 68 | "Making it easier to contribute to Jekyll". 69 |
70 |
71 |
72 |
73 | <%= yield %> 74 |
75 | 85 | 86 | 87 | 88 | --------------------------------------------------------------------------------