omniauth-applicaster 1.3.2 → 1.3.3

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: f704347222f07a39ad3eee27ac673a39a49088a5
4
- data.tar.gz: edccf6d47d1e11c850bfb08c2bf4e7a2c441ed16
3
+ metadata.gz: 28a4d1d112c3be8042347abdeb5854641c7c0bbd
4
+ data.tar.gz: 5862c3cf30313cbdf6f8866db6be8f8e34acbe93
5
5
  SHA512:
6
- metadata.gz: ee0f5f9776bb3e5f8569f17cf2b94c4516a0799bffa32aabf15cdd50c237ca79aa49bc9608efba55379d5b9133c73aa759e4d534160e69be402746f7a71fa79b
7
- data.tar.gz: e5825b4bb9ce32815f503f6d1f5e618dc2245a9595a510389ccbc207010f729ab5b4547bb4ca06eca4a9a9b88e2a83da3476d5044aadee57173d7e933ea79a00
6
+ metadata.gz: b5d12249370ea652c63238a3524f3287f751b25744a3137063d294c86408493139dfcafd81ba41d1f95ea59d61a4e3e796437550db7ba8c31831608c69d5e61d
7
+ data.tar.gz: 31d8eb9dec37665b13864f22fbbc90093c8db27acf068b4a13eac67682b50025a5b4cdf9ade6e00673b336fb5af5a2fc79fba7cad5f3f84ded1670638ceaf99e
@@ -16,7 +16,9 @@ module Applicaster
16
16
  end
17
17
 
18
18
  def current_access_token
19
- session[:omniauth_credentials][:token] if session[:omniauth_credentials]
19
+ if credentials = session[:omniauth_credentials]
20
+ credentials[:token] || credentials["token"]
21
+ end
20
22
  end
21
23
 
22
24
  protected
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Applicaster
3
- VERSION = "1.3.2"
3
+ VERSION = "1.3.3"
4
4
  end
5
5
  end
@@ -108,6 +108,20 @@ RSpec.describe Applicaster::AuthHelpers do
108
108
  {}
109
109
  end
110
110
  end
111
+
112
+ context "when hash in session has string keys" do
113
+ it "returns access token" do
114
+ expect(controller.current_access_token).to eq("access-token")
115
+ end
116
+
117
+ def session
118
+ {
119
+ omniauth_credentials: {
120
+ "token" => "access-token"
121
+ }
122
+ }
123
+ end
124
+ end
111
125
  end
112
126
 
113
127
  def session
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-applicaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neer Friedman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-27 00:00:00.000000000 Z
11
+ date: 2015-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler