jsonapi-utils 0.5.0 → 0.5.1

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: c0be601da593b84a1174a28708470fc8a3b19156
4
- data.tar.gz: 201d0bb520bc0465486819f94fe419a15c4c1bb1
3
+ metadata.gz: d5fa572a99867ebcee2a95e424b1f249c44603fd
4
+ data.tar.gz: a7859fa30c45aff2cb66e43bce219cc691114310
5
5
  SHA512:
6
- metadata.gz: e07edab40bd4956fb3ef3eba13e29e1f020d1ec144d2904d6e95a716a568ce8283a09f8ba8e76ecec4fd43e42805dbf72607dd97e8e1574770b0574fa0bd3f2e
7
- data.tar.gz: c23d41ae2fa4fe7896d2aea00dc0417479a8213e407984e06281bf899912d32251bf49f206c2b18977570eb7c9cff47ec68b6f9ebaa6580f0b083228dd0b5497
6
+ metadata.gz: 6351e38706a14d05e137f0daf257a44f98f3140eb4edc3b80306666b88581df8d069cdad8e264dce682d6c255a44c2b6d22c8a6188855240a31c43a3c91b23dc
7
+ data.tar.gz: fd1fae5c0b4d81d21f52688ad5e44d1e92c3bb0302bcc6346bedf637b78db7c5e8165f85230d5559b5e1ca1e85f5b449c09362ff9d9fd425b7ed080cc617c89b
data/README.md CHANGED
@@ -59,13 +59,13 @@ Support:
59
59
  For Rails 4.x add this to your application's Gemfile:
60
60
 
61
61
  ```ruby
62
- gem 'jsonapi-utils', '~> 0.4.7'
62
+ gem 'jsonapi-utils', '~> 0.4.8'
63
63
  ```
64
64
 
65
65
  For Rails 5, specify the `0.5.x` version in the Gemfile:
66
66
 
67
67
  ```ruby
68
- gem 'jsonapi-utils', '0.5.0'
68
+ gem 'jsonapi-utils', '0.5.1'
69
69
  ```
70
70
 
71
71
  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.5.0'.freeze
3
+ VERSION = '0.5.1'.freeze
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.5.0
4
+ version: 0.5.1
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: 2017-01-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