bullet_train-super_scaffolding 1.0.41 → 1.0.42
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: 20c44af78ae7911fc2ef90a78db8d76d7f52f8535b6931a3c1719a84ee8b1104
|
4
|
+
data.tar.gz: 12cabbb8f6530d809d17d9fe9ff3c742e5ac705e296b982df33c55763afb7518
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89ffc20c1fae91cde0bd62b490d1d86aba8ed8ec3dd2f30445c260bab4e326bc9c026a0331d199e6a7942610a5ef5d926ffca38ce0e39bc68129155ec003c8e7
|
7
|
+
data.tar.gz: 1f0ff6f2b787dc6c5aa8d60fbfdacaf70a1f892494ae9e103fd8879ea25113374364cbbd69c172e26e9102e947dd10963f1eb1fef5ec7e8007a0f83e9991dbf8
|
@@ -26,7 +26,7 @@ module Scaffolding::FileManipulator
|
|
26
26
|
if target_file_content.include?(content)
|
27
27
|
puts "No need to update '#{file}'. It already has '#{content}'."
|
28
28
|
else
|
29
|
-
puts "Updating '#{file}'."
|
29
|
+
puts "Updating '#{file}'." unless silence_logs?
|
30
30
|
target_file_content.gsub!(in_place_of, content)
|
31
31
|
File.write(file, target_file_content)
|
32
32
|
end
|
@@ -66,7 +66,7 @@ module Scaffolding::FileManipulator
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def self.write(file_name, lines, strip: true)
|
69
|
-
puts "Updating '#{file_name}'."
|
69
|
+
puts "Updating '#{file_name}'." unless ENV["SILENCE_LOGS"].present?
|
70
70
|
if strip
|
71
71
|
File.open(file_name, "w+") do |file|
|
72
72
|
file.puts(lines.join.strip + "\n")
|
@@ -11,7 +11,7 @@ def legacy_resolve_template_path(file)
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def legacy_replace_in_file(file, before, after)
|
14
|
-
puts "Replacing in '#{file}'."
|
14
|
+
puts "Replacing in '#{file}'." unless silence_logs?
|
15
15
|
target_file_content = File.read(file)
|
16
16
|
target_file_content.gsub!(before, after)
|
17
17
|
File.write(file, target_file_content)
|
@@ -58,7 +58,7 @@ def legacy_add_line_to_file(file, content, hook, child, parent, options = {})
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
puts "Updating '#{transformed_file_name}'."
|
61
|
+
puts "Updating '#{transformed_file_name}'." unless silence_logs?
|
62
62
|
|
63
63
|
File.write(transformed_file_name, new_target_file_content.join("\n") + "\n")
|
64
64
|
end
|
@@ -137,7 +137,7 @@ def oauth_scaffold_file(file, options)
|
|
137
137
|
FileUtils.mkdir_p(transformed_directory_name)
|
138
138
|
end
|
139
139
|
|
140
|
-
puts "Writing '#{transformed_file_name}'."
|
140
|
+
puts "Writing '#{transformed_file_name}'." unless silence_logs?
|
141
141
|
|
142
142
|
File.write(transformed_file_name, transformed_file_content)
|
143
143
|
end
|
@@ -240,12 +240,12 @@ class Scaffolding::Transformer
|
|
240
240
|
FileUtils.mkdir_p(transformed_directory_name)
|
241
241
|
end
|
242
242
|
|
243
|
-
puts "Writing '#{transformed_file_name}'."
|
243
|
+
puts "Writing '#{transformed_file_name}'." unless silence_logs?
|
244
244
|
|
245
245
|
File.write(transformed_file_name, transformed_file_content.strip + "\n")
|
246
246
|
|
247
247
|
if transformed_file_name.split(".").last == "rb"
|
248
|
-
puts "Fixing Standard Ruby on '#{transformed_file_name}'."
|
248
|
+
puts "Fixing Standard Ruby on '#{transformed_file_name}'." unless silence_logs?
|
249
249
|
# `standardrb --fix #{transformed_file_name} 2> /dev/null`
|
250
250
|
end
|
251
251
|
end
|
@@ -285,7 +285,7 @@ class Scaffolding::Transformer
|
|
285
285
|
end
|
286
286
|
|
287
287
|
if target_file_content.include?(transformed_content)
|
288
|
-
puts "No need to update '#{transformed_file_name}'. It already has '#{transformed_content}'."
|
288
|
+
puts "No need to update '#{transformed_file_name}'. It already has '#{transformed_content}'." unless silence_logs?
|
289
289
|
|
290
290
|
else
|
291
291
|
|
@@ -335,7 +335,7 @@ class Scaffolding::Transformer
|
|
335
335
|
end
|
336
336
|
end
|
337
337
|
|
338
|
-
puts "Updating '#{transformed_file_name}'."
|
338
|
+
puts "Updating '#{transformed_file_name}'." unless silence_logs?
|
339
339
|
|
340
340
|
File.write(transformed_file_name, new_target_file_content.join("\n").strip + "\n")
|
341
341
|
|
@@ -477,7 +477,7 @@ class Scaffolding::Transformer
|
|
477
477
|
end
|
478
478
|
|
479
479
|
def replace_in_file(file, before, after, target_regexp = nil)
|
480
|
-
puts "Replacing in '#{file}'."
|
480
|
+
puts "Replacing in '#{file}'." unless silence_logs?
|
481
481
|
if target_regexp.present?
|
482
482
|
target_file_content = ""
|
483
483
|
File.open(file).each_line do |l|
|