jsonb_accessor 1.1.0 → 1.2.0

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: 4572af0f905157b8a8540b7c4fac70426908926c
4
- data.tar.gz: 7fc82fc4c45831589b5de1d041cab1e651783447
3
+ metadata.gz: 80ed7aa0b3f529122a97b2a00b4f81011ef18014
4
+ data.tar.gz: 407d572cea056870ce66d7b92c89d1b3e15bdb2d
5
5
  SHA512:
6
- metadata.gz: bb272c8509fce56497c5863feb5879428cab9d90e42243c791caf14928e11a40f1a3c07af10574028be601874f49a26560354c85d4f561b5fb22d9258e79e944
7
- data.tar.gz: c053957f581dbcb37aa77c8c7cdce51193ec073927abaa43832e9ad4330a8d8d60de45ab671cf4a48dacf24a4dddbc576b743abc02c6019979bd5901257f4556
6
+ metadata.gz: be4ffe5fc2318edc84b98ffee5296d30d2a9d03817540c4622f04875d0a41c19022c19c0c998357f6730cad37103ce79c43b46c5aa08a46dce8078b77f03752d
7
+ data.tar.gz: c02e7189b7354d5d112aa9414e9cb4e5329d57b97b75b4d07a7e64da1abab04c63a0419509335fd557728eb48df1183d2a2d00c9c84ed7216ac4461205ec1c4d
data/.travis.yml CHANGED
@@ -5,14 +5,15 @@ rvm:
5
5
  - 2.5.3
6
6
  - 2.6.1
7
7
  addons:
8
- postgresql: '9.4'
8
+ postgresql: "9.4"
9
9
  before_install:
10
10
  - gem update --system
11
11
  - gem --version
12
- - gem install bundler
12
+ - gem install bundler:2.1.4
13
13
  before_script:
14
14
  - bundle exec rake db:create
15
15
  - bundle exec rake db:migrate
16
+ install: bundle _2.1.4_ install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
16
17
  cache: bundler
17
18
  gemfile:
18
19
  - gemfiles/activerecord_5.0.0.gemfile
data/README.md CHANGED
@@ -25,7 +25,7 @@ It also adds generic scopes for querying `jsonb` columns.
25
25
  Add this line to your application's `Gemfile`:
26
26
 
27
27
  ```ruby
28
- gem "jsonb_accessor", "~> 1.0.0"
28
+ gem "jsonb_accessor", "~> 1"
29
29
  ```
30
30
 
31
31
  And then execute:
@@ -11,7 +11,11 @@ module JsonbAccessor
11
11
 
12
12
  # Defines virtual attributes for each jsonb field.
13
13
  field_types.each do |name, type|
14
- attribute name, *type
14
+ next attribute name, type unless type.is_a?(Array)
15
+ next attribute name, *type unless type.last.is_a?(Hash)
16
+
17
+ *args, keyword_args = type
18
+ attribute name, *args, **keyword_args
15
19
  end
16
20
 
17
21
  store_key_mapping_method_name = "jsonb_store_key_mapping_for_#{jsonb_attribute}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonbAccessor
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonb_accessor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Crismali
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2020-06-29 00:00:00.000000000 Z
13
+ date: 2021-05-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord