frodo 0.12.5 → 0.12.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/frodo/concerns/api.rb +2 -2
- data/lib/frodo/version.rb +1 -1
- data/spec/frodo/concerns/api_spec.rb +14 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ad72629909d379b037ab935b6f026d9735cfa8ea7f5e2aada9572c8a5dd7f14
|
4
|
+
data.tar.gz: 96b2ecab8606c359095a304e525cd65f380445a85a0b7f8f6f07ad966657021d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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`)
|
data/lib/frodo/concerns/api.rb
CHANGED
@@ -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
|
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
|
225
|
+
url_chunk = query.find(id)
|
226
226
|
|
227
227
|
body = api_get(url_chunk).body
|
228
228
|
build_entity(entity_set, body)
|
data/lib/frodo/version.rb
CHANGED
@@ -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
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
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
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
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
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
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.
|
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-
|
11
|
+
date: 2019-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|