ar_doc_store 2.1.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5e0f3b286ab52eebdb032146c7bd7c368f76888221e3bdf1c01f3a7d088d5ef
4
- data.tar.gz: 96e38a0850648b7eb8af1f7b1ebadc44c136b0633f0c33a398ab3e632d734f88
3
+ metadata.gz: 4b2fadd8bf7bb78682cabb980f852ecbe91eb65013138f63521542e9ed42c972
4
+ data.tar.gz: 8e12ab14feab7fbf3c2b922612911502c253971f50a555d77c39a2aeb07d3f03
5
5
  SHA512:
6
- metadata.gz: 5d4cc8a28403eaf2f42277b1c5d1f2d702380c3a90b2dbce9a80aec55d02af3c716dcd15075eb513c8ac1d48f83db3a20e1006770d539eb81be16c2709f04b10
7
- data.tar.gz: f7c4ab93d371cf71a7e8a29542e9a00a8a84d64910b9df8763ab56622531bcf5f4545f703c8755ec70bf18b49208ee1ac6996c93e7e44e54243fca8fd95bdecf
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
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in ar_doc_store.gemspec
4
4
  gemspec
5
+
6
+ gem 'activerecord', ENV.fetch('RAILS_VERSION', '~> 8.1.0')
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,8 +8,11 @@ end
8
8
 
9
9
  namespace :test do
10
10
  task :prepare_ar_doc_store do
11
+ config = ENV.fetch('DATABASE_URL', 'postgresql://postgres:postgres@localhost/ar_doc_store_test')
12
+ require 'logger'
11
13
  require 'active_record'
12
- ActiveRecord::Base.establish_connection(adapter: 'postgresql', database: 'ar_doc_store_test', username: 'postgres', password: 'postgres')
14
+ ActiveRecord::Tasks::DatabaseTasks.create(config)
15
+ ActiveRecord::Base.establish_connection(config)
13
16
 
14
17
  ActiveRecord::Schema.define do
15
18
  self.verbose = false
@@ -21,4 +24,4 @@ namespace :test do
21
24
  end
22
25
  end
23
26
  end
24
- 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 "bundler", "~> 2.2"
24
- spec.add_development_dependency "rake", "~> 10.0"
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
 
@@ -93,6 +93,7 @@ module ArDocStore
93
93
 
94
94
  class AssignEmbedsManyAttributes
95
95
  attr_reader :models, :assn_name, :parent, :class_name
96
+
96
97
  def initialize(parent, class_name, assn_name, models, values)
97
98
  @parent, @class_name, @assn_name, @models, @values = parent, class_name, assn_name, models, values
98
99
  @models ||= ArDocStore::EmbeddedCollection.new
@@ -109,8 +110,8 @@ module ArDocStore
109
110
 
110
111
  private
111
112
 
112
- attr_writer :models, :values
113
- attr_reader :values, :assn_name
113
+ attr_accessor :values
114
+ attr_writer :models
114
115
 
115
116
  def process_existing_model(value)
116
117
  return false unless value.key?(:id)
@@ -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
@@ -22,8 +22,8 @@ module ArDocStore
22
22
  attr_accessor :parent
23
23
  attr_accessor :embedded_as
24
24
 
25
- class_attribute :json_attributes
26
- self.json_attributes = HashWithIndifferentAccess.new
25
+ # class_attribute :json_attributes
26
+ # self.json_attributes = HashWithIndifferentAccess.new
27
27
 
28
28
  json_attribute :id, :string #, default: -> { SecureRandom.uuid }
29
29
 
@@ -92,7 +92,7 @@ module ArDocStore
92
92
  end
93
93
 
94
94
  def write_attribute(attribute, value)
95
- attributes[attribute.to_s] = value
95
+ @attributes.write_from_user(attribute.to_s, value)
96
96
  end
97
97
 
98
98
  def to_param
@@ -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 |attribute, message|
29
- attribute = "#{assn_name}.#{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
@@ -8,6 +8,7 @@ module ArDocStore
8
8
  mod.send :include, InstanceMethods
9
9
  mod.after_initialize :assign_json_data
10
10
  mod.before_validation :save_json_data
11
+ mod.before_save :ensure_json_data_saved
11
12
  mod.before_save :mark_embeds_as_persisted
12
13
  end
13
14
 
@@ -28,6 +29,12 @@ module ArDocStore
28
29
  json_attributes.each do |key, value|
29
30
  write_store_attribute(json_column, key, read_attribute(key)) if changes.key?(key)
30
31
  end
32
+ @json_data_saved = true
33
+ end
34
+
35
+ def ensure_json_data_saved
36
+ save_json_data unless defined?(@json_data_saved)
37
+ @json_data_saved = nil
31
38
  end
32
39
 
33
40
  def mark_embeds_as_persisted
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ArDocStore
4
- VERSION = "2.1.2"
4
+ VERSION = "2.1.4"
5
5
  end
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class ArrayAttributeTest < MiniTest::Test
3
+ class ArrayAttributeTest < Minitest::Test
4
4
 
5
5
  def test_attribute_on_model_init
6
6
  architects = %W{Bob John Billy Bob}
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class BooleanAttributeTest < MiniTest::Test
3
+ class BooleanAttributeTest < Minitest::Test
4
4
 
5
5
  def test_attribute_on_model_init
6
6
  b = Building.new finished: true
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class DateAttributeTest < MiniTest::Test
3
+ class DateAttributeTest < Minitest::Test
4
4
 
5
5
  def test_attribute_on_model_init
6
6
  finished_on = Date.new(1984, 3, 6)
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class DatetimeAttributeTest < MiniTest::Test
3
+ class DatetimeAttributeTest < Minitest::Test
4
4
 
5
5
  def test_attribute_on_model_init
6
6
  inspected_at = Time.new(1984, 3, 6)
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class DecimalAttributeTest < MiniTest::Test
3
+ class DecimalAttributeTest < Minitest::Test
4
4
 
5
5
  def test_attribute_on_model_init
6
6
  b = Building.new cost: 5.42
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class EmbedsManyAttributeTest < MiniTest::Test
3
+ class EmbedsManyAttributeTest < Minitest::Test
4
4
 
5
5
  def test_initialized_on_model_init
6
6
  r = Restroom.new name: 'Foo'
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class EmbedsOneAttributeTest < MiniTest::Test
3
+ class EmbedsOneAttributeTest < Minitest::Test
4
4
 
5
5
  def test_initialized_on_model_init
6
6
  entrance = Entrance.new name: 'Foo'
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class EnumerationAttributeTest < MiniTest::Test
3
+ class EnumerationAttributeTest < Minitest::Test
4
4
 
5
5
  def test_simple_enumeration_attribute
6
6
  b = Building.new construction: 'wood'
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class FloatAttributeTest < MiniTest::Test
3
+ class FloatAttributeTest < Minitest::Test
4
4
 
5
5
  def test_attribute_on_model_init
6
6
  b = Building.new height: 5.42
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class IntegerAttributeTest < MiniTest::Test
3
+ class IntegerAttributeTest < Minitest::Test
4
4
 
5
5
  def test_string_attribute_on_model_init
6
6
  b = Building.new stories: 5
@@ -1,6 +1,6 @@
1
1
  require_relative './../test_helper'
2
2
 
3
- class StringAttributeTest < MiniTest::Test
3
+ class StringAttributeTest < Minitest::Test
4
4
 
5
5
  def test_attribute_on_model_init
6
6
  b = Building.new name: 'test'
@@ -0,0 +1,31 @@
1
+ require_relative './test_helper'
2
+
3
+ class ModelTest < Minitest::Test
4
+ def test_save_with_validation
5
+ b = Building.new name: 'test'
6
+ assert b.save
7
+ b.reload
8
+ assert_equal 'test', b.name
9
+ end
10
+
11
+ def test_save_without_validation
12
+ b = Building.new name: 'test'
13
+ assert b.save(validate: false)
14
+ b.reload
15
+ assert_equal 'test', b.name
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
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(adapter: 'postgresql', database: 'ar_doc_store_test', username: 'postgres', password: 'postgres')
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::Migration[4.2].execute "DROP TABLE IF EXISTS purchase_orders"
13
- ActiveRecord::Migration.execute "DROP TABLE IF EXISTS buildings"
14
- ActiveRecord::Migration.create_table :buildings do |t|
15
- t.jsonb :data
16
- end
17
- ActiveRecord::Migration.create_table :purchase_orders do |t|
18
- t.jsonb :data
19
- t.belongs_to :building, index: true, foreign_key: true
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.2
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: 2021-01-26 00:00:00.000000000 Z
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: bundler
41
+ name: rake
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
- - - "~>"
44
+ - - ">="
46
45
  - !ruby/object:Gem::Version
47
- version: '2.2'
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: '2.2'
53
+ version: '12.2'
55
54
  - !ruby/object:Gem::Dependency
56
- name: rake
55
+ name: minitest
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - "~>"
60
59
  - !ruby/object:Gem::Version
61
- version: '10.0'
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: '10.0'
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
@@ -130,12 +144,13 @@ files:
130
144
  - test/attributes/float_attribute_test.rb
131
145
  - test/attributes/integer_attribute_test.rb
132
146
  - test/attributes/string_attribute_test.rb
147
+ - test/model_test.rb
148
+ - test/rails_compatibility_test.rb
133
149
  - test/test_helper.rb
134
150
  homepage: https://github.com/dfurber/ar_doc_store
135
151
  licenses:
136
152
  - MIT
137
153
  metadata: {}
138
- post_install_message:
139
154
  rdoc_options: []
140
155
  require_paths:
141
156
  - lib
@@ -150,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
165
  - !ruby/object:Gem::Version
151
166
  version: '0'
152
167
  requirements: []
153
- rubygems_version: 3.0.8
154
- signing_key:
168
+ rubygems_version: 4.0.20
155
169
  specification_version: 4
156
170
  summary: A document storage gem meant for ActiveRecord PostgresQL JSON storage.
157
171
  test_files:
@@ -166,4 +180,6 @@ test_files:
166
180
  - test/attributes/float_attribute_test.rb
167
181
  - test/attributes/integer_attribute_test.rb
168
182
  - test/attributes/string_attribute_test.rb
183
+ - test/model_test.rb
184
+ - test/rails_compatibility_test.rb
169
185
  - test/test_helper.rb