gitfinger 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -1
- data/bin/gitfinger +2 -1
- data/lib/gitfinger.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -8,17 +8,22 @@ A simple Ruby gem that lets you finger GitHub users.
|
|
8
8
|
|
9
9
|
gitfinger [GitHub username] [options]
|
10
10
|
|
11
|
+
or
|
12
|
+
|
13
|
+
gitfinger [options] [GitHub username]
|
14
|
+
|
15
|
+
|
11
16
|
## Options
|
12
17
|
|
13
18
|
Specific options:
|
14
19
|
-s, --sort FIELD Sort on FIELD; you can try to abbreviate FIELD
|
15
20
|
-t, --type TYPE Filter results to TYPE (s for source, f for fork)
|
16
21
|
-r, --reverse Reverse default order
|
22
|
+
-l, --left-justify Left-justify the repo column
|
17
23
|
-H, --no-header Suppress header and prefix repo name with user
|
18
24
|
-h, --help Show this message
|
19
25
|
-v, --version Show version
|
20
26
|
|
21
|
-
|
22
27
|
## Examples
|
23
28
|
|
24
29
|
Sort repos by number of issues, from most to least:
|
data/bin/gitfinger
CHANGED
@@ -13,6 +13,7 @@ op = OptionParser.new {|o|
|
|
13
13
|
o.on("-s", "--sort FIELD", "Sort on FIELD; you can try to abbreviate FIELD") { |field| opts[:sort] = field }
|
14
14
|
o.on("-t", "--type TYPE", "Filter results to TYPE (s for source, f for fork)") { |v| opts[:type] = v }
|
15
15
|
o.on("-r", "--reverse", "Reverse default order") { opts[:reverse] = true }
|
16
|
+
o.on("-l", "--left-justify", "Left-justify the repo column") { opts[:leftj] = true }
|
16
17
|
o.on("-H", "--no-header", "Suppress header and prefix repo name with user") {
|
17
18
|
opts[:noheader] = true
|
18
19
|
}
|
@@ -90,7 +91,7 @@ abort "No repositories found for #{user}" unless !res.empty?
|
|
90
91
|
|
91
92
|
longest_name_len = res.reduce(0) {|max, row| [max, row['repo'].length].max }
|
92
93
|
|
93
|
-
placeholders = "%#{longest_name_len}s%6s%5s%4s%13s%13s%9s "
|
94
|
+
placeholders = "%#{opts[:leftj] ? '-' : nil}#{longest_name_len}s%6s%5s%4s%13s%13s%9s "
|
94
95
|
desc_length = `tput cols`.to_i - (placeholders.scan(/\d+/).map(&:to_i).reduce(0){|sum,x| sum+x} + 3)
|
95
96
|
placeholders += "%-#{desc_length}s"
|
96
97
|
|
data/lib/gitfinger.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitfinger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-29 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: octokit
|
16
|
-
requirement: &
|
16
|
+
requirement: &70346078435660 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0.6'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70346078435660
|
25
25
|
description: Finger GitHub users
|
26
26
|
email:
|
27
27
|
- dhchoi@gmail.com
|