omniauth-tradegecko 0.1.1 → 0.1.2

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: 974507da3863359b2eb921ca51a426d37a918d14
4
- data.tar.gz: 94787d8b84fcc4a7ee443ea077ab76751fbd5ebb
3
+ metadata.gz: 938ba9c173fc6eeb66b24ac9a8067a9b62c3b1f2
4
+ data.tar.gz: 5fca624bd7079afc6e005974aeec2ff95f643264
5
5
  SHA512:
6
- metadata.gz: 738663c87d0da6f24b7b7ad0595cf9598beb485096e0312c753b742b2cb46576e22f873fb422a207805cc303af2784f1b6746582cb3de563a5366ca4577ba68e
7
- data.tar.gz: 33c70b17b5caa6981514bd0741059b3ad27d27b24cee1a7a3b91fa4702f1ac4928849f775d08f51cca07c16d54132d34788e0c0682a0394002309309243156a0
6
+ metadata.gz: f4a3a78023c2af7486f7d154c1b552c0932fbbfbb7a4641765806ecf6d9870dcee5b0253591d1f6f10e837e764c04de7ecedc85a49f7aacd09db84b1ba1f78ec
7
+ data.tar.gz: 8fd13cdd8e511204ff472343257246cf0fb1f0c80e37e7264fe274a9576a18e8c4330e498bc76dfb21b8bc77eec392063fe3c202acce908d1c2fc6d1cfa4d601
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module TradeGecko
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -14,6 +14,8 @@ module OmniAuth
14
14
 
15
15
  info do
16
16
  {
17
+ account_id: raw_info["account_id"],
18
+ login_id: raw_info["login_id"],
17
19
  email: raw_info["email"],
18
20
  first_name: raw_info["first_name"],
19
21
  last_name: raw_info["last_name"],
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
 
17
17
  gem.add_dependency 'omniauth', '~> 1.0'
18
18
  gem.add_dependency 'omniauth-oauth2', '~> 1.3.1'
19
- gem.add_development_dependency 'rspec', '~> 2.7'
19
+ gem.add_development_dependency 'rspec', '~> 3.0'
20
20
  gem.add_development_dependency 'rack-test'
21
21
  gem.add_development_dependency 'simplecov'
22
22
  gem.add_development_dependency 'webmock'
@@ -4,35 +4,40 @@ describe OmniAuth::Strategies::TradeGecko do
4
4
  let(:strategy) do
5
5
  OmniAuth::Strategies::TradeGecko.new({})
6
6
  end
7
- context :options do
8
- subject { strategy.options }
9
- its(:name) { should eql :tradegecko }
7
+
8
+ it :options do
9
+ expect(strategy.options.name).to eql :tradegecko
10
10
  end
11
11
 
12
- context :client_options do
13
- subject { strategy.options.client_options }
14
- its(:site) { should eql "https://api.tradegecko.com" }
15
- its(:authorize_path) { should eql "/oauth/authorize" }
12
+ it :client_options do
13
+ client_options = strategy.options.client_options
14
+ expect(client_options.site).to eql "https://api.tradegecko.com"
15
+ expect(client_options.authorize_path).to eql "/oauth/authorize"
16
16
  end
17
17
 
18
18
  context :raw_info do
19
19
  before do
20
- strategy.stub(:raw_info) do
20
+ allow(strategy).to receive(:raw_info) do
21
21
  {
22
22
  "first_name" => "Invader",
23
23
  "account_id" => 1,
24
24
  "last_name" => "Zim",
25
- "email" => "invaderzim@example.com"
25
+ "email" => "invaderzim@example.com",
26
+ "account_id" => 1,
27
+ "login_id" => 2
26
28
  }
27
29
  end
28
30
  end
31
+
29
32
  it "exposes user info" do
30
- strategy.info.should eql({
33
+ expect(strategy.info).to eql({
31
34
  first_name: "Invader",
32
35
  last_name: "Zim",
33
36
  email: "invaderzim@example.com",
34
- name: "Invader Zim"
37
+ name: "Invader Zim",
38
+ account_id: 1,
39
+ login_id: 2
35
40
  })
36
41
  end
37
42
  end
38
- end
43
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-tradegecko
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bradley Priest
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-28 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.7'
47
+ version: '3.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
- version: '2.7'
54
+ version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rack-test
57
57
  requirement: !ruby/object:Gem::Requirement