bullet_train-super_scaffolding 1.2.18 → 1.2.20
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: b554f5ade5ad754c9ebb7c3116a4711e6cd71d84bab640778b6472a074ec6796
|
4
|
+
data.tar.gz: c6125f4769afdacd90d2f7d5335f8d6bd3d10c4c7bd4ad6c0426bcf3b86ecb33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9897a5217e14b12b3a7bf01b9696f315550b19b9b55c5bcdfabd7411cad631da11a25afbeacd1eb3301848d8e768a424c902b34caeaf56570c40851c42a8643
|
7
|
+
data.tar.gz: 8ebb17644c3290782cd77fb3feb2f336bd0fcdca4d63b498e6d2389bb59b9562e7c2c0a604e706cbd64189016dd0891aea2eda884e4fb3334039aa65dc700a2c
|
@@ -23,7 +23,7 @@ module Scaffolding::FileManipulator
|
|
23
23
|
return false
|
24
24
|
end
|
25
25
|
|
26
|
-
if target_file_content.include?(content)
|
26
|
+
if options[:content_replacement_transformed] && target_file_content.include?(content)
|
27
27
|
puts "No need to update '#{file}'. It already has '#{content}'."
|
28
28
|
else
|
29
29
|
puts "Updating '#{file}'." unless silence_logs?
|
@@ -192,7 +192,7 @@ class Scaffolding::Transformer
|
|
192
192
|
# If the file exists in the application repository, we want to target it there.
|
193
193
|
return file if File.exist?(file)
|
194
194
|
|
195
|
-
ENV["OTHER_TARGETS"]
|
195
|
+
ENV["OTHER_TARGETS"]&.split(",")&.each do |possible_target|
|
196
196
|
candidate_path = "#{possible_target}/#{file}".gsub("//", "/")
|
197
197
|
return candidate_path if File.exist?(candidate_path)
|
198
198
|
end
|
@@ -421,11 +421,13 @@ class Scaffolding::Transformer
|
|
421
421
|
add_line_to_file(file, content, hook, options)
|
422
422
|
end
|
423
423
|
|
424
|
-
def scaffold_replace_line_in_file(file, content,
|
424
|
+
def scaffold_replace_line_in_file(file, content, content_to_replace)
|
425
425
|
file = resolve_target_path(transform_string(file))
|
426
426
|
# we specifically don't transform the content, we assume a builder function created this content.
|
427
|
-
|
428
|
-
|
427
|
+
transformed_content_to_replace = transform_string(content_to_replace)
|
428
|
+
content_replacement_transformed = content_to_replace != transformed_content_to_replace
|
429
|
+
options = {suppress_could_not_find: suppress_could_not_find, content_replacement_transformed: content_replacement_transformed}
|
430
|
+
Scaffolding::FileManipulator.replace_line_in_file(file, content, transformed_content_to_replace, **options)
|
429
431
|
end
|
430
432
|
|
431
433
|
# if class_name isn't specified, we use `child`.
|
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.2.
|
4
|
+
version: 1.2.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|