attr_json 0.5.0 → 0.6.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 +9 -2
- data/Appraisals +7 -0
- data/README.md +1 -1
- data/attr_json.gemspec +1 -1
- data/gemfiles/rails_6_0.gemfile +18 -0
- data/lib/attr_json/attribute_definition/registry.rb +5 -0
- data/lib/attr_json/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dda561b590231ab664acf2eb3cc4301d314cb046c137a4634e7ffbf69fcab023
|
|
4
|
+
data.tar.gz: 3387445db5a9df2fe905bc58ad03bff68c6d3e8950a20d49df9abb1407e3f911
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 17f38aa4781d512e6082861b2fea83eff7c679be24ae78a1d86143399ca3185c535400521fe3dac9e4064f82cd4d0626bd9426af5bddafd6dbc6353a513959b9
|
|
7
|
+
data.tar.gz: b8e05ea5e8cf5f9ec0c91ec4d2d3b6929f63325478b855a377abbcba0124a4c0450437c91b283a2257400d371c10a7781a8e49d3b319a7eb6c74218e9562a516
|
data/.travis.yml
CHANGED
|
@@ -7,15 +7,22 @@ addons:
|
|
|
7
7
|
language: ruby
|
|
8
8
|
cache: bundler
|
|
9
9
|
rvm:
|
|
10
|
-
- 2.4
|
|
11
|
-
- 2.5.
|
|
10
|
+
- 2.4.5
|
|
11
|
+
- 2.5.3
|
|
12
12
|
gemfile:
|
|
13
13
|
- gemfiles/rails_5_0.gemfile
|
|
14
14
|
- gemfiles/rails_5_1.gemfile
|
|
15
15
|
- gemfiles/rails_5_2.gemfile
|
|
16
|
+
- gemfiles/rails_6_0.gemfile
|
|
16
17
|
- gemfiles/rails_edge_6.gemfile
|
|
17
18
|
before_install:
|
|
18
19
|
- gem install bundler -v 1.14.6
|
|
19
20
|
matrix:
|
|
20
21
|
allow_failures:
|
|
21
22
|
- gemfile: gemfiles/rails_edge_6.gemfile
|
|
23
|
+
fast_finish: true
|
|
24
|
+
exclude:
|
|
25
|
+
- gemfile: gemfiles/rails_edge_6.gemfile
|
|
26
|
+
rvm: 2.4.5
|
|
27
|
+
- gemfile: gemfiles/rails_6_0.gemfile
|
|
28
|
+
rvm: 2.4.5
|
data/Appraisals
CHANGED
|
@@ -25,6 +25,13 @@ appraise "rails-5-2" do
|
|
|
25
25
|
gem "pg", "~> 1.0"
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
appraise "rails-6-0" do
|
|
29
|
+
gem 'combustion', git: "https://github.com/pat/combustion.git"
|
|
30
|
+
|
|
31
|
+
gem "rails", ">= 6.0.0.beta1", "< 6.1"
|
|
32
|
+
gem "pg", "~> 1.0"
|
|
33
|
+
end
|
|
34
|
+
|
|
28
35
|
appraise "rails-edge-6" do
|
|
29
36
|
# Edge rails needs unreleased combustion
|
|
30
37
|
# https://github.com/pat/combustion/issues/92
|
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://badge.fury.io/rb/attr_json)
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
ActiveRecord attributes stored serialized in a json column, super smooth. For Rails 5.0, 5.1,
|
|
6
|
+
ActiveRecord attributes stored serialized in a json column, super smooth. For Rails 5.0, 5.1, 5.2, or 6.0. Ruby 2.4+.
|
|
7
7
|
|
|
8
8
|
Typed and cast like Active Record. Supporting [nested models](#nested), [dirty tracking](#dirty), some [querying](#querying) (with postgres [jsonb](https://www.postgresql.org/docs/9.5/static/datatype-json.html) contains), and [working smoothy with form builders](#forms).
|
|
9
9
|
|
data/attr_json.gemspec
CHANGED
|
@@ -45,7 +45,7 @@ attributes use as much of the existing ActiveRecord architecture as we can.}
|
|
|
45
45
|
# Only to get CI to work on versions of Rails other than we release with,
|
|
46
46
|
# should never release a gem with RAILS_GEM set!
|
|
47
47
|
unless ENV['APPRAISAL_INITIALIZED'] || ENV["TRAVIS"]
|
|
48
|
-
spec.add_runtime_dependency "activerecord", ">= 5.0.0", "<
|
|
48
|
+
spec.add_runtime_dependency "activerecord", ">= 5.0.0", "< 6.1"
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
spec.add_development_dependency "bundler", "~> 1.14"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# This file was generated by Appraisal
|
|
2
|
+
|
|
3
|
+
source "https://rubygems.org"
|
|
4
|
+
|
|
5
|
+
gem "combustion", git: "https://github.com/pat/combustion.git"
|
|
6
|
+
gem "rails", ">= 6.0.0.beta1", "< 6.1"
|
|
7
|
+
gem "railties"
|
|
8
|
+
gem "pg", "~> 1.0"
|
|
9
|
+
gem "rspec-rails", "~> 3.7"
|
|
10
|
+
gem "simple_form", ">= 4.0"
|
|
11
|
+
gem "cocoon", ">= 1.2"
|
|
12
|
+
gem "jquery-rails"
|
|
13
|
+
gem "capybara", "~> 3.0"
|
|
14
|
+
gem "chromedriver-helper"
|
|
15
|
+
gem "selenium-webdriver"
|
|
16
|
+
gem "byebug"
|
|
17
|
+
|
|
18
|
+
gemspec path: "../"
|
|
@@ -54,6 +54,11 @@ module AttrJson
|
|
|
54
54
|
@name_to_definition.values
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
# Returns all registered attributes as an array of symbols
|
|
58
|
+
def attribute_names
|
|
59
|
+
@name_to_definition.keys
|
|
60
|
+
end
|
|
61
|
+
|
|
57
62
|
def container_attributes
|
|
58
63
|
@store_key_to_definition.keys.collect(&:to_s)
|
|
59
64
|
end
|
data/lib/attr_json/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: attr_json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Rochkind
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-01-
|
|
11
|
+
date: 2019-01-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -19,7 +19,7 @@ dependencies:
|
|
|
19
19
|
version: 5.0.0
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
22
|
+
version: '6.1'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -29,7 +29,7 @@ dependencies:
|
|
|
29
29
|
version: 5.0.0
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
32
|
+
version: '6.1'
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: bundler
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -149,6 +149,7 @@ files:
|
|
|
149
149
|
- gemfiles/rails_5_0.gemfile
|
|
150
150
|
- gemfiles/rails_5_1.gemfile
|
|
151
151
|
- gemfiles/rails_5_2.gemfile
|
|
152
|
+
- gemfiles/rails_6_0.gemfile
|
|
152
153
|
- gemfiles/rails_edge_6.gemfile
|
|
153
154
|
- lib/attr_json.rb
|
|
154
155
|
- lib/attr_json/attribute_definition.rb
|