json_api_toolbox 0.7.1 → 0.7.2

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: f7680d19b43c12ad0345922dc1f110e2b24cea30
4
- data.tar.gz: 87befb6ceba6184893f3b47c299fcdeaf48b0300
3
+ metadata.gz: 79da90324606331c68b49af3debae0e39e9fa4b0
4
+ data.tar.gz: a966e83e52ceea214541ae4fcc326c0087a8a3f8
5
5
  SHA512:
6
- metadata.gz: 1317696531c5040fc73a4dd71a0cb37108c1be4c83462d440f414d34529d52b11b1288a99ea730599a47a0bc40aa6815aa6b55fa7d7b91ef882ad63242ac8f9e
7
- data.tar.gz: 876bc8d9222054714aac607af4a982270bebb5b519a68f5c075ed5f67a7f6a34d427ffb46a68587b685e1a59e42591a3e134f36a77c02b53e053cee89a42f8e4
6
+ metadata.gz: c21e5ca55dd7b9ecad49b186c0016e4befbfd676fd059a4f85396cf36cd6a4817d2b34be06c3ffc9bc05a72c36f4b5a32605819adc693590359fcf9d2ad55800
7
+ data.tar.gz: c93f4f8ceaaec843ad384ddf1a781b5245b6091a497af6386a123b12ae9d934f6d4f8ac317712855bd7c61910e53c0c4ca9cdafa6197270c5587828aaeb90aa8
data/CHANGELOG.md CHANGED
@@ -16,3 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
16
16
  ## [0.7.1] - 2017-12-11
17
17
  ### Changed
18
18
  - Fix rspec required on shared_examples
19
+
20
+ ## [0.7.2] - 2017-12-13
21
+ ### Changed
22
+ - Fix total-count render
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonApiToolbox
4
- VERSION = '0.7.1'
4
+ VERSION = '0.7.2'
5
5
  end
data/lib/renderizable.rb CHANGED
@@ -8,7 +8,7 @@ module JsonApiToolbox
8
8
  else
9
9
  renderization =
10
10
  { jsonapi: object, include: includes_params }.merge(options)
11
- render(renderization, build_meta_data(object))
11
+ render(renderization.merge(build_meta_data(object)))
12
12
  end
13
13
  end
14
14
 
@@ -52,6 +52,8 @@ module JsonApiToolbox
52
52
  def build_meta_data(objects)
53
53
  if objects.respond_to?(:count)
54
54
  { meta: { 'total-count' => objects.count } }
55
+ else
56
+ {}
55
57
  end
56
58
  end
57
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_api_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adriano Bacha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-11 00:00:00.000000000 Z
11
+ date: 2017-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport