frodo 0.12.5 → 0.12.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be94d246c0478f5b6e1f7b8816a9b2558c8f4e71649d50ce9722ae33dc8496a1
4
- data.tar.gz: b09e077ea5a40039b571601c8c6a1e3576649dca6d81925c8df83a9842b35902
3
+ metadata.gz: 4ad72629909d379b037ab935b6f026d9735cfa8ea7f5e2aada9572c8a5dd7f14
4
+ data.tar.gz: 96b2ecab8606c359095a304e525cd65f380445a85a0b7f8f6f07ad966657021d
5
5
  SHA512:
6
- metadata.gz: be646abf7839a1e9a726725691cffab8d41de9fd317664295b5bde64387b6e1fd434faef311bc6c1754fbc6f123e833ba4e806c605d3240799e0b7bce56b5440
7
- data.tar.gz: adf218a868e0464583e32ebf1fc9b3e229e375ec89ec1344e2b4f7b4e05acc7716b9464dc17a28c392264934419a607320b46b037828faa20d3942805a06f27c
6
+ metadata.gz: ba428ab987ec05e1a04f35d09f3da82e30b05f782f5186c68e95b613d53a23cce06fa2f57e5815c0b09ffd065d33969213c1ce196250e81a520472c6ba360aa7
7
+ data.tar.gz: 7c8cb277e3b96fd9893ac508ee008d62789ade50e2a7708b170434a8f8429d9d90ff64a99bfeac1413b40c397470ecb9b45f4c9a7bf010d1bf6c0882ad01aad7
data/README.md CHANGED
@@ -471,6 +471,9 @@ In this mode, any property validation error will log a warning instead of raisin
471
471
  service.options[:strict] = false
472
472
  ```
473
473
 
474
+ ## Release on rubygems.org
475
+ There is a rake task `rake release`, which will do everything for you.
476
+
474
477
  ## Contributing
475
478
 
476
479
  1. Fork it (`https://github.com/[my-github-username]/frodo/fork`)
@@ -205,7 +205,7 @@ module Frodo
205
205
  # Returns the Entity record.
206
206
  def find(entity_set, id)
207
207
  query = service[entity_set].query
208
- url_chunk = query.find(id, entity_set)
208
+ url_chunk = query.find(id)
209
209
 
210
210
  body = api_get(url_chunk).body
211
211
  build_entity(entity_set, body)
@@ -222,7 +222,7 @@ module Frodo
222
222
  query = service[entity_set].query
223
223
 
224
224
  fields.each{|field| query.select(field)}
225
- url_chunk = query.find(id, entity_set)
225
+ url_chunk = query.find(id)
226
226
 
227
227
  body = api_get(url_chunk).body
228
228
  build_entity(entity_set, body)
@@ -1,3 +1,3 @@
1
1
  module Frodo
2
- VERSION = '0.12.5'
2
+ VERSION = '0.12.6'
3
3
  end
@@ -257,11 +257,10 @@ describe Frodo::Concerns::API do
257
257
  subject { client.destroy!(entity_type, id) }
258
258
 
259
259
  it 'deletes entity_set and returns true' do
260
- allow(client).to receive(:service).and_return(service)
261
- allow(service).to receive(:[]).with(entity_type).and_return(entity_set)
262
- allow(entity_set).to receive(:query).and_return(query)
263
- allow(query).to receive(:find).with(id).and_return(path)
264
-
260
+ expect(client).to receive(:service).and_return(service)
261
+ expect(service).to receive(:[]).with(entity_type).and_return(entity_set)
262
+ expect(entity_set).to receive(:query).and_return(query)
263
+ expect(query).to receive(:find).with(id).and_return(path)
265
264
  expect(subject).to eq(true)
266
265
  end
267
266
 
@@ -276,11 +275,11 @@ describe Frodo::Concerns::API do
276
275
  subject { client.find(entity_type, id) }
277
276
 
278
277
  it 'returns found entity_set' do
279
- allow(client).to receive(:service).and_return(service)
280
- allow(service).to receive(:[]).with(entity_type).and_return(entity_set)
281
- allow(entity_set).to receive(:query).and_return(query)
282
- allow(query).to receive(:find).with(id, entity_type).and_return(path)
283
- allow(client).to receive(:build_entity).with(entity_type, body).and_return(entity)
278
+ expect(client).to receive(:service).and_return(service)
279
+ expect(entity_set).to receive(:query).and_return(query)
280
+ expect(service).to receive(:[]).with(entity_type).and_return(entity_set)
281
+ expect(query).to receive(:find).with(id).and_return(path)
282
+ expect(client).to receive(:build_entity).with(entity_type, body).and_return(entity)
284
283
 
285
284
  expect(subject).to eq(entity)
286
285
  end
@@ -298,11 +297,11 @@ describe Frodo::Concerns::API do
298
297
  subject { client.select(entity_type, id, fields) }
299
298
 
300
299
  it 'returns selected entity and fields' do
301
- allow(client).to receive(:service).and_return(service)
302
- allow(service).to receive(:[]).with(entity_type).and_return(entity_set)
303
- allow(entity_set).to receive(:query).and_return(query)
304
- allow(query).to receive(:find).and_return(path)
305
- allow(client).to receive(:build_entity).with(entity_type, body).and_return(entity)
300
+ expect(client).to receive(:service).and_return(service)
301
+ expect(service).to receive(:[]).with(entity_type).and_return(entity_set)
302
+ expect(entity_set).to receive(:query).and_return(query)
303
+ expect(query).to receive(:find).with(id).and_return(path)
304
+ expect(client).to receive(:build_entity).with(entity_type, body).and_return(entity)
306
305
 
307
306
  expect(query).to receive(:select).exactly(fields.count).times
308
307
  expect(subject).to eq(entity)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frodo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.5
4
+ version: 0.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emmanuel Pinault
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-06 00:00:00.000000000 Z
11
+ date: 2019-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri