bullet_train-super_scaffolding 1.0.41 → 1.0.42

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5b3c39c20e852d11ae216cb1bb8e8686e935345954b5bb89fa4662e931aa9f0
4
- data.tar.gz: c5c7884aacf4fad0073b2802913b2521c985d4059648e5036cef76dec826ba86
3
+ metadata.gz: 20c44af78ae7911fc2ef90a78db8d76d7f52f8535b6931a3c1719a84ee8b1104
4
+ data.tar.gz: 12cabbb8f6530d809d17d9fe9ff3c742e5ac705e296b982df33c55763afb7518
5
5
  SHA512:
6
- metadata.gz: 5c67a6fc6aa0325cded01535276152126a8339ce2ea321b6e3e31eecb0a969dccbe6b69077b239941239720ce7cc616dd28272c17d6aa6dd1048984d5464aeba
7
- data.tar.gz: 5591f573ad8cea3aed70e079bf6293f8764de12dbbf333f17e4c0f67ec295812ab986fe6fd04e1e9a64066125be944508bea381c2a2d145e1a9a52be6017efc8
6
+ metadata.gz: 89ffc20c1fae91cde0bd62b490d1d86aba8ed8ec3dd2f30445c260bab4e326bc9c026a0331d199e6a7942610a5ef5d926ffca38ce0e39bc68129155ec003c8e7
7
+ data.tar.gz: 1f0ff6f2b787dc6c5aa8d60fbfdacaf70a1f892494ae9e103fd8879ea25113374364cbbd69c172e26e9102e947dd10963f1eb1fef5ec7e8007a0f83e9991dbf8
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.0.41"
3
+ VERSION = "1.0.42"
4
4
  end
5
5
  end
@@ -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|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-super_scaffolding
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.41
4
+ version: 1.0.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver