passaporteweb-client 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- passaporteweb-client (0.0.16)
4
+ passaporteweb-client (0.0.17)
5
5
  multi_json (~> 1.7.1)
6
6
  rest-client (~> 1.6.7)
7
7
 
@@ -19,8 +19,8 @@ module PassaporteWeb
19
19
  # API method: <tt>GET /organizations/api/identities/:uuid/accounts/</tt>
20
20
  #
21
21
  # API documentation: https://app.passaporteweb.com.br/static/docs/account_manager.html#get-organizations-api-identities-uuid-accounts
22
- def self.find_all(identity, include_expired_accounts=false, role=nil)
23
- params = {include_expired_accounts: include_expired_accounts}
22
+ def self.find_all(identity, include_expired_accounts=false, role=nil, include_other_services=false)
23
+ params = {include_expired_accounts: include_expired_accounts, include_other_services: include_other_services}
24
24
  params[:role] = role unless (role.nil? || role.to_s.empty?)
25
25
  response = Http.get("/organizations/api/identities/#{identity.uuid}/accounts/", params)
26
26
  raw_accounts = MultiJson.decode(response.body)
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module PassaporteWeb
3
- VERSION = "0.0.16"
3
+ VERSION = "0.0.17"
4
4
  end
@@ -45,7 +45,7 @@ describe PassaporteWeb::IdentityServiceAccount do
45
45
  accounts.map { |a| a.instance_of?(described_class) }.uniq.should == [true]
46
46
  accounts.map { |a| a.persisted? }.uniq.should == [true]
47
47
 
48
- account = accounts.first
48
+ account = accounts[4]
49
49
  account.errors.should be_empty
50
50
  account.identity.should == identity
51
51
  account.membership_details_url.should == '/organizations/api/accounts/859d3542-84d6-4909-b1bd-4f43c1312065/members/5e32f927-c4ab-404e-a91c-b2abc05afb56/'
@@ -61,8 +61,8 @@ describe PassaporteWeb::IdentityServiceAccount do
61
61
  end
62
62
  it "should include expired service accounts if asked to" do
63
63
  accounts = described_class.find_all(identity, true)
64
- accounts.size.should == 10
65
- accounts.map { |a| a.expiration }.uniq.should == ["2014-05-01 00:00:00", nil, "2013-04-02 00:00:00"]
64
+ accounts.size.should == 12
65
+ accounts.map { |a| a.expiration }.uniq.should == [nil, "2013-04-02 00:00:00", "2014-05-01 00:00:00", "2013-04-18 00:00:00"]
66
66
  end
67
67
  it "should find only service accounts in which the identity has the supplied role" do
68
68
  role = 'foo,bar'
@@ -70,6 +70,11 @@ describe PassaporteWeb::IdentityServiceAccount do
70
70
  accounts.size.should == 1
71
71
  accounts.map { |a| a.roles.include?(role) }.uniq.should == [true]
72
72
  end
73
+ it "should include other services is asked to" do
74
+ accounts = described_class.find_all(identity, false, nil, true)
75
+ accounts.size.should == 9
76
+ accounts.map { |a| a.expiration }.uniq.should == [nil, "2014-05-01 00:00:00"]
77
+ end
73
78
  end
74
79
 
75
80
  describe "#save", vcr: true do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: passaporteweb-client
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.16
5
+ version: 0.0.17
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rodrigo Tassinari de Oliveira
@@ -10,215 +10,215 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-06-10 00:00:00.000000000 Z
13
+ date: 2013-08-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
17
- version_requirements: !ruby/object:Gem::Requirement
18
- none: false
17
+ type: :runtime
18
+ requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.6.7
23
- requirement: !ruby/object:Gem::Requirement
24
23
  none: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  version: 1.6.7
29
- type: :runtime
29
+ none: false
30
30
  prerelease: false
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: multi_json
33
- version_requirements: !ruby/object:Gem::Requirement
34
- none: false
33
+ type: :runtime
34
+ requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
36
  - - ~>
37
37
  - !ruby/object:Gem::Version
38
38
  version: 1.7.1
39
- requirement: !ruby/object:Gem::Requirement
40
39
  none: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
44
  version: 1.7.1
45
- type: :runtime
45
+ none: false
46
46
  prerelease: false
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- version_requirements: !ruby/object:Gem::Requirement
50
- none: false
49
+ type: :development
50
+ requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.3.2
55
- requirement: !ruby/object:Gem::Requirement
56
55
  none: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ~>
59
59
  - !ruby/object:Gem::Version
60
60
  version: 1.3.2
61
- type: :development
61
+ none: false
62
62
  prerelease: false
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: rake
65
- version_requirements: !ruby/object:Gem::Requirement
66
- none: false
65
+ type: :development
66
+ requirement: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ~>
69
69
  - !ruby/object:Gem::Version
70
70
  version: '10.0'
71
- requirement: !ruby/object:Gem::Requirement
72
71
  none: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
76
  version: '10.0'
77
- type: :development
77
+ none: false
78
78
  prerelease: false
79
79
  - !ruby/object:Gem::Dependency
80
80
  name: rdoc
81
- version_requirements: !ruby/object:Gem::Requirement
82
- none: false
81
+ type: :development
82
+ requirement: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - ~>
85
85
  - !ruby/object:Gem::Version
86
86
  version: '4.0'
87
- requirement: !ruby/object:Gem::Requirement
88
87
  none: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
89
  requirements:
90
90
  - - ~>
91
91
  - !ruby/object:Gem::Version
92
92
  version: '4.0'
93
- type: :development
93
+ none: false
94
94
  prerelease: false
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: rspec
97
- version_requirements: !ruby/object:Gem::Requirement
98
- none: false
97
+ type: :development
98
+ requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ~>
101
101
  - !ruby/object:Gem::Version
102
102
  version: '2.13'
103
- requirement: !ruby/object:Gem::Requirement
104
103
  none: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - ~>
107
107
  - !ruby/object:Gem::Version
108
108
  version: '2.13'
109
- type: :development
109
+ none: false
110
110
  prerelease: false
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: vcr
113
- version_requirements: !ruby/object:Gem::Requirement
114
- none: false
113
+ type: :development
114
+ requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ~>
117
117
  - !ruby/object:Gem::Version
118
118
  version: '2.4'
119
- requirement: !ruby/object:Gem::Requirement
120
119
  none: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: '2.4'
125
- type: :development
125
+ none: false
126
126
  prerelease: false
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: webmock
129
- version_requirements: !ruby/object:Gem::Requirement
130
- none: false
129
+ type: :development
130
+ requirement: !ruby/object:Gem::Requirement
131
131
  requirements:
132
132
  - - ~>
133
133
  - !ruby/object:Gem::Version
134
134
  version: 1.9.3
135
- requirement: !ruby/object:Gem::Requirement
136
135
  none: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ~>
139
139
  - !ruby/object:Gem::Version
140
140
  version: 1.9.3
141
- type: :development
141
+ none: false
142
142
  prerelease: false
143
143
  - !ruby/object:Gem::Dependency
144
144
  name: pry
145
- version_requirements: !ruby/object:Gem::Requirement
146
- none: false
145
+ type: :development
146
+ requirement: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - ~>
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0.9'
151
- requirement: !ruby/object:Gem::Requirement
152
151
  none: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - ~>
155
155
  - !ruby/object:Gem::Version
156
156
  version: '0.9'
157
- type: :development
157
+ none: false
158
158
  prerelease: false
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: pry-nav
161
- version_requirements: !ruby/object:Gem::Requirement
162
- none: false
161
+ type: :development
162
+ requirement: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ~>
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.2'
167
- requirement: !ruby/object:Gem::Requirement
168
167
  none: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - ~>
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0.2'
173
- type: :development
173
+ none: false
174
174
  prerelease: false
175
175
  - !ruby/object:Gem::Dependency
176
176
  name: awesome_print
177
- version_requirements: !ruby/object:Gem::Requirement
178
- none: false
177
+ type: :development
178
+ requirement: !ruby/object:Gem::Requirement
179
179
  requirements:
180
180
  - - ~>
181
181
  - !ruby/object:Gem::Version
182
182
  version: '1.1'
183
- requirement: !ruby/object:Gem::Requirement
184
183
  none: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
185
  requirements:
186
186
  - - ~>
187
187
  - !ruby/object:Gem::Version
188
188
  version: '1.1'
189
- type: :development
189
+ none: false
190
190
  prerelease: false
191
191
  - !ruby/object:Gem::Dependency
192
192
  name: simplecov
193
- version_requirements: !ruby/object:Gem::Requirement
194
- none: false
193
+ type: :development
194
+ requirement: !ruby/object:Gem::Requirement
195
195
  requirements:
196
196
  - - ~>
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0.7'
199
- requirement: !ruby/object:Gem::Requirement
200
199
  none: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
201
  requirements:
202
202
  - - ~>
203
203
  - !ruby/object:Gem::Version
204
204
  version: '0.7'
205
- type: :development
205
+ none: false
206
206
  prerelease: false
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: coveralls
209
- version_requirements: !ruby/object:Gem::Requirement
210
- none: false
209
+ type: :development
210
+ requirement: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - ~>
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0.6'
215
- requirement: !ruby/object:Gem::Requirement
216
215
  none: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
217
  requirements:
218
218
  - - ~>
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0.6'
221
- type: :development
221
+ none: false
222
222
  prerelease: false
223
223
  description: A Ruby client for the PassaporteWeb REST API
224
224
  email:
@@ -271,17 +271,23 @@ rdoc_options: []
271
271
  require_paths:
272
272
  - lib
273
273
  required_ruby_version: !ruby/object:Gem::Requirement
274
- none: false
275
274
  requirements:
276
275
  - - ! '>='
277
276
  - !ruby/object:Gem::Version
277
+ segments:
278
+ - 0
279
+ hash: -770214906384818753
278
280
  version: '0'
279
- required_rubygems_version: !ruby/object:Gem::Requirement
280
281
  none: false
282
+ required_rubygems_version: !ruby/object:Gem::Requirement
281
283
  requirements:
282
284
  - - ! '>='
283
285
  - !ruby/object:Gem::Version
286
+ segments:
287
+ - 0
288
+ hash: -770214906384818753
284
289
  version: '0'
290
+ none: false
285
291
  requirements: []
286
292
  rubyforge_project:
287
293
  rubygems_version: 1.8.25
@@ -300,4 +306,3 @@ test_files:
300
306
  - spec/passaporte_web/service_account_spec.rb
301
307
  - spec/passaporte_web_spec.rb
302
308
  - spec/spec_helper.rb
303
- has_rdoc: true