forest_liana 7.6.7 → 7.6.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d3d3ba2c03e1294df91a54647f23345b4027945cfe4e813d58716e658877f4d
4
- data.tar.gz: 1f60dc963548ca99f0f2c01f771fef730a874b0bbf320efb4afd6f9c25e4f6b8
3
+ metadata.gz: 529622dcf795df3fecbb514a1b707c59ba2508d5b9c09b51ebc4cd25984cc558
4
+ data.tar.gz: 31d36870440829fcad6549e452ccba2b25cde75a9bb3ce3c7370baf48248c6c2
5
5
  SHA512:
6
- metadata.gz: 9097174cf46b34360a486c8629365acaf130491aac6d9f5dc06568beedf31d93070a1ccf5f2156547ef68b9aab9e0a2705ef8ec58f3662a4829434a3f6ec6819
7
- data.tar.gz: f9d1d946fe495e74a7cd0a2929ab208af4a5fa369efae007d838a4edd4f6c66e15ec8a6c9f0b23321e762f9cdeefe2ee9f688fc26a666463804787a2bd9aa0e8
6
+ metadata.gz: 8183bd54a698c09f6831a8972bf108074cf038f983c3e9e89ab688b61dab07d9bb9e4fc75b337d0bcf54fe6d64e11eb96cfe7e3e6a05b133f9b2c3c5dd2a2724
7
+ data.tar.gz: f677de6ae48ec830dcde1f2f9acaa7b795017f4a068af72a5d2f3eacc3c826c5df6827fe5398869671ef275d86beb355736eefd64a7b1f965c3baa8dc5a760f6
@@ -32,15 +32,23 @@ module ForestLiana
32
32
 
33
33
  def optimize_record_loading(resource, records)
34
34
  instance_dependent_associations = instance_dependent_associations(resource)
35
- eager_loads = @includes - instance_dependent_associations
36
35
 
37
- result = records.eager_load(eager_loads)
36
+ preload_loads = @includes.select do |name|
37
+ targetModelConnection = resource.reflect_on_association(name).klass.connection
38
+ targetModelDatabase = targetModelConnection.current_database if targetModelConnection.respond_to? :current_database
39
+ resourceConnection = resource.connection
40
+ resourceDatabase = resourceConnection.current_database if resourceConnection.respond_to? :current_database
41
+
42
+ targetModelDatabase != resourceDatabase
43
+ end + instance_dependent_associations
44
+
45
+ result = records.eager_load(@includes - preload_loads)
38
46
 
39
47
  # Rails 7 can mix `eager_load` and `preload` in the same scope
40
48
  # Rails 6 cannot mix `eager_load` and `preload` in the same scope
41
49
  # Rails 6 and 7 cannot mix `eager_load` and `includes` in the same scope
42
50
  if Rails::VERSION::MAJOR >= 7
43
- result = result.preload(instance_dependent_associations)
51
+ result = result.preload(preload_loads)
44
52
  end
45
53
 
46
54
  result
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "7.6.7"
2
+ VERSION = "7.6.10"
3
3
  end
@@ -0,0 +1,3 @@
1
+ class Car < GarageRecord
2
+ belongs_to :driver
3
+ end
@@ -0,0 +1,3 @@
1
+ class Driver < UserRecord
2
+ has_one :car
3
+ end
@@ -0,0 +1,4 @@
1
+ class GarageRecord < ApplicationRecord
2
+ self.abstract_class = true
3
+ connects_to database: { writing: :garage, reading: :garage }
4
+ end
@@ -0,0 +1,3 @@
1
+ class Manufacturer < ApplicationRecord
2
+ has_many :products
3
+ end
@@ -1,3 +1,6 @@
1
1
  class Product < ApplicationRecord
2
+ belongs_to :manufacturer
3
+ belongs_to :driver, optional: true
4
+
2
5
  validates :uri, presence: true, format: { with: URI::DEFAULT_PARSER.make_regexp }
3
6
  end
@@ -0,0 +1,4 @@
1
+ class UserRecord < ApplicationRecord
2
+ self.abstract_class = true
3
+ connects_to database: { writing: :user, reading: :user }
4
+ end
@@ -19,6 +19,13 @@ development:
19
19
  test:
20
20
  <<: *default
21
21
  database: db/test.sqlite3
22
+
23
+ garage:
24
+ <<: *default
25
+ database: db/test2.sqlite3
26
+ user:
27
+ <<: *default
28
+ database: db/test3.sqlite3
22
29
 
23
30
  production:
24
31
  <<: *default
@@ -0,0 +1,8 @@
1
+ class CreateCars < ActiveRecord::Migration[6.0]
2
+ def change
3
+ Car.connection.create_table :cars do |t|
4
+ t.string :model
5
+ t.references :driver, index: true
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ class CreateDrivers < ActiveRecord::Migration[6.0]
2
+ def change
3
+ Driver.connection.create_table :drivers do |t|
4
+ t.string :firstname
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ class CreateManufacturers < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :manufacturers do |t|
4
+ t.string :name
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ class AddColumnsToProducts < ActiveRecord::Migration[6.0]
2
+ def change
3
+ change_table :products do |table|
4
+ table.string :name
5
+ table.belongs_to(:manufacturer)
6
+ table.belongs_to(:driver)
7
+ end
8
+ end
9
+ end
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2021_05_26_084712) do
13
+ ActiveRecord::Schema.define(version: 2022_07_27_114930) do
14
14
 
15
15
  create_table "isle", force: :cascade do |t|
16
16
  t.string "name"
@@ -27,6 +27,10 @@ ActiveRecord::Schema.define(version: 2021_05_26_084712) do
27
27
  t.index ["island_id"], name: "index_locations_on_island_id"
28
28
  end
29
29
 
30
+ create_table "manufacturers", force: :cascade do |t|
31
+ t.string "name"
32
+ end
33
+
30
34
  create_table "owners", force: :cascade do |t|
31
35
  t.string "name"
32
36
  t.datetime "hired_at"
@@ -34,6 +38,11 @@ ActiveRecord::Schema.define(version: 2021_05_26_084712) do
34
38
 
35
39
  create_table "products", force: :cascade do |t|
36
40
  t.string "uri"
41
+ t.string "name"
42
+ t.integer "manufacturer_id"
43
+ t.integer "driver_id"
44
+ t.index ["driver_id"], name: "index_products_on_driver_id"
45
+ t.index ["manufacturer_id"], name: "index_products_on_manufacturer_id"
37
46
  end
38
47
 
39
48
  create_table "references", force: :cascade do |t|
@@ -25,12 +25,15 @@ module ForestLiana
25
25
  [
26
26
  Island,
27
27
  Location,
28
+ Manufacturer,
28
29
  Owner,
29
30
  Product,
30
31
  Reference,
31
32
  Town,
32
33
  Tree,
33
- User
34
+ User,
35
+ Driver,
36
+ Car,
34
37
  ]
35
38
  end
36
39
 
@@ -4,9 +4,9 @@ module ForestLiana
4
4
  let(:pageSize) { 10 }
5
5
  let(:pageNumber) { 1 }
6
6
  let(:sort) { 'id' }
7
- let(:fields) { }
8
- let(:filters) { }
9
- let(:scopes) { { } }
7
+ let(:fields) {}
8
+ let(:filters) {}
9
+ let(:scopes) { {} }
10
10
  let(:rendering_id) { 13 }
11
11
  let(:user) { { 'id' => '1', 'rendering_id' => rendering_id } }
12
12
 
@@ -22,7 +22,21 @@ module ForestLiana
22
22
  allow(ForestLiana::ScopeManager).to receive(:fetch_scopes).and_return(scopes)
23
23
  end
24
24
 
25
+ def clean_database
26
+ [
27
+ Driver,
28
+ Island,
29
+ Location,
30
+ Manufacturer,
31
+ Product,
32
+ Tree,
33
+ User,
34
+ ].each(&:destroy_all)
35
+ end
36
+
25
37
  before(:each) do
38
+ clean_database
39
+
26
40
  users = ['Michel', 'Robert', 'Vince', 'Sandro', 'Olesya', 'Romain', 'Valentin', 'Jason', 'Arnaud', 'Jeff', 'Steve', 'Marc', 'Xavier', 'Paul', 'Mickael', 'Mike', 'Maxime', 'Gertrude', 'Monique', 'Mia', 'Rachid', 'Edouard', 'Sacha', 'Caro', 'Amand', 'Nathan', 'Noémie', 'Robin', 'Gaelle', 'Isabelle']
27
41
  .map { |name| User.create(name: name) }
28
42
 
@@ -50,15 +64,94 @@ module ForestLiana
50
64
  { :coordinates => '32154', :island => islands[4] }
51
65
  ].map { |location| Location.create(coordinates: location[:coordinates], island: location[:island]) }
52
66
 
67
+ manufacturers = ['Orange', 'Pear'].map { |name| Manufacturer.create!(name: 'name') }
68
+
69
+ drivers = ['Baby driver', 'Taxi driver'].map { |firstname| Driver.create!(firstname: firstname) }
70
+
71
+ products = [
72
+ { name: 'Valencia', uri: 'https://valencia.com', manufacturer: manufacturers[0], driver: drivers[0] },
73
+ { name: 'Blood', uri: 'https://blood.com', manufacturer: manufacturers[0], driver: drivers[1] },
74
+ { name: 'Conference', uri: 'https://conference.com', manufacturer: manufacturers[1], driver: drivers[0] },
75
+ { name: 'Concorde', uri: 'https://concorde.com', manufacturer: manufacturers[1], driver: drivers[1] }
76
+ ].map {|attributes| Product.create!(attributes) }
77
+
53
78
  reference = Reference.create()
54
79
  init_scopes
55
80
  end
56
81
 
57
- after(:each) do
58
- User.destroy_all
59
- Island.destroy_all
60
- Location.destroy_all
61
- Tree.destroy_all
82
+ describe 'records eager loading' do
83
+ let(:resource) { Product }
84
+ let(:fields) { { resource.name => 'id,name,manufacturer', 'manufacturer' => 'name' } }
85
+
86
+ shared_context 'resource current_database' do
87
+ before do
88
+ connection = resource.connection
89
+
90
+ def connection.current_database
91
+ 'db/test.sqlite3'
92
+ end
93
+ end
94
+
95
+ after do
96
+ resource.connection.singleton_class.remove_method(:current_database)
97
+ end
98
+ end
99
+
100
+ shared_examples 'left outer join' do
101
+ it 'should perform a left outer join with the association' do
102
+ expect(getter.perform.to_sql).to match(/LEFT OUTER JOIN "manufacturers"/)
103
+ end
104
+ end
105
+
106
+ shared_examples 'records' do
107
+ it 'should get only the expected records' do
108
+ getter.perform
109
+
110
+ records = getter.records
111
+
112
+ count = getter.count
113
+
114
+ expect(records.count).to eq 4
115
+ expect(count).to eq 4
116
+ expect(records.map(&:name)).to match_array(%w[Valencia Blood Conference Concorde])
117
+ end
118
+ end
119
+
120
+ context 'when the connections do not support current_database' do
121
+ include_examples 'left outer join'
122
+ include_examples 'records'
123
+ end
124
+
125
+ context 'when the included association uses a different database connection' do
126
+ let(:fields) { { resource.name => 'id,name,driver', 'driver' => 'firstname' } }
127
+
128
+ before do
129
+ association_connection = resource.reflect_on_association(:driver).klass.connection
130
+
131
+ def association_connection.current_database
132
+ 'db/different_test.sqlite3'
133
+ end
134
+ end
135
+
136
+ after do
137
+ resource.reflect_on_association(:driver).klass.connection.singleton_class.remove_method(:current_database)
138
+ end
139
+
140
+ include_context 'resource current_database'
141
+
142
+ include_examples 'records'
143
+
144
+ it 'does not perform a left outer join with the association' do
145
+ expect(getter.perform.to_sql).not_to match(/LEFT OUTER JOIN "drivers"/)
146
+ end
147
+ end
148
+
149
+ context 'when the included association uses the same database connection' do
150
+ include_context 'resource current_database'
151
+
152
+ include_examples 'left outer join'
153
+ include_examples 'records'
154
+ end
62
155
  end
63
156
 
64
157
  describe 'when there are more records than the page size' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.6.7
4
+ version: 7.6.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-29 00:00:00.000000000 Z
11
+ date: 2022-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -329,8 +329,12 @@ files:
329
329
  - spec/dummy/app/controllers/forest/islands_controller.rb
330
330
  - spec/dummy/app/helpers/application_helper.rb
331
331
  - spec/dummy/app/models/application_record.rb
332
+ - spec/dummy/app/models/car.rb
333
+ - spec/dummy/app/models/driver.rb
334
+ - spec/dummy/app/models/garage_record.rb
332
335
  - spec/dummy/app/models/island.rb
333
336
  - spec/dummy/app/models/location.rb
337
+ - spec/dummy/app/models/manufacturer.rb
334
338
  - spec/dummy/app/models/owner.rb
335
339
  - spec/dummy/app/models/product.rb
336
340
  - spec/dummy/app/models/reference.rb
@@ -338,6 +342,7 @@ files:
338
342
  - spec/dummy/app/models/town.rb
339
343
  - spec/dummy/app/models/tree.rb
340
344
  - spec/dummy/app/models/user.rb
345
+ - spec/dummy/app/models/user_record.rb
341
346
  - spec/dummy/app/views/layouts/application.html.erb
342
347
  - spec/dummy/bin/bundle
343
348
  - spec/dummy/bin/rails
@@ -371,6 +376,10 @@ files:
371
376
  - spec/dummy/db/migrate/20210326140855_create_locations.rb
372
377
  - spec/dummy/db/migrate/20210511141752_create_owners.rb
373
378
  - spec/dummy/db/migrate/20210526084712_create_products.rb
379
+ - spec/dummy/db/migrate/20220719094127_create_cars.rb
380
+ - spec/dummy/db/migrate/20220719094450_create_drivers.rb
381
+ - spec/dummy/db/migrate/20220727114450_create_manufacturers.rb
382
+ - spec/dummy/db/migrate/20220727114930_add_columns_to_products.rb
374
383
  - spec/dummy/db/schema.rb
375
384
  - spec/dummy/lib/forest_liana/collections/island.rb
376
385
  - spec/dummy/lib/forest_liana/collections/location.rb
@@ -518,179 +527,188 @@ signing_key:
518
527
  specification_version: 4
519
528
  summary: Official Rails Liana for Forest
520
529
  test_files:
521
- - test/forest_liana_test.rb
522
- - test/services/forest_liana/schema_adapter_test.rb
523
- - test/services/forest_liana/operator_date_interval_parser_test.rb
530
+ - test/fixtures/has_one_field.yml
531
+ - test/fixtures/string_field.yml
532
+ - test/fixtures/belongs_to_field.yml
533
+ - test/fixtures/reference.yml
534
+ - test/fixtures/has_many_field.yml
535
+ - test/fixtures/serialize_field.yml
536
+ - test/fixtures/owner.yml
537
+ - test/fixtures/tree.yml
538
+ - test/fixtures/has_many_through_field.yml
524
539
  - test/test_helper.rb
525
- - test/routing/route_test.rb
526
- - test/dummy/db/migrate/20150608133044_create_has_one_field.rb
527
- - test/dummy/db/migrate/20181111162121_create_references_table.rb
528
- - test/dummy/db/migrate/20150608131430_create_integer_field.rb
529
- - test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb
530
- - test/dummy/db/migrate/20150608130516_create_date_field.rb
531
- - test/dummy/db/migrate/20160627172951_create_tree.rb
532
- - test/dummy/db/migrate/20150616150629_create_polymorphic_field.rb
533
- - test/dummy/db/migrate/20170614141921_create_serialize_field.rb
534
- - test/dummy/db/migrate/20160628173505_add_timestamps.rb
535
- - test/dummy/db/migrate/20150608132159_create_boolean_field.rb
536
- - test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb
537
- - test/dummy/db/migrate/20150608132621_create_string_field.rb
538
- - test/dummy/db/migrate/20150608150016_create_has_many_field.rb
539
- - test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb
540
- - test/dummy/db/migrate/20150608131610_create_float_field.rb
541
- - test/dummy/db/migrate/20150608131603_create_decimal_field.rb
542
- - test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb
543
- - test/dummy/db/migrate/20160627172810_create_owner.rb
544
- - test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb
545
- - test/dummy/db/schema.rb
540
+ - test/dummy/config.ru
541
+ - test/dummy/bin/rake
542
+ - test/dummy/bin/setup
543
+ - test/dummy/bin/bundle
544
+ - test/dummy/bin/rails
545
+ - test/dummy/public/422.html
546
+ - test/dummy/public/500.html
547
+ - test/dummy/public/favicon.ico
548
+ - test/dummy/public/404.html
546
549
  - test/dummy/README.rdoc
550
+ - test/dummy/config/secrets.yml
551
+ - test/dummy/config/locales/en.yml
552
+ - test/dummy/config/environments/test.rb
553
+ - test/dummy/config/environments/production.rb
554
+ - test/dummy/config/environments/development.rb
555
+ - test/dummy/config/database.yml
556
+ - test/dummy/config/application.rb
547
557
  - test/dummy/config/boot.rb
558
+ - test/dummy/config/environment.rb
559
+ - test/dummy/config/initializers/inflections.rb
548
560
  - test/dummy/config/initializers/session_store.rb
561
+ - test/dummy/config/initializers/backtrace_silencers.rb
549
562
  - test/dummy/config/initializers/wrap_parameters.rb
550
- - test/dummy/config/initializers/filter_parameter_logging.rb
563
+ - test/dummy/config/initializers/mime_types.rb
551
564
  - test/dummy/config/initializers/cookies_serializer.rb
552
565
  - test/dummy/config/initializers/assets.rb
553
- - test/dummy/config/initializers/mime_types.rb
554
- - test/dummy/config/initializers/backtrace_silencers.rb
555
- - test/dummy/config/initializers/inflections.rb
556
- - test/dummy/config/locales/en.yml
557
- - test/dummy/config/environment.rb
558
- - test/dummy/config/secrets.yml
559
- - test/dummy/config/application.rb
560
- - test/dummy/config/database.yml
566
+ - test/dummy/config/initializers/filter_parameter_logging.rb
561
567
  - test/dummy/config/routes.rb
562
- - test/dummy/config/environments/production.rb
563
- - test/dummy/config/environments/test.rb
564
- - test/dummy/config/environments/development.rb
565
- - test/dummy/app/models/serialize_field.rb
566
- - test/dummy/app/models/has_many_through_field.rb
568
+ - test/dummy/app/helpers/application_helper.rb
569
+ - test/dummy/app/views/layouts/application.html.erb
570
+ - test/dummy/app/models/has_many_field.rb
567
571
  - test/dummy/app/models/belongs_to_field.rb
572
+ - test/dummy/app/models/has_and_belongs_to_many_field.rb
573
+ - test/dummy/app/models/has_many_class_name_field.rb
574
+ - test/dummy/app/models/date_field.rb
575
+ - test/dummy/app/models/has_one_field.rb
568
576
  - test/dummy/app/models/decimal_field.rb
569
- - test/dummy/app/models/owner.rb
577
+ - test/dummy/app/models/integer_field.rb
578
+ - test/dummy/app/models/tree.rb
570
579
  - test/dummy/app/models/belongs_to_class_name_field.rb
571
- - test/dummy/app/models/string_field.rb
572
- - test/dummy/app/models/has_many_class_name_field.rb
573
- - test/dummy/app/models/reference.rb
574
580
  - test/dummy/app/models/boolean_field.rb
575
- - test/dummy/app/models/polymorphic_field.rb
576
- - test/dummy/app/models/tree.rb
577
- - test/dummy/app/models/has_many_field.rb
578
- - test/dummy/app/models/has_and_belongs_to_many_field.rb
579
- - test/dummy/app/models/integer_field.rb
580
- - test/dummy/app/models/date_field.rb
581
+ - test/dummy/app/models/has_many_through_field.rb
581
582
  - test/dummy/app/models/float_field.rb
582
- - test/dummy/app/models/has_one_field.rb
583
+ - test/dummy/app/models/string_field.rb
584
+ - test/dummy/app/models/owner.rb
585
+ - test/dummy/app/models/serialize_field.rb
586
+ - test/dummy/app/models/polymorphic_field.rb
587
+ - test/dummy/app/models/reference.rb
583
588
  - test/dummy/app/controllers/application_controller.rb
584
- - test/dummy/app/assets/javascripts/application.js
585
- - test/dummy/app/assets/config/manifest.js
586
589
  - test/dummy/app/assets/stylesheets/application.css
587
- - test/dummy/app/views/layouts/application.html.erb
588
- - test/dummy/app/helpers/application_helper.rb
589
- - test/dummy/bin/rails
590
- - test/dummy/bin/bundle
591
- - test/dummy/bin/rake
592
- - test/dummy/bin/setup
593
- - test/dummy/public/favicon.ico
594
- - test/dummy/public/404.html
595
- - test/dummy/public/422.html
596
- - test/dummy/public/500.html
597
- - test/dummy/config.ru
590
+ - test/dummy/app/assets/config/manifest.js
591
+ - test/dummy/app/assets/javascripts/application.js
592
+ - test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb
593
+ - test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb
594
+ - test/dummy/db/migrate/20160627172810_create_owner.rb
595
+ - test/dummy/db/migrate/20160627172951_create_tree.rb
596
+ - test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb
597
+ - test/dummy/db/migrate/20150608130516_create_date_field.rb
598
+ - test/dummy/db/migrate/20150608132621_create_string_field.rb
599
+ - test/dummy/db/migrate/20160628173505_add_timestamps.rb
600
+ - test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb
601
+ - test/dummy/db/migrate/20150608131610_create_float_field.rb
602
+ - test/dummy/db/migrate/20170614141921_create_serialize_field.rb
603
+ - test/dummy/db/migrate/20150608131430_create_integer_field.rb
604
+ - test/dummy/db/migrate/20150608133044_create_has_one_field.rb
605
+ - test/dummy/db/migrate/20150608131603_create_decimal_field.rb
606
+ - test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb
607
+ - test/dummy/db/migrate/20150616150629_create_polymorphic_field.rb
608
+ - test/dummy/db/migrate/20181111162121_create_references_table.rb
609
+ - test/dummy/db/migrate/20150608150016_create_has_many_field.rb
610
+ - test/dummy/db/migrate/20150608132159_create_boolean_field.rb
611
+ - test/dummy/db/schema.rb
598
612
  - test/dummy/Rakefile
599
- - test/fixtures/tree.yml
600
- - test/fixtures/string_field.yml
601
- - test/fixtures/owner.yml
602
- - test/fixtures/has_one_field.yml
603
- - test/fixtures/serialize_field.yml
604
- - test/fixtures/reference.yml
605
- - test/fixtures/belongs_to_field.yml
606
- - test/fixtures/has_many_through_field.yml
607
- - test/fixtures/has_many_field.yml
608
- - spec/requests/resources_spec.rb
609
- - spec/requests/authentications_spec.rb
610
- - spec/requests/count_spec.rb
613
+ - test/routing/route_test.rb
614
+ - test/forest_liana_test.rb
615
+ - test/services/forest_liana/schema_adapter_test.rb
616
+ - test/services/forest_liana/operator_date_interval_parser_test.rb
617
+ - spec/helpers/forest_liana/query_helper_spec.rb
618
+ - spec/helpers/forest_liana/schema_helper_spec.rb
611
619
  - spec/requests/actions_controller_spec.rb
612
- - spec/requests/cors_spec.rb
620
+ - spec/requests/authentications_spec.rb
613
621
  - spec/requests/test.ru
622
+ - spec/requests/cors_spec.rb
614
623
  - spec/requests/stats_spec.rb
624
+ - spec/requests/count_spec.rb
625
+ - spec/requests/resources_spec.rb
615
626
  - spec/spec_helper.rb
616
- - spec/services/forest_liana/filters_parser_spec.rb
617
- - spec/services/forest_liana/resources_getter_spec.rb
618
- - spec/services/forest_liana/line_stat_getter_spec.rb
619
- - spec/services/forest_liana/ip_whitelist_checker_spec.rb
620
- - spec/services/forest_liana/schema_adapter_spec.rb
621
- - spec/services/forest_liana/value_stat_getter_spec.rb
622
- - spec/services/forest_liana/permissions_formatter_spec.rb
623
- - spec/services/forest_liana/has_many_getter_spec.rb
624
- - spec/services/forest_liana/resource_updater_spec.rb
625
- - spec/services/forest_liana/permissions_getter_spec.rb
626
- - spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
627
- - spec/services/forest_liana/scope_manager_spec.rb
628
- - spec/services/forest_liana/permissions_checker_live_queries_spec.rb
629
- - spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb
630
- - spec/services/forest_liana/apimap_sorter_spec.rb
631
- - spec/services/forest_liana/pie_stat_getter_spec.rb
632
- - spec/services/forest_liana/smart_action_field_validator_spec.rb
633
- - spec/dummy/db/migrate/20210526084712_create_products.rb
634
- - spec/dummy/db/migrate/20190716135241_add_type_to_user.rb
635
- - spec/dummy/db/migrate/20190716130830_add_age_to_tree.rb
636
- - spec/dummy/db/migrate/20190226172951_create_user.rb
637
- - spec/dummy/db/migrate/20190226174951_create_tree.rb
638
- - spec/dummy/db/migrate/20190226173051_create_isle.rb
639
- - spec/dummy/db/migrate/20210326140855_create_locations.rb
640
- - spec/dummy/db/migrate/20210326110524_create_references.rb
641
- - spec/dummy/db/migrate/20210511141752_create_owners.rb
642
- - spec/dummy/db/schema.rb
627
+ - spec/dummy/config.ru
628
+ - spec/dummy/bin/rake
629
+ - spec/dummy/bin/setup
630
+ - spec/dummy/bin/bundle
631
+ - spec/dummy/bin/rails
643
632
  - spec/dummy/README.rdoc
633
+ - spec/dummy/config/secrets.yml
634
+ - spec/dummy/config/environments/test.rb
635
+ - spec/dummy/config/environments/production.rb
636
+ - spec/dummy/config/environments/development.rb
637
+ - spec/dummy/config/database.yml
638
+ - spec/dummy/config/application.rb
644
639
  - spec/dummy/config/boot.rb
640
+ - spec/dummy/config/environment.rb
641
+ - spec/dummy/config/initializers/inflections.rb
645
642
  - spec/dummy/config/initializers/session_store.rb
643
+ - spec/dummy/config/initializers/backtrace_silencers.rb
646
644
  - spec/dummy/config/initializers/wrap_parameters.rb
647
- - spec/dummy/config/initializers/filter_parameter_logging.rb
648
- - spec/dummy/config/initializers/forest_liana.rb
645
+ - spec/dummy/config/initializers/mime_types.rb
649
646
  - spec/dummy/config/initializers/cookies_serializer.rb
650
647
  - spec/dummy/config/initializers/assets.rb
651
- - spec/dummy/config/initializers/mime_types.rb
652
- - spec/dummy/config/initializers/backtrace_silencers.rb
653
- - spec/dummy/config/initializers/inflections.rb
654
- - spec/dummy/config/environment.rb
655
- - spec/dummy/config/secrets.yml
656
- - spec/dummy/config/application.rb
657
- - spec/dummy/config/database.yml
648
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
649
+ - spec/dummy/config/initializers/forest_liana.rb
658
650
  - spec/dummy/config/routes.rb
659
- - spec/dummy/config/environments/production.rb
660
- - spec/dummy/config/environments/test.rb
661
- - spec/dummy/config/environments/development.rb
662
- - spec/dummy/app/models/town.rb
651
+ - spec/dummy/app/helpers/application_helper.rb
652
+ - spec/dummy/app/views/layouts/application.html.erb
653
+ - spec/dummy/app/models/driver.rb
654
+ - spec/dummy/app/models/car.rb
655
+ - spec/dummy/app/models/garage_record.rb
656
+ - spec/dummy/app/models/user_record.rb
657
+ - spec/dummy/app/models/product.rb
658
+ - spec/dummy/app/models/sub_application_record.rb
659
+ - spec/dummy/app/models/tree.rb
660
+ - spec/dummy/app/models/island.rb
663
661
  - spec/dummy/app/models/owner.rb
664
- - spec/dummy/app/models/location.rb
665
- - spec/dummy/app/models/reference.rb
666
662
  - spec/dummy/app/models/application_record.rb
667
- - spec/dummy/app/models/tree.rb
668
- - spec/dummy/app/models/product.rb
663
+ - spec/dummy/app/models/manufacturer.rb
664
+ - spec/dummy/app/models/town.rb
669
665
  - spec/dummy/app/models/user.rb
670
- - spec/dummy/app/models/island.rb
671
- - spec/dummy/app/models/sub_application_record.rb
666
+ - spec/dummy/app/models/reference.rb
667
+ - spec/dummy/app/models/location.rb
668
+ - spec/dummy/app/config/routes.rb
672
669
  - spec/dummy/app/controllers/forest/islands_controller.rb
673
670
  - spec/dummy/app/controllers/application_controller.rb
674
- - spec/dummy/app/assets/javascripts/application.js
675
- - spec/dummy/app/assets/config/manifest.js
676
671
  - spec/dummy/app/assets/stylesheets/application.css
677
- - spec/dummy/app/config/routes.rb
678
- - spec/dummy/app/views/layouts/application.html.erb
679
- - spec/dummy/app/helpers/application_helper.rb
680
- - spec/dummy/bin/rails
681
- - spec/dummy/bin/bundle
682
- - spec/dummy/bin/rake
683
- - spec/dummy/bin/setup
684
- - spec/dummy/config.ru
685
- - spec/dummy/Rakefile
672
+ - spec/dummy/app/assets/config/manifest.js
673
+ - spec/dummy/app/assets/javascripts/application.js
674
+ - spec/dummy/lib/forest_liana/collections/island.rb
675
+ - spec/dummy/lib/forest_liana/collections/user.rb
676
+ - spec/dummy/lib/forest_liana/collections/location.rb
686
677
  - spec/dummy/lib/forest_liana/controllers/owners_controller.rb
687
678
  - spec/dummy/lib/forest_liana/controllers/owner_trees_controller.rb
688
- - spec/dummy/lib/forest_liana/collections/location.rb
689
- - spec/dummy/lib/forest_liana/collections/user.rb
690
- - spec/dummy/lib/forest_liana/collections/island.rb
691
- - spec/rails_helper.rb
679
+ - spec/dummy/db/migrate/20190226173051_create_isle.rb
680
+ - spec/dummy/db/migrate/20210326140855_create_locations.rb
681
+ - spec/dummy/db/migrate/20190716135241_add_type_to_user.rb
682
+ - spec/dummy/db/migrate/20220719094127_create_cars.rb
683
+ - spec/dummy/db/migrate/20210511141752_create_owners.rb
684
+ - spec/dummy/db/migrate/20220719094450_create_drivers.rb
685
+ - spec/dummy/db/migrate/20220727114930_add_columns_to_products.rb
686
+ - spec/dummy/db/migrate/20210526084712_create_products.rb
687
+ - spec/dummy/db/migrate/20220727114450_create_manufacturers.rb
688
+ - spec/dummy/db/migrate/20190226174951_create_tree.rb
689
+ - spec/dummy/db/migrate/20190716130830_add_age_to_tree.rb
690
+ - spec/dummy/db/migrate/20190226172951_create_user.rb
691
+ - spec/dummy/db/migrate/20210326110524_create_references.rb
692
+ - spec/dummy/db/schema.rb
693
+ - spec/dummy/Rakefile
692
694
  - spec/config/initializers/logger_spec.rb
693
- - spec/helpers/forest_liana/schema_helper_spec.rb
694
- - spec/helpers/forest_liana/query_helper_spec.rb
695
- - spec/lib/forest_liana/schema_file_updater_spec.rb
696
695
  - spec/lib/forest_liana/bootstrapper_spec.rb
696
+ - spec/lib/forest_liana/schema_file_updater_spec.rb
697
+ - spec/services/forest_liana/smart_action_field_validator_spec.rb
698
+ - spec/services/forest_liana/apimap_sorter_spec.rb
699
+ - spec/services/forest_liana/value_stat_getter_spec.rb
700
+ - spec/services/forest_liana/filters_parser_spec.rb
701
+ - spec/services/forest_liana/line_stat_getter_spec.rb
702
+ - spec/services/forest_liana/permissions_formatter_spec.rb
703
+ - spec/services/forest_liana/ip_whitelist_checker_spec.rb
704
+ - spec/services/forest_liana/permissions_getter_spec.rb
705
+ - spec/services/forest_liana/pie_stat_getter_spec.rb
706
+ - spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb
707
+ - spec/services/forest_liana/scope_manager_spec.rb
708
+ - spec/services/forest_liana/has_many_getter_spec.rb
709
+ - spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
710
+ - spec/services/forest_liana/resource_updater_spec.rb
711
+ - spec/services/forest_liana/permissions_checker_live_queries_spec.rb
712
+ - spec/services/forest_liana/resources_getter_spec.rb
713
+ - spec/services/forest_liana/schema_adapter_spec.rb
714
+ - spec/rails_helper.rb