npduy 0.0.1
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 +7 -0
- data/bin/npduy +3 -0
- data/lib/npduy.rb +19 -0
- metadata +46 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 4cc543b489768bfb0e2ff8934e92d47241d0f11f
|
|
4
|
+
data.tar.gz: e7e128149c3cc8c2bcd28e627f889f8da49fc972
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b644622e6d07994cf9261dfc4c24161c06d25da9d0259e0cd3ac7b0e5b4c3350183cb995adb5c2228c745a426f900f7c180c0150f97cff9ad99ad3767649e22a
|
|
7
|
+
data.tar.gz: 3b40ca897dab1468d9d1ae2f73b79e7d6d60e555403fc7f49f3c89f877c30e4378e95aaf91824830ed4db2a0efa0161d1e17f6a7142116035e5e1076939b76b2
|
data/bin/npduy
ADDED
data/lib/npduy.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class Npduy
|
|
2
|
+
def self.process
|
|
3
|
+
current_project = `pwd`
|
|
4
|
+
current_project = current_project.gsub(/\n/,"")
|
|
5
|
+
content = File.read(current_project + "/Gemfile")
|
|
6
|
+
content = content.gsub(/\#\s.*\s*/,"")
|
|
7
|
+
content = content.gsub(/'/, '"')
|
|
8
|
+
content = content.gsub(/\s*^group/, "\n\ngroup")
|
|
9
|
+
content = content.gsub(/\s*^\s+^gem/, "\n\ngem")
|
|
10
|
+
File.open(current_project + "/Gemfile", "w") do |file|
|
|
11
|
+
file.puts content
|
|
12
|
+
end
|
|
13
|
+
system "echo", "-e", "\e[92mYour Gemfile was successfully beautified!"
|
|
14
|
+
rescue Exception => e
|
|
15
|
+
system "echo", "-e", "\e[91m#{e.message}"
|
|
16
|
+
system "echo", "-e", "\e[91mMake sure you're in the right place!"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: npduy
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Nguyen Phuoc Duy
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2017-06-13 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: This gem help gemfile clear code
|
|
14
|
+
email: nguyenphuocduy13cntt@gmail.com
|
|
15
|
+
executables:
|
|
16
|
+
- npduy
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- bin/npduy
|
|
21
|
+
- lib/npduy.rb
|
|
22
|
+
homepage: https://rubygems.org/gems/npduy
|
|
23
|
+
licenses:
|
|
24
|
+
- MIT
|
|
25
|
+
metadata: {}
|
|
26
|
+
post_install_message:
|
|
27
|
+
rdoc_options: []
|
|
28
|
+
require_paths:
|
|
29
|
+
- lib
|
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
- - ">="
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: '0'
|
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
40
|
+
requirements: []
|
|
41
|
+
rubyforge_project:
|
|
42
|
+
rubygems_version: 2.6.8
|
|
43
|
+
signing_key:
|
|
44
|
+
specification_version: 4
|
|
45
|
+
summary: Gemfile Beautify
|
|
46
|
+
test_files: []
|