bullet_train-super_scaffolding 1.6.35 → 1.6.36
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78fc168b87086abdff9a77f6fca18414f48ecfa480b96675e5d57d5b15461834
|
4
|
+
data.tar.gz: 3a219e7452a7d1cee87498fff9626636758efbd9c6276b38fc8071689271299c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86f8893e04227ba822300e981e1a606ccb8242d22c6e3c628fa226b044f50c060dc1a4401b9ae1150bfc9be67718d349d3a8ab23e6c0b12a4d682a8babcd9c00
|
7
|
+
data.tar.gz: 89ea52f90b89ffde18b3458ccbb20df62848be892c823feb8fe69508b09a46dd451b376e9ec6e298f98dfe6bcfa0d78ff365e292000e470ae1750cd74b684097
|
@@ -316,6 +316,9 @@ class Scaffolding::RoutesFileManipulator
|
|
316
316
|
|
317
317
|
within = find_or_create_namespaces(base_namespaces)
|
318
318
|
|
319
|
+
# Add any concerns passed as options.
|
320
|
+
add_concern(:sortable) if transformer_options["sortable"]
|
321
|
+
|
319
322
|
# e.g. Project and Projects::Deliverable
|
320
323
|
if parent_namespaces.empty? && child_namespaces.any? && parent_resource == child_namespaces.first
|
321
324
|
|
@@ -352,9 +355,13 @@ class Scaffolding::RoutesFileManipulator
|
|
352
355
|
child_namespaces_without_parent = child_namespaces.dup
|
353
356
|
child_namespaces_without_parent.shift
|
354
357
|
deeply_nested_within = find_or_create_namespaces(child_namespaces_without_parent, scope_within)
|
355
|
-
|
358
|
+
routing_options = "shallow: false"
|
359
|
+
routing_options += ", #{formatted_concerns}" if formatted_concerns
|
360
|
+
find_or_create_resource([child_resource], options: routing_options, within: deeply_nested_within)
|
356
361
|
else
|
357
|
-
|
362
|
+
routing_options = "only: collection_actions"
|
363
|
+
routing_options += ", #{formatted_concerns}" if formatted_concerns
|
364
|
+
find_or_create_resource([child_resource], options: routing_options, within: scope_within)
|
358
365
|
|
359
366
|
# namespace :projects do
|
360
367
|
# resources :deliverables, except: collection_actions
|
@@ -364,7 +371,9 @@ class Scaffolding::RoutesFileManipulator
|
|
364
371
|
# because namespaces with the same name as the resource can exist on the same level.
|
365
372
|
parent_block_start = Scaffolding::BlockManipulator.find_block_parent(parent_within, lines)
|
366
373
|
namespace_line_within = find_or_create_namespaces(child_namespaces, parent_block_start)
|
367
|
-
|
374
|
+
routing_options = "except: collection_actions"
|
375
|
+
routing_options += ", #{formatted_concerns}" if formatted_concerns
|
376
|
+
find_or_create_resource([child_resource], options: routing_options, within: namespace_line_within)
|
368
377
|
unless find_namespaces(child_namespaces, within)[child_namespaces.last]
|
369
378
|
raise "tried to insert `namespace :#{child_namespaces.last}` but it seems we failed"
|
370
379
|
end
|
@@ -377,7 +386,7 @@ class Scaffolding::RoutesFileManipulator
|
|
377
386
|
# resources :deliverables
|
378
387
|
# end
|
379
388
|
top_parent_namespace = find_namespaces(parent_namespaces, within)[parent_namespaces.first]
|
380
|
-
find_or_create_resource(child_namespaces + [child_resource], within: top_parent_namespace)
|
389
|
+
find_or_create_resource(child_namespaces + [child_resource], options: formatted_concerns, within: top_parent_namespace)
|
381
390
|
|
382
391
|
# resources :projects_deliverables, path: 'projects/deliverables' do
|
383
392
|
# resources :objectives
|
@@ -394,7 +403,6 @@ class Scaffolding::RoutesFileManipulator
|
|
394
403
|
within = find_or_convert_resource_block(parent_resource, options: "except: collection_actions", within: within)
|
395
404
|
end
|
396
405
|
|
397
|
-
add_concern(:sortable) if transformer_options["sortable"]
|
398
406
|
find_or_create_resource(child_namespaces + [child_resource], options: formatted_concerns, within: within)
|
399
407
|
|
400
408
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-super_scaffolding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|