jsonb_accessor 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gemfiles/activerecord_4.2.1.gemfile.lock +6 -3
- data/gemfiles/activerecord_4.2.2.gemfile.lock +6 -3
- data/gemfiles/activerecord_4.2.3.gemfile.lock +6 -3
- data/gemfiles/activerecord_4.2.4.gemfile.lock +6 -3
- data/jsonb_accessor.gemspec +3 -3
- data/lib/jsonb_accessor/macro.rb +8 -1
- data/lib/jsonb_accessor/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4482a9227381219289a5fa3c3ee142c65c209264
|
4
|
+
data.tar.gz: 40151f160357b3f8b903e13e7d6665649590c229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f46c2d4bd1f4e8eeed04dcfdd5e15d494dba305eaac17f5ec13ffe1034b9cb812ebccbb48129427dbf2ba5816a388bb53e28d713b40cca4eeda0d0545b8f0b52
|
7
|
+
data.tar.gz: 92b6b372df5c862d8e3e322e2f05a3875eb2cf59f4a0fba18f9c9e6779257b604d5ba06fd16eea7fd1e6f466b5aa8ec5f8efdb1c00b25734907268e6d79dfd5a
|
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
jsonb_accessor (0.3.
|
4
|
+
jsonb_accessor (0.3.2)
|
5
5
|
activerecord (>= 4.2.1)
|
6
|
-
pg
|
6
|
+
pg (>= 0.18.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -59,7 +59,7 @@ GEM
|
|
59
59
|
mini_portile (~> 0.6.0)
|
60
60
|
parser (2.2.2.5)
|
61
61
|
ast (>= 1.1, < 3.0)
|
62
|
-
pg (0.18.
|
62
|
+
pg (0.18.4)
|
63
63
|
powerpack (0.1.1)
|
64
64
|
pry (0.10.1)
|
65
65
|
coderay (~> 1.1.0)
|
@@ -140,3 +140,6 @@ DEPENDENCIES
|
|
140
140
|
rubocop (= 0.31.0)
|
141
141
|
shoulda-matchers
|
142
142
|
standalone_migrations
|
143
|
+
|
144
|
+
BUNDLED WITH
|
145
|
+
1.11.2
|
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
jsonb_accessor (0.3.
|
4
|
+
jsonb_accessor (0.3.2)
|
5
5
|
activerecord (>= 4.2.1)
|
6
|
-
pg
|
6
|
+
pg (>= 0.18.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -60,7 +60,7 @@ GEM
|
|
60
60
|
mini_portile (~> 0.6.0)
|
61
61
|
parser (2.3.0.pre.2)
|
62
62
|
ast (>= 1.1, < 3.0)
|
63
|
-
pg (0.18.
|
63
|
+
pg (0.18.4)
|
64
64
|
powerpack (0.1.1)
|
65
65
|
pry (0.10.1)
|
66
66
|
coderay (~> 1.1.0)
|
@@ -141,3 +141,6 @@ DEPENDENCIES
|
|
141
141
|
rubocop (= 0.31.0)
|
142
142
|
shoulda-matchers
|
143
143
|
standalone_migrations
|
144
|
+
|
145
|
+
BUNDLED WITH
|
146
|
+
1.11.2
|
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
jsonb_accessor (0.3.
|
4
|
+
jsonb_accessor (0.3.2)
|
5
5
|
activerecord (>= 4.2.1)
|
6
|
-
pg
|
6
|
+
pg (>= 0.18.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -59,7 +59,7 @@ GEM
|
|
59
59
|
mini_portile (~> 0.6.0)
|
60
60
|
parser (2.2.3.0)
|
61
61
|
ast (>= 1.1, < 3.0)
|
62
|
-
pg (0.18.
|
62
|
+
pg (0.18.4)
|
63
63
|
powerpack (0.1.1)
|
64
64
|
pry (0.10.3)
|
65
65
|
coderay (~> 1.1.0)
|
@@ -140,3 +140,6 @@ DEPENDENCIES
|
|
140
140
|
rubocop (= 0.31.0)
|
141
141
|
shoulda-matchers
|
142
142
|
standalone_migrations
|
143
|
+
|
144
|
+
BUNDLED WITH
|
145
|
+
1.11.2
|
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
jsonb_accessor (0.3.
|
4
|
+
jsonb_accessor (0.3.2)
|
5
5
|
activerecord (>= 4.2.1)
|
6
|
-
pg
|
6
|
+
pg (>= 0.18.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -59,7 +59,7 @@ GEM
|
|
59
59
|
mini_portile (~> 0.6.0)
|
60
60
|
parser (2.2.3.0)
|
61
61
|
ast (>= 1.1, < 3.0)
|
62
|
-
pg (0.18.
|
62
|
+
pg (0.18.4)
|
63
63
|
powerpack (0.1.1)
|
64
64
|
pry (0.10.3)
|
65
65
|
coderay (~> 1.1.0)
|
@@ -140,3 +140,6 @@ DEPENDENCIES
|
|
140
140
|
rubocop (= 0.31.0)
|
141
141
|
shoulda-matchers
|
142
142
|
standalone_migrations
|
143
|
+
|
144
|
+
BUNDLED WITH
|
145
|
+
1.11.2
|
data/jsonb_accessor.gemspec
CHANGED
@@ -6,8 +6,8 @@ require "jsonb_accessor/version"
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "jsonb_accessor"
|
8
8
|
spec.version = JsonbAccessor::VERSION
|
9
|
-
spec.authors = ["Michael Crismali", "Joe Hirn"]
|
10
|
-
spec.email = ["michael.crismali@gmail.com", "joe@devmynd.com"]
|
9
|
+
spec.authors = ["Michael Crismali", "Joe Hirn", "Jason Haruska"]
|
10
|
+
spec.email = ["michael.crismali@gmail.com", "joe@devmynd.com", "jason@haruska.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Adds typed jsonb backed fields to your ActiveRecord models.}
|
13
13
|
spec.description = %q{Adds typed jsonb backed fields to your ActiveRecord models.}
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
23
|
spec.add_dependency "activerecord", ">= 4.2.1"
|
24
|
-
spec.add_dependency "pg"
|
24
|
+
spec.add_dependency "pg", ">= 0.18.1"
|
25
25
|
|
26
26
|
spec.add_development_dependency "actionpack", "~> 4.2.1"
|
27
27
|
spec.add_development_dependency "appraisal"
|
data/lib/jsonb_accessor/macro.rb
CHANGED
@@ -40,12 +40,19 @@ module JsonbAccessor
|
|
40
40
|
define_method(jsonb_attribute_initialization_method_name) do
|
41
41
|
if has_attribute?(jsonb_attribute)
|
42
42
|
jsonb_attribute_hash = send(jsonb_attribute) || {}
|
43
|
-
|
43
|
+
|
44
|
+
fields_map.typed_fields.keys.each do |field|
|
45
|
+
write_attribute(field, jsonb_attribute_hash[field.to_s])
|
46
|
+
end
|
47
|
+
|
48
|
+
fields_map.nested_fields.keys.each do |field|
|
44
49
|
send("#{field}=", jsonb_attribute_hash[field.to_s])
|
45
50
|
end
|
51
|
+
|
46
52
|
send(:clear_attribute_changes, fields_map.names)
|
47
53
|
end
|
48
54
|
end
|
55
|
+
|
49
56
|
after_initialize(jsonb_attribute_initialization_method_name)
|
50
57
|
end
|
51
58
|
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonb_accessor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Crismali
|
8
8
|
- Joe Hirn
|
9
|
+
- Jason Haruska
|
9
10
|
autorequire:
|
10
11
|
bindir: exe
|
11
12
|
cert_chain: []
|
12
|
-
date: 2016-04-
|
13
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: activerecord
|
@@ -31,14 +32,14 @@ dependencies:
|
|
31
32
|
requirements:
|
32
33
|
- - ">="
|
33
34
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
35
|
+
version: 0.18.1
|
35
36
|
type: :runtime
|
36
37
|
prerelease: false
|
37
38
|
version_requirements: !ruby/object:Gem::Requirement
|
38
39
|
requirements:
|
39
40
|
- - ">="
|
40
41
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
42
|
+
version: 0.18.1
|
42
43
|
- !ruby/object:Gem::Dependency
|
43
44
|
name: actionpack
|
44
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -225,6 +226,7 @@ description: Adds typed jsonb backed fields to your ActiveRecord models.
|
|
225
226
|
email:
|
226
227
|
- michael.crismali@gmail.com
|
227
228
|
- joe@devmynd.com
|
229
|
+
- jason@haruska.com
|
228
230
|
executables: []
|
229
231
|
extensions: []
|
230
232
|
extra_rdoc_files: []
|