forest_liana 6.6.0 → 7.0.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/forest_liana/actions_controller.rb +44 -29
- data/app/controllers/forest_liana/application_controller.rb +2 -2
- data/app/controllers/forest_liana/associations_controller.rb +1 -1
- data/app/controllers/forest_liana/base_controller.rb +1 -1
- data/app/controllers/forest_liana/resources_controller.rb +7 -6
- data/app/serializers/forest_liana/intercom_attribute_serializer.rb +1 -1
- data/app/serializers/forest_liana/intercom_conversation_serializer.rb +1 -1
- data/app/serializers/forest_liana/mixpanel_event_serializer.rb +1 -1
- data/app/serializers/forest_liana/serializer_factory.rb +1 -1
- data/app/serializers/forest_liana/stat_serializer.rb +1 -1
- data/app/serializers/forest_liana/stripe_bank_account_serializer.rb +1 -1
- data/app/serializers/forest_liana/stripe_card_serializer.rb +1 -1
- data/app/serializers/forest_liana/stripe_invoice_serializer.rb +1 -1
- data/app/serializers/forest_liana/stripe_payment_serializer.rb +1 -1
- data/app/serializers/forest_liana/stripe_subscription_serializer.rb +1 -1
- data/app/services/forest_liana/apimap_sorter.rb +1 -0
- data/app/services/forest_liana/permissions_checker.rb +40 -34
- data/app/services/forest_liana/permissions_formatter.rb +1 -1
- data/app/services/forest_liana/permissions_getter.rb +1 -4
- data/app/services/forest_liana/smart_action_field_validator.rb +49 -0
- data/config/initializers/errors.rb +17 -0
- data/lib/forest_liana/bootstrapper.rb +2 -2
- data/lib/forest_liana/schema_file_updater.rb +8 -0
- data/lib/forest_liana/version.rb +1 -1
- data/spec/lib/forest_liana/schema_file_updater_spec.rb +94 -0
- data/spec/requests/actions_controller_spec.rb +22 -20
- data/spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb +45 -69
- data/spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb +39 -63
- data/spec/services/forest_liana/permissions_checker_live_queries_spec.rb +3 -3
- data/spec/services/forest_liana/permissions_formatter_spec.rb +11 -11
- data/spec/services/forest_liana/smart_action_field_validator_spec.rb +70 -0
- metadata +119 -117
- data/app/helpers/forest_liana/is_same_data_structure_helper.rb +0 -44
- data/spec/helpers/forest_liana/is_same_data_structure_helper_spec.rb +0 -87
@@ -50,7 +50,8 @@ module ForestLiana
|
|
50
50
|
})
|
51
51
|
]
|
52
52
|
}
|
53
|
-
let(:
|
53
|
+
let(:default_rendering_id) { 1 }
|
54
|
+
let(:segments_permissions) { { default_rendering_id => { 'segments' => nil } } }
|
54
55
|
let(:default_api_permissions) {
|
55
56
|
{
|
56
57
|
"data" => {
|
@@ -116,14 +117,16 @@ module ForestLiana
|
|
116
117
|
}
|
117
118
|
},
|
118
119
|
},
|
119
|
-
'renderings' =>
|
120
|
+
'renderings' => segments_permissions
|
121
|
+
},
|
122
|
+
"stats" => {
|
123
|
+
"queries"=>[],
|
120
124
|
},
|
121
125
|
"meta" => {
|
122
126
|
"rolesACLActivated" => true
|
123
127
|
}
|
124
128
|
}
|
125
129
|
}
|
126
|
-
let(:default_rendering_id) { 1 }
|
127
130
|
|
128
131
|
before do
|
129
132
|
allow(ForestLiana).to receive(:apimap).and_return(schema)
|
@@ -174,7 +177,7 @@ module ForestLiana
|
|
174
177
|
end
|
175
178
|
|
176
179
|
let(:collection_name) { 'custom' }
|
177
|
-
let(:
|
180
|
+
let(:segments_permissions) { { default_rendering_id => { 'custom' => nil }, 2 => { 'custom' => nil } } }
|
178
181
|
let(:api_permissions_rendering_1) {
|
179
182
|
{
|
180
183
|
"data" => {
|
@@ -191,7 +194,7 @@ module ForestLiana
|
|
191
194
|
"actions" => { }
|
192
195
|
},
|
193
196
|
},
|
194
|
-
'renderings' =>
|
197
|
+
'renderings' => segments_permissions
|
195
198
|
},
|
196
199
|
"meta" => {
|
197
200
|
"rolesACLActivated" => true
|
@@ -242,10 +245,10 @@ module ForestLiana
|
|
242
245
|
end
|
243
246
|
end
|
244
247
|
|
245
|
-
context '
|
248
|
+
context 'renderings cache' do
|
246
249
|
let(:rendering_id) { 1 }
|
247
250
|
let(:collection_name) { 'custom' }
|
248
|
-
let(:
|
251
|
+
let(:segments_permissions) { { rendering_id => { 'custom' => nil } } }
|
249
252
|
let(:api_permissions) {
|
250
253
|
{
|
251
254
|
"data" => {
|
@@ -262,18 +265,18 @@ module ForestLiana
|
|
262
265
|
"actions" => { }
|
263
266
|
},
|
264
267
|
},
|
265
|
-
'renderings' =>
|
268
|
+
'renderings' => segments_permissions
|
266
269
|
},
|
267
270
|
"meta" => {
|
268
271
|
"rolesACLActivated" => true
|
269
272
|
}
|
270
273
|
}
|
271
274
|
}
|
272
|
-
let(:
|
275
|
+
let(:api_permissions_rendering_only) {
|
273
276
|
{
|
274
277
|
"data" => {
|
275
278
|
'collections' => { },
|
276
|
-
'renderings' =>
|
279
|
+
'renderings' => segments_permissions
|
277
280
|
},
|
278
281
|
"meta" => {
|
279
282
|
"rolesACLActivated" => true
|
@@ -283,13 +286,13 @@ module ForestLiana
|
|
283
286
|
|
284
287
|
before do
|
285
288
|
allow(ForestLiana::PermissionsGetter).to receive(:get_permissions_for_rendering).with(rendering_id).and_return(api_permissions)
|
286
|
-
allow(ForestLiana::PermissionsGetter).to receive(:get_permissions_for_rendering).with(rendering_id, rendering_specific_only: true).and_return(
|
289
|
+
allow(ForestLiana::PermissionsGetter).to receive(:get_permissions_for_rendering).with(rendering_id, rendering_specific_only: true).and_return(api_permissions_rendering_only)
|
287
290
|
end
|
288
291
|
|
289
292
|
context 'when checking once for authorization' do
|
290
293
|
context 'when checking browseEnabled' do
|
291
294
|
context 'when expiration value is set to its default' do
|
292
|
-
it 'should not call the API to refresh the
|
295
|
+
it 'should not call the API to refresh the renderings cache' do
|
293
296
|
described_class.new(fake_ressource, 'browseEnabled', rendering_id, user_id: user_id).is_authorized?
|
294
297
|
|
295
298
|
expect(ForestLiana::PermissionsGetter).to have_received(:get_permissions_for_rendering).with(rendering_id).once
|
@@ -304,7 +307,7 @@ module ForestLiana
|
|
304
307
|
described_class.empty_cache
|
305
308
|
end
|
306
309
|
|
307
|
-
it 'should call the API to refresh the
|
310
|
+
it 'should call the API to refresh the renderings cache' do
|
308
311
|
described_class.new(fake_ressource, 'browseEnabled', rendering_id, user_id: user_id).is_authorized?
|
309
312
|
|
310
313
|
expect(ForestLiana::PermissionsGetter).to have_received(:get_permissions_for_rendering).with(rendering_id).once
|
@@ -313,7 +316,7 @@ module ForestLiana
|
|
313
316
|
end
|
314
317
|
end
|
315
318
|
|
316
|
-
# Only browse permission requires
|
319
|
+
# Only browse permission requires segments
|
317
320
|
context 'when checking exportEnabled' do
|
318
321
|
context 'when expiration value is set in the past' do
|
319
322
|
before do
|
@@ -323,7 +326,7 @@ module ForestLiana
|
|
323
326
|
end
|
324
327
|
end
|
325
328
|
|
326
|
-
it 'should NOT call the API to refresh the
|
329
|
+
it 'should NOT call the API to refresh the rendering cache' do
|
327
330
|
described_class.new(fake_ressource, 'exportEnabled', rendering_id, user_id: user_id).is_authorized?
|
328
331
|
|
329
332
|
expect(ForestLiana::PermissionsGetter).to have_received(:get_permissions_for_rendering).with(rendering_id).once
|
@@ -334,8 +337,8 @@ module ForestLiana
|
|
334
337
|
|
335
338
|
context 'when checking twice for authorization' do
|
336
339
|
context 'on the same rendering' do
|
337
|
-
context 'when
|
338
|
-
it 'should NOT call the API to refresh the
|
340
|
+
context 'when rendering permission has NOT expired' do
|
341
|
+
it 'should NOT call the API to refresh the rendering permissions' do
|
339
342
|
described_class.new(fake_ressource, 'browseEnabled', rendering_id, user_id: user_id).is_authorized?
|
340
343
|
described_class.new(fake_ressource, 'browseEnabled', rendering_id, user_id: user_id).is_authorized?
|
341
344
|
|
@@ -344,14 +347,14 @@ module ForestLiana
|
|
344
347
|
end
|
345
348
|
end
|
346
349
|
|
347
|
-
context 'when
|
350
|
+
context 'when renderings permission has expired' do
|
348
351
|
before do
|
349
352
|
allow(ENV).to receive(:[]).with('FOREST_PERMISSIONS_EXPIRATION_IN_SECONDS').and_return('-1')
|
350
353
|
# Needed to enforce ENV stub
|
351
354
|
described_class.empty_cache
|
352
355
|
end
|
353
356
|
|
354
|
-
it 'should call the API to refresh the
|
357
|
+
it 'should call the API to refresh the rendering permissions' do
|
355
358
|
described_class.new(fake_ressource, 'browseEnabled', rendering_id, user_id: user_id).is_authorized?
|
356
359
|
described_class.new(fake_ressource, 'browseEnabled', rendering_id, user_id: user_id).is_authorized?
|
357
360
|
|
@@ -363,14 +366,17 @@ module ForestLiana
|
|
363
366
|
|
364
367
|
context 'on two different renderings' do
|
365
368
|
let(:other_rendering_id) { 2 }
|
366
|
-
let(:
|
369
|
+
let(:api_permissions_rendering_only) {
|
367
370
|
{
|
368
371
|
"data" => {
|
369
372
|
'collections' => { },
|
370
373
|
'renderings' => {
|
371
|
-
|
374
|
+
other_rendering_id => { 'custom' => nil }
|
372
375
|
}
|
373
376
|
},
|
377
|
+
"stats" => {
|
378
|
+
"somestats" => [],
|
379
|
+
},
|
374
380
|
"meta" => {
|
375
381
|
"rolesACLActivated" => true
|
376
382
|
}
|
@@ -378,10 +384,10 @@ module ForestLiana
|
|
378
384
|
}
|
379
385
|
|
380
386
|
before do
|
381
|
-
allow(ForestLiana::PermissionsGetter).to receive(:get_permissions_for_rendering).with(other_rendering_id, rendering_specific_only: true).and_return(
|
387
|
+
allow(ForestLiana::PermissionsGetter).to receive(:get_permissions_for_rendering).with(other_rendering_id, rendering_specific_only: true).and_return(api_permissions_rendering_only)
|
382
388
|
end
|
383
389
|
|
384
|
-
it 'should call the API to refresh the
|
390
|
+
it 'should call the API to refresh the rendering permissions' do
|
385
391
|
described_class.new(fake_ressource, 'browseEnabled', rendering_id, user_id: user_id).is_authorized?
|
386
392
|
described_class.new(fake_ressource, 'browseEnabled', other_rendering_id, user_id: user_id).is_authorized?
|
387
393
|
|
@@ -452,58 +458,28 @@ module ForestLiana
|
|
452
458
|
end
|
453
459
|
end
|
454
460
|
|
455
|
-
context 'when
|
461
|
+
context 'when segments are defined' do
|
456
462
|
let(:default_rendering_id) { 1 }
|
457
|
-
let(:
|
463
|
+
let(:segments_permissions) {
|
458
464
|
{
|
459
465
|
default_rendering_id => {
|
460
466
|
collection_name => {
|
461
|
-
'
|
462
|
-
'dynamicScopesValues' => {},
|
463
|
-
'filter' => { 'aggregator' => 'and', 'conditions' => [condition] }
|
464
|
-
}
|
467
|
+
'segments' => ['SELECT * FROM products;', 'SELECT * FROM sellers;']
|
465
468
|
}
|
466
469
|
}
|
467
470
|
}
|
468
471
|
}
|
469
|
-
let(:collection_list_parameters) { { :user_id => "1", :
|
472
|
+
let(:collection_list_parameters) { { :user_id => "1", :segmentQuery => segmentQuery } }
|
470
473
|
|
471
|
-
context 'when
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
it 'should return true' do
|
476
|
-
expect(subject.is_authorized?).to be true
|
477
|
-
end
|
478
|
-
end
|
479
|
-
|
480
|
-
context 'when scope value is a boolean' do
|
481
|
-
let(:condition) { { 'field' => 'field_1', 'operator' => 'equal', 'value' => 'true' } }
|
482
|
-
|
483
|
-
it 'should return true' do
|
484
|
-
expect(subject.is_authorized?).to be true
|
485
|
-
end
|
474
|
+
context 'when segments are passing validation' do
|
475
|
+
let(:segmentQuery) { 'SELECT * FROM products;' }
|
476
|
+
it 'should return true' do
|
477
|
+
expect(subject.is_authorized?).to be true
|
486
478
|
end
|
487
479
|
end
|
488
480
|
|
489
|
-
context 'when
|
490
|
-
let(:
|
491
|
-
let(:other_condition) {
|
492
|
-
{
|
493
|
-
aggregator: 'and',
|
494
|
-
conditions: [
|
495
|
-
{ field: 'name', value: 'john', operator: 'equal' },
|
496
|
-
{ field: 'price', value: '2500', operator: 'equal' }
|
497
|
-
]
|
498
|
-
}
|
499
|
-
}
|
500
|
-
let(:collection_list_parameters) {
|
501
|
-
{
|
502
|
-
:user_id => "1",
|
503
|
-
:filters => JSON.generate(other_condition)
|
504
|
-
}
|
505
|
-
}
|
506
|
-
|
481
|
+
context 'when segments are NOT passing validation' do
|
482
|
+
let(:segmentQuery) { 'SELECT * FROM rockets WHERE name = "Starship";' }
|
507
483
|
it 'should return false' do
|
508
484
|
expect(subject.is_authorized?).to be false
|
509
485
|
end
|
@@ -20,7 +20,8 @@ module ForestLiana
|
|
20
20
|
})
|
21
21
|
]
|
22
22
|
}
|
23
|
-
let(:
|
23
|
+
let(:default_rendering_id) { 1 }
|
24
|
+
let(:segments_permissions) { { default_rendering_id => { 'segments' => nil } } }
|
24
25
|
let(:default_api_permissions) {
|
25
26
|
{
|
26
27
|
"data" => {
|
@@ -41,7 +42,7 @@ module ForestLiana
|
|
41
42
|
}
|
42
43
|
},
|
43
44
|
},
|
44
|
-
'renderings' =>
|
45
|
+
'renderings' => segments_permissions
|
45
46
|
},
|
46
47
|
"meta" => {
|
47
48
|
"rolesACLActivated" => true
|
@@ -61,7 +62,6 @@ module ForestLiana
|
|
61
62
|
},
|
62
63
|
}
|
63
64
|
}
|
64
|
-
let(:default_rendering_id) { 1 }
|
65
65
|
|
66
66
|
before do
|
67
67
|
allow(ForestLiana).to receive(:apimap).and_return(schema)
|
@@ -14,7 +14,7 @@ module ForestLiana
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
let(:old_format_action_permissions) { { 'allowed' => true, 'users' => nil } }
|
17
|
-
let(:
|
17
|
+
let(:old_format_segments_permissions) { nil }
|
18
18
|
let(:old_format_permissions) {
|
19
19
|
{
|
20
20
|
'collection_1' => {
|
@@ -22,7 +22,7 @@ module ForestLiana
|
|
22
22
|
'actions' => {
|
23
23
|
'action_1' => old_format_action_permissions
|
24
24
|
},
|
25
|
-
'
|
25
|
+
'segments' => old_format_segments_permissions
|
26
26
|
}
|
27
27
|
}
|
28
28
|
}
|
@@ -197,22 +197,22 @@ module ForestLiana
|
|
197
197
|
end
|
198
198
|
end
|
199
199
|
|
200
|
-
describe '
|
201
|
-
subject { converted_permission['renderings'][rendering_id]['collection_1']['
|
202
|
-
let(:expected_new_format_permissions) {
|
200
|
+
describe 'segments permissions' do
|
201
|
+
subject { converted_permission['renderings'][rendering_id]['collection_1']['segments'] }
|
202
|
+
let(:expected_new_format_permissions) { old_format_segments_permissions }
|
203
203
|
|
204
|
-
context 'when
|
205
|
-
let(:
|
204
|
+
context 'when segments permissions are set' do
|
205
|
+
let(:old_format_segments_permissions) { ['segmentQuery1', 'segmentQuery2'] }
|
206
206
|
|
207
|
-
it 'expected
|
207
|
+
it 'expected segments permissions should be set' do
|
208
208
|
expect(subject).to eq expected_new_format_permissions
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
212
|
-
context 'when
|
213
|
-
let(:
|
212
|
+
context 'when segments permissions are nil' do
|
213
|
+
let(:old_format_segments_permissions) { nil }
|
214
214
|
|
215
|
-
it 'expected
|
215
|
+
it 'expected segments permissions should be nil' do
|
216
216
|
expect(subject).to eq expected_new_format_permissions
|
217
217
|
end
|
218
218
|
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
describe SmartActionFieldValidator do
|
3
|
+
describe "self.validate_field" do
|
4
|
+
it "should raise an SmartActionInvalidFieldError with nil field" do
|
5
|
+
expect { SmartActionFieldValidator.validate_field(nil, "actionName") }.to raise_error(ForestLiana::Errors::SmartActionInvalidFieldError, 'Error while parsing action "actionName": The field attribute must be defined')
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should raise an SmartActionInvalidFieldError with a field that is not a string" do
|
9
|
+
expect { SmartActionFieldValidator.validate_field({
|
10
|
+
:field => 5
|
11
|
+
}, "actionName") }.to raise_error(ForestLiana::Errors::SmartActionInvalidFieldError, 'Error while parsing action "actionName": The field attribute must be a string.')
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should raise an SmartActionInvalidFieldError with description that is not a string" do
|
15
|
+
expect { SmartActionFieldValidator.validate_field({
|
16
|
+
:field => "field",
|
17
|
+
:description => 5
|
18
|
+
}, "actionName") }.to raise_error(ForestLiana::Errors::SmartActionInvalidFieldError, 'Error while parsing action "actionName" on field "field": The description attribute must be a string.')
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should raise an SmartActionInvalidFieldError with an enums that is not an array" do
|
22
|
+
expect { SmartActionFieldValidator.validate_field({
|
23
|
+
:field => "field",
|
24
|
+
:enums => "NotAnArray"
|
25
|
+
}, "actionName") }.to raise_error(ForestLiana::Errors::SmartActionInvalidFieldError, 'Error while parsing action "actionName" on field "field": The enums attribute must be an array.')
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should raise an SmartActionInvalidFieldError with a reference that is not a string" do
|
29
|
+
expect { SmartActionFieldValidator.validate_field({
|
30
|
+
:field => "field",
|
31
|
+
:type => "String",
|
32
|
+
:reference => 5
|
33
|
+
}, "actionName") }.to raise_error(ForestLiana::Errors::SmartActionInvalidFieldError, 'Error while parsing action "actionName" on field "field": The reference attribute must be a string.')
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should raise an SmartActionInvalidFieldError with an invalid type" do
|
37
|
+
expect { SmartActionFieldValidator.validate_field({
|
38
|
+
:field => "field",
|
39
|
+
:type => "AbsolutelyNotAValidType"
|
40
|
+
}, "actionName") }.to raise_error(ForestLiana::Errors::SmartActionInvalidFieldError, 'Error while parsing action "actionName" on field "field": The type attribute must be a valid type. See the documentation for more information. https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields#available-field-options.')
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should not raise any error when everything is configured correctly" do
|
44
|
+
expect { SmartActionFieldValidator.validate_field({
|
45
|
+
:field => "field",
|
46
|
+
:type => "String",
|
47
|
+
:description => "field description"
|
48
|
+
}, "actionName") }.not_to raise_error
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "self.validate_field_change_hook" do
|
53
|
+
it "should raise an SmartActionInvalidFieldHookError with an invalid type" do
|
54
|
+
expect { SmartActionFieldValidator.validate_field_change_hook({
|
55
|
+
:field => "field",
|
56
|
+
:type => "AbsolutelyNotAValidType",
|
57
|
+
:hook => "hookThatDoesNotExist"
|
58
|
+
}, "actionName", []) }.to raise_error(ForestLiana::Errors::SmartActionInvalidFieldHookError)
|
59
|
+
end
|
60
|
+
|
61
|
+
it "should not raise any error when everything is configured correctly" do
|
62
|
+
expect { SmartActionFieldValidator.validate_field_change_hook({
|
63
|
+
:field => "field",
|
64
|
+
:type => "AbsolutelyNotAValidType",
|
65
|
+
:hook => "on_field_changed"
|
66
|
+
}, "actionName", ["on_field_changed"]) }.not_to raise_error
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
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:
|
4
|
+
version: 7.0.0.beta.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: jsonapi-serializers
|
28
|
+
name: forestadmin-jsonapi-serializers
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -225,7 +225,6 @@ files:
|
|
225
225
|
- app/helpers/forest_liana/adapter_helper.rb
|
226
226
|
- app/helpers/forest_liana/application_helper.rb
|
227
227
|
- app/helpers/forest_liana/decoration_helper.rb
|
228
|
-
- app/helpers/forest_liana/is_same_data_structure_helper.rb
|
229
228
|
- app/helpers/forest_liana/query_helper.rb
|
230
229
|
- app/helpers/forest_liana/schema_helper.rb
|
231
230
|
- app/helpers/forest_liana/widgets_helper.rb
|
@@ -283,6 +282,7 @@ files:
|
|
283
282
|
- app/services/forest_liana/schema_utils.rb
|
284
283
|
- app/services/forest_liana/scope_validator.rb
|
285
284
|
- app/services/forest_liana/search_query_builder.rb
|
285
|
+
- app/services/forest_liana/smart_action_field_validator.rb
|
286
286
|
- app/services/forest_liana/stat_getter.rb
|
287
287
|
- app/services/forest_liana/stripe_base_getter.rb
|
288
288
|
- app/services/forest_liana/stripe_invoice_getter.rb
|
@@ -368,10 +368,10 @@ files:
|
|
368
368
|
- spec/dummy/db/schema.rb
|
369
369
|
- spec/dummy/lib/forest_liana/collections/location.rb
|
370
370
|
- spec/dummy/lib/forest_liana/collections/user.rb
|
371
|
-
- spec/helpers/forest_liana/is_same_data_structure_helper_spec.rb
|
372
371
|
- spec/helpers/forest_liana/query_helper_spec.rb
|
373
372
|
- spec/helpers/forest_liana/schema_helper_spec.rb
|
374
373
|
- spec/lib/forest_liana/bootstrapper_spec.rb
|
374
|
+
- spec/lib/forest_liana/schema_file_updater_spec.rb
|
375
375
|
- spec/rails_helper.rb
|
376
376
|
- spec/requests/actions_controller_spec.rb
|
377
377
|
- spec/requests/authentications_spec.rb
|
@@ -388,6 +388,7 @@ files:
|
|
388
388
|
- spec/services/forest_liana/permissions_getter_spec.rb
|
389
389
|
- spec/services/forest_liana/resources_getter_spec.rb
|
390
390
|
- spec/services/forest_liana/schema_adapter_spec.rb
|
391
|
+
- spec/services/forest_liana/smart_action_field_validator_spec.rb
|
391
392
|
- spec/spec_helper.rb
|
392
393
|
- test/dummy/README.rdoc
|
393
394
|
- test/dummy/Rakefile
|
@@ -496,177 +497,178 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
496
497
|
version: '0'
|
497
498
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
498
499
|
requirements:
|
499
|
-
- - "
|
500
|
+
- - ">"
|
500
501
|
- !ruby/object:Gem::Version
|
501
|
-
version:
|
502
|
+
version: 1.3.1
|
502
503
|
requirements: []
|
503
504
|
rubygems_version: 3.1.2
|
504
505
|
signing_key:
|
505
506
|
specification_version: 4
|
506
507
|
summary: Official Rails Liana for Forest
|
507
508
|
test_files:
|
509
|
+
- test/routing/route_test.rb
|
508
510
|
- test/forest_liana_test.rb
|
509
|
-
- test/
|
510
|
-
- test/services/forest_liana/has_many_getter_test.rb
|
511
|
-
- test/services/forest_liana/pie_stat_getter_test.rb
|
511
|
+
- test/services/forest_liana/schema_adapter_test.rb
|
512
512
|
- test/services/forest_liana/resource_updater_test.rb
|
513
|
-
- test/services/forest_liana/value_stat_getter_test.rb
|
514
513
|
- test/services/forest_liana/scope_validator_test.rb
|
515
|
-
- test/services/forest_liana/schema_adapter_test.rb
|
516
514
|
- test/services/forest_liana/operator_date_interval_parser_test.rb
|
517
|
-
- test/
|
515
|
+
- test/services/forest_liana/value_stat_getter_test.rb
|
516
|
+
- test/services/forest_liana/has_many_getter_test.rb
|
517
|
+
- test/services/forest_liana/pie_stat_getter_test.rb
|
518
518
|
- test/fixtures/string_field.yml
|
519
|
-
- test/fixtures/
|
519
|
+
- test/fixtures/reference.yml
|
520
520
|
- test/fixtures/has_one_field.yml
|
521
|
-
- test/fixtures/
|
521
|
+
- test/fixtures/tree.yml
|
522
|
+
- test/fixtures/serialize_field.yml
|
522
523
|
- test/fixtures/has_many_field.yml
|
523
|
-
- test/fixtures/reference.yml
|
524
524
|
- test/fixtures/owner.yml
|
525
525
|
- test/fixtures/belongs_to_field.yml
|
526
|
-
- test/fixtures/
|
526
|
+
- test/fixtures/has_many_through_field.yml
|
527
|
+
- test/dummy/README.rdoc
|
528
|
+
- test/dummy/config.ru
|
529
|
+
- test/dummy/Rakefile
|
527
530
|
- test/dummy/db/schema.rb
|
528
531
|
- test/dummy/db/migrate/20150608131610_create_float_field.rb
|
529
|
-
- test/dummy/db/migrate/
|
532
|
+
- test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb
|
533
|
+
- test/dummy/db/migrate/20181111162121_create_references_table.rb
|
530
534
|
- test/dummy/db/migrate/20170614141921_create_serialize_field.rb
|
535
|
+
- test/dummy/db/migrate/20150608133044_create_has_one_field.rb
|
531
536
|
- test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb
|
537
|
+
- test/dummy/db/migrate/20160627172951_create_tree.rb
|
532
538
|
- test/dummy/db/migrate/20150608130516_create_date_field.rb
|
539
|
+
- test/dummy/db/migrate/20150608131430_create_integer_field.rb
|
540
|
+
- test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb
|
533
541
|
- test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb
|
534
|
-
- test/dummy/db/migrate/20150608132621_create_string_field.rb
|
535
542
|
- test/dummy/db/migrate/20150608132159_create_boolean_field.rb
|
536
|
-
- test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb
|
537
|
-
- test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb
|
538
|
-
- test/dummy/db/migrate/20181111162121_create_references_table.rb
|
539
|
-
- test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb
|
540
543
|
- test/dummy/db/migrate/20160627172810_create_owner.rb
|
541
|
-
- test/dummy/db/migrate/
|
544
|
+
- test/dummy/db/migrate/20150616150629_create_polymorphic_field.rb
|
545
|
+
- test/dummy/db/migrate/20150608132621_create_string_field.rb
|
546
|
+
- test/dummy/db/migrate/20160628173505_add_timestamps.rb
|
542
547
|
- test/dummy/db/migrate/20150608150016_create_has_many_field.rb
|
548
|
+
- test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb
|
543
549
|
- test/dummy/db/migrate/20150608131603_create_decimal_field.rb
|
544
|
-
- test/dummy/
|
545
|
-
- test/dummy/
|
546
|
-
- test/dummy/
|
547
|
-
- test/dummy/config.
|
548
|
-
- test/dummy/
|
549
|
-
- test/dummy/
|
550
|
-
- test/dummy/bin/bundle
|
551
|
-
- test/dummy/bin/rails
|
552
|
-
- test/dummy/config/routes.rb
|
550
|
+
- test/dummy/config/environment.rb
|
551
|
+
- test/dummy/config/secrets.yml
|
552
|
+
- test/dummy/config/application.rb
|
553
|
+
- test/dummy/config/environments/test.rb
|
554
|
+
- test/dummy/config/environments/development.rb
|
555
|
+
- test/dummy/config/environments/production.rb
|
553
556
|
- test/dummy/config/boot.rb
|
554
|
-
- test/dummy/config/
|
557
|
+
- test/dummy/config/locales/en.yml
|
558
|
+
- test/dummy/config/database.yml
|
559
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
555
560
|
- test/dummy/config/initializers/assets.rb
|
561
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
562
|
+
- test/dummy/config/initializers/mime_types.rb
|
556
563
|
- test/dummy/config/initializers/session_store.rb
|
557
564
|
- test/dummy/config/initializers/wrap_parameters.rb
|
558
565
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
559
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
560
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
561
566
|
- test/dummy/config/initializers/inflections.rb
|
562
|
-
- test/dummy/config/
|
563
|
-
- test/dummy/
|
564
|
-
- test/dummy/config/environment.rb
|
565
|
-
- test/dummy/config/environments/production.rb
|
566
|
-
- test/dummy/config/environments/development.rb
|
567
|
-
- test/dummy/config/environments/test.rb
|
568
|
-
- test/dummy/config/database.yml
|
569
|
-
- test/dummy/config/application.rb
|
570
|
-
- test/dummy/README.rdoc
|
571
|
-
- test/dummy/Rakefile
|
572
|
-
- test/dummy/public/favicon.ico
|
567
|
+
- test/dummy/config/routes.rb
|
568
|
+
- test/dummy/public/500.html
|
573
569
|
- test/dummy/public/404.html
|
574
570
|
- test/dummy/public/422.html
|
575
|
-
- test/dummy/public/
|
576
|
-
- test/dummy/app/controllers/application_controller.rb
|
577
|
-
- test/dummy/app/views/layouts/application.html.erb
|
578
|
-
- test/dummy/app/helpers/application_helper.rb
|
579
|
-
- test/dummy/app/assets/stylesheets/application.css
|
580
|
-
- test/dummy/app/assets/config/manifest.js
|
581
|
-
- test/dummy/app/assets/javascripts/application.js
|
571
|
+
- test/dummy/public/favicon.ico
|
582
572
|
- test/dummy/app/models/boolean_field.rb
|
583
|
-
- test/dummy/app/models/decimal_field.rb
|
584
|
-
- test/dummy/app/models/date_field.rb
|
585
|
-
- test/dummy/app/models/tree.rb
|
586
|
-
- test/dummy/app/models/has_and_belongs_to_many_field.rb
|
587
|
-
- test/dummy/app/models/owner.rb
|
588
|
-
- test/dummy/app/models/belongs_to_class_name_field.rb
|
589
|
-
- test/dummy/app/models/has_many_through_field.rb
|
590
573
|
- test/dummy/app/models/float_field.rb
|
591
|
-
- test/dummy/app/models/polymorphic_field.rb
|
592
|
-
- test/dummy/app/models/has_one_field.rb
|
593
|
-
- test/dummy/app/models/has_many_class_name_field.rb
|
594
|
-
- test/dummy/app/models/belongs_to_field.rb
|
595
574
|
- test/dummy/app/models/integer_field.rb
|
575
|
+
- test/dummy/app/models/reference.rb
|
576
|
+
- test/dummy/app/models/has_one_field.rb
|
577
|
+
- test/dummy/app/models/belongs_to_class_name_field.rb
|
578
|
+
- test/dummy/app/models/tree.rb
|
596
579
|
- test/dummy/app/models/serialize_field.rb
|
580
|
+
- test/dummy/app/models/polymorphic_field.rb
|
581
|
+
- test/dummy/app/models/date_field.rb
|
597
582
|
- test/dummy/app/models/string_field.rb
|
598
583
|
- test/dummy/app/models/has_many_field.rb
|
599
|
-
- test/dummy/app/models/
|
600
|
-
-
|
601
|
-
-
|
602
|
-
-
|
584
|
+
- test/dummy/app/models/has_and_belongs_to_many_field.rb
|
585
|
+
- test/dummy/app/models/has_many_class_name_field.rb
|
586
|
+
- test/dummy/app/models/decimal_field.rb
|
587
|
+
- test/dummy/app/models/owner.rb
|
588
|
+
- test/dummy/app/models/belongs_to_field.rb
|
589
|
+
- test/dummy/app/models/has_many_through_field.rb
|
590
|
+
- test/dummy/app/helpers/application_helper.rb
|
591
|
+
- test/dummy/app/views/layouts/application.html.erb
|
592
|
+
- test/dummy/app/assets/javascripts/application.js
|
593
|
+
- test/dummy/app/assets/stylesheets/application.css
|
594
|
+
- test/dummy/app/assets/config/manifest.js
|
595
|
+
- test/dummy/app/controllers/application_controller.rb
|
596
|
+
- test/dummy/bin/setup
|
597
|
+
- test/dummy/bin/bundle
|
598
|
+
- test/dummy/bin/rake
|
599
|
+
- test/dummy/bin/rails
|
600
|
+
- test/test_helper.rb
|
601
|
+
- spec/helpers/forest_liana/schema_helper_spec.rb
|
602
|
+
- spec/helpers/forest_liana/query_helper_spec.rb
|
603
|
+
- spec/services/forest_liana/permissions_checker_live_queries_spec.rb
|
603
604
|
- spec/services/forest_liana/ip_whitelist_checker_spec.rb
|
604
|
-
- spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb
|
605
|
-
- spec/services/forest_liana/filters_parser_spec.rb
|
606
|
-
- spec/services/forest_liana/schema_adapter_spec.rb
|
607
605
|
- spec/services/forest_liana/line_stat_getter_spec.rb
|
608
|
-
- spec/services/forest_liana/
|
609
|
-
- spec/services/forest_liana/
|
606
|
+
- spec/services/forest_liana/schema_adapter_spec.rb
|
607
|
+
- spec/services/forest_liana/resources_getter_spec.rb
|
608
|
+
- spec/services/forest_liana/smart_action_field_validator_spec.rb
|
610
609
|
- spec/services/forest_liana/apimap_sorter_spec.rb
|
610
|
+
- spec/services/forest_liana/filters_parser_spec.rb
|
611
|
+
- spec/services/forest_liana/permissions_checker_acl_enabled_spec.rb
|
612
|
+
- spec/services/forest_liana/permissions_formatter_spec.rb
|
613
|
+
- spec/services/forest_liana/permissions_getter_spec.rb
|
611
614
|
- spec/services/forest_liana/permissions_checker_acl_disabled_spec.rb
|
615
|
+
- spec/spec_helper.rb
|
612
616
|
- spec/config/initializers/logger_spec.rb
|
613
|
-
- spec/
|
614
|
-
- spec/
|
615
|
-
- spec/
|
617
|
+
- spec/lib/forest_liana/schema_file_updater_spec.rb
|
618
|
+
- spec/lib/forest_liana/bootstrapper_spec.rb
|
619
|
+
- spec/requests/stats_spec.rb
|
620
|
+
- spec/requests/actions_controller_spec.rb
|
621
|
+
- spec/requests/authentications_spec.rb
|
622
|
+
- spec/requests/resources_spec.rb
|
623
|
+
- spec/dummy/README.rdoc
|
624
|
+
- spec/dummy/config.ru
|
625
|
+
- spec/dummy/Rakefile
|
616
626
|
- spec/dummy/db/schema.rb
|
617
|
-
- spec/dummy/db/migrate/20190226172951_create_user.rb
|
618
|
-
- spec/dummy/db/migrate/20190716135241_add_type_to_user.rb
|
619
627
|
- spec/dummy/db/migrate/20190226173051_create_isle.rb
|
620
|
-
- spec/dummy/db/migrate/20210511141752_create_owners.rb
|
621
628
|
- spec/dummy/db/migrate/20190716130830_add_age_to_tree.rb
|
622
629
|
- spec/dummy/db/migrate/20210326140855_create_locations.rb
|
623
630
|
- spec/dummy/db/migrate/20190226174951_create_tree.rb
|
624
|
-
- spec/dummy/db/migrate/20210526084712_create_products.rb
|
625
631
|
- spec/dummy/db/migrate/20210326110524_create_references.rb
|
626
|
-
- spec/dummy/
|
627
|
-
- spec/dummy/
|
628
|
-
- spec/dummy/
|
629
|
-
- spec/dummy/
|
630
|
-
- spec/dummy/
|
631
|
-
- spec/dummy/config/
|
632
|
+
- spec/dummy/db/migrate/20210511141752_create_owners.rb
|
633
|
+
- spec/dummy/db/migrate/20190716135241_add_type_to_user.rb
|
634
|
+
- spec/dummy/db/migrate/20190226172951_create_user.rb
|
635
|
+
- spec/dummy/db/migrate/20210526084712_create_products.rb
|
636
|
+
- spec/dummy/config/environment.rb
|
637
|
+
- spec/dummy/config/secrets.yml
|
638
|
+
- spec/dummy/config/application.rb
|
639
|
+
- spec/dummy/config/environments/test.rb
|
640
|
+
- spec/dummy/config/environments/development.rb
|
641
|
+
- spec/dummy/config/environments/production.rb
|
632
642
|
- spec/dummy/config/boot.rb
|
633
|
-
- spec/dummy/config/
|
634
|
-
- spec/dummy/config/initializers/
|
643
|
+
- spec/dummy/config/database.yml
|
644
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
635
645
|
- spec/dummy/config/initializers/assets.rb
|
646
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
647
|
+
- spec/dummy/config/initializers/mime_types.rb
|
636
648
|
- spec/dummy/config/initializers/session_store.rb
|
637
649
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
638
650
|
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
639
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
640
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
641
651
|
- spec/dummy/config/initializers/inflections.rb
|
642
|
-
- spec/dummy/config/
|
643
|
-
- spec/dummy/config/
|
644
|
-
- spec/dummy/config/environments/production.rb
|
645
|
-
- spec/dummy/config/environments/development.rb
|
646
|
-
- spec/dummy/config/environments/test.rb
|
647
|
-
- spec/dummy/config/database.yml
|
648
|
-
- spec/dummy/config/application.rb
|
649
|
-
- spec/dummy/lib/forest_liana/collections/user.rb
|
652
|
+
- spec/dummy/config/initializers/forest_liana.rb
|
653
|
+
- spec/dummy/config/routes.rb
|
650
654
|
- spec/dummy/lib/forest_liana/collections/location.rb
|
651
|
-
- spec/dummy/
|
652
|
-
- spec/dummy/Rakefile
|
653
|
-
- spec/dummy/app/controllers/application_controller.rb
|
654
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
655
|
-
- spec/dummy/app/config/routes.rb
|
656
|
-
- spec/dummy/app/helpers/application_helper.rb
|
657
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
658
|
-
- spec/dummy/app/assets/config/manifest.js
|
659
|
-
- spec/dummy/app/assets/javascripts/application.js
|
660
|
-
- spec/dummy/app/models/tree.rb
|
661
|
-
- spec/dummy/app/models/owner.rb
|
662
|
-
- spec/dummy/app/models/user.rb
|
663
|
-
- spec/dummy/app/models/product.rb
|
655
|
+
- spec/dummy/lib/forest_liana/collections/user.rb
|
664
656
|
- spec/dummy/app/models/location.rb
|
665
657
|
- spec/dummy/app/models/island.rb
|
666
658
|
- spec/dummy/app/models/reference.rb
|
667
|
-
- spec/
|
659
|
+
- spec/dummy/app/models/tree.rb
|
660
|
+
- spec/dummy/app/models/user.rb
|
661
|
+
- spec/dummy/app/models/product.rb
|
662
|
+
- spec/dummy/app/models/owner.rb
|
663
|
+
- spec/dummy/app/helpers/application_helper.rb
|
664
|
+
- spec/dummy/app/config/routes.rb
|
665
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
666
|
+
- spec/dummy/app/assets/javascripts/application.js
|
667
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
668
|
+
- spec/dummy/app/assets/config/manifest.js
|
669
|
+
- spec/dummy/app/controllers/application_controller.rb
|
670
|
+
- spec/dummy/bin/setup
|
671
|
+
- spec/dummy/bin/bundle
|
672
|
+
- spec/dummy/bin/rake
|
673
|
+
- spec/dummy/bin/rails
|
668
674
|
- spec/rails_helper.rb
|
669
|
-
- spec/requests/stats_spec.rb
|
670
|
-
- spec/requests/resources_spec.rb
|
671
|
-
- spec/requests/actions_controller_spec.rb
|
672
|
-
- spec/requests/authentications_spec.rb
|