bootsetting 0.1.6 → 0.1.7
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/Gemfile.lock +1 -1
- data/lib/bootsetting/version.rb +1 -1
- data/lib/bootsetting.rb +2 -1
- data/lib/duplicate_file_check.rb +2 -0
- 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: 90a770892347e6c5793335804e9355122b7bc2316c495dd6ef1b4eb2dc94ec8e
|
4
|
+
data.tar.gz: 3ccca2e9caf7b8f9bb29a0ce980675f990bcb884432f848f3d52d4f815bf8567
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c01b3c08c8e173120d4af1151bf2148bcce9d5a6f11dea11906967710c8a237f9f259cb43b1efbb8b148ecac44c96ef68ef71e2f3389b826e8fd8b58c9221156
|
7
|
+
data.tar.gz: 9c188e20aa523d182294b91f7e39925e99573ace9d34d53346fa92adff0c3091f37d655af3951decff5c52313192a28c967d2b2baa47d7115208e73d0e75978a
|
data/Gemfile.lock
CHANGED
data/lib/bootsetting/version.rb
CHANGED
data/lib/bootsetting.rb
CHANGED
@@ -15,9 +15,10 @@ class CLI < Thor
|
|
15
15
|
puts "Hello method #{name}".bright.red
|
16
16
|
end
|
17
17
|
# duplicate file check
|
18
|
-
desc "
|
18
|
+
desc "dfc", "duplicate file check by type && suffix"
|
19
19
|
def dfc(type, suffix)
|
20
20
|
puts "start to check ...".bright.red
|
21
|
+
puts "parames type: #{type} suffix: #{suffix}".blue
|
21
22
|
helper = FileCheckHelper.new()
|
22
23
|
helper.check(type, suffix)
|
23
24
|
end
|
data/lib/duplicate_file_check.rb
CHANGED
@@ -21,8 +21,10 @@ class FileCheckHelper
|
|
21
21
|
files.each { |filePath|
|
22
22
|
key = ""
|
23
23
|
if type == "md5"
|
24
|
+
puts "check type: #{type} suffix: #{suffix}".blue
|
24
25
|
key = md5 = Digest::MD5.hexdigest(File.read(filePath))
|
25
26
|
elsif type == "name"
|
27
|
+
puts "check type: #{type} suffix: #{suffix}".green
|
26
28
|
key = File.basename(filePath)
|
27
29
|
end
|
28
30
|
fileArr = [] + fileMaps[key]
|