g5_authentication_client 1.0.0.pre.3 → 1.0.0.pre.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/g5_authentication_client.gemspec +2 -1
- data/lib/g5_authentication_client/version.rb +1 -1
- data/spec/g5_authentication_client/token_info_spec.rb +22 -44
- data/spec/spec_helper.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f63830e0a413ad2568d96946060f0805217c030f
|
4
|
+
data.tar.gz: c0453914c7cc5ddadd56ed4d622100f4de1c720a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd129390f52e35534adc9cb138d056d2911122007b006fc3b330be11fcb847a7824ad2b5b861ef88b9c85464327a1d9c700533ac9b92527c05db12caac7e87d
|
7
|
+
data.tar.gz: 1c37769247c3b08caa8d477904bcc3d42f59723d528f351a626f2e2c83b433dbe0a993407bad868fb39b30e39713220a9e5d1c53b8c71df79057d6e56e87188b
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -19,13 +19,14 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.require_paths = ['lib']
|
21
21
|
|
22
|
-
s.add_dependency('modelish', '1.0.0.pre.
|
22
|
+
s.add_dependency('modelish', '1.0.0.pre.2')
|
23
23
|
s.add_dependency('configlet', '~> 2.1')
|
24
24
|
s.add_dependency('oauth2')
|
25
25
|
s.add_dependency('addressable')
|
26
26
|
|
27
27
|
s.add_development_dependency('rake')
|
28
28
|
s.add_development_dependency('rspec')
|
29
|
+
s.add_development_dependency('rspec-its')
|
29
30
|
s.add_development_dependency('webmock')
|
30
31
|
s.add_development_dependency('fakefs')
|
31
32
|
s.add_development_dependency('simplecov')
|
@@ -18,7 +18,7 @@ describe G5AuthenticationClient::TokenInfo do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
let(:resource_owner_id) { 42 }
|
21
|
-
let(:scopes) { [
|
21
|
+
let(:scopes) { %w[leads calls] }
|
22
22
|
let(:expires_in_seconds) { '3600' }
|
23
23
|
let(:application_uid) { 'application-uid-42' }
|
24
24
|
let(:created_at) { Time.now.to_i }
|
@@ -26,54 +26,32 @@ describe G5AuthenticationClient::TokenInfo do
|
|
26
26
|
context 'with default initialization' do
|
27
27
|
let(:attributes) {}
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
it 'should have nil expires_in_seconds' do
|
38
|
-
expect(token.expires_in_seconds).to be_nil
|
39
|
-
end
|
40
|
-
|
41
|
-
it 'should have nil application_uid' do
|
42
|
-
expect(token.application_uid).to be_nil
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'should have nil created_at' do
|
46
|
-
expect(token.created_at).to be_nil
|
47
|
-
end
|
48
|
-
|
49
|
-
it 'should not have extra_attribute' do
|
50
|
-
expect(token).to_not respond_to(:extra_attribute)
|
51
|
-
end
|
29
|
+
its(:resource_owner_id) { is_expected.to be_nil }
|
30
|
+
its(:scopes) { are_expected.to be_empty }
|
31
|
+
its(:expires_in_seconds) { is_expected.to be_nil }
|
32
|
+
its(:application_uid) { is_expected.to be_nil }
|
33
|
+
its(:created_at) { is_expected.to be_nil }
|
34
|
+
it { is_expected.to_not respond_to(:extra_attributes) }
|
52
35
|
end
|
53
36
|
|
54
37
|
context 'with full initialization' do
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
it 'should have expires_in_seconds' do
|
64
|
-
expect(token.expires_in_seconds).to eq(expires_in_seconds.to_i)
|
65
|
-
end
|
66
|
-
|
67
|
-
it 'should have application_uid' do
|
68
|
-
expect(token.application_uid).to eq(application_uid)
|
69
|
-
end
|
38
|
+
its(:resource_owner_id) { is_expected.to eq(resource_owner_id.to_s) }
|
39
|
+
its(:scopes) { are_expected.to eq(scopes) }
|
40
|
+
its(:expires_in_seconds) { is_expected.to eq(expires_in_seconds.to_i) }
|
41
|
+
its(:application_uid) { is_expected.to eq(application_uid) }
|
42
|
+
its(:created_at) { is_expected.to eq(Time.at(created_at)) }
|
43
|
+
it { is_expected.to_not respond_to(:extra_attribute) }
|
44
|
+
end
|
70
45
|
|
71
|
-
|
72
|
-
|
46
|
+
context 'with string key initialization' do
|
47
|
+
let(:attributes) do
|
48
|
+
{
|
49
|
+
'resource_owner_id' => resource_owner_id,
|
50
|
+
'application_uid' => application_uid
|
51
|
+
}
|
73
52
|
end
|
74
53
|
|
75
|
-
|
76
|
-
|
77
|
-
end
|
54
|
+
its(:resource_owner_id) { is_expected.to eq(resource_owner_id.to_s) }
|
55
|
+
its(:application_uid) { is_expected.to eq(application_uid) }
|
78
56
|
end
|
79
57
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: g5_authentication_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.
|
4
|
+
version: 1.0.0.pre.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Revels
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-06-
|
12
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: modelish
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.0.0.pre.
|
20
|
+
version: 1.0.0.pre.2
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.0.0.pre.
|
27
|
+
version: 1.0.0.pre.2
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: configlet
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,6 +95,20 @@ dependencies:
|
|
95
95
|
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: rspec-its
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: webmock
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|