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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23e2d18d331fd6f514ab1d46d66ed5f8fed99284
4
- data.tar.gz: 748de85ed89240318a648738cd05c58fb7daf86f
3
+ metadata.gz: 540dc690902ed7180d4f606dcf69462182ba9bc5
4
+ data.tar.gz: ccac36edb12b78ae0b3c23ff7e9d25d4ecaad02c
5
5
  SHA512:
6
- metadata.gz: e89dd42f92a7648dd67236dbd5b46f8aad0cfdd6559c5d3d73e9fd95373345966e6423d762e5e8ce6bb7bd839d7d33fca7e3f63146ba11e2b9bd4311a9bc829e
7
- data.tar.gz: 852b0c7dd36e633e0f7267671c5fdeb61554d0c1ef39751471f7e09445e901640931bd11377c1fb67ef81cbae06f9cb7b2fb5d0cfadb9f39800f7866e942473e
6
+ metadata.gz: fcd9eb3fb3bbc98d42b4886ea6beef07826b85f41033199334555e9d7e07f283215843edb039aec9b8186a2327369c4a89299485b8103634d2d3e86318fe1a53
7
+ data.tar.gz: ba69be9b3ac5993bf47234ba6bd8736e0a45348fb84de68990bfa2bb1948447b427e877f04acdfea6d6337071f5f9523e73822f0902bef8f6a206723a10df9a5
@@ -1,3 +1,8 @@
1
+ 0.1.1 (5/4/2016)
2
+ ================
3
+
4
+ * [#3](https://github.com/artsy/omniauth-artsy/pull/3): Set `X-ACCESS-TOKEN` header instead of URL - [@alloy](https://github.com/alloy).
5
+
1
6
  0.1.0 (8/25/2014)
2
7
  =================
3
8
 
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Artsy
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
@@ -21,11 +21,7 @@ module OmniAuth
21
21
  end
22
22
 
23
23
  def raw_info
24
- # TODO: we should send the access_token with the headers,
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.0
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: 2014-08-25 00:00:00.000000000 Z
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.1.11
126
+ rubygems_version: 2.4.8
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Omniauth plugin for Artsy authentication.