jsonapi_compliable 0.6.6 → 0.6.7

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: 158723539c9ae9bef84801ddbefc34335cf70611
4
- data.tar.gz: fd5fcb8c06c21f1e1ff9b921e4b294bb6bced110
3
+ metadata.gz: 9f46b94a397759f05cd7537d79b05e67ca9fd20c
4
+ data.tar.gz: a35204dce94ff15fee19a052f95e12c6c44ad414
5
5
  SHA512:
6
- metadata.gz: d3af8845757c413f34ad118a1dcf83cea6bc67b11f669df1a602aa0b9c1e507366bdf4d9b352ca96f74fc2f6a4ddbdf3c1bc0e61c079a0f58cafe45fec67a45d
7
- data.tar.gz: 09299f64c2cb0352a267d24716b9687f400935ee56bf79548fe1ab69c4292c3675288ea4ae3eecc9b321750a765dabd2cd500bce541b65f7d55eeca00cc3f808
6
+ metadata.gz: 351229549de82a6e3e1e448018adf10135c603200a9ff14a859d6fc3bf2a5a0b117a5d488abfc757a353c6aa719d4b286e0d6c6c06c4a4813ab44730598acd3b
7
+ data.tar.gz: 446f344728c8ec9fe881dd84db1e017b8c7cc51c91cf9730192111a8e9d8c768fcbf83a535892be69c878a9aafece275f1a6a7d6fb09e533c77d028bed4faf08
@@ -65,7 +65,7 @@ class JsonapiCompliable::Deserializer
65
65
  # @return [Hash] the raw :attributes hash + +id+
66
66
  def attributes
67
67
  @attributes ||= raw_attributes.tap do |hash|
68
- hash.merge!(id: id) if id
68
+ hash[:id] = id if id
69
69
  end
70
70
  end
71
71
 
@@ -191,13 +191,14 @@ class JsonapiCompliable::Deserializer
191
191
  attributes = included_object[:attributes] || {}
192
192
  attributes[:id] = datum[:id] if datum[:id]
193
193
  relationships = process_relationships(included_object[:relationships] || {})
194
-
194
+ method = datum[:method]
195
+ method = method.to_sym if method
195
196
 
196
197
  {
197
198
  meta: {
198
199
  jsonapi_type: datum[:type],
199
200
  temp_id: temp_id,
200
- method: datum[:method].try(:to_sym)
201
+ method: method
201
202
  },
202
203
  attributes: attributes,
203
204
  relationships: relationships
@@ -1,3 +1,3 @@
1
1
  module JsonapiCompliable
2
- VERSION = "0.6.6"
2
+ VERSION = "0.6.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_compliable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond