jsonb_accessor 1.0.0.beta.1 → 1.0.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/README.md +8 -3
- data/gemfiles/activerecord_5.0.0.gemfile.lock +2 -2
- data/jsonb_accessor.gemspec +1 -1
- data/lib/jsonb_accessor/macro.rb +1 -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: d6f16bfcb008ed0dabf95cb479829414652c0fb5
|
4
|
+
data.tar.gz: 9aec106f0ba84f640710bb8181da1d2d329e38ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bac196bd2d23e96576d8893a320f4fc006860164ef5ca56fde49ee7591b603f3f1d876de857231c3e4a2e07ecdd9170567f9b74e17c1c97ea44a6c514cb81a5
|
7
|
+
data.tar.gz: 4670f4f4dda76182a874f9ffa3c279487a4b8aff250660575df49aab1a84b5dd0b11971142c76a8cc50dbccd935bdd814b18646838a100a9cef927bd487a5011
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.1
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# JSONb Accessor
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/jsonb_accessor.svg)](http://badge.fury.io/rb/jsonb_accessor) [![Build Status](https://travis-ci.org/devmynd/jsonb_accessor.svg)](https://travis-ci.org/devmynd/jsonb_accessor)
|
3
|
+
Created by [<img src="https://raw.githubusercontent.com/devmynd/jsonb_accessor/master/devmynd-logo.png" alt="DevMynd Logo" />](https://www.devmynd.com/) [![Gem Version](https://badge.fury.io/rb/jsonb_accessor.svg)](http://badge.fury.io/rb/jsonb_accessor) [![Build Status](https://travis-ci.org/devmynd/jsonb_accessor.svg)](https://travis-ci.org/devmynd/jsonb_accessor) <img src="https://raw.githubusercontent.com/devmynd/jsonb_accessor/master/json-bee.png" alt="JSONb Accessor Logo" align="right" />
|
4
4
|
|
5
5
|
Adds typed `jsonb` backed fields as first class citizens to your `ActiveRecord` models. This gem is similar in spirit to [HstoreAccessor](https://github.com/devmynd/hstore_accessor), but the `jsonb` column in PostgreSQL has a few distinct advantages, mostly around nested documents and support for collections.
|
6
6
|
|
@@ -8,7 +8,7 @@ It also adds generic scopes for querying `jsonb` columns.
|
|
8
8
|
|
9
9
|
## 1.0 Beta
|
10
10
|
|
11
|
-
This README reflects the 1.0 beta. Method names and interfaces may still change.
|
11
|
+
This README reflects the most recent 1.0 beta. Method names and interfaces may still change.
|
12
12
|
|
13
13
|
## Table of Contents
|
14
14
|
|
@@ -18,6 +18,7 @@ This README reflects the 1.0 beta. Method names and interfaces may still change.
|
|
18
18
|
* [Single-Table Inheritance](#single-table-inheritance)
|
19
19
|
* [Dependencies](#dependencies)
|
20
20
|
* [Validations](#validations)
|
21
|
+
* [Upgrading](#upgrading)
|
21
22
|
* [Development](#development)
|
22
23
|
* [Contributing](#contributing)
|
23
24
|
|
@@ -26,7 +27,7 @@ This README reflects the 1.0 beta. Method names and interfaces may still change.
|
|
26
27
|
Add this line to your application's `Gemfile`:
|
27
28
|
|
28
29
|
```ruby
|
29
|
-
gem "jsonb_accessor"
|
30
|
+
gem "jsonb_accessor", "1.0.0.beta.2"
|
30
31
|
```
|
31
32
|
|
32
33
|
And then execute:
|
@@ -251,6 +252,10 @@ Because this gem promotes attributes nested into the JSON column to first level
|
|
251
252
|
- ActiveRecord >= 5.0
|
252
253
|
- Postgres >= 9.4 (in order to use the [jsonb column type](http://www.postgresql.org/docs/9.4/static/datatype-json.html)).
|
253
254
|
|
255
|
+
## Upgrading
|
256
|
+
|
257
|
+
See the [upgrade guide](UPGRADE_GUIDE.md).
|
258
|
+
|
254
259
|
## Development
|
255
260
|
|
256
261
|
After checking out the repo, run `bin/setup` to install dependencies (make sure postgres is running first).
|
data/jsonb_accessor.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.license = "MIT"
|
16
16
|
spec.required_ruby_version = "~> 2.0"
|
17
17
|
|
18
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) || f.match(%r{png\z}) }
|
19
19
|
spec.bindir = "exe"
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
data/lib/jsonb_accessor/macro.rb
CHANGED
@@ -44,7 +44,7 @@ module JsonbAccessor
|
|
44
44
|
jsonb_values = public_send(jsonb_attribute) || {}
|
45
45
|
jsonb_values.each do |store_key, value|
|
46
46
|
name = names_and_store_keys.key(store_key)
|
47
|
-
write_attribute(name, value)
|
47
|
+
write_attribute(name, value) if name
|
48
48
|
end
|
49
49
|
clear_changes_information if persisted?
|
50
50
|
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.0.0.beta.
|
4
|
+
version: 1.0.0.beta.2
|
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: 2016-10
|
13
|
+
date: 2016-11-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|