husky 0.1.2 → 0.1.3

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
2
  SHA1:
3
- metadata.gz: cb1f42f3a676a4967714b1f10969a42325170651
4
- data.tar.gz: 870399a149c31b144f6ea99182ffe638b83663cd
3
+ metadata.gz: 96f37e20fd563b265a4c24da1a02ac8e3a6b8ed0
4
+ data.tar.gz: 195f24bc1ffa9a3dffb9511db9eed51bb1b200ff
5
5
  SHA512:
6
- metadata.gz: d95693ff3ec1875c7c3d67b742f9d441f6d84466f7efc796a3bc4dddaacb103268c806043e24c9deff468c7b8277dc324471ca6fa6ee9fd4e725414bcfaf4088
7
- data.tar.gz: 9bd9bed4d9522ed046dd668e6a3ab9626008d65f622d585d073b72a5d1c5c61fa85d9ce69e2c27d367d3f279f76560216ad5f0da820b4eab7b2f8f7526d284f0
6
+ metadata.gz: aecdfbbccef3d2986d2e848b352d38ba360701305f6060c9f962057073ec0defadfdf9996bdb8a4974374f6be0c679129bd5321c33995cb2799660867c92ded4
7
+ data.tar.gz: 82f8ddbda6641048cb0cdb2efc3b140e66d1837e5a598c94c1b7eec4b899a6d8e6d4c8ed99635496a312f51521b1dce25318ccfd7c082f10456a4c3d322e6b3f
@@ -15,15 +15,19 @@ module Husky
15
15
  interactor.run
16
16
  end
17
17
 
18
- def deliver_entities(entities, *extra)
19
- args = [json: entities.map(&:object)]
20
- args << extra unless extra.nil?
21
- render(args)
18
+ def deliver_entities(entities, *options)
19
+ serve_for(entities.map(&:object), *options)
20
+ end
21
+
22
+ def deliver_entity(entity, *options)
23
+ serve_for(entity.object, *options)
22
24
  end
23
25
 
24
- def deliver_entity(entity, *extra)
25
- args = [json: entity.object]
26
- args << extra unless extra.nil?
26
+ private
27
+
28
+ def serve_for(target, *options)
29
+ args = { json: target }
30
+ options.each { |option| args.merge!(option) }
27
31
  render(args)
28
32
  end
29
33
 
@@ -1,3 +1,3 @@
1
1
  module Husky
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: husky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Fiser