ar_doc_store 2.1.3 → 2.1.4
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/.github/workflows/test.yml +48 -0
- data/Gemfile +2 -0
- data/README.md +22 -0
- data/Rakefile +3 -2
- data/ar_doc_store.gemspec +3 -2
- data/lib/ar_doc_store/attributes/base.rb +0 -7
- data/lib/ar_doc_store/attributes/enumeration.rb +9 -0
- data/lib/ar_doc_store/embeddable_model.rb +1 -1
- data/lib/ar_doc_store/embedding.rb +2 -4
- data/lib/ar_doc_store/model.rb +1 -1
- data/lib/ar_doc_store/version.rb +1 -1
- data/test/attributes/array_attribute_test.rb +1 -1
- data/test/attributes/boolean_attribute_test.rb +1 -1
- data/test/attributes/date_attribute_test.rb +1 -1
- data/test/attributes/datetime_attribute_test.rb +1 -1
- data/test/attributes/decimal_attribute_test.rb +1 -1
- data/test/attributes/embeds_many_attribute_test.rb +1 -1
- data/test/attributes/embeds_one_attribute_test.rb +1 -1
- data/test/attributes/enumeration_attribute_test.rb +1 -1
- data/test/attributes/float_attribute_test.rb +1 -1
- data/test/attributes/integer_attribute_test.rb +1 -1
- data/test/attributes/string_attribute_test.rb +1 -1
- data/test/model_test.rb +15 -1
- data/test/rails_compatibility_test.rb +66 -0
- data/test/test_helper.rb +75 -11
- metadata +28 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b2fadd8bf7bb78682cabb980f852ecbe91eb65013138f63521542e9ed42c972
|
|
4
|
+
data.tar.gz: 8e12ab14feab7fbf3c2b922612911502c253971f50a555d77c39a2aeb07d3f03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe6118c156f464c6f36dd5b011813648a95f6c23112c133b40f32ad47968d91d973cbcb9de7865c7b5ce61463be03de1bfa404c2feed11f1a1d0ecdb5e75eb4a
|
|
7
|
+
data.tar.gz: 3c9fc5af5db270403ee35c701e8557f76c94990bbd11372b41cd04df942de52fe2fb501bf47982b354aff3002207dc3a0856a3064fef996f197e82c08a1046c7
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
fail-fast: false
|
|
10
|
+
matrix:
|
|
11
|
+
include:
|
|
12
|
+
- ruby: '3.1'
|
|
13
|
+
rails: '~> 6.1.0'
|
|
14
|
+
- ruby: '3.1'
|
|
15
|
+
rails: '~> 7.0.0'
|
|
16
|
+
- ruby: '3.2'
|
|
17
|
+
rails: '~> 7.1.0'
|
|
18
|
+
- ruby: '3.2'
|
|
19
|
+
rails: '~> 7.2.0'
|
|
20
|
+
- ruby: '3.4'
|
|
21
|
+
rails: '~> 8.0.0'
|
|
22
|
+
- ruby: '3.4'
|
|
23
|
+
rails: '~> 8.1.0'
|
|
24
|
+
- ruby: '4.0'
|
|
25
|
+
rails: '~> 8.1.0'
|
|
26
|
+
services:
|
|
27
|
+
postgres:
|
|
28
|
+
image: postgres:16
|
|
29
|
+
env:
|
|
30
|
+
POSTGRES_USER: postgres
|
|
31
|
+
POSTGRES_PASSWORD: postgres
|
|
32
|
+
POSTGRES_DB: ar_doc_store_test
|
|
33
|
+
ports: ['5432:5432']
|
|
34
|
+
options: >-
|
|
35
|
+
--health-cmd pg_isready
|
|
36
|
+
--health-interval 10s
|
|
37
|
+
--health-timeout 5s
|
|
38
|
+
--health-retries 5
|
|
39
|
+
env:
|
|
40
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
|
41
|
+
DATABASE_URL: postgresql://postgres:postgres@localhost/ar_doc_store_test
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
- uses: ruby/setup-ruby@v1
|
|
45
|
+
with:
|
|
46
|
+
ruby-version: ${{ matrix.ruby }}
|
|
47
|
+
bundler-cache: true
|
|
48
|
+
- run: bundle exec rake test
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -294,6 +294,28 @@ end
|
|
|
294
294
|
|
|
295
295
|
## Contributing
|
|
296
296
|
|
|
297
|
+
### Running tests
|
|
298
|
+
|
|
299
|
+
The development bundle defaults to Rails 8.1. The gem's runtime requirement
|
|
300
|
+
remains Active Record 6.1 or newer. CI covers Rails 6.1, 7.0, 7.1, 7.2, 8.0,
|
|
301
|
+
and 8.1 with compatible Ruby versions.
|
|
302
|
+
|
|
303
|
+
Create a dedicated PostgreSQL database and run:
|
|
304
|
+
|
|
305
|
+
```sh
|
|
306
|
+
bundle install
|
|
307
|
+
DATABASE_URL=postgresql://postgres:postgres@localhost/ar_doc_store_test bundle exec rake test
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
The tests recreate the `buildings` and `purchase_orders` tables. Always use a
|
|
311
|
+
dedicated test database. To test a different Rails series, resolve the bundle
|
|
312
|
+
with that version and use the same variable when running tests:
|
|
313
|
+
|
|
314
|
+
```sh
|
|
315
|
+
RAILS_VERSION='~> 7.2.0' bundle update
|
|
316
|
+
RAILS_VERSION='~> 7.2.0' bundle exec rake test
|
|
317
|
+
```
|
|
318
|
+
|
|
297
319
|
1. Fork it ( https://github.com/dfurber/ar_doc_store/fork )
|
|
298
320
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
299
321
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,8 @@ end
|
|
|
8
8
|
|
|
9
9
|
namespace :test do
|
|
10
10
|
task :prepare_ar_doc_store do
|
|
11
|
-
config =
|
|
11
|
+
config = ENV.fetch('DATABASE_URL', 'postgresql://postgres:postgres@localhost/ar_doc_store_test')
|
|
12
|
+
require 'logger'
|
|
12
13
|
require 'active_record'
|
|
13
14
|
ActiveRecord::Tasks::DatabaseTasks.create(config)
|
|
14
15
|
ActiveRecord::Base.establish_connection(config)
|
|
@@ -23,4 +24,4 @@ namespace :test do
|
|
|
23
24
|
end
|
|
24
25
|
end
|
|
25
26
|
end
|
|
26
|
-
end
|
|
27
|
+
end
|
data/ar_doc_store.gemspec
CHANGED
|
@@ -20,7 +20,8 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
|
|
21
21
|
spec.add_dependency "activerecord", ">=6.1"
|
|
22
22
|
spec.add_dependency "pg"
|
|
23
|
-
spec.add_development_dependency "
|
|
24
|
-
spec.add_development_dependency "
|
|
23
|
+
spec.add_development_dependency "rake", ">= 12.2"
|
|
24
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
|
25
25
|
spec.add_development_dependency "simplecov"
|
|
26
|
+
spec.add_development_dependency "ransack"
|
|
26
27
|
end
|
|
@@ -34,13 +34,6 @@ module ArDocStore
|
|
|
34
34
|
options.merge!(default: default) if default.present?
|
|
35
35
|
model.class_eval do
|
|
36
36
|
attribute attribute_name, attribute_type.new, **options
|
|
37
|
-
# define_method "#{attribute_name}=".to_sym, -> (value) {
|
|
38
|
-
# value = nil if value == '' || value == ['']
|
|
39
|
-
# write_attribute attribute_name, value
|
|
40
|
-
# # new_value = read_attribute attribute_name
|
|
41
|
-
# # write_store_attribute(json_column, attribute_name, new_value)
|
|
42
|
-
# attributes[attribute_name]
|
|
43
|
-
# }
|
|
44
37
|
end
|
|
45
38
|
end
|
|
46
39
|
|
|
@@ -28,12 +28,21 @@ module ArDocStore
|
|
|
28
28
|
define_singleton_method "#{key}_choices" do
|
|
29
29
|
dictionary
|
|
30
30
|
end
|
|
31
|
+
# if respond_to?(:ransacker)
|
|
32
|
+
# ransacker key do |parent|
|
|
33
|
+
# Arel.sql "#{parent.table[json_column].name}->'#{key}'"
|
|
34
|
+
# end
|
|
35
|
+
# end
|
|
31
36
|
end
|
|
32
37
|
end
|
|
33
38
|
|
|
34
39
|
def type
|
|
35
40
|
:string
|
|
36
41
|
end
|
|
42
|
+
|
|
43
|
+
def add_ransacker
|
|
44
|
+
raise 'hello'
|
|
45
|
+
end
|
|
37
46
|
end
|
|
38
47
|
end
|
|
39
48
|
end
|
|
@@ -25,10 +25,8 @@ module ArDocStore
|
|
|
25
25
|
# enabled records if they're marked_for_destruction? or destroyed.
|
|
26
26
|
def embed_valid?(assn_name, record)
|
|
27
27
|
unless valid = record.valid?
|
|
28
|
-
record.errors.each do |
|
|
29
|
-
attribute
|
|
30
|
-
errors[attribute] << message
|
|
31
|
-
errors[attribute].uniq!
|
|
28
|
+
record.errors.each do |error|
|
|
29
|
+
errors.import(error, attribute: "#{assn_name}.#{error.attribute}")
|
|
32
30
|
end
|
|
33
31
|
end
|
|
34
32
|
valid
|
data/lib/ar_doc_store/model.rb
CHANGED
data/lib/ar_doc_store/version.rb
CHANGED
data/test/model_test.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require_relative './test_helper'
|
|
2
2
|
|
|
3
|
-
class ModelTest <
|
|
3
|
+
class ModelTest < Minitest::Test
|
|
4
4
|
def test_save_with_validation
|
|
5
5
|
b = Building.new name: 'test'
|
|
6
6
|
assert b.save
|
|
@@ -14,4 +14,18 @@ class ModelTest < MiniTest::Test
|
|
|
14
14
|
b.reload
|
|
15
15
|
assert_equal 'test', b.name
|
|
16
16
|
end
|
|
17
|
+
|
|
18
|
+
def test_ransack_finds_string
|
|
19
|
+
Building.create name: 'test'
|
|
20
|
+
search = Building.ransack(name_eq: 'test').result
|
|
21
|
+
assert search.size > 0
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_ransack_finds_array
|
|
25
|
+
Building.create multiconstruction: %w[brick wood]
|
|
26
|
+
# search = Building.construction_in(['brick'])
|
|
27
|
+
search = Building.ransack(multiconstruction_jin: ['brick', 'wood']).result
|
|
28
|
+
puts search.to_sql
|
|
29
|
+
assert search.size > 0
|
|
30
|
+
end
|
|
17
31
|
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
require_relative 'test_helper'
|
|
2
|
+
|
|
3
|
+
class CompatibilityLeaf
|
|
4
|
+
include ArDocStore::EmbeddableModel
|
|
5
|
+
json_attribute :name, :string
|
|
6
|
+
validates :name, presence: true
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class CompatibilityBranch
|
|
10
|
+
include ArDocStore::EmbeddableModel
|
|
11
|
+
embeds_one :leaf, class_name: 'CompatibilityLeaf'
|
|
12
|
+
embeds_many :items, class_name: 'CompatibilityLeaf'
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class CompatibilityDocument < ActiveRecord::Base
|
|
16
|
+
self.table_name = 'buildings'
|
|
17
|
+
include ArDocStore::Model
|
|
18
|
+
embeds_one :branch, class_name: 'CompatibilityBranch'
|
|
19
|
+
embeds_many :items, class_name: 'CompatibilityLeaf'
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class RailsCompatibilityTest < Minitest::Test
|
|
23
|
+
def test_invalid_nested_child_prevents_save_and_preserves_error_details
|
|
24
|
+
document = CompatibilityDocument.new
|
|
25
|
+
document.build_branch.build_leaf
|
|
26
|
+
|
|
27
|
+
refute document.save
|
|
28
|
+
assert document.new_record?
|
|
29
|
+
assert_equal ["can't be blank"], document.errors[:'branch.leaf.name']
|
|
30
|
+
assert_equal [{ error: :blank }], document.errors.details[:'branch.leaf.name']
|
|
31
|
+
refute document.valid?
|
|
32
|
+
assert_equal 1, document.errors.size
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def test_invalid_collection_child_prevents_save
|
|
36
|
+
document = CompatibilityDocument.new
|
|
37
|
+
document.build_item
|
|
38
|
+
|
|
39
|
+
refute document.save
|
|
40
|
+
assert_equal ["can't be blank"], document.errors[:'items.name']
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def test_nested_one_and_many_survive_save_reload_and_updates
|
|
44
|
+
document = CompatibilityDocument.new
|
|
45
|
+
branch = document.build_branch
|
|
46
|
+
branch.build_leaf(name: 'one')
|
|
47
|
+
branch.items = [{ name: 'many' }]
|
|
48
|
+
document.save!
|
|
49
|
+
document.reload
|
|
50
|
+
|
|
51
|
+
assert_equal 'one', document.branch.leaf.name
|
|
52
|
+
assert_equal 'many', document.branch.items.first.name
|
|
53
|
+
assert document.branch.leaf.persisted?
|
|
54
|
+
assert document.branch.items.first.persisted?
|
|
55
|
+
refute document.branch.leaf.name_changed?
|
|
56
|
+
assert_same document.branch, document.branch.leaf.parent
|
|
57
|
+
assert_same document.branch, document.branch.items.parent
|
|
58
|
+
|
|
59
|
+
document.branch.leaf.name = 'updated one'
|
|
60
|
+
document.branch.items.first.name = 'updated many'
|
|
61
|
+
document.save!
|
|
62
|
+
document.reload
|
|
63
|
+
assert_equal 'updated one', document.branch.leaf.name
|
|
64
|
+
assert_equal 'updated many', document.branch.items.first.name
|
|
65
|
+
end
|
|
66
|
+
end
|
data/test/test_helper.rb
CHANGED
|
@@ -1,27 +1,76 @@
|
|
|
1
1
|
gem 'activerecord'
|
|
2
|
-
gem 'minitest'
|
|
2
|
+
gem 'minitest', '~> 5.0'
|
|
3
|
+
gem 'ransack'
|
|
3
4
|
|
|
4
5
|
require 'minitest/autorun'
|
|
6
|
+
require 'logger'
|
|
5
7
|
require 'active_record'
|
|
8
|
+
require 'ransack'
|
|
6
9
|
|
|
7
10
|
require_relative './../lib/ar_doc_store'
|
|
8
|
-
ActiveRecord::Base.establish_connection(
|
|
11
|
+
ActiveRecord::Base.establish_connection(ENV.fetch('DATABASE_URL', 'postgresql://postgres:postgres@localhost/ar_doc_store_test'))
|
|
9
12
|
|
|
10
13
|
require 'active_record/migration'
|
|
11
14
|
|
|
12
|
-
ActiveRecord::
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
ActiveRecord::Schema.define do
|
|
16
|
+
drop_table :purchase_orders, if_exists: true
|
|
17
|
+
drop_table :buildings, if_exists: true
|
|
18
|
+
create_table :buildings do |t|
|
|
19
|
+
t.jsonb :data
|
|
20
|
+
end
|
|
21
|
+
create_table :purchase_orders do |t|
|
|
22
|
+
t.jsonb :data
|
|
23
|
+
t.belongs_to :building, index: true, foreign_key: true
|
|
24
|
+
end
|
|
20
25
|
end
|
|
21
26
|
|
|
22
27
|
# require 'simplecov'
|
|
23
28
|
# SimpleCov.start
|
|
24
29
|
|
|
30
|
+
# module Arel
|
|
31
|
+
# module Nodes
|
|
32
|
+
# class Contains < Arel::Nodes::InfixOperation
|
|
33
|
+
# def initialize(left, right)
|
|
34
|
+
# super(:'@>', left, right)
|
|
35
|
+
# end
|
|
36
|
+
# end
|
|
37
|
+
# end
|
|
38
|
+
#
|
|
39
|
+
# module Visitors
|
|
40
|
+
# class PostgreSQL < Arel::Visitors::ToSql
|
|
41
|
+
# alias_method :visit_Arel_Nodes_Contains, :visit_Arel_Nodes_InfixOperation
|
|
42
|
+
# end
|
|
43
|
+
# end
|
|
44
|
+
# end
|
|
45
|
+
|
|
46
|
+
#
|
|
47
|
+
# module ActiveRecord
|
|
48
|
+
# module QueryMethods
|
|
49
|
+
# def contains(predicates)
|
|
50
|
+
# predicates.map do |column, predicate|
|
|
51
|
+
# column = table[column]
|
|
52
|
+
# predicate = column.type_cast_for_database(predicate)
|
|
53
|
+
# predicate = Arel::Nodes.build_quoted(predicate)
|
|
54
|
+
#
|
|
55
|
+
# where Arel::Nodes::Contains.new(column, predicate)
|
|
56
|
+
# end
|
|
57
|
+
# end
|
|
58
|
+
# end
|
|
59
|
+
#
|
|
60
|
+
# module Querying
|
|
61
|
+
# delegate :contains, to: :all
|
|
62
|
+
# end
|
|
63
|
+
# end
|
|
64
|
+
|
|
65
|
+
# Ransack.configure do |config|
|
|
66
|
+
# # config.add_predicate 'jin', arel_predicate: 'contains', formatter: proc { |v| Arel.sql(v.to_json).gsub(/^"|"$/, "'") }
|
|
67
|
+
# config.add_predicate 'jin', arel_predicate: 'contains', formatter: proc { |v|
|
|
68
|
+
# value = Arel.sql(v.to_json).gsub(/^"|"$/, "'")
|
|
69
|
+
# puts value
|
|
70
|
+
# value
|
|
71
|
+
# }
|
|
72
|
+
# end
|
|
73
|
+
|
|
25
74
|
class Route
|
|
26
75
|
include ArDocStore::EmbeddableModel
|
|
27
76
|
json_attribute :is_route_unobstructed, as: :boolean
|
|
@@ -75,5 +124,20 @@ class Building < ActiveRecord::Base
|
|
|
75
124
|
embeds_many :restrooms
|
|
76
125
|
|
|
77
126
|
validates :stories, numericality: { allow_nil: true }
|
|
78
|
-
end
|
|
79
127
|
|
|
128
|
+
scope :multiconstruction_jin, -> (*values) {
|
|
129
|
+
where("data->'multiconstruction' @> ?", values.to_json)
|
|
130
|
+
}
|
|
131
|
+
def self.ransackable_scopes(_auth_object = nil)
|
|
132
|
+
%i[multiconstruction_jin]
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def self.ransackable_attributes(_auth_object = nil)
|
|
136
|
+
%w[name]
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def self.ransackable_associations(_auth_object = nil)
|
|
140
|
+
[]
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ar_doc_store
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Furber
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activerecord
|
|
@@ -39,33 +38,33 @@ dependencies:
|
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
39
|
version: '0'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
41
|
+
name: rake
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
|
-
- - "
|
|
44
|
+
- - ">="
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
46
|
+
version: '12.2'
|
|
48
47
|
type: :development
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
|
-
- - "
|
|
51
|
+
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
53
|
+
version: '12.2'
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
55
|
+
name: minitest
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
58
|
- - "~>"
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
60
|
+
version: '5.0'
|
|
62
61
|
type: :development
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
65
|
- - "~>"
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
67
|
+
version: '5.0'
|
|
69
68
|
- !ruby/object:Gem::Dependency
|
|
70
69
|
name: simplecov
|
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -80,6 +79,20 @@ dependencies:
|
|
|
80
79
|
- - ">="
|
|
81
80
|
- !ruby/object:Gem::Version
|
|
82
81
|
version: '0'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: ransack
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - ">="
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '0'
|
|
89
|
+
type: :development
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0'
|
|
83
96
|
description: 'Provides an easy way to do something that is possible in Rails but still
|
|
84
97
|
a bit close to the metal using store_accessor: create typecasted, persistent attributes
|
|
85
98
|
that are not columns in the database but stored in the JSON "data" column. Also
|
|
@@ -90,6 +103,7 @@ executables: []
|
|
|
90
103
|
extensions: []
|
|
91
104
|
extra_rdoc_files: []
|
|
92
105
|
files:
|
|
106
|
+
- ".github/workflows/test.yml"
|
|
93
107
|
- ".gitignore"
|
|
94
108
|
- Gemfile
|
|
95
109
|
- LICENSE.txt
|
|
@@ -131,12 +145,12 @@ files:
|
|
|
131
145
|
- test/attributes/integer_attribute_test.rb
|
|
132
146
|
- test/attributes/string_attribute_test.rb
|
|
133
147
|
- test/model_test.rb
|
|
148
|
+
- test/rails_compatibility_test.rb
|
|
134
149
|
- test/test_helper.rb
|
|
135
150
|
homepage: https://github.com/dfurber/ar_doc_store
|
|
136
151
|
licenses:
|
|
137
152
|
- MIT
|
|
138
153
|
metadata: {}
|
|
139
|
-
post_install_message:
|
|
140
154
|
rdoc_options: []
|
|
141
155
|
require_paths:
|
|
142
156
|
- lib
|
|
@@ -151,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
151
165
|
- !ruby/object:Gem::Version
|
|
152
166
|
version: '0'
|
|
153
167
|
requirements: []
|
|
154
|
-
rubygems_version:
|
|
155
|
-
signing_key:
|
|
168
|
+
rubygems_version: 4.0.20
|
|
156
169
|
specification_version: 4
|
|
157
170
|
summary: A document storage gem meant for ActiveRecord PostgresQL JSON storage.
|
|
158
171
|
test_files:
|
|
@@ -168,4 +181,5 @@ test_files:
|
|
|
168
181
|
- test/attributes/integer_attribute_test.rb
|
|
169
182
|
- test/attributes/string_attribute_test.rb
|
|
170
183
|
- test/model_test.rb
|
|
184
|
+
- test/rails_compatibility_test.rb
|
|
171
185
|
- test/test_helper.rb
|