omniauth-artsy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -1
- data/lib/omniauth-artsy/version.rb +1 -1
- data/lib/omniauth/strategies/artsy.rb +1 -5
- data/spec/omniauth/strategies/artsy_spec.rb +12 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 540dc690902ed7180d4f606dcf69462182ba9bc5
|
4
|
+
data.tar.gz: ccac36edb12b78ae0b3c23ff7e9d25d4ecaad02c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcd9eb3fb3bbc98d42b4886ea6beef07826b85f41033199334555e9d7e07f283215843edb039aec9b8186a2327369c4a89299485b8103634d2d3e86318fe1a53
|
7
|
+
data.tar.gz: ba69be9b3ac5993bf47234ba6bd8736e0a45348fb84de68990bfa2bb1948447b427e877f04acdfea6d6337071f5f9523e73822f0902bef8f6a206723a10df9a5
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -21,11 +21,7 @@ module OmniAuth
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def raw_info
|
24
|
-
|
25
|
-
# but it looks like the AccessToken's get request isn't sending it over
|
26
|
-
# as specified in the oauth gem's documentation.
|
27
|
-
# @raw_info ||= access_token.get('/api/v1/me',{ "X-ACCESS-TOKEN" => access_token.token }).parsed
|
28
|
-
@raw_info ||= access_token.get('/api/v1/me?access_token=' + access_token.token).parsed
|
24
|
+
@raw_info ||= access_token.get('/api/v1/me', headers: { 'X-ACCESS-TOKEN' => access_token.token }).parsed
|
29
25
|
end
|
30
26
|
end
|
31
27
|
end
|
@@ -11,6 +11,8 @@ describe OmniAuth::Strategies::Artsy do
|
|
11
11
|
@uid = 'asdfasdfadsfcdad'
|
12
12
|
@name = 'Bobert Smithson'
|
13
13
|
@email = 'email@spiraljeezey.com'
|
14
|
+
|
15
|
+
@raw_info_hash = { 'id' => @uid, 'name' => @name, 'email' => @email }
|
14
16
|
end
|
15
17
|
|
16
18
|
subject do
|
@@ -33,9 +35,18 @@ describe OmniAuth::Strategies::Artsy do
|
|
33
35
|
end
|
34
36
|
end
|
35
37
|
|
38
|
+
it 'fetches raw_info' do
|
39
|
+
access_token = instance_double(OAuth2::AccessToken, token: 'secret')
|
40
|
+
allow(subject).to receive(:access_token).and_return(access_token)
|
41
|
+
|
42
|
+
response = instance_double(OAuth2::Response, parsed: @raw_info_hash)
|
43
|
+
expect(access_token).to receive(:get).with('/api/v1/me', headers: { 'X-ACCESS-TOKEN' => 'secret' }).and_return(response)
|
44
|
+
|
45
|
+
expect(subject.raw_info).to eq(@raw_info_hash)
|
46
|
+
end
|
47
|
+
|
36
48
|
describe 'with raw_info' do
|
37
49
|
before :each do
|
38
|
-
@raw_info_hash = { 'id' => @uid, 'name' => @name, 'email' => @email }
|
39
50
|
allow(subject).to receive(:raw_info) { @raw_info_hash }
|
40
51
|
end
|
41
52
|
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-artsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Fareed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.0.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.0.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: webmock
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -87,11 +87,11 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- .gitignore
|
91
|
-
- .rspec
|
92
|
-
- .rubocop.yml
|
93
|
-
- .rubocop_todo.yml
|
94
|
-
- .travis.yml
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".rubocop.yml"
|
93
|
+
- ".rubocop_todo.yml"
|
94
|
+
- ".travis.yml"
|
95
95
|
- CHANGELOG.md
|
96
96
|
- Gemfile
|
97
97
|
- LICENSE
|
@@ -113,17 +113,17 @@ require_paths:
|
|
113
113
|
- lib
|
114
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- -
|
121
|
+
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.4.8
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Omniauth plugin for Artsy authentication.
|