bullet_train-super_scaffolding 1.7.12 → 1.7.14
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/lib/bullet_train/super_scaffolding/version.rb +1 -1
- data/lib/scaffolding/transformer.rb +3 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fbbab7fb4a27ac59d2c45ab045b4bfde7830a043c3f497e3268d01cf1e5e2bf
|
4
|
+
data.tar.gz: ced42f2301e4c6d844d528dfda01b0f94093c3e024a131578ca08fbbcdbfaa6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01c6d819d93a1c53a050a45665efce5af013480d14385ca9266cc3a80e4a78c9cd43b5fa6de25569d52cf4e06d8ff8112973787fc04f916b19d262b40d03cacc
|
7
|
+
data.tar.gz: 3c7a0ec3a19dc5cd7803e5f806e9a4fbec09a7dded29d37289057ee154034e87fa736e423cab219c74d71d56d83c6d714aaac09a999fa72ffd5d7ac9afbea144
|
@@ -1396,16 +1396,11 @@ class Scaffolding::Transformer
|
|
1396
1396
|
test_name = transform_string("./test/controllers/api/v1/scaffolding/completely_concrete/tangible_things_controller_test.rb")
|
1397
1397
|
test_lines = File.open(test_name).readlines
|
1398
1398
|
|
1399
|
-
# Shift contents of controller test after skipping `unless scaffolding_things_disabled?` block.
|
1400
|
-
class_block_index = Scaffolding::FileManipulator.find(test_lines, "class #{transform_string("Api::V1::Scaffolding::CompletelyConcrete::TangibleThingsControllerTest")}")
|
1401
|
-
new_lines = Scaffolding::BlockManipulator.shift_block(lines: test_lines, block_start: test_lines[class_block_index], shift_contents_only: true)
|
1402
|
-
Scaffolding::FileManipulator.write(test_name, new_lines)
|
1403
|
-
|
1404
1399
|
# Ensure variables built with factories are indented properly.
|
1405
|
-
factory_hook_index = Scaffolding::FileManipulator.find(
|
1406
|
-
factory_hook_indentation = Scaffolding::BlockManipulator.indentation_of(factory_hook_index,
|
1400
|
+
factory_hook_index = Scaffolding::FileManipulator.find(test_lines, RUBY_FACTORY_SETUP_HOOK)
|
1401
|
+
factory_hook_indentation = Scaffolding::BlockManipulator.indentation_of(factory_hook_index, test_lines)
|
1407
1402
|
indented_factory_lines = build_factory_setup.map { |line| "#{factory_hook_indentation}#{line}\n" }
|
1408
|
-
scaffold_replace_line_in_file(test_name, indented_factory_lines.join,
|
1403
|
+
scaffold_replace_line_in_file(test_name, indented_factory_lines.join, test_lines[factory_hook_index])
|
1409
1404
|
end
|
1410
1405
|
|
1411
1406
|
# add children to the show page of their parent.
|
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.7.
|
4
|
+
version: 1.7.14
|
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-06-
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|