weigh 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +17 -1
- data/lib/weigh/cli.rb +14 -0
- data/lib/weigh/version.rb +7 -0
- metadata +20 -4
data/README.md
CHANGED
@@ -1,4 +1,20 @@
|
|
1
1
|
# Weigh
|
2
2
|
|
3
|
-
A small ruby utility to
|
3
|
+
A small ruby utility to weigh directory contents. Heavy stuff to the bottom.
|
4
|
+
|
5
|
+
## Example output
|
6
|
+
|
7
|
+
7 bytes ./.gitignore
|
8
|
+
90 bytes ./bin/
|
9
|
+
343 bytes ./README.md
|
10
|
+
670 bytes ./weigh.gemspec
|
11
|
+
4.90 KiB ./lib/
|
12
|
+
28.38 KiB ./.git/
|
13
|
+
--- ---
|
14
|
+
34.37 KiB :total size
|
15
|
+
--- ---
|
16
|
+
|
17
|
+
## Installation
|
18
|
+
|
19
|
+
gem install weigh
|
4
20
|
|
data/lib/weigh/cli.rb
CHANGED
@@ -21,10 +21,24 @@ module Weigh
|
|
21
21
|
runner.run
|
22
22
|
end
|
23
23
|
|
24
|
+
def self.shutdown
|
25
|
+
puts "Terminating..."
|
26
|
+
exit 0
|
27
|
+
end
|
28
|
+
|
29
|
+
Signal.trap("TERM") do
|
30
|
+
shutdown()
|
31
|
+
end
|
32
|
+
|
33
|
+
Signal.trap("INT") do
|
34
|
+
shutdown()
|
35
|
+
end
|
36
|
+
|
24
37
|
def self.run(*args)
|
25
38
|
flags = Weigh::Flags.new args
|
26
39
|
|
27
40
|
return Weigh::CLI.new(flags).run
|
28
41
|
end
|
42
|
+
|
29
43
|
end
|
30
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weigh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
13
|
-
dependencies:
|
12
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
description: Useful utility to weigh the directory contents and sort the output by
|
15
31
|
size in a neatly formatted list.
|
16
32
|
email: xaque208@gmail.com
|
@@ -24,6 +40,7 @@ files:
|
|
24
40
|
- lib/weigh/flags.rb
|
25
41
|
- lib/weigh/runner.rb
|
26
42
|
- lib/weigh/util.rb
|
43
|
+
- lib/weigh/version.rb
|
27
44
|
- README.md
|
28
45
|
homepage: https://github.com/xaque208/weigh
|
29
46
|
licenses: []
|
@@ -50,4 +67,3 @@ signing_key:
|
|
50
67
|
specification_version: 3
|
51
68
|
summary: Weigh directory contents
|
52
69
|
test_files: []
|
53
|
-
has_rdoc:
|