du_pretty 1.0.3 → 1.1.0
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/du_pretty/cli.rb +7 -7
- data/lib/du_pretty/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac3cf473edd475c31e79deaa3fd9fe3f636d87bf482384affe17ef7caf916434
|
4
|
+
data.tar.gz: 3872bc7313ad923c4fc1670fcba1b0bf2281ce254ea287f6aa1ae883ed74fafd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ffd6cf99a2ca262474f7eb0ee494470fc9cf8a50abed32b38045e71223c0c8303e1fb13dc6bb19637f83d178c4649687f23827a6b97e05c0e70e629e3d5832f
|
7
|
+
data.tar.gz: f4765cd481031ae4c02b94a78e334399f5650b76bfcaae30f8447280ae38043467a423f8913119244536352e81ed7675606504c8eb7b87d300ee9281f872bc45
|
data/Gemfile.lock
CHANGED
data/lib/du_pretty/cli.rb
CHANGED
@@ -24,10 +24,10 @@ Details:
|
|
24
24
|
Show results sorted by the file's size.
|
25
25
|
EOT
|
26
26
|
option :all, aliases: :a, type: :boolean
|
27
|
-
option :depth, type: :numeric, aliases: :d
|
27
|
+
option :depth, type: :numeric, aliases: :d, default: 1
|
28
28
|
option :size, aliases: :s
|
29
|
-
option :sort, type: :boolean
|
30
|
-
option :tree, type: :boolean
|
29
|
+
option :sort, type: :boolean, default: true
|
30
|
+
option :tree, type: :boolean
|
31
31
|
|
32
32
|
def path(path = '.')
|
33
33
|
prettier = DuPretty::Prettier.new(
|
@@ -36,12 +36,12 @@ Details:
|
|
36
36
|
depth: options[:depth],
|
37
37
|
with_files: options[:all]
|
38
38
|
)
|
39
|
-
result = if options[:
|
39
|
+
result = if options[:tree]
|
40
|
+
prettier.tree
|
41
|
+
elsif options[:sort]
|
40
42
|
prettier.sorted
|
41
|
-
elsif options[:tree] == false
|
42
|
-
prettier.original
|
43
43
|
else
|
44
|
-
prettier.
|
44
|
+
prettier.original
|
45
45
|
end
|
46
46
|
print result + "\n"
|
47
47
|
end
|
data/lib/du_pretty/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: du_pretty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katsuma Narisawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|