gitfinger 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +28 -7
  2. data/bin/gitfinger +4 -0
  3. data/lib/gitfinger.rb +1 -1
  4. metadata +3 -3
data/README.md CHANGED
@@ -9,15 +9,36 @@ A simple Ruby gem that lets you finger GitHub users.
9
9
  gitfinger [GitHub username] [options]
10
10
 
11
11
  ## Options
12
-
13
- -s, --sort [FIELD] Order on FIELD
14
- -r, --reverse Reverse standard order
15
- -H, --no-header Suppress header and prefix repo name with user
16
- -h, --help Show this message
17
- -v, --version Show version
18
-
12
+
13
+ Specific options:
14
+ -s, --sort FIELD Sort on FIELD; you can try to abbreviate FIELD
15
+ -t, --type TYPE Filter results to TYPE (s for source, f for fork)
16
+ -r, --reverse Reverse default order
17
+ -H, --no-header Suppress header and prefix repo name with user
18
+ -h, --help Show this message
19
+ -v, --version Show version
20
+
21
+
22
+ ## Examples
23
+
24
+ Sort repos by number of issues, from most to least:
25
+
26
+ gitfinger thoughtbot -si
27
+
28
+ Show only source repos, not forks:
29
+
30
+ gitfinger maxogden -ts
31
+
32
+ Sort repos by number of watchers, from most to least:
33
+
34
+ gitfinger rails -sw
35
+
36
+ Sort repos by date of last push, starting from most recent:
37
+
38
+ gitfinger rails -sp
19
39
 
20
40
  ## Install
21
41
 
22
42
  gem install gitfinger
23
43
 
44
+
data/bin/gitfinger CHANGED
@@ -11,6 +11,7 @@ op = OptionParser.new {|o|
11
11
  o.separator ""
12
12
  o.separator "Specific options:"
13
13
  o.on("-s", "--sort FIELD", "Sort on FIELD; you can try to abbreviate FIELD") { |field| opts[:sort] = field }
14
+ o.on("-t", "--type TYPE", "Filter results to TYPE (s for source, f for fork)") { |v| opts[:type] = v }
14
15
  o.on("-r", "--reverse", "Reverse default order") { opts[:reverse] = true }
15
16
  o.on("-H", "--no-header", "Suppress header and prefix repo name with user") {
16
17
  opts[:noheader] = true
@@ -73,6 +74,9 @@ res = res.sort_by {|x|
73
74
  sort_value.downcase! if sort_field == 'repo'
74
75
  sort_value
75
76
  }
77
+ if opts[:type]
78
+ res.select! {|x| x['type'] =~ /^#{opts[:type]}/}
79
+ end
76
80
 
77
81
  # default order for date and counts is latest or greatest first
78
82
  res.reverse! if %w(updated pushed w i f).member?(sort_field)
data/lib/gitfinger.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gitfinger
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
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.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: octokit
16
- requirement: &70361639143180 !ruby/object:Gem::Requirement
16
+ requirement: &70301329301640 !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: *70361639143180
24
+ version_requirements: *70301329301640
25
25
  description: Finger GitHub users
26
26
  email:
27
27
  - dhchoi@gmail.com