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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 938ba9c173fc6eeb66b24ac9a8067a9b62c3b1f2
|
4
|
+
data.tar.gz: 5fca624bd7079afc6e005974aeec2ff95f643264
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4a3a78023c2af7486f7d154c1b552c0932fbbfbb7a4641765806ecf6d9870dcee5b0253591d1f6f10e837e764c04de7ecedc85a49f7aacd09db84b1ba1f78ec
|
7
|
+
data.tar.gz: 8fd13cdd8e511204ff472343257246cf0fb1f0c80e37e7264fe274a9576a18e8c4330e498bc76dfb21b8bc77eec392063fe3c202acce908d1c2fc6d1cfa4d601
|
data/omniauth-tradegecko.gemspec
CHANGED
@@ -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', '~>
|
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
|
-
|
8
|
-
|
9
|
-
|
7
|
+
|
8
|
+
it :options do
|
9
|
+
expect(strategy.options.name).to eql :tradegecko
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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.
|
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.
|
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.
|
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-
|
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: '
|
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: '
|
54
|
+
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rack-test
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|