artirix_data_models 1.0.0.beta8 → 1.0.0.beta9
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 +5 -5
- data/Gemfile +1 -2
- data/README.md +9 -1
- data/lib/artirix_data_models/daos/basic_model_dao.rb +88 -55
- data/lib/artirix_data_models/gateways/data_gateway.rb +6 -6
- data/lib/artirix_data_models/version.rb +1 -1
- data/spec/spec_helper.rb +4 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 51cf2ac011d50d6b250b70122edc4b984f34a847944d32d73e48eee6c33c18bb
|
4
|
+
data.tar.gz: fb96c3a2f40a95c36f662e420e93c2b82ec7ea070b563d65f0cb8879e039a6b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995f907438ed91d9b590c2f7e43a022182ff001f7037d7de1d7703615dcab9258d5b39496b8eaa7d1dd3fdd275ceb334f5f0e188d28fc8599067673ad1b211f6
|
7
|
+
data.tar.gz: 8783adac248a275f2666adc44c171931ae07256881c565a52697b4959ae422c03ca770b8321397bc3ee192416b5d3c574fb1cff171fbeb3e159aa69b75ebe1b3
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -320,7 +320,15 @@ end
|
|
320
320
|
|
321
321
|
## Changes
|
322
322
|
|
323
|
-
### 1.0.0.
|
323
|
+
### 1.0.0.beta9
|
324
|
+
|
325
|
+
- remove deprecated codeclimate gem
|
326
|
+
- allow for basic dao perform methods to pass extra options to gateway methods:
|
327
|
+
- `authorization_bearer`
|
328
|
+
- `authorization_token_hash`
|
329
|
+
- `json_body`
|
330
|
+
|
331
|
+
### 1.0.0.beta8
|
324
332
|
|
325
333
|
- allow non json responses in gateway `#perform`, by passing `json_parse_response: false`.
|
326
334
|
|
@@ -173,134 +173,167 @@ class ArtirixDataModels::BasicModelDAO
|
|
173
173
|
#################
|
174
174
|
|
175
175
|
def perform_get(path,
|
176
|
-
|
177
|
-
|
178
|
-
json_parse_response: true,
|
176
|
+
authorization_bearer: nil,
|
177
|
+
authorization_token_hash: nil,
|
179
178
|
body: nil,
|
180
|
-
fake_response: nil,
|
181
179
|
cache_adaptor: nil,
|
182
|
-
|
180
|
+
fake: nil,
|
181
|
+
fake_response: nil,
|
183
182
|
gateway: nil,
|
184
|
-
headers: nil
|
183
|
+
headers: nil,
|
184
|
+
json_body: true,
|
185
|
+
json_parse_response: true,
|
186
|
+
response_adaptor: nil,
|
187
|
+
timeout: nil
|
188
|
+
)
|
185
189
|
|
186
190
|
fake = fake.nil? ? fake? : fake
|
187
191
|
g = gateway.presence || preloaded_gateway
|
188
192
|
raise_no_gateway unless g.present?
|
189
193
|
|
190
194
|
g.get path,
|
191
|
-
|
192
|
-
|
195
|
+
authorization_bearer: authorization_bearer,
|
196
|
+
authorization_token_hash: authorization_token_hash,
|
193
197
|
body: body,
|
194
|
-
|
198
|
+
cache_adaptor: cache_adaptor,
|
195
199
|
fake: fake,
|
196
200
|
fake_response: fake_response,
|
197
|
-
|
198
|
-
|
201
|
+
headers: headers,
|
202
|
+
json_body: json_body,
|
203
|
+
json_parse_response: json_parse_response,
|
204
|
+
response_adaptor: response_adaptor,
|
205
|
+
timeout: timeout
|
199
206
|
end
|
200
207
|
|
201
208
|
|
202
209
|
def perform_post(path,
|
203
|
-
|
204
|
-
|
205
|
-
json_parse_response: true,
|
210
|
+
authorization_bearer: nil,
|
211
|
+
authorization_token_hash: nil,
|
206
212
|
body: nil,
|
207
|
-
fake_response: nil,
|
208
213
|
cache_adaptor: nil,
|
209
|
-
|
214
|
+
fake: nil,
|
215
|
+
fake_response: nil,
|
210
216
|
gateway: nil,
|
211
|
-
headers: nil
|
217
|
+
headers: nil,
|
218
|
+
json_body: true,
|
219
|
+
json_parse_response: true,
|
220
|
+
response_adaptor: nil,
|
221
|
+
timeout: nil
|
222
|
+
)
|
212
223
|
|
213
224
|
fake = fake.nil? ? fake? : fake
|
214
225
|
g = gateway.presence || preloaded_gateway
|
215
226
|
raise_no_gateway unless g.present?
|
216
227
|
|
217
228
|
g.post path,
|
218
|
-
|
219
|
-
|
229
|
+
authorization_bearer: authorization_bearer,
|
230
|
+
authorization_token_hash: authorization_token_hash,
|
220
231
|
body: body,
|
221
|
-
|
232
|
+
cache_adaptor: cache_adaptor,
|
222
233
|
fake: fake,
|
223
234
|
fake_response: fake_response,
|
224
|
-
|
225
|
-
|
235
|
+
headers: headers,
|
236
|
+
json_body: json_body,
|
237
|
+
json_parse_response: json_parse_response,
|
238
|
+
response_adaptor: response_adaptor,
|
239
|
+
timeout: timeout
|
226
240
|
end
|
227
241
|
|
228
242
|
def perform_put(path,
|
229
|
-
|
230
|
-
|
231
|
-
json_parse_response: true,
|
243
|
+
authorization_bearer: nil,
|
244
|
+
authorization_token_hash: nil,
|
232
245
|
body: nil,
|
233
|
-
fake_response: nil,
|
234
246
|
cache_adaptor: nil,
|
235
|
-
|
247
|
+
fake: nil,
|
248
|
+
fake_response: nil,
|
236
249
|
gateway: nil,
|
237
|
-
headers: nil
|
250
|
+
headers: nil,
|
251
|
+
json_body: true,
|
252
|
+
json_parse_response: true,
|
253
|
+
response_adaptor: nil,
|
254
|
+
timeout: nil)
|
238
255
|
|
239
256
|
fake = fake.nil? ? fake? : fake
|
240
257
|
g = gateway.presence || preloaded_gateway
|
241
258
|
raise_no_gateway unless g.present?
|
242
259
|
|
243
260
|
g.put path,
|
244
|
-
|
245
|
-
|
261
|
+
authorization_bearer: authorization_bearer,
|
262
|
+
authorization_token_hash: authorization_token_hash,
|
246
263
|
body: body,
|
247
|
-
|
264
|
+
cache_adaptor: cache_adaptor,
|
248
265
|
fake: fake,
|
249
266
|
fake_response: fake_response,
|
250
|
-
|
251
|
-
|
267
|
+
headers: headers,
|
268
|
+
json_body: json_body,
|
269
|
+
json_parse_response: json_parse_response,
|
270
|
+
response_adaptor: response_adaptor,
|
271
|
+
timeout: timeout
|
272
|
+
|
252
273
|
end
|
253
274
|
|
254
275
|
def perform_patch(path,
|
255
|
-
|
256
|
-
|
257
|
-
json_parse_response: true,
|
276
|
+
authorization_bearer: nil,
|
277
|
+
authorization_token_hash: nil,
|
258
278
|
body: nil,
|
259
|
-
fake_response: nil,
|
260
279
|
cache_adaptor: nil,
|
261
|
-
|
280
|
+
fake: nil,
|
281
|
+
fake_response: nil,
|
262
282
|
gateway: nil,
|
263
|
-
headers: nil
|
283
|
+
headers: nil,
|
284
|
+
json_body: true,
|
285
|
+
json_parse_response: true,
|
286
|
+
response_adaptor: nil,
|
287
|
+
timeout: nil)
|
264
288
|
|
265
289
|
fake = fake.nil? ? fake? : fake
|
266
290
|
g = gateway.presence || preloaded_gateway
|
267
291
|
raise_no_gateway unless g.present?
|
268
292
|
|
269
293
|
g.patch path,
|
270
|
-
|
271
|
-
|
294
|
+
authorization_bearer: authorization_bearer,
|
295
|
+
authorization_token_hash: authorization_token_hash,
|
272
296
|
body: body,
|
273
|
-
|
297
|
+
cache_adaptor: cache_adaptor,
|
274
298
|
fake: fake,
|
275
299
|
fake_response: fake_response,
|
276
|
-
|
277
|
-
|
300
|
+
headers: headers,
|
301
|
+
json_body: json_body,
|
302
|
+
json_parse_response: json_parse_response,
|
303
|
+
response_adaptor: response_adaptor,
|
304
|
+
timeout: timeout
|
278
305
|
end
|
279
306
|
|
280
307
|
def perform_delete(path,
|
281
|
-
|
282
|
-
|
283
|
-
json_parse_response: true,
|
308
|
+
authorization_bearer: nil,
|
309
|
+
authorization_token_hash: nil,
|
284
310
|
body: nil,
|
285
|
-
fake_response: nil,
|
286
311
|
cache_adaptor: nil,
|
287
|
-
|
312
|
+
fake: nil,
|
313
|
+
fake_response: nil,
|
288
314
|
gateway: nil,
|
289
|
-
headers: nil
|
315
|
+
headers: nil,
|
316
|
+
json_body: true,
|
317
|
+
json_parse_response: true,
|
318
|
+
response_adaptor: nil,
|
319
|
+
timeout: nil)
|
290
320
|
|
291
321
|
fake = fake.nil? ? fake? : fake
|
292
322
|
g = gateway.presence || preloaded_gateway
|
293
323
|
raise_no_gateway unless g.present?
|
294
324
|
|
295
325
|
g.delete path,
|
296
|
-
|
297
|
-
|
326
|
+
authorization_bearer: authorization_bearer,
|
327
|
+
authorization_token_hash: authorization_token_hash,
|
298
328
|
body: body,
|
299
|
-
|
329
|
+
cache_adaptor: cache_adaptor,
|
300
330
|
fake: fake,
|
301
331
|
fake_response: fake_response,
|
302
|
-
|
303
|
-
|
332
|
+
headers: headers,
|
333
|
+
json_body: json_body,
|
334
|
+
json_parse_response: json_parse_response,
|
335
|
+
response_adaptor: response_adaptor,
|
336
|
+
timeout: timeout
|
304
337
|
end
|
305
338
|
|
306
339
|
# old names
|
@@ -41,17 +41,17 @@ class ArtirixDataModels::DataGateway
|
|
41
41
|
|
42
42
|
def call(method,
|
43
43
|
path,
|
44
|
-
|
45
|
-
|
44
|
+
authorization_bearer: nil,
|
45
|
+
authorization_token_hash: nil,
|
46
46
|
body: nil,
|
47
|
+
cache_adaptor: nil,
|
47
48
|
fake: false,
|
48
49
|
fake_response: nil,
|
49
|
-
cache_adaptor: nil,
|
50
|
-
timeout: nil,
|
51
|
-
authorization_bearer: nil,
|
52
|
-
authorization_token_hash: nil,
|
53
50
|
headers: nil,
|
51
|
+
json_body: true,
|
54
52
|
json_parse_response: true,
|
53
|
+
response_adaptor: nil,
|
54
|
+
timeout: nil,
|
55
55
|
**_ignored_options)
|
56
56
|
|
57
57
|
if fake
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artirix_data_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Turiño
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
312
|
version: 1.3.1
|
313
313
|
requirements: []
|
314
314
|
rubyforge_project:
|
315
|
-
rubygems_version: 2.6
|
315
|
+
rubygems_version: 2.7.6
|
316
316
|
signing_key:
|
317
317
|
specification_version: 4
|
318
318
|
summary: Data Models (read only model) and Data Layer connection lib
|