passaporteweb-client 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/passaporte_web/identity.rb +1 -1
- data/lib/passaporte_web/identity_service.rb +1 -1
- data/lib/passaporte_web/identity_service_account.rb +1 -1
- data/lib/passaporte_web/service_account_member.rb +1 -1
- data/lib/passaporte_web/version.rb +1 -1
- data/spec/passaporte_web/identity_spec.rb +1 -1
- metadata +57 -62
data/Gemfile.lock
CHANGED
@@ -172,7 +172,7 @@ module PassaporteWeb
|
|
172
172
|
def save
|
173
173
|
# TODO validar atributos?
|
174
174
|
response = (persisted? ? update : create)
|
175
|
-
raise "unexpected response: #{response.code} - #{response.body}" unless response.code
|
175
|
+
raise "unexpected response: #{response.code} - #{response.body}" unless [200,201].include?(response.code)
|
176
176
|
attributes_hash = MultiJson.decode(response.body)
|
177
177
|
set_attributes(attributes_hash)
|
178
178
|
@persisted = true
|
@@ -39,7 +39,7 @@ module PassaporteWeb
|
|
39
39
|
def save
|
40
40
|
# TODO validar atributos?
|
41
41
|
response = Http.put("/accounts/api/service-info/#{identity.uuid}/#{slug}/", save_body)
|
42
|
-
raise "unexpected response: #{response.code} - #{response.body}" unless
|
42
|
+
raise "unexpected response: #{response.code} - #{response.body}" unless response.code == 200
|
43
43
|
attributes_hash = MultiJson.decode(response.body)
|
44
44
|
set_attributes(attributes_hash)
|
45
45
|
@errors = {}
|
@@ -57,7 +57,7 @@ module PassaporteWeb
|
|
57
57
|
def save
|
58
58
|
# TODO validar atributos?
|
59
59
|
response = Http.post("/organizations/api/identities/#{self.identity.uuid}/accounts/", create_body)
|
60
|
-
raise "unexpected response: #{response.code} - #{response.body}" unless response.code
|
60
|
+
raise "unexpected response: #{response.code} - #{response.body}" unless [200,201].include?(response.code)
|
61
61
|
attributes_hash = MultiJson.decode(response.body)
|
62
62
|
set_attributes(attributes_hash)
|
63
63
|
@persisted = true
|
@@ -103,7 +103,7 @@ module PassaporteWeb
|
|
103
103
|
"/organizations/api/accounts/#{self.service_account.uuid}/members/",
|
104
104
|
{identity: self.identity.uuid, roles: self.roles}
|
105
105
|
)
|
106
|
-
raise "unexpected response: #{response.code} - #{response.body}" unless response.code
|
106
|
+
raise "unexpected response: #{response.code} - #{response.body}" unless [200,201].include?(response.code)
|
107
107
|
attributes_hash = MultiJson.decode(response.body)
|
108
108
|
@membership_details_url = attributes_hash['membership_details_url']
|
109
109
|
@errors = {}
|
@@ -298,7 +298,7 @@ describe PassaporteWeb::Identity do
|
|
298
298
|
send_myfreecomm_news: true
|
299
299
|
}
|
300
300
|
identity = described_class.new(attributes)
|
301
|
-
mock_response = mock('response', code:
|
301
|
+
mock_response = mock('response', code: 201, body: MultiJson.encode(attributes))
|
302
302
|
PassaporteWeb::Http.should_receive(:post).with("/accounts/api/create/", attributes).and_return(mock_response)
|
303
303
|
identity.save.should be_true
|
304
304
|
end
|
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.
|
5
|
+
version: 0.0.18
|
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-
|
13
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
17
|
-
|
18
|
-
|
17
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.6.7
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
23
24
|
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
|
-
|
29
|
+
type: :runtime
|
30
30
|
prerelease: false
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: multi_json
|
33
|
-
|
34
|
-
|
33
|
+
version_requirements: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
35
|
requirements:
|
36
36
|
- - ~>
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: 1.7.1
|
39
|
+
requirement: !ruby/object:Gem::Requirement
|
39
40
|
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
|
-
|
45
|
+
type: :runtime
|
46
46
|
prerelease: false
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
|
50
|
-
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.3.2
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
55
56
|
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
|
-
|
61
|
+
type: :development
|
62
62
|
prerelease: false
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: rake
|
65
|
-
|
66
|
-
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
67
|
requirements:
|
68
68
|
- - ~>
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '10.0'
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
71
72
|
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
|
-
|
77
|
+
type: :development
|
78
78
|
prerelease: false
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: rdoc
|
81
|
-
|
82
|
-
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
83
|
requirements:
|
84
84
|
- - ~>
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '4.0'
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
87
88
|
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
|
-
|
93
|
+
type: :development
|
94
94
|
prerelease: false
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: rspec
|
97
|
-
|
98
|
-
|
97
|
+
version_requirements: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
99
|
requirements:
|
100
100
|
- - ~>
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '2.13'
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
103
104
|
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
|
-
|
109
|
+
type: :development
|
110
110
|
prerelease: false
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: vcr
|
113
|
-
|
114
|
-
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
115
|
requirements:
|
116
116
|
- - ~>
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '2.4'
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
119
120
|
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
|
-
|
125
|
+
type: :development
|
126
126
|
prerelease: false
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: webmock
|
129
|
-
|
130
|
-
|
129
|
+
version_requirements: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
131
|
requirements:
|
132
132
|
- - ~>
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: 1.9.3
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
135
136
|
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
|
-
|
141
|
+
type: :development
|
142
142
|
prerelease: false
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: pry
|
145
|
-
|
146
|
-
|
145
|
+
version_requirements: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
147
|
requirements:
|
148
148
|
- - ~>
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0.9'
|
151
|
+
requirement: !ruby/object:Gem::Requirement
|
151
152
|
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
|
-
|
157
|
+
type: :development
|
158
158
|
prerelease: false
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: pry-nav
|
161
|
-
|
162
|
-
|
161
|
+
version_requirements: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
163
|
requirements:
|
164
164
|
- - ~>
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0.2'
|
167
|
+
requirement: !ruby/object:Gem::Requirement
|
167
168
|
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
|
-
|
173
|
+
type: :development
|
174
174
|
prerelease: false
|
175
175
|
- !ruby/object:Gem::Dependency
|
176
176
|
name: awesome_print
|
177
|
-
|
178
|
-
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
178
|
+
none: false
|
179
179
|
requirements:
|
180
180
|
- - ~>
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '1.1'
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
183
184
|
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
|
-
|
189
|
+
type: :development
|
190
190
|
prerelease: false
|
191
191
|
- !ruby/object:Gem::Dependency
|
192
192
|
name: simplecov
|
193
|
-
|
194
|
-
|
193
|
+
version_requirements: !ruby/object:Gem::Requirement
|
194
|
+
none: false
|
195
195
|
requirements:
|
196
196
|
- - ~>
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0.7'
|
199
|
+
requirement: !ruby/object:Gem::Requirement
|
199
200
|
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
|
-
|
205
|
+
type: :development
|
206
206
|
prerelease: false
|
207
207
|
- !ruby/object:Gem::Dependency
|
208
208
|
name: coveralls
|
209
|
-
|
210
|
-
|
209
|
+
version_requirements: !ruby/object:Gem::Requirement
|
210
|
+
none: false
|
211
211
|
requirements:
|
212
212
|
- - ~>
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: '0.6'
|
215
|
+
requirement: !ruby/object:Gem::Requirement
|
215
216
|
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
|
-
|
221
|
+
type: :development
|
222
222
|
prerelease: false
|
223
223
|
description: A Ruby client for the PassaporteWeb REST API
|
224
224
|
email:
|
@@ -271,23 +271,17 @@ rdoc_options: []
|
|
271
271
|
require_paths:
|
272
272
|
- lib
|
273
273
|
required_ruby_version: !ruby/object:Gem::Requirement
|
274
|
+
none: false
|
274
275
|
requirements:
|
275
276
|
- - ! '>='
|
276
277
|
- !ruby/object:Gem::Version
|
277
|
-
segments:
|
278
|
-
- 0
|
279
|
-
hash: -770214906384818753
|
280
278
|
version: '0'
|
281
|
-
none: false
|
282
279
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
|
+
none: false
|
283
281
|
requirements:
|
284
282
|
- - ! '>='
|
285
283
|
- !ruby/object:Gem::Version
|
286
|
-
segments:
|
287
|
-
- 0
|
288
|
-
hash: -770214906384818753
|
289
284
|
version: '0'
|
290
|
-
none: false
|
291
285
|
requirements: []
|
292
286
|
rubyforge_project:
|
293
287
|
rubygems_version: 1.8.25
|
@@ -306,3 +300,4 @@ test_files:
|
|
306
300
|
- spec/passaporte_web/service_account_spec.rb
|
307
301
|
- spec/passaporte_web_spec.rb
|
308
302
|
- spec/spec_helper.rb
|
303
|
+
has_rdoc: true
|