bullet_train-super_scaffolding 1.7.13 → 1.7.15
Sign up to get free protection for your applications and to get access to all the features.
- 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: 5ea880cbb7581cf68490a82a28f7e5ab5c1a1ce317bea5086d558b33ebb7054f
|
4
|
+
data.tar.gz: be72d3230e34d1934e4406c1d999acfd8ec2acc2ecceab09275d8ccab29d6c8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16e6d92b847291c57d7ebfe8fd95fa2930e158dc40c383fbce651536e07282dac0a12a019cea97aeb1c735ab087cde4cc7ddde5584d6c4b17a05d9c5f556eead
|
7
|
+
data.tar.gz: f584d4c1af771af4e05e8ab7d2b732004fa674c823ab35f9d766d4701466d7f6d7697049c39793c53b69e8efb71398af0da5e8b16cf6470757b1f1c9226ac0a3
|
@@ -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.15
|
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-
|
11
|
+
date: 2024-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|