omniauth-tanmer 1.0.3 → 1.0.4

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: f96caf52e3f6edbb43727e8b7e2c68dfdca31de3
4
- data.tar.gz: aefc300dc05ddf971ac514937634d60d073c25d8
3
+ metadata.gz: 64de0273582add790e8fec1a2ba3f49707a7ea30
4
+ data.tar.gz: 596f1181c30179361e9bf086e39a8718b7229843
5
5
  SHA512:
6
- metadata.gz: 0454c3ba8c278c47f193f258718b22ecc7c1de43fd349628536fd89fb97951ba43a28d22d86e51bae50bf85b1f9a52b2cb0575c0dd13d9289ad7ea9bfe710f66
7
- data.tar.gz: c651a22566196ce15b08e3972886f7fcec047f81647106188c9b9e230a6321f94761e37f714534940fba55fab17468e72c5f68522d8a94fa383a7e96f16ed86c
6
+ metadata.gz: 06a34922c12807ce1fe9bbdb7cbd955d32a34e0a436a7be93a9a9af9de02272f8995ff15656aa3928fd324a3565f37447be75134b36baba0f41f57adc76cc58e
7
+ data.tar.gz: ec58268a74f950788b1ff297f47c03ba5979e452d12526dbb35d18a7382da0bf757c66c237bdc4997270ca34e458c47e2af437b6a4f4a1ad81596c4d56fad24c
data/Gemfile CHANGED
@@ -2,3 +2,9 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in omniauth-gitlab.gemspec
4
4
  gemspec
5
+
6
+ gem 'rspec', '~> 3.1'
7
+ gem 'rspec-its', '~> 1.0'
8
+ gem 'rack-test'
9
+ gem 'simplecov'
10
+ gem 'webmock'
data/README.md CHANGED
@@ -21,7 +21,7 @@ Or install it yourself as:
21
21
  ## Usage
22
22
 
23
23
  use OmniAuth::Builder do
24
- provider :tanmer, ENV['TANMER_KEY'], ENV['TANMER_SECRET']
24
+ provider :tanmer, ENV['TANMER_KEY'], ENV['TANMER_SECRET'], scope: 'tanmer_service'
25
25
  end
26
26
 
27
27
  ## Contributing
@@ -5,7 +5,7 @@ module OmniAuth
5
5
  class Tanmer < OmniAuth::Strategies::OAuth2
6
6
 
7
7
  option :client_options, {
8
- site: 'https://login.tanmer.com',
8
+ site: 'https://account.tanmer.com',
9
9
  authorize_url: '/oauth/authorize',
10
10
  token_url: '/oauth/token'
11
11
  }
@@ -27,7 +27,7 @@ module OmniAuth
27
27
  end
28
28
 
29
29
  def raw_info
30
- @raw_info ||= access_token.get('/api/v1/user').parsed
30
+ @raw_info ||= access_token.get('/api/v1/users/profile').parsed
31
31
  end
32
32
 
33
33
  private
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Tanmer
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
5
5
  end
@@ -19,9 +19,4 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_dependency 'omniauth', '~> 1.0'
21
21
  gem.add_dependency 'omniauth-oauth2', '~> 1.0'
22
- gem.add_development_dependency 'rspec', '~> 3.1'
23
- gem.add_development_dependency 'rspec-its', '~> 1.0'
24
- gem.add_development_dependency 'rack-test'
25
- gem.add_development_dependency 'simplecov'
26
- gem.add_development_dependency 'webmock'
27
22
  end
@@ -32,7 +32,7 @@ describe OmniAuth::Strategies::Tanmer do
32
32
  context 'with defaults' do
33
33
  subject { tanmer_service.options.client_options }
34
34
 
35
- its(:site) { is_expected.to eq 'https://login.tanmer.com' }
35
+ its(:site) { is_expected.to eq 'https://account.tanmer.com' }
36
36
  its(:authorize_url) { is_expected.to eq '/oauth/authorize' }
37
37
  its(:token_url) { is_expected.to eq '/oauth/token' }
38
38
  end
@@ -60,7 +60,7 @@ describe OmniAuth::Strategies::Tanmer do
60
60
 
61
61
  describe '#raw_info' do
62
62
  it 'sent request to current user endpoint' do
63
- expect(access_token).to receive(:get).with('/api/v1/user').and_return(response)
63
+ expect(access_token).to receive(:get).with('/api/v1/users/profile').and_return(response)
64
64
  expect(subject.raw_info).to eq(parsed_response)
65
65
  end
66
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-tanmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - xiaohui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-06 00:00:00.000000000 Z
11
+ date: 2017-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -38,76 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.1'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.1'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec-its
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rack-test
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: webmock
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
41
  description: This is the strategy for authenticating to your Tanmer service
112
42
  email:
113
43
  - xiaohui@tanmer.com