heroku-bouncer 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile.lock +11 -11
  3. data/README.md +3 -1
  4. data/lib/heroku/bouncer.rb +3 -4
  5. metadata +9 -19
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0404185bf3da1eecc4a7e9009a715c2adb5a220e
4
+ data.tar.gz: dc7d6fb8e45947c9d58419d7b0d7d446bd1cdc6c
5
+ SHA512:
6
+ metadata.gz: 9f464a678eebff16cd70e25991fd75bab614f3985e1bbf4ce82adef7524f6a7c16c33ab71495935eb22982a08f25c0f5b7563af4fc628807a40263a28669df4c
7
+ data.tar.gz: 2f2e046e1259375465c2048466f7a2bd0c5f6e6ce4069b13e43cb476da6db00d33ce6fd36e62354376556342e48fcb20508c55357145a010365c37160e24494b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heroku-bouncer (0.1.0)
4
+ heroku-bouncer (0.2.1)
5
5
  faraday (~> 0.8)
6
6
  multi_json (~> 1.0)
7
7
  omniauth-heroku (>= 0.1.0)
@@ -10,13 +10,13 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- faraday (0.8.6)
13
+ faraday (0.8.7)
14
14
  multipart-post (~> 1.1)
15
- hashie (1.2.0)
15
+ hashie (2.0.5)
16
16
  httpauth (0.2.0)
17
- jwt (0.1.7)
17
+ jwt (0.1.8)
18
18
  multi_json (>= 1.5)
19
- multi_json (1.6.1)
19
+ multi_json (1.7.7)
20
20
  multipart-post (1.2.0)
21
21
  oauth2 (0.8.1)
22
22
  faraday (~> 0.8)
@@ -24,8 +24,8 @@ GEM
24
24
  jwt (~> 0.1.4)
25
25
  multi_json (~> 1.0)
26
26
  rack (~> 1.2)
27
- omniauth (1.1.3)
28
- hashie (~> 1.2)
27
+ omniauth (1.1.4)
28
+ hashie (>= 1.2, < 3)
29
29
  rack
30
30
  omniauth-heroku (0.1.1)
31
31
  omniauth (~> 1.0)
@@ -36,11 +36,11 @@ GEM
36
36
  rack (1.5.2)
37
37
  rack-protection (1.5.0)
38
38
  rack
39
- sinatra (1.3.5)
39
+ sinatra (1.4.3)
40
40
  rack (~> 1.4)
41
- rack-protection (~> 1.3)
42
- tilt (~> 1.3, >= 1.3.3)
43
- tilt (1.3.5)
41
+ rack-protection (~> 1.4)
42
+ tilt (~> 1.3, >= 1.3.4)
43
+ tilt (1.4.1)
44
44
 
45
45
  PLATFORMS
46
46
  ruby
data/README.md CHANGED
@@ -79,7 +79,9 @@ logging in again.
79
79
 
80
80
  Don't want to OAuth on every request? Use a middleware to conditionally
81
81
  enable this middleware, like
82
- [`Rack::Builder`](http://rack.rubyforge.org/doc/Rack/Builder.html).
82
+ [Rack::Builder](http://rack.rubyforge.org/doc/Rack/Builder.html).
83
+ Alternatively, [use inheritance to extend the middleware to act any way
84
+ you like](https://gist.github.com/wuputah/5534428).
83
85
 
84
86
  ## There be dragons
85
87
 
@@ -55,17 +55,16 @@ class Heroku::Bouncer < Sinatra::Base
55
55
  get '/auth/heroku/callback' do
56
56
  session[:user] = true
57
57
  token = request.env['omniauth.auth']['credentials']['token']
58
- store(:token, token) if @expose_token
59
58
  if @expose_email || @expose_user || @herokai_only
60
59
  user = fetch_user(token)
61
- store(:user, user) if @expose_user
62
- store(:email, user['email']) if @expose_email
63
-
64
60
  if @herokai_only && !user['email'].end_with?("@heroku.com")
65
61
  url = @herokai_only.is_a?(String) ? @herokai_only : 'https://www.heroku.com'
66
62
  redirect to(url) and return
67
63
  end
64
+ store(:user, user) if @expose_user
65
+ store(:email, user['email']) if @expose_email
68
66
  end
67
+ store(:token, token) if @expose_token
69
68
  redirect to(session.delete(:return_to) || '/')
70
69
  end
71
70
 
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-bouncer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.2.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jonathan Dance
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-14 00:00:00.000000000 Z
11
+ date: 2013-06-17 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: omniauth-heroku
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.1.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.1.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: sinatra
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: faraday
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: multi_json
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -90,27 +81,26 @@ files:
90
81
  - Rakefile
91
82
  homepage: https://github.com/heroku/heroku-bouncer
92
83
  licenses: []
84
+ metadata: {}
93
85
  post_install_message:
94
86
  rdoc_options: []
95
87
  require_paths:
96
88
  - lib
97
89
  required_ruby_version: !ruby/object:Gem::Requirement
98
- none: false
99
90
  requirements:
100
- - - ! '>='
91
+ - - '>='
101
92
  - !ruby/object:Gem::Version
102
93
  version: '0'
103
94
  required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
95
  requirements:
106
- - - ! '>='
96
+ - - '>='
107
97
  - !ruby/object:Gem::Version
108
98
  version: '0'
109
99
  requirements: []
110
100
  rubyforge_project:
111
- rubygems_version: 1.8.23
101
+ rubygems_version: 2.0.2
112
102
  signing_key:
113
- specification_version: 3
103
+ specification_version: 4
114
104
  summary: Requires Heroku OAuth on all requests.
115
105
  test_files:
116
106
  - Gemfile