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 +4 -4
- data/lib/art_gun/order.rb +4 -2
- data/lib/art_gun/order_item.rb +2 -2
- data/lib/art_gun/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0f2a7a3523b7bc5ac5d54f3baffa3b164de41c2
|
|
4
|
+
data.tar.gz: debe340aab28b479e63244ad3c17b10c5f5c4d5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f54bf41f50881ef1f6fbac54a2ec0ec265eaae294b8724e749d4d986ec3f7f34f3d0b85ef121c2ba0b1b065e15255665302db3bb94ce236faff4ed41e7abcca
|
|
7
|
+
data.tar.gz: 71fe73c5de231c79b4d4e5580cebcf48144a4bda4ac830bcce9d49ed322a3d181dfd1c7097b63a98308922b93ccf4c799eeb79217d5cc5e4e6a15a1f5f4ee018
|
data/lib/art_gun/order.rb
CHANGED
|
@@ -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 = {
|
|
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
|
data/lib/art_gun/order_item.rb
CHANGED
|
@@ -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 = {
|
|
22
|
+
def as_json opts = {}
|
|
23
23
|
hash = super opts
|
|
24
|
-
hash['attributes'] =
|
|
24
|
+
hash['attributes'] = attrs.map(&:as_json) # to avoid name conflict in model
|
|
25
25
|
hash
|
|
26
26
|
end
|
|
27
27
|
end
|
data/lib/art_gun/version.rb
CHANGED