npduy 0.2.4 → 0.2.5
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/npduy.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f0c75e1149047d97ece1fceb470636eab6adafe
|
|
4
|
+
data.tar.gz: 36a843cc2a491e56b781c99a8dfbbf39c814f81c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0685488a2ec563f1abe0ea82841a47d5667ab47730c8859caa5bc63058c3579be07cf1cb3834ef887877b475fc62a20780ba4844904e1eb0e0f8fc267b1fd873'
|
|
7
|
+
data.tar.gz: f351dfe655e20f4d6850398331d4452051fd40628ba460a8415db4f541e00266b0c162202befa907067ba9ecc8d01f9ae27ee88e40af664565793bbf901a6c2b
|
data/lib/npduy.rb
CHANGED
|
@@ -23,17 +23,17 @@ class Npduy
|
|
|
23
23
|
current_project = current_project.gsub(/\n/,"")
|
|
24
24
|
files.each do |file_name|
|
|
25
25
|
content = File.read(current_project + "/" +file_name)
|
|
26
|
-
content = content.gsub(
|
|
26
|
+
content = content.gsub(/binding.pry/,"")
|
|
27
27
|
content = content.gsub(/'/, '"')
|
|
28
28
|
content = content.gsub(/\s*^group/, "\n\ngroup")
|
|
29
29
|
content = content.gsub(/\s*^\s+^gem/, "\n\ngem")
|
|
30
30
|
File.open(current_project + "/" +file_name, "w") do |file|
|
|
31
31
|
file.puts content
|
|
32
32
|
end
|
|
33
|
-
system "echo", "-e", "\e[92mYour controllers " + file_name +" was successfully beautified!"
|
|
34
33
|
end
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
system "echo", "-e", "\e[92mYour file .rb was successfully beautified!"
|
|
35
|
+
rescue Exception => e
|
|
36
|
+
system "echo", "-e", "\e[91m#{e.message}"
|
|
37
|
+
system "echo", "-e", "\e[91mMake sure you're in the right place!"
|
|
38
38
|
end
|
|
39
39
|
end
|