heroku-bouncer 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/heroku/bouncer.rb +4 -2
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cccd59bdca895f2a5c650990ad7af07674bc848
4
- data.tar.gz: ec7eef13fe990bedf5b7e7814017b3417adabbfa
3
+ metadata.gz: db1251e6456728976191f19f21f0fd6c98c5678a
4
+ data.tar.gz: ec81a607376dc9bcbcf1e5f6faee52114e519856
5
5
  SHA512:
6
- metadata.gz: 5713722707b103a2e2ad4c2feca64e063144541a0d1b84bc6c3ebde6abb71b487c006b60ddb6080d6376c20a1fe6001d40afbf9dbf0f1533780814ca32dd5005
7
- data.tar.gz: 5b0ea6aa22b01793c762890bcf7862fcd442eb542769ea2fcd98dfcd272d6a67fd14d0da76669402a00eb45b689c1e06a76664509d7fa4a570f50ca2e0db0065
6
+ metadata.gz: c768c3efe4c28bc8f7732b0b81bfc4c07fc6c86875c114ef4573a0860ae3a5268d65f96fbf76a7b79935e3b5966b76ed2bd4cf6425f6b57914723c74ed46495e
7
+ data.tar.gz: fa1d52afd5552640d43d472f79cc5364ecf9f249dba27cdda3da6be343cf91d004fee92b7aa19db53ff51fcc5395451a891d3293bb63bab3a0db8b15e0bb0b69
@@ -61,7 +61,6 @@ class Heroku::Bouncer < Sinatra::Base
61
61
 
62
62
  # callback when successful, time to save data
63
63
  get '/auth/heroku/callback' do
64
- session[:user] = true
65
64
  token = request.env['omniauth.auth']['credentials']['token']
66
65
  if @expose_email || @expose_user || @herokai_only
67
66
  user = fetch_user(token)
@@ -69,9 +68,12 @@ class Heroku::Bouncer < Sinatra::Base
69
68
  url = @herokai_only.is_a?(String) ? @herokai_only : 'https://www.heroku.com'
70
69
  redirect to(url) and return
71
70
  end
72
- store(:user, user) if @expose_user
71
+ @expose_user ? store(:user, user) : store(:user, true)
73
72
  store(:email, user['email']) if @expose_email
73
+ else
74
+ store(:user, true)
74
75
  end
76
+
75
77
  store(:token, token) if @expose_token
76
78
  redirect to(session.delete(:return_to) || '/')
77
79
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-bouncer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Dance
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-16 00:00:00.000000000 Z
11
+ date: 2013-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-heroku
@@ -94,7 +94,8 @@ files:
94
94
  - Gemfile.lock
95
95
  - Rakefile
96
96
  homepage: https://github.com/heroku/heroku-bouncer
97
- licenses: []
97
+ licenses:
98
+ - MIT
98
99
  metadata: {}
99
100
  post_install_message:
100
101
  rdoc_options: []