jsonb_accessor 1.0.0.beta.7 → 1.3.1
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 +5 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +17 -18
- data/.ruby-version +1 -1
- data/.travis.yml +17 -5
- data/Appraisals +5 -1
- data/Dockerfile +12 -0
- data/README.md +39 -30
- data/Rakefile +21 -2
- data/bin/console +3 -3
- data/db/config.yml +2 -3
- data/db/migrate/20150407031737_set_up_testing_db.rb +2 -0
- data/db/schema.rb +3 -3
- data/docker-compose.yml +26 -0
- data/gemfiles/activerecord_5.1.0.gemfile +1 -1
- data/gemfiles/activerecord_6.1.0.gemfile +8 -0
- data/jsonb_accessor.gemspec +5 -8
- data/lib/jsonb_accessor.rb +2 -2
- data/lib/jsonb_accessor/macro.rb +11 -5
- data/lib/jsonb_accessor/query_builder.rb +2 -4
- data/lib/jsonb_accessor/query_helper.rb +2 -6
- data/lib/jsonb_accessor/version.rb +1 -1
- metadata +24 -52
- data/gemfiles/activerecord_5.0.0.gemfile.lock +0 -139
- data/gemfiles/activerecord_5.1.0.gemfile.lock +0 -139
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: e0206aa16a6170326c1c5683a894715d6466cce4fb4b53f0bbd4326619608aed
|
|
4
|
+
data.tar.gz: e806fe994b60d0e9a4f8d46bda8df39a44266292010f2b4706bd2be3dfe46d44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 443182674b5fd917ea91c8a7813756e43b85678343833845db054a4814ccbb9e20598794c2ee44ad44715258a5e957a1fe2cbcdbf2758b2a01200adf266c7381
|
|
7
|
+
data.tar.gz: 7f604bebd874c410c78e554c4e724f18d0c816fe035ebc1d8e470cede3d8d3497f9443a4a25a4d611f0395eb5215063e211aada8ef9d8df8e4ee7502b352eb81
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
AllCops:
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
NewCops: enable
|
|
3
|
+
TargetRubyVersion: 2.7.2
|
|
4
|
+
SuggestExtensions: false
|
|
4
5
|
Exclude:
|
|
5
|
-
- db/**/*
|
|
6
|
-
- gemfiles/**/*
|
|
7
|
-
- vendor/**/*
|
|
8
|
-
|
|
6
|
+
- "db/**/*"
|
|
7
|
+
- "gemfiles/**/*"
|
|
8
|
+
- "vendor/**/*"
|
|
9
|
+
Layout/SpaceBeforeFirstArg:
|
|
10
|
+
Enabled: false
|
|
11
|
+
Layout/LineLength:
|
|
12
|
+
Enabled: false
|
|
13
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
|
9
14
|
Enabled: false
|
|
10
15
|
Lint/UnusedBlockArgument:
|
|
11
16
|
Enabled: false
|
|
@@ -17,8 +22,6 @@ Metrics/ClassLength:
|
|
|
17
22
|
Enabled: false
|
|
18
23
|
Metrics/CyclomaticComplexity:
|
|
19
24
|
Enabled: false
|
|
20
|
-
Metrics/LineLength:
|
|
21
|
-
Enabled: false
|
|
22
25
|
Metrics/MethodLength:
|
|
23
26
|
Enabled: false
|
|
24
27
|
Metrics/ModuleLength:
|
|
@@ -29,8 +32,6 @@ Metrics/BlockLength:
|
|
|
29
32
|
Enabled: false
|
|
30
33
|
Security/YAMLLoad:
|
|
31
34
|
Enabled: false
|
|
32
|
-
Style/AlignParameters:
|
|
33
|
-
Enabled: false
|
|
34
35
|
Style/ClassAndModuleChildren:
|
|
35
36
|
Enabled: false
|
|
36
37
|
Style/ClassVars:
|
|
@@ -39,25 +40,23 @@ Style/Documentation:
|
|
|
39
40
|
Enabled: false
|
|
40
41
|
Style/DoubleNegation:
|
|
41
42
|
Enabled: false
|
|
42
|
-
|
|
43
|
+
Naming/FileName:
|
|
43
44
|
Enabled: false
|
|
44
45
|
Style/GuardClause:
|
|
45
46
|
Enabled: false
|
|
46
|
-
Style/IndentHash:
|
|
47
|
-
Enabled: false
|
|
48
47
|
Style/NilComparison:
|
|
49
48
|
Enabled: false
|
|
50
|
-
Style/OpMethod:
|
|
51
|
-
Enabled: false
|
|
52
49
|
Style/RescueModifier:
|
|
53
50
|
Enabled: false
|
|
54
51
|
Style/SignalException:
|
|
55
52
|
Enabled: false
|
|
56
53
|
Style/SingleLineMethods:
|
|
57
54
|
Enabled: false
|
|
58
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
|
59
|
-
Enabled: false
|
|
60
55
|
Style/StringLiterals:
|
|
61
56
|
EnforcedStyle: double_quotes
|
|
62
|
-
|
|
57
|
+
Naming/BinaryOperatorParameterName:
|
|
58
|
+
Enabled: false
|
|
59
|
+
Naming/VariableNumber:
|
|
60
|
+
Enabled: false
|
|
61
|
+
Gemspec/RequiredRubyVersion:
|
|
63
62
|
Enabled: false
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.7.2
|
data/.travis.yml
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
language: ruby
|
|
2
2
|
rvm:
|
|
3
|
-
- 2.
|
|
4
|
-
- 2.
|
|
5
|
-
- 2.
|
|
3
|
+
- 2.4.5
|
|
4
|
+
- 2.5.3
|
|
5
|
+
- 2.6.1
|
|
6
|
+
- 2.7.2
|
|
7
|
+
- 3.0.0
|
|
6
8
|
addons:
|
|
7
|
-
postgresql:
|
|
9
|
+
postgresql: "9.4"
|
|
8
10
|
before_install:
|
|
9
11
|
- gem update --system
|
|
10
12
|
- gem --version
|
|
11
|
-
- gem install bundler
|
|
13
|
+
- gem install bundler:2.1.4
|
|
12
14
|
before_script:
|
|
13
15
|
- bundle exec rake db:create
|
|
14
16
|
- bundle exec rake db:migrate
|
|
17
|
+
install: bundle _2.1.4_ install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
|
15
18
|
cache: bundler
|
|
16
19
|
gemfile:
|
|
17
20
|
- gemfiles/activerecord_5.0.0.gemfile
|
|
18
21
|
- gemfiles/activerecord_5.1.0.gemfile
|
|
22
|
+
- gemfiles/activerecord_6.1.0.gemfile
|
|
23
|
+
jobs:
|
|
24
|
+
exclude:
|
|
25
|
+
- rvm: 2.4.5
|
|
26
|
+
gemfile: gemfiles/activerecord_6.1.0.gemfile
|
|
27
|
+
- rvm: 3.0.0
|
|
28
|
+
gemfile: gemfiles/activerecord_5.0.0.gemfile
|
|
29
|
+
- rvm: 3.0.0
|
|
30
|
+
gemfile: gemfiles/activerecord_5.1.0.gemfile
|
data/Appraisals
CHANGED
data/Dockerfile
ADDED
data/README.md
CHANGED
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
# JSONb Accessor
|
|
2
2
|
|
|
3
|
-
Created by [<img src="https://raw.githubusercontent.com/
|
|
3
|
+
Created by [<img src="https://raw.githubusercontent.com/madeintandem/jsonb_accessor/master/tandem-logo.png" alt="Tandem Logo" />](https://www.madeintandem.com/)
|
|
4
4
|
|
|
5
|
-
[](http://badge.fury.io/rb/jsonb_accessor) [](http://badge.fury.io/rb/jsonb_accessor) [](https://travis-ci.org/madeintandem/jsonb_accessor) <img src="https://raw.githubusercontent.com/madeintandem/jsonb_accessor/master/json-bee.png" alt="JSONb Accessor Logo" align="right" />
|
|
6
6
|
|
|
7
|
-
Adds typed `jsonb` backed fields as first class citizens to your `ActiveRecord` models. This gem is similar in spirit to [HstoreAccessor](https://github.com/
|
|
7
|
+
Adds typed `jsonb` backed fields as first class citizens to your `ActiveRecord` models. This gem is similar in spirit to [HstoreAccessor](https://github.com/madeintandem/hstore_accessor), but the `jsonb` column in PostgreSQL has a few distinct advantages, mostly around nested documents and support for collections.
|
|
8
8
|
|
|
9
9
|
It also adds generic scopes for querying `jsonb` columns.
|
|
10
10
|
|
|
11
|
-
## 1.0 Beta
|
|
12
|
-
|
|
13
|
-
This README reflects the most recent 1.0 beta. Method names and interfaces may still change.
|
|
14
|
-
|
|
15
11
|
## Table of Contents
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
- [Installation](#installation)
|
|
14
|
+
- [Usage](#usage)
|
|
15
|
+
- [Scopes](#scopes)
|
|
16
|
+
- [Single-Table Inheritance](#single-table-inheritance)
|
|
17
|
+
- [Dependencies](#dependencies)
|
|
18
|
+
- [Validations](#validations)
|
|
19
|
+
- [Upgrading](#upgrading)
|
|
20
|
+
- [Development](#development)
|
|
21
|
+
- [Contributing](#contributing)
|
|
26
22
|
|
|
27
23
|
## Installation
|
|
28
24
|
|
|
29
25
|
Add this line to your application's `Gemfile`:
|
|
30
26
|
|
|
31
27
|
```ruby
|
|
32
|
-
gem "jsonb_accessor", "1
|
|
28
|
+
gem "jsonb_accessor", "~> 1"
|
|
33
29
|
```
|
|
34
30
|
|
|
35
31
|
And then execute:
|
|
@@ -162,6 +158,7 @@ Product.all.jsonb_where(:data, reviewed_at: { before: Time.current }, p: { great
|
|
|
162
158
|
|
|
163
159
|
Product.all.data_where(reviewed_at: { before: Time.current }, price: { greater_than: 5 })
|
|
164
160
|
```
|
|
161
|
+
|
|
165
162
|
This scope makes use of the `jsonb_contains`, `jsonb_number_where`, and `jsonb_time_where` `scope`s.
|
|
166
163
|
|
|
167
164
|
### `jsonb_where_not`
|
|
@@ -223,14 +220,14 @@ Product.all.jsonb_number_where(:data, :price_in_cents, :greater_than, 300)
|
|
|
223
220
|
|
|
224
221
|
It supports:
|
|
225
222
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
223
|
+
- `>`
|
|
224
|
+
- `>=`
|
|
225
|
+
- `greater_than`
|
|
226
|
+
- `greater_than_or_equal_to`
|
|
227
|
+
- `<`
|
|
228
|
+
- `<=`
|
|
229
|
+
- `less_than`
|
|
230
|
+
- `less_than_or_equal_to`
|
|
234
231
|
|
|
235
232
|
and it is indifferent to strings/symbols.
|
|
236
233
|
|
|
@@ -263,9 +260,9 @@ Product.all.jsonb_time_where_not(:data, :reviewed_at, :before, 2.days.ago)
|
|
|
263
260
|
## Single-Table Inheritance
|
|
264
261
|
|
|
265
262
|
One of the big issues with `ActiveRecord` single-table inheritance (STI)
|
|
266
|
-
is sparse columns.
|
|
263
|
+
is sparse columns. Essentially, as sub-types of the original table
|
|
267
264
|
diverge further from their parent more columns are left empty in a given
|
|
268
|
-
table.
|
|
265
|
+
table. Postgres' `jsonb` type provides part of the solution in that
|
|
269
266
|
the values in an `jsonb` column does not impose a structure - different
|
|
270
267
|
rows can have different values.
|
|
271
268
|
|
|
@@ -309,11 +306,11 @@ end
|
|
|
309
306
|
```
|
|
310
307
|
|
|
311
308
|
From here any attributes specific to any sub-class can be stored in the
|
|
312
|
-
`jsonb` column avoiding sparse data.
|
|
309
|
+
`jsonb` column avoiding sparse data. Indices can also be created on
|
|
313
310
|
individual fields in an `jsonb` column.
|
|
314
311
|
|
|
315
312
|
This approach was originally conceived by Joe Hirn in [this blog
|
|
316
|
-
post](
|
|
313
|
+
post](https://madeintandem.com/blog/2013-3-single-table-inheritance-hstore-lovely-combination/).
|
|
317
314
|
|
|
318
315
|
## Validations
|
|
319
316
|
|
|
@@ -330,15 +327,27 @@ See the [upgrade guide](UPGRADE_GUIDE.md).
|
|
|
330
327
|
|
|
331
328
|
## Development
|
|
332
329
|
|
|
330
|
+
### On your local machine
|
|
331
|
+
|
|
333
332
|
After checking out the repo, run `bin/setup` to install dependencies (make sure postgres is running first).
|
|
334
333
|
|
|
335
334
|
Run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
336
335
|
|
|
337
336
|
`rake` will run Rubocop and the specs.
|
|
338
337
|
|
|
338
|
+
### With Docker
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
# setup
|
|
342
|
+
docker-compose build
|
|
343
|
+
docker-compose run ruby rake db:migrate
|
|
344
|
+
# run test suite
|
|
345
|
+
docker-compose run ruby rake spec
|
|
346
|
+
```
|
|
347
|
+
|
|
339
348
|
## Contributing
|
|
340
349
|
|
|
341
|
-
1. [Fork it](https://github.com/
|
|
350
|
+
1. [Fork it](https://github.com/madeintandem/jsonb_accessor/fork)
|
|
342
351
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
343
352
|
3. Add tests and changes (run the tests with `rake`)
|
|
344
353
|
4. Commit your changes (`git commit -am 'Add some feature'`)
|
data/Rakefile
CHANGED
|
@@ -5,10 +5,29 @@ require "bundler/setup"
|
|
|
5
5
|
require "bundler/gem_tasks"
|
|
6
6
|
require "rspec/core/rake_task"
|
|
7
7
|
require "rubocop/rake_task"
|
|
8
|
-
require "
|
|
9
|
-
|
|
8
|
+
require "active_record"
|
|
9
|
+
require "erb"
|
|
10
10
|
|
|
11
11
|
RSpec::Core::RakeTask.new
|
|
12
12
|
RuboCop::RakeTask.new
|
|
13
13
|
|
|
14
|
+
# rubocop:disable Style/MixinUsage
|
|
15
|
+
include ActiveRecord::Tasks
|
|
16
|
+
# rubocop:enable Style/MixinUsage
|
|
17
|
+
|
|
18
|
+
root = File.expand_path __dir__
|
|
19
|
+
db_dir = File.join(root, "db")
|
|
20
|
+
DatabaseTasks.root = root
|
|
21
|
+
DatabaseTasks.db_dir = db_dir
|
|
22
|
+
DatabaseTasks.database_configuration = YAML.load(ERB.new(File.read(File.join(db_dir, "config.yml"))).result)
|
|
23
|
+
DatabaseTasks.migrations_paths = [File.join(db_dir, "migrate")]
|
|
24
|
+
DatabaseTasks.env = "test"
|
|
25
|
+
|
|
26
|
+
task :environment do
|
|
27
|
+
ActiveRecord::Base.configurations = DatabaseTasks.database_configuration
|
|
28
|
+
ActiveRecord::Base.establish_connection DatabaseTasks.env.to_sym
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
load "active_record/railties/databases.rake"
|
|
32
|
+
|
|
14
33
|
task(default: %i[rubocop spec])
|
data/bin/console
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
-
# rubocop:disable Lint/UselessAssignment
|
|
5
|
-
|
|
6
4
|
require "bundler/setup"
|
|
7
5
|
require "jsonb_accessor"
|
|
8
6
|
require "rspec"
|
|
9
|
-
require File.expand_path("
|
|
7
|
+
require File.expand_path("../spec/spec_helper.rb", __dir__)
|
|
10
8
|
|
|
11
9
|
dbconfig = YAML.load(File.open("db/config.yml"))
|
|
12
10
|
ActiveRecord::Base.establish_connection(dbconfig["development"])
|
|
13
11
|
|
|
12
|
+
# rubocop:disable Lint/UselessAssignment
|
|
14
13
|
x = Product.new
|
|
14
|
+
# rubocop:enable Lint/UselessAssignment
|
|
15
15
|
|
|
16
16
|
Pry.start
|
data/db/config.yml
CHANGED
data/db/schema.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# This file is auto-generated from the current state of the database. Instead
|
|
2
4
|
# of editing this file, please use the migrations feature of Active Record to
|
|
3
5
|
# incrementally modify your database, and then regenerate this schema definition.
|
|
@@ -10,8 +12,7 @@
|
|
|
10
12
|
#
|
|
11
13
|
# It's strongly recommended that you check this file into your version control system.
|
|
12
14
|
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
|
14
|
-
|
|
15
|
+
ActiveRecord::Schema.define(version: 20_150_407_031_737) do
|
|
15
16
|
# These are extensions that must be enabled in order to support this database
|
|
16
17
|
enable_extension "plpgsql"
|
|
17
18
|
|
|
@@ -32,5 +33,4 @@ ActiveRecord::Schema.define(version: 20150407031737) do
|
|
|
32
33
|
t.datetime "datetime_type"
|
|
33
34
|
t.decimal "decimal_type"
|
|
34
35
|
end
|
|
35
|
-
|
|
36
36
|
end
|
data/docker-compose.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
ruby:
|
|
5
|
+
environment:
|
|
6
|
+
- DATABASE_HOST=postgres
|
|
7
|
+
build:
|
|
8
|
+
args:
|
|
9
|
+
- RUBY_VERSION=${RUBY_VERSION:-2.7.2}
|
|
10
|
+
context: .
|
|
11
|
+
volumes:
|
|
12
|
+
- '.:/usr/src/app'
|
|
13
|
+
depends_on:
|
|
14
|
+
- postgres
|
|
15
|
+
|
|
16
|
+
postgres:
|
|
17
|
+
image: postgres:12
|
|
18
|
+
environment:
|
|
19
|
+
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
20
|
+
- POSTGRES_DB=jsonb_accessor
|
|
21
|
+
- PGDATA=/var/lib/postgresql/data/pgdata
|
|
22
|
+
volumes:
|
|
23
|
+
- pg_data:/var/lib/postgresql/data/pgdata
|
|
24
|
+
|
|
25
|
+
volumes:
|
|
26
|
+
pg_data:
|
data/jsonb_accessor.gemspec
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
1
|
# frozen_string_literal: true
|
|
3
2
|
|
|
4
|
-
lib = File.expand_path("
|
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
|
5
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
6
5
|
require "jsonb_accessor/version"
|
|
7
6
|
|
|
@@ -15,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
|
15
14
|
spec.description = "Adds typed jsonb backed fields to your ActiveRecord models."
|
|
16
15
|
spec.homepage = "https://github.com/devmynd/jsonb_accessor"
|
|
17
16
|
spec.license = "MIT"
|
|
18
|
-
spec.required_ruby_version = "
|
|
17
|
+
spec.required_ruby_version = ">= 2"
|
|
19
18
|
|
|
20
19
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) || f.match(/png\z/) }
|
|
21
20
|
spec.bindir = "exe"
|
|
@@ -27,14 +26,12 @@ Gem::Specification.new do |spec|
|
|
|
27
26
|
spec.add_dependency "pg", ">= 0.18.1"
|
|
28
27
|
|
|
29
28
|
spec.add_development_dependency "appraisal", "~> 2.2.0"
|
|
30
|
-
spec.add_development_dependency "bundler", "~> 1.15.0"
|
|
31
|
-
spec.add_development_dependency "database_cleaner", "~> 1.6.0"
|
|
32
29
|
spec.add_development_dependency "awesome_print"
|
|
30
|
+
spec.add_development_dependency "database_cleaner", "~> 1.6.0"
|
|
33
31
|
spec.add_development_dependency "pry"
|
|
34
32
|
spec.add_development_dependency "pry-doc"
|
|
35
33
|
spec.add_development_dependency "pry-nav"
|
|
36
|
-
spec.add_development_dependency "rake", "
|
|
34
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
|
37
35
|
spec.add_development_dependency "rspec", "~> 3.6.0"
|
|
38
|
-
spec.add_development_dependency "rubocop", "~>
|
|
39
|
-
spec.add_development_dependency "standalone_migrations", "~> 5.2.0"
|
|
36
|
+
spec.add_development_dependency "rubocop", "~> 1"
|
|
40
37
|
end
|
data/lib/jsonb_accessor.rb
CHANGED
|
@@ -15,6 +15,6 @@ module JsonbAccessor
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
ActiveSupport.on_load(:active_record) do
|
|
18
|
-
ActiveRecord::Base.
|
|
19
|
-
ActiveRecord::Base.
|
|
18
|
+
ActiveRecord::Base.include JsonbAccessor
|
|
19
|
+
ActiveRecord::Base.include JsonbAccessor::QueryBuilder
|
|
20
20
|
end
|
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}"
|
|
@@ -51,7 +55,7 @@ module JsonbAccessor
|
|
|
51
55
|
# each time it is evaluated.
|
|
52
56
|
all_defaults_mapping_proc =
|
|
53
57
|
if all_defaults_mapping.present?
|
|
54
|
-
-> { all_defaults_mapping.
|
|
58
|
+
-> { all_defaults_mapping.transform_values { |value| value.respond_to?(:call) ? value.call : value }.to_h.compact }
|
|
55
59
|
end
|
|
56
60
|
attribute jsonb_attribute, :jsonb, default: all_defaults_mapping_proc if all_defaults_mapping_proc.present?
|
|
57
61
|
|
|
@@ -75,7 +79,7 @@ module JsonbAccessor
|
|
|
75
79
|
empty_named_attributes = names_to_store_keys.keys.each_with_object({}) { |name, defaults| defaults[name] = nil }
|
|
76
80
|
|
|
77
81
|
store_key_attributes = ::JsonbAccessor::QueryHelper.convert_keys_to_store_keys(value, names_to_store_keys)
|
|
78
|
-
write_attribute(jsonb_attribute, empty_store_key_attributes.merge(store_key_attributes))
|
|
82
|
+
write_attribute(jsonb_attribute, empty_store_key_attributes.merge(store_key_attributes).compact)
|
|
79
83
|
|
|
80
84
|
empty_named_attributes.merge(value).each { |name, attribute_value| write_attribute(name, attribute_value) }
|
|
81
85
|
end
|
|
@@ -88,9 +92,11 @@ module JsonbAccessor
|
|
|
88
92
|
jsonb_values = public_send(jsonb_attribute) || {}
|
|
89
93
|
jsonb_values.each do |store_key, value|
|
|
90
94
|
name = names_and_store_keys.key(store_key)
|
|
91
|
-
|
|
95
|
+
next unless name
|
|
96
|
+
|
|
97
|
+
write_attribute(name, value)
|
|
98
|
+
clear_attribute_change(name) if persisted?
|
|
92
99
|
end
|
|
93
|
-
clear_changes_information if persisted?
|
|
94
100
|
end
|
|
95
101
|
end
|
|
96
102
|
|
|
@@ -61,9 +61,7 @@ module JsonbAccessor
|
|
|
61
61
|
excludes_attributes = {}
|
|
62
62
|
|
|
63
63
|
attributes.each do |name, value|
|
|
64
|
-
if value.is_a?(Range)
|
|
65
|
-
raise JsonbAccessor::QueryHelper::NotSupported, "`jsonb_where_not` scope does not accept ranges as arguments. Given `#{value}` for `#{name}` field"
|
|
66
|
-
end
|
|
64
|
+
raise JsonbAccessor::QueryHelper::NotSupported, "`jsonb_where_not` scope does not accept ranges as arguments. Given `#{value}` for `#{name}` field" if value.is_a?(Range)
|
|
67
65
|
|
|
68
66
|
if JsonbAccessor::QueryHelper.number_query_arguments?(value)
|
|
69
67
|
value.each { |operator, query_value| query = query.jsonb_number_where_not(column_name, name, operator, query_value) }
|
|
@@ -81,7 +79,7 @@ module JsonbAccessor
|
|
|
81
79
|
JsonbAccessor::QueryHelper.validate_column_name!(all, column_name)
|
|
82
80
|
JsonbAccessor::QueryHelper.validate_field_name!(all, column_name, field_name)
|
|
83
81
|
JsonbAccessor::QueryHelper.validate_direction!(direction)
|
|
84
|
-
order("(#{table_name}.#{column_name} -> '#{field_name}') #{direction}")
|
|
82
|
+
order(Arel.sql("(#{table_name}.#{column_name} -> '#{field_name}') #{direction}"))
|
|
85
83
|
end)
|
|
86
84
|
end
|
|
87
85
|
end
|
|
@@ -42,9 +42,7 @@ module JsonbAccessor
|
|
|
42
42
|
|
|
43
43
|
class << self
|
|
44
44
|
def validate_column_name!(query, column_name)
|
|
45
|
-
if query.model.columns.none? { |column| column.name == column_name.to_s }
|
|
46
|
-
raise InvalidColumnName, "a column named `#{column_name}` does not exist on the `#{query.model.table_name}` table"
|
|
47
|
-
end
|
|
45
|
+
raise InvalidColumnName, "a column named `#{column_name}` does not exist on the `#{query.model.table_name}` table" if query.model.columns.none? { |column| column.name == column_name.to_s }
|
|
48
46
|
end
|
|
49
47
|
|
|
50
48
|
def validate_field_name!(query, column_name, field_name)
|
|
@@ -56,9 +54,7 @@ module JsonbAccessor
|
|
|
56
54
|
end
|
|
57
55
|
|
|
58
56
|
def validate_direction!(option)
|
|
59
|
-
if ORDER_DIRECTIONS.exclude?(option)
|
|
60
|
-
raise InvalidDirection, "`#{option}` is not a valid direction for ordering, only `asc` and `desc` are accepted"
|
|
61
|
-
end
|
|
57
|
+
raise InvalidDirection, "`#{option}` is not a valid direction for ordering, only `asc` and `desc` are accepted" if ORDER_DIRECTIONS.exclude?(option)
|
|
62
58
|
end
|
|
63
59
|
|
|
64
60
|
def convert_keys_to_store_keys(attributes, store_key_mapping)
|
metadata
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jsonb_accessor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Crismali
|
|
8
8
|
- Joe Hirn
|
|
9
9
|
- Jason Haruska
|
|
10
|
-
autorequire:
|
|
10
|
+
autorequire:
|
|
11
11
|
bindir: exe
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2021-05-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: activerecord
|
|
@@ -69,19 +69,19 @@ dependencies:
|
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
70
|
version: 2.2.0
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
|
-
name:
|
|
72
|
+
name: awesome_print
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements:
|
|
75
|
-
- - "
|
|
75
|
+
- - ">="
|
|
76
76
|
- !ruby/object:Gem::Version
|
|
77
|
-
version:
|
|
77
|
+
version: '0'
|
|
78
78
|
type: :development
|
|
79
79
|
prerelease: false
|
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
|
81
81
|
requirements:
|
|
82
|
-
- - "
|
|
82
|
+
- - ">="
|
|
83
83
|
- !ruby/object:Gem::Version
|
|
84
|
-
version:
|
|
84
|
+
version: '0'
|
|
85
85
|
- !ruby/object:Gem::Dependency
|
|
86
86
|
name: database_cleaner
|
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -96,20 +96,6 @@ dependencies:
|
|
|
96
96
|
- - "~>"
|
|
97
97
|
- !ruby/object:Gem::Version
|
|
98
98
|
version: 1.6.0
|
|
99
|
-
- !ruby/object:Gem::Dependency
|
|
100
|
-
name: awesome_print
|
|
101
|
-
requirement: !ruby/object:Gem::Requirement
|
|
102
|
-
requirements:
|
|
103
|
-
- - ">="
|
|
104
|
-
- !ruby/object:Gem::Version
|
|
105
|
-
version: '0'
|
|
106
|
-
type: :development
|
|
107
|
-
prerelease: false
|
|
108
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
109
|
-
requirements:
|
|
110
|
-
- - ">="
|
|
111
|
-
- !ruby/object:Gem::Version
|
|
112
|
-
version: '0'
|
|
113
99
|
- !ruby/object:Gem::Dependency
|
|
114
100
|
name: pry
|
|
115
101
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -156,16 +142,16 @@ dependencies:
|
|
|
156
142
|
name: rake
|
|
157
143
|
requirement: !ruby/object:Gem::Requirement
|
|
158
144
|
requirements:
|
|
159
|
-
- - "
|
|
145
|
+
- - ">="
|
|
160
146
|
- !ruby/object:Gem::Version
|
|
161
|
-
version:
|
|
147
|
+
version: 12.3.3
|
|
162
148
|
type: :development
|
|
163
149
|
prerelease: false
|
|
164
150
|
version_requirements: !ruby/object:Gem::Requirement
|
|
165
151
|
requirements:
|
|
166
|
-
- - "
|
|
152
|
+
- - ">="
|
|
167
153
|
- !ruby/object:Gem::Version
|
|
168
|
-
version:
|
|
154
|
+
version: 12.3.3
|
|
169
155
|
- !ruby/object:Gem::Dependency
|
|
170
156
|
name: rspec
|
|
171
157
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -186,28 +172,14 @@ dependencies:
|
|
|
186
172
|
requirements:
|
|
187
173
|
- - "~>"
|
|
188
174
|
- !ruby/object:Gem::Version
|
|
189
|
-
version:
|
|
190
|
-
type: :development
|
|
191
|
-
prerelease: false
|
|
192
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
193
|
-
requirements:
|
|
194
|
-
- - "~>"
|
|
195
|
-
- !ruby/object:Gem::Version
|
|
196
|
-
version: 0.48.1
|
|
197
|
-
- !ruby/object:Gem::Dependency
|
|
198
|
-
name: standalone_migrations
|
|
199
|
-
requirement: !ruby/object:Gem::Requirement
|
|
200
|
-
requirements:
|
|
201
|
-
- - "~>"
|
|
202
|
-
- !ruby/object:Gem::Version
|
|
203
|
-
version: 5.2.0
|
|
175
|
+
version: '1'
|
|
204
176
|
type: :development
|
|
205
177
|
prerelease: false
|
|
206
178
|
version_requirements: !ruby/object:Gem::Requirement
|
|
207
179
|
requirements:
|
|
208
180
|
- - "~>"
|
|
209
181
|
- !ruby/object:Gem::Version
|
|
210
|
-
version:
|
|
182
|
+
version: '1'
|
|
211
183
|
description: Adds typed jsonb backed fields to your ActiveRecord models.
|
|
212
184
|
email:
|
|
213
185
|
- michael@crismali.com
|
|
@@ -224,6 +196,7 @@ files:
|
|
|
224
196
|
- ".travis.yml"
|
|
225
197
|
- Appraisals
|
|
226
198
|
- CODE_OF_CONDUCT.md
|
|
199
|
+
- Dockerfile
|
|
227
200
|
- Gemfile
|
|
228
201
|
- LICENSE.txt
|
|
229
202
|
- README.md
|
|
@@ -234,10 +207,10 @@ files:
|
|
|
234
207
|
- db/config.yml
|
|
235
208
|
- db/migrate/20150407031737_set_up_testing_db.rb
|
|
236
209
|
- db/schema.rb
|
|
210
|
+
- docker-compose.yml
|
|
237
211
|
- gemfiles/activerecord_5.0.0.gemfile
|
|
238
|
-
- gemfiles/activerecord_5.0.0.gemfile.lock
|
|
239
212
|
- gemfiles/activerecord_5.1.0.gemfile
|
|
240
|
-
- gemfiles/
|
|
213
|
+
- gemfiles/activerecord_6.1.0.gemfile
|
|
241
214
|
- jsonb_accessor.gemspec
|
|
242
215
|
- lib/jsonb_accessor.rb
|
|
243
216
|
- lib/jsonb_accessor/macro.rb
|
|
@@ -248,24 +221,23 @@ homepage: https://github.com/devmynd/jsonb_accessor
|
|
|
248
221
|
licenses:
|
|
249
222
|
- MIT
|
|
250
223
|
metadata: {}
|
|
251
|
-
post_install_message:
|
|
224
|
+
post_install_message:
|
|
252
225
|
rdoc_options: []
|
|
253
226
|
require_paths:
|
|
254
227
|
- lib
|
|
255
228
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
256
229
|
requirements:
|
|
257
|
-
- - "
|
|
230
|
+
- - ">="
|
|
258
231
|
- !ruby/object:Gem::Version
|
|
259
|
-
version: '2
|
|
232
|
+
version: '2'
|
|
260
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
234
|
requirements:
|
|
262
|
-
- - "
|
|
235
|
+
- - ">="
|
|
263
236
|
- !ruby/object:Gem::Version
|
|
264
|
-
version:
|
|
237
|
+
version: '0'
|
|
265
238
|
requirements: []
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
signing_key:
|
|
239
|
+
rubygems_version: 3.1.4
|
|
240
|
+
signing_key:
|
|
269
241
|
specification_version: 4
|
|
270
242
|
summary: Adds typed jsonb backed fields to your ActiveRecord models.
|
|
271
243
|
test_files: []
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ..
|
|
3
|
-
specs:
|
|
4
|
-
jsonb_accessor (1.0.0.beta.7)
|
|
5
|
-
activerecord (>= 5.0)
|
|
6
|
-
activesupport (>= 5.0)
|
|
7
|
-
pg (>= 0.18.1)
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
actionpack (5.0.2)
|
|
13
|
-
actionview (= 5.0.2)
|
|
14
|
-
activesupport (= 5.0.2)
|
|
15
|
-
rack (~> 2.0)
|
|
16
|
-
rack-test (~> 0.6.3)
|
|
17
|
-
rails-dom-testing (~> 2.0)
|
|
18
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
19
|
-
actionview (5.0.2)
|
|
20
|
-
activesupport (= 5.0.2)
|
|
21
|
-
builder (~> 3.1)
|
|
22
|
-
erubis (~> 2.7.0)
|
|
23
|
-
rails-dom-testing (~> 2.0)
|
|
24
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
25
|
-
activemodel (5.0.2)
|
|
26
|
-
activesupport (= 5.0.2)
|
|
27
|
-
activerecord (5.0.2)
|
|
28
|
-
activemodel (= 5.0.2)
|
|
29
|
-
activesupport (= 5.0.2)
|
|
30
|
-
arel (~> 7.0)
|
|
31
|
-
activesupport (5.0.2)
|
|
32
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
33
|
-
i18n (~> 0.7)
|
|
34
|
-
minitest (~> 5.1)
|
|
35
|
-
tzinfo (~> 1.1)
|
|
36
|
-
appraisal (2.2.0)
|
|
37
|
-
bundler
|
|
38
|
-
rake
|
|
39
|
-
thor (>= 0.14.0)
|
|
40
|
-
arel (7.1.4)
|
|
41
|
-
ast (2.3.0)
|
|
42
|
-
awesome_print (1.7.0)
|
|
43
|
-
builder (3.2.3)
|
|
44
|
-
coderay (1.1.1)
|
|
45
|
-
concurrent-ruby (1.0.5)
|
|
46
|
-
database_cleaner (1.6.0)
|
|
47
|
-
diff-lcs (1.3)
|
|
48
|
-
erubis (2.7.0)
|
|
49
|
-
i18n (0.8.1)
|
|
50
|
-
loofah (2.0.3)
|
|
51
|
-
nokogiri (>= 1.5.9)
|
|
52
|
-
method_source (0.8.2)
|
|
53
|
-
mini_portile2 (2.1.0)
|
|
54
|
-
minitest (5.10.1)
|
|
55
|
-
nokogiri (1.7.1)
|
|
56
|
-
mini_portile2 (~> 2.1.0)
|
|
57
|
-
parser (2.4.0.0)
|
|
58
|
-
ast (~> 2.2)
|
|
59
|
-
pg (0.20.0)
|
|
60
|
-
powerpack (0.1.1)
|
|
61
|
-
pry (0.10.4)
|
|
62
|
-
coderay (~> 1.1.0)
|
|
63
|
-
method_source (~> 0.8.1)
|
|
64
|
-
slop (~> 3.4)
|
|
65
|
-
pry-doc (0.10.0)
|
|
66
|
-
pry (~> 0.9)
|
|
67
|
-
yard (~> 0.9)
|
|
68
|
-
pry-nav (0.2.4)
|
|
69
|
-
pry (>= 0.9.10, < 0.11.0)
|
|
70
|
-
rack (2.0.2)
|
|
71
|
-
rack-test (0.6.3)
|
|
72
|
-
rack (>= 1.0)
|
|
73
|
-
rails-dom-testing (2.0.2)
|
|
74
|
-
activesupport (>= 4.2.0, < 6.0)
|
|
75
|
-
nokogiri (~> 1.6)
|
|
76
|
-
rails-html-sanitizer (1.0.3)
|
|
77
|
-
loofah (~> 2.0)
|
|
78
|
-
railties (5.0.2)
|
|
79
|
-
actionpack (= 5.0.2)
|
|
80
|
-
activesupport (= 5.0.2)
|
|
81
|
-
method_source
|
|
82
|
-
rake (>= 0.8.7)
|
|
83
|
-
thor (>= 0.18.1, < 2.0)
|
|
84
|
-
rainbow (2.2.2)
|
|
85
|
-
rake
|
|
86
|
-
rake (10.5.0)
|
|
87
|
-
rspec (3.6.0)
|
|
88
|
-
rspec-core (~> 3.6.0)
|
|
89
|
-
rspec-expectations (~> 3.6.0)
|
|
90
|
-
rspec-mocks (~> 3.6.0)
|
|
91
|
-
rspec-core (3.6.0)
|
|
92
|
-
rspec-support (~> 3.6.0)
|
|
93
|
-
rspec-expectations (3.6.0)
|
|
94
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
95
|
-
rspec-support (~> 3.6.0)
|
|
96
|
-
rspec-mocks (3.6.0)
|
|
97
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
|
-
rspec-support (~> 3.6.0)
|
|
99
|
-
rspec-support (3.6.0)
|
|
100
|
-
rubocop (0.48.1)
|
|
101
|
-
parser (>= 2.3.3.1, < 3.0)
|
|
102
|
-
powerpack (~> 0.1)
|
|
103
|
-
rainbow (>= 1.99.1, < 3.0)
|
|
104
|
-
ruby-progressbar (~> 1.7)
|
|
105
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
106
|
-
ruby-progressbar (1.8.1)
|
|
107
|
-
slop (3.6.0)
|
|
108
|
-
standalone_migrations (5.2.1)
|
|
109
|
-
activerecord (>= 4.2.7, < 5.2.0)
|
|
110
|
-
railties (>= 4.2.7, < 5.2.0)
|
|
111
|
-
rake (~> 10.0)
|
|
112
|
-
thor (0.19.4)
|
|
113
|
-
thread_safe (0.3.6)
|
|
114
|
-
tzinfo (1.2.2)
|
|
115
|
-
thread_safe (~> 0.1)
|
|
116
|
-
unicode-display_width (1.2.1)
|
|
117
|
-
yard (0.9.8)
|
|
118
|
-
|
|
119
|
-
PLATFORMS
|
|
120
|
-
ruby
|
|
121
|
-
|
|
122
|
-
DEPENDENCIES
|
|
123
|
-
activerecord (~> 5.0.0)
|
|
124
|
-
appraisal (~> 2.2.0)
|
|
125
|
-
awesome_print
|
|
126
|
-
bundler (~> 1.15.0)
|
|
127
|
-
database_cleaner (~> 1.6.0)
|
|
128
|
-
jsonb_accessor!
|
|
129
|
-
pg
|
|
130
|
-
pry
|
|
131
|
-
pry-doc
|
|
132
|
-
pry-nav
|
|
133
|
-
rake (~> 10.0)
|
|
134
|
-
rspec (~> 3.6.0)
|
|
135
|
-
rubocop (~> 0.48.1)
|
|
136
|
-
standalone_migrations (~> 5.2.0)
|
|
137
|
-
|
|
138
|
-
BUNDLED WITH
|
|
139
|
-
1.15.3
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ..
|
|
3
|
-
specs:
|
|
4
|
-
jsonb_accessor (1.0.0.beta.7)
|
|
5
|
-
activerecord (>= 5.0)
|
|
6
|
-
activesupport (>= 5.0)
|
|
7
|
-
pg (>= 0.18.1)
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
actionpack (5.1.0)
|
|
13
|
-
actionview (= 5.1.0)
|
|
14
|
-
activesupport (= 5.1.0)
|
|
15
|
-
rack (~> 2.0)
|
|
16
|
-
rack-test (~> 0.6.3)
|
|
17
|
-
rails-dom-testing (~> 2.0)
|
|
18
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
19
|
-
actionview (5.1.0)
|
|
20
|
-
activesupport (= 5.1.0)
|
|
21
|
-
builder (~> 3.1)
|
|
22
|
-
erubi (~> 1.4)
|
|
23
|
-
rails-dom-testing (~> 2.0)
|
|
24
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
25
|
-
activemodel (5.1.0)
|
|
26
|
-
activesupport (= 5.1.0)
|
|
27
|
-
activerecord (5.1.0)
|
|
28
|
-
activemodel (= 5.1.0)
|
|
29
|
-
activesupport (= 5.1.0)
|
|
30
|
-
arel (~> 8.0)
|
|
31
|
-
activesupport (5.1.0)
|
|
32
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
33
|
-
i18n (~> 0.7)
|
|
34
|
-
minitest (~> 5.1)
|
|
35
|
-
tzinfo (~> 1.1)
|
|
36
|
-
appraisal (2.2.0)
|
|
37
|
-
bundler
|
|
38
|
-
rake
|
|
39
|
-
thor (>= 0.14.0)
|
|
40
|
-
arel (8.0.0)
|
|
41
|
-
ast (2.3.0)
|
|
42
|
-
awesome_print (1.7.0)
|
|
43
|
-
builder (3.2.3)
|
|
44
|
-
coderay (1.1.1)
|
|
45
|
-
concurrent-ruby (1.0.5)
|
|
46
|
-
database_cleaner (1.6.0)
|
|
47
|
-
diff-lcs (1.3)
|
|
48
|
-
erubi (1.6.0)
|
|
49
|
-
i18n (0.8.1)
|
|
50
|
-
loofah (2.0.3)
|
|
51
|
-
nokogiri (>= 1.5.9)
|
|
52
|
-
method_source (0.8.2)
|
|
53
|
-
mini_portile2 (2.1.0)
|
|
54
|
-
minitest (5.10.1)
|
|
55
|
-
nokogiri (1.7.1)
|
|
56
|
-
mini_portile2 (~> 2.1.0)
|
|
57
|
-
parser (2.4.0.0)
|
|
58
|
-
ast (~> 2.2)
|
|
59
|
-
pg (0.20.0)
|
|
60
|
-
powerpack (0.1.1)
|
|
61
|
-
pry (0.10.4)
|
|
62
|
-
coderay (~> 1.1.0)
|
|
63
|
-
method_source (~> 0.8.1)
|
|
64
|
-
slop (~> 3.4)
|
|
65
|
-
pry-doc (0.10.0)
|
|
66
|
-
pry (~> 0.9)
|
|
67
|
-
yard (~> 0.9)
|
|
68
|
-
pry-nav (0.2.4)
|
|
69
|
-
pry (>= 0.9.10, < 0.11.0)
|
|
70
|
-
rack (2.0.1)
|
|
71
|
-
rack-test (0.6.3)
|
|
72
|
-
rack (>= 1.0)
|
|
73
|
-
rails-dom-testing (2.0.2)
|
|
74
|
-
activesupport (>= 4.2.0, < 6.0)
|
|
75
|
-
nokogiri (~> 1.6)
|
|
76
|
-
rails-html-sanitizer (1.0.3)
|
|
77
|
-
loofah (~> 2.0)
|
|
78
|
-
railties (5.1.0)
|
|
79
|
-
actionpack (= 5.1.0)
|
|
80
|
-
activesupport (= 5.1.0)
|
|
81
|
-
method_source
|
|
82
|
-
rake (>= 0.8.7)
|
|
83
|
-
thor (>= 0.18.1, < 2.0)
|
|
84
|
-
rainbow (2.2.2)
|
|
85
|
-
rake
|
|
86
|
-
rake (10.5.0)
|
|
87
|
-
rspec (3.6.0)
|
|
88
|
-
rspec-core (~> 3.6.0)
|
|
89
|
-
rspec-expectations (~> 3.6.0)
|
|
90
|
-
rspec-mocks (~> 3.6.0)
|
|
91
|
-
rspec-core (3.6.0)
|
|
92
|
-
rspec-support (~> 3.6.0)
|
|
93
|
-
rspec-expectations (3.6.0)
|
|
94
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
95
|
-
rspec-support (~> 3.6.0)
|
|
96
|
-
rspec-mocks (3.6.0)
|
|
97
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
|
-
rspec-support (~> 3.6.0)
|
|
99
|
-
rspec-support (3.6.0)
|
|
100
|
-
rubocop (0.48.1)
|
|
101
|
-
parser (>= 2.3.3.1, < 3.0)
|
|
102
|
-
powerpack (~> 0.1)
|
|
103
|
-
rainbow (>= 1.99.1, < 3.0)
|
|
104
|
-
ruby-progressbar (~> 1.7)
|
|
105
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
106
|
-
ruby-progressbar (1.8.1)
|
|
107
|
-
slop (3.6.0)
|
|
108
|
-
standalone_migrations (5.2.1)
|
|
109
|
-
activerecord (>= 4.2.7, < 5.2.0)
|
|
110
|
-
railties (>= 4.2.7, < 5.2.0)
|
|
111
|
-
rake (~> 10.0)
|
|
112
|
-
thor (0.19.4)
|
|
113
|
-
thread_safe (0.3.6)
|
|
114
|
-
tzinfo (1.2.3)
|
|
115
|
-
thread_safe (~> 0.1)
|
|
116
|
-
unicode-display_width (1.2.1)
|
|
117
|
-
yard (0.9.9)
|
|
118
|
-
|
|
119
|
-
PLATFORMS
|
|
120
|
-
ruby
|
|
121
|
-
|
|
122
|
-
DEPENDENCIES
|
|
123
|
-
activerecord (~> 5.1.0)
|
|
124
|
-
appraisal (~> 2.2.0)
|
|
125
|
-
awesome_print
|
|
126
|
-
bundler (~> 1.15.0)
|
|
127
|
-
database_cleaner (~> 1.6.0)
|
|
128
|
-
jsonb_accessor!
|
|
129
|
-
pg
|
|
130
|
-
pry
|
|
131
|
-
pry-doc
|
|
132
|
-
pry-nav
|
|
133
|
-
rake (~> 10.0)
|
|
134
|
-
rspec (~> 3.6.0)
|
|
135
|
-
rubocop (~> 0.48.1)
|
|
136
|
-
standalone_migrations (~> 5.2.0)
|
|
137
|
-
|
|
138
|
-
BUNDLED WITH
|
|
139
|
-
1.15.3
|