ruboclean 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ruboclean/version.rb +1 -1
- data/lib/ruboclean.rb +12 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83d33545be3fee0dac0b9079635c279efa82b2af8b304880314be985e39302e1
|
4
|
+
data.tar.gz: 955b57ad29b70210d72c2da05b8df40027f10323c0d4f3de09a98d4c72724faf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a906081afe314920743999bc31471cd1c6e2837281409e9babf3bb68149dd7d094eb8a0942f9efa1bd4eec7f0a354a3d5f4530a4169b1ef039c0c4f61dab460
|
7
|
+
data.tar.gz: '097a82f5d6654f12fc5104d0f463e01204dbbe3c143819c93d8567e13f6bc5d0ecb06512775732884cf3f11f63b9dc834ce77c7658689ebf3dfb2308193f9a4b'
|
data/Gemfile.lock
CHANGED
data/lib/ruboclean/version.rb
CHANGED
data/lib/ruboclean.rb
CHANGED
@@ -15,15 +15,20 @@ require "ruboclean/version"
|
|
15
15
|
|
16
16
|
# Ruboclean entry point
|
17
17
|
module Ruboclean
|
18
|
-
def self.run_from_cli!(args)
|
19
|
-
|
20
|
-
|
18
|
+
def self.run_from_cli!(args) # rubocop:disable Metrics/MethodLength
|
19
|
+
if args.include?("--version")
|
20
|
+
print Ruboclean::VERSION
|
21
|
+
else
|
22
|
+
runner = Runner.new(args)
|
23
|
+
logger = Ruboclean::Logger.new(runner.verbose? ? :verbose : :none)
|
24
|
+
|
25
|
+
logger.verbose "Using input path '#{runner.input_path}' ... "
|
26
|
+
changed = runner.run!
|
27
|
+
logger.verbose post_execution_message(changed, runner.verify?)
|
21
28
|
|
22
|
-
|
23
|
-
|
24
|
-
logger.verbose post_execution_message(changed, runner.verify?)
|
29
|
+
exit !changed if runner.verify?
|
30
|
+
end
|
25
31
|
|
26
|
-
exit !changed if runner.verify?
|
27
32
|
exit 0
|
28
33
|
end
|
29
34
|
|