jsonapi-utils 0.4.7 → 0.4.8

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: 5c64468130b16c1b4247c925d9fc25a583d6134d
4
- data.tar.gz: 8d90c469c22ed667afb6b72dc02b2fcd31997e4b
3
+ metadata.gz: 17de793a78cef4a0b86e1fc100ebae4333ed18f6
4
+ data.tar.gz: 5a46049114450f913cddd2e2c7679a809772847b
5
5
  SHA512:
6
- metadata.gz: 9ef5754a5dbe043c4bfeb30f40532c9a893c98ce65c15b2ca0d46196386b5eaa8e77b80a59f8e4350fdaafb867cdb7fef357a342ea1a322813a09341f5af0403
7
- data.tar.gz: da448b2469e853c89e027960810325eaf90e66191b93769ac30cb41d8e565455b37a2a23f5e923581ab8ce74abddd8065dc9b4d85539439dd97718b465ed3ebd
6
+ metadata.gz: 2dc69b2394872cf5e66317f4719f03fafcd1be2ec24e14a99ed57416ec128fcfc24430a444c3365306cf139595124581aca369dc1c14721340974783b269f929
7
+ data.tar.gz: 1a19b7118d7396bdb61f12f0c134cc503ac8906952d627740ed7d3da66053230547c1724e68ab5069662bc33138cdbdf33d180d65c9c0c5866726c6ab288d86d
data/README.md CHANGED
@@ -13,7 +13,7 @@ JSONAPI::Utils (JU) was built on top of [JSONAPI::Resources](https://github.com/
13
13
  Add these lines to your application's Gemfile:
14
14
 
15
15
  ```ruby
16
- gem 'jsonapi-utils', '~> 0.4.5'
16
+ gem 'jsonapi-utils', '~> 0.4.8'
17
17
  ```
18
18
 
19
19
  And then execute:
@@ -11,12 +11,8 @@ module JSONAPI::Utils::Support::Filter
11
11
  def custom_filter(attr)
12
12
  attr = attr.to_sym
13
13
  @_allowed_filters[attr] = {}
14
-
15
- if !@_allowed_custom_filters.is_a?(Array)
16
- @_allowed_custom_filters = Array(attr)
17
- elsif @_allowed_custom_filters.include?(attr)
18
- @_allowed_custom_filters.push(attr)
19
- end
14
+ @_allowed_custom_filters ||= []
15
+ @_allowed_custom_filters |= [attr]
20
16
  end
21
17
  end
22
18
  end
@@ -1,5 +1,5 @@
1
1
  module JSONAPI
2
2
  module Utils
3
- VERSION = '0.4.7'
3
+ VERSION = '0.4.8'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Guedes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-10-16 00:00:00.000000000 Z
12
+ date: 2017-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jsonapi-resources
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  version: '0'
200
200
  requirements: []
201
201
  rubyforge_project:
202
- rubygems_version: 2.5.1
202
+ rubygems_version: 2.6.7
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: JSON::Utils is a simple way to get a full-featured JSON API serialization