jsonapi-serializers 0.6.4 → 0.6.5

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: 3eaa17fccc55ae5a39942e835dbe6d96745d8144
4
- data.tar.gz: 49169f889acb1f9e0a13b575a6a9f099d9080ac3
3
+ metadata.gz: 3f3ea0a6b146f6d472d29baeab24e9250af5a445
4
+ data.tar.gz: 12b7df3f2f154caeebc75bcebb238437343ae908
5
5
  SHA512:
6
- metadata.gz: c9a914aca7d66506a91c2a879b30b192d8dcfadcec44744e3ba42494ea36613fbf22c2ea9240602b1784b9c272f7307109ac9c383c2010e0a6f5cb19a3ae2993
7
- data.tar.gz: 5e309c05b09a6edb29a57d1fe7452656e9c471749ae85a79f4c2348dced312418c5adf08cd5ccc42ccb57bb9f3e6b72b02273f441e5419331f9e17e9700273f9
6
+ metadata.gz: 38c6c932bf6dc7d56876bdfdd4f03994bbbba29e9d548152d2d55c4366ef1a89d707dd23b5f2f160516ee183cfdc15b7408f48ece62835da5a28adea86760a6e
7
+ data.tar.gz: 14fc35998aab4db62f6b92f77b053120bb6ba69a911fdfbed63fd616bb17b2a51bb67017c1322f9121af4f3572cbcd18ca08704d7857ecc754a1bae3f7597f05
data/README.md CHANGED
@@ -652,6 +652,7 @@ end
652
652
 
653
653
  ## Release notes
654
654
 
655
+ * v0.6.5: Exclude attributes when empty.
655
656
  * v0.6.4: Fix regression of including links when empty.
656
657
  * v0.6.3: Fix support for underscore-formatted attribute names.
657
658
  * v0.6.2: Internal style updates and performance fixes.
@@ -331,7 +331,7 @@ module JSONAPI
331
331
  links = serializer.links
332
332
  relationships = serializer.relationships
333
333
  meta = serializer.meta
334
- data['attributes'] = attributes if !attributes.nil?
334
+ data['attributes'] = attributes if !attributes.empty?
335
335
  data['links'] = links if !links.empty?
336
336
  data['relationships'] = relationships if !relationships.empty?
337
337
  data['meta'] = meta if !meta.nil?
@@ -1,5 +1,5 @@
1
1
  module JSONAPI
2
2
  module Serializer
3
- VERSION = '0.6.4'
3
+ VERSION = '0.6.5'
4
4
  end
5
5
  end
@@ -314,7 +314,6 @@ describe JSONAPI::Serializer do
314
314
  expect(primary_data).to eq({
315
315
  'id' => '1',
316
316
  'type' => 'posts',
317
- 'attributes' => {},
318
317
  'links' => {
319
318
  'self' => '/posts/1',
320
319
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-serializers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Fotinakis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-01 00:00:00.000000000 Z
11
+ date: 2016-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.2.2
126
+ rubygems_version: 2.4.5
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Pure Ruby readonly serializers for the JSON:API spec.
@@ -132,3 +132,4 @@ test_files:
132
132
  - spec/spec_helper.rb
133
133
  - spec/support/factory.rb
134
134
  - spec/support/serializers.rb
135
+ has_rdoc: