g5_authentication_client 1.0.0.pre.3 → 1.0.0.pre.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: 30e4f50f10a065225639afee573172f134c21e6a
4
- data.tar.gz: 28fd23271b9c207e4a05e8ec72913518edbb20aa
3
+ metadata.gz: f63830e0a413ad2568d96946060f0805217c030f
4
+ data.tar.gz: c0453914c7cc5ddadd56ed4d622100f4de1c720a
5
5
  SHA512:
6
- metadata.gz: 512d1053ac0b327b00770f94b8907e6e2faab4680382fb5566794f9c76fde4ce4528c9206af1c8a5fe0df5b3550450be16b714f03026ea41a9cf95db3a78ce22
7
- data.tar.gz: 7aafa6b0695ce118f47d520f5de46831ef2539eeac556dde593cbf5101a60fae639b36dfc4f24d217711719326003e25a0461f95d3f6ef24e061e43f003bd99a
6
+ metadata.gz: cfd129390f52e35534adc9cb138d056d2911122007b006fc3b330be11fcb847a7824ad2b5b861ef88b9c85464327a1d9c700533ac9b92527c05db12caac7e87d
7
+ data.tar.gz: 1c37769247c3b08caa8d477904bcc3d42f59723d528f351a626f2e2c83b433dbe0a993407bad868fb39b30e39713220a9e5d1c53b8c71df79057d6e56e87188b
data/.travis.yml CHANGED
@@ -3,6 +3,10 @@ rvm:
3
3
  - 2.2.7
4
4
  - 2.3.4
5
5
  - 2.4.1
6
+ dist: trusty
7
+ sudo: false
8
+ cache:
9
+ bundler: true
6
10
  script:
7
11
  - bundle exec rspec spec
8
12
  after_script:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v1.0.0.pre.4 (2017-06-14)
2
+
3
+ * Bug fix: more modelish fixes
4
+
1
5
  ## v1.0.0.pre.3 (2017-06-10)
2
6
 
3
7
  * Bug fix: upgrade modelish to pick up fixes for hashie 3.x
data/README.md CHANGED
@@ -4,7 +4,7 @@ A client library for the g5-authentication service.
4
4
 
5
5
  ## Current version ##
6
6
 
7
- 1.0.0.pre.3
7
+ 1.0.0.pre.4
8
8
 
9
9
  ## Requirements ##
10
10
 
@@ -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.1')
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')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module G5AuthenticationClient
4
- VERSION = '1.0.0.pre.3'
4
+ VERSION = '1.0.0.pre.4'
5
5
  end
@@ -18,7 +18,7 @@ describe G5AuthenticationClient::TokenInfo do
18
18
  end
19
19
 
20
20
  let(:resource_owner_id) { 42 }
21
- let(:scopes) { ['leads','calls'] }
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
- it 'should have nil resource_owner_id' do
30
- expect(token.resource_owner_id).to be_nil
31
- end
32
-
33
- it 'should have nil scopes' do
34
- expect(token.scopes).to be_empty
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
- it 'should have resource_owner_id' do
56
- expect(token.resource_owner_id).to eq(resource_owner_id.to_s)
57
- end
58
-
59
- it 'should have scopes' do
60
- expect(token.scopes).to eq(scopes)
61
- end
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
- it 'should have created_at timestamp' do
72
- expect(token.created_at).to eq(Time.at(created_at))
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
- it 'should not have extra_attribute' do
76
- expect(token).to_not respond_to(:extra_attribute)
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
@@ -4,7 +4,7 @@ require 'simplecov'
4
4
  SimpleCov.start 'test_frameworks'
5
5
 
6
6
  require 'rspec'
7
-
7
+ require 'rspec/its'
8
8
  require 'webmock/rspec'
9
9
  require 'fakefs/spec_helpers'
10
10
 
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.3
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 00:00:00.000000000 Z
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.1
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.1
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