jsonb_accessor 1.1.0 → 1.2.0
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 +4 -4
- data/.travis.yml +3 -2
- data/README.md +1 -1
- data/lib/jsonb_accessor/macro.rb +5 -1
- data/lib/jsonb_accessor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 80ed7aa0b3f529122a97b2a00b4f81011ef18014
|
|
4
|
+
data.tar.gz: 407d572cea056870ce66d7b92c89d1b3e15bdb2d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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:
|
|
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
data/lib/jsonb_accessor/macro.rb
CHANGED
|
@@ -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,
|
|
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}"
|
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.
|
|
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:
|
|
13
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activerecord
|