add-to-org 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 351c099fc7771a5adc6fd806223371fe4d5ab588
4
- data.tar.gz: 5616531e6f75f524d8e7af3ca68ea2a34d95c664
3
+ metadata.gz: 82b5c39679b1c2a027a7e88d6e89ac6f2bb51943
4
+ data.tar.gz: dfed027da8d511c120088cfaf1499f57d7e8323b
5
5
  SHA512:
6
- metadata.gz: 96fe29f18f7ca1e94e0c27e24c5fa8096b7ca7d6abc85531cff9ed759c0e12d8c848d1b3e08975ff1245b0b9882d1dfa634f63cb90ea03bdbe8de616d8152209
7
- data.tar.gz: 5bb857c019684da4da650e9160f556b3df7ad35aa6796b96d2baf81ff707a086dd5b8c0c3232737cf7c01ca5106ed1f263593ad82479a8b0a12a4fd79f013bbe
6
+ metadata.gz: da885134a8f2dae8e38fdeda232e35ddc30476a5664770b5e894a7c32ce385e98e1cb3d29da71ce7627fb0180a419fc53249233ea9846879adfcb5d7695c0b89
7
+ data.tar.gz: 9c6b02fce59bdcc578a83804b72880d70ea2d6f58088abe7acccafd8cd24781766601ac3a48cff5a795d78b1199cef81c64af8145bd940270bc65542f3552884
@@ -1,3 +1,3 @@
1
1
  module AddToOrg
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
@@ -6,7 +6,7 @@
6
6
  </head>
7
7
  <body>
8
8
  <h1>You're all set</h1>
9
- <p class="lead">You simply need to <a href="https://github.com/orgs/<%= @org_id %>/invitation?return_to=<%= ERB::Util.html_escape(redirect) %>">confirm your invitation to join the organization</a> on GitHub.</p>
9
+ <p class="lead">You simply need to <a href="https://github.com/orgs/<%= org_id %>/invitation?return_to=<%= ERB::Util.html_escape(redirect) %>">confirm your invitation to join the organization</a> on GitHub.</p>
10
10
  <p>Once confirmed, you will have access to <a href="<%= ERB::Util.html_escape(redirect) %>"><%= ERB::Util.html_escape(redirect) %></a>, the requested URL.</h1>
11
11
  </body>
12
12
  </html>
@@ -79,10 +79,12 @@ describe "logged in user" do
79
79
  stub = stub_request(:put, "https://api.github.com/teams/memberships/benbaltertest").
80
80
  to_return(:status => 204)
81
81
 
82
- get "/"
82
+ get "/foo"
83
83
  expect(stub).to have_been_requested
84
84
  expect(last_response.status).to eql(200)
85
85
  expect(last_response.body).to match(/confirm your invitation to join the organization/)
86
+ expect(last_response.body).to match(/https:\/\/github.com\/orgs\/some_org\/invitation/)
87
+ expect(last_response.body).to match(/\?return_to=https:\/\/github.com\/foo/)
86
88
  end
87
89
  end
88
90
 
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,8 @@ require "bundler/setup"
2
2
  require 'fileutils'
3
3
 
4
4
  ENV['RACK_ENV'] = 'test'
5
+ ENV['GITHUB_CLIENT_ID'] = "CLIENT_ID"
6
+ ENV['GITHUB_CLIENT_SECRET'] = 'CLIENT_SECRET'
5
7
  $:.push File.join(File.dirname(__FILE__), '..', 'lib')
6
8
 
7
9
  require 'rack/test'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: add-to-org
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter