artirix_data_models 1.0.0.beta8 → 1.0.0.beta9

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
- SHA1:
3
- metadata.gz: fa6ee7f791b64b681b98229190120f8ba464a0f1
4
- data.tar.gz: 88831d196f2b2c278cedfae4f5e3dd3ca71230e6
2
+ SHA256:
3
+ metadata.gz: 51cf2ac011d50d6b250b70122edc4b984f34a847944d32d73e48eee6c33c18bb
4
+ data.tar.gz: fb96c3a2f40a95c36f662e420e93c2b82ec7ea070b563d65f0cb8879e039a6b3
5
5
  SHA512:
6
- metadata.gz: e9ff61cc1ed744df94441200b85fd1ecc6213ab5f25c0d94bbdc0de7d151a2bc33f6a3241448e801c501d993d9333abe9ab28db7b411589f900a122f0d90ba48
7
- data.tar.gz: 61d8998bdc314ce0e3bdbe94f80826858b4b8d80500f3af51fb8ef5bebe6375e99510e76ba5b16a9e5f2d1c3abb59a3e61c05247dc9502b1f43f56e1c74ba112
6
+ metadata.gz: 995f907438ed91d9b590c2f7e43a022182ff001f7037d7de1d7703615dcab9258d5b39496b8eaa7d1dd3fdd275ceb334f5f0e188d28fc8599067673ad1b211f6
7
+ data.tar.gz: 8783adac248a275f2666adc44c171931ae07256881c565a52697b4959ae422c03ca770b8321397bc3ee192416b5d3c574fb1cff171fbeb3e159aa69b75ebe1b3
data/Gemfile CHANGED
@@ -16,5 +16,4 @@ group :test do
16
16
  gem 'fakeredis', require: 'fakeredis/rspec'
17
17
  end
18
18
 
19
- gem 'codeclimate-test-reporter', group: :test, require: nil
20
- gem 'simplecov'
19
+ gem 'simplecov', require: false, group: :test
data/README.md CHANGED
@@ -320,7 +320,15 @@ end
320
320
 
321
321
  ## Changes
322
322
 
323
- ### 1.0.0.beta8(YANKED)
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
- fake: nil,
177
- response_adaptor: nil,
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
- timeout: nil,
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
- response_adaptor: response_adaptor,
192
- json_parse_response: json_parse_response,
195
+ authorization_bearer: authorization_bearer,
196
+ authorization_token_hash: authorization_token_hash,
193
197
  body: body,
194
- timeout: timeout,
198
+ cache_adaptor: cache_adaptor,
195
199
  fake: fake,
196
200
  fake_response: fake_response,
197
- cache_adaptor: cache_adaptor,
198
- headers: headers
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
- fake: nil,
204
- response_adaptor: nil,
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
- timeout: nil,
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
- response_adaptor: response_adaptor,
219
- json_parse_response: json_parse_response,
229
+ authorization_bearer: authorization_bearer,
230
+ authorization_token_hash: authorization_token_hash,
220
231
  body: body,
221
- timeout: timeout,
232
+ cache_adaptor: cache_adaptor,
222
233
  fake: fake,
223
234
  fake_response: fake_response,
224
- cache_adaptor: cache_adaptor,
225
- headers: headers
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
- fake: nil,
230
- response_adaptor: nil,
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
- timeout: nil,
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
- response_adaptor: response_adaptor,
245
- json_parse_response: json_parse_response,
261
+ authorization_bearer: authorization_bearer,
262
+ authorization_token_hash: authorization_token_hash,
246
263
  body: body,
247
- timeout: timeout,
264
+ cache_adaptor: cache_adaptor,
248
265
  fake: fake,
249
266
  fake_response: fake_response,
250
- cache_adaptor: cache_adaptor,
251
- headers: headers
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
- fake: nil,
256
- response_adaptor: nil,
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
- timeout: nil,
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
- response_adaptor: response_adaptor,
271
- json_parse_response: json_parse_response,
294
+ authorization_bearer: authorization_bearer,
295
+ authorization_token_hash: authorization_token_hash,
272
296
  body: body,
273
- timeout: timeout,
297
+ cache_adaptor: cache_adaptor,
274
298
  fake: fake,
275
299
  fake_response: fake_response,
276
- cache_adaptor: cache_adaptor,
277
- headers: headers
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
- fake: nil,
282
- response_adaptor: nil,
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
- timeout: nil,
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
- response_adaptor: response_adaptor,
297
- json_parse_response: json_parse_response,
326
+ authorization_bearer: authorization_bearer,
327
+ authorization_token_hash: authorization_token_hash,
298
328
  body: body,
299
- timeout: timeout,
329
+ cache_adaptor: cache_adaptor,
300
330
  fake: fake,
301
331
  fake_response: fake_response,
302
- cache_adaptor: cache_adaptor,
303
- headers: headers
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
- json_body: true,
45
- response_adaptor: nil,
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
@@ -1,3 +1,3 @@
1
1
  module ArtirixDataModels
2
- VERSION = '1.0.0.beta8'
2
+ VERSION = '1.0.0.beta9'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,10 @@ require 'bundler/setup'
3
3
  Bundler.setup
4
4
 
5
5
  require 'simplecov'
6
- SimpleCov.start
6
+ SimpleCov.start do
7
+ add_filter "/spec/"
8
+ add_filter "/lib/artirix_data_models/spec_support/"
9
+ end
7
10
 
8
11
  require 'rspec/given'
9
12
 
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.beta8
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-04-19 00:00:00.000000000 Z
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.13
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