art-gun 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: f5c5bfadf644a85610aee6810337476b02718c8c
4
- data.tar.gz: 1767af707121de560fe02cf4b2ba6653632fc123
3
+ metadata.gz: a0f2a7a3523b7bc5ac5d54f3baffa3b164de41c2
4
+ data.tar.gz: debe340aab28b479e63244ad3c17b10c5f5c4d5f
5
5
  SHA512:
6
- metadata.gz: def45b412ef3bd3016f014c228ffa391a976d9b5131b6ad0393a09d2e6e7ef9024bdf2218485844715a639f50bf740734d54a140b9fe9691cec8811cb91316ca
7
- data.tar.gz: 8bc9a21b91c545cbb34bf5603a63de05af511f5ed1b8677e4fd3ef8330eea669ab4335eef847bcf332203e3e6b0ac53220e10ad851324f1b29e241d3221816fc
6
+ metadata.gz: 1f54bf41f50881ef1f6fbac54a2ec0ec265eaae294b8724e749d4d986ec3f7f34f3d0b85ef121c2ba0b1b065e15255665302db3bb94ce236faff4ed41e7abcca
7
+ data.tar.gz: 71fe73c5de231c79b4d4e5580cebcf48144a4bda4ac830bcce9d49ed322a3d181dfd1c7097b63a98308922b93ccf4c799eeb79217d5cc5e4e6a15a1f5f4ee018
@@ -61,8 +61,10 @@ module ArtGun
61
61
  (self.class.attrs + %w(type time method mode status status_code)).inject({}){|h,k| h[k.to_s] = nil; h}
62
62
  end
63
63
 
64
- def as_json opts = {include: :items}
65
- super opts
64
+ def as_json opts = {}
65
+ hash = super opts
66
+ hash['items'] = items.map(&:as_json)
67
+ hash
66
68
  end
67
69
  end
68
70
  end
@@ -19,9 +19,9 @@ module ArtGun
19
19
  self.class.attrs.inject({}){|h,k| h[k.to_s] = nil; h}
20
20
  end
21
21
 
22
- def as_json opts = {include: :attrs}
22
+ def as_json opts = {}
23
23
  hash = super opts
24
- hash['attributes'] = hash.delete('attrs') # to avoid name conflict in model
24
+ hash['attributes'] = attrs.map(&:as_json) # to avoid name conflict in model
25
25
  hash
26
26
  end
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module ArtGun
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: art-gun
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
  - Lars Kluge