gitfinger 0.0.5 → 0.0.6

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 +1 -0
  2. data/bin/gitfinger +5 -1
  3. data/lib/gitfinger.rb +1 -1
  4. metadata +3 -3
data/README.md CHANGED
@@ -12,6 +12,7 @@ A simple Ruby gem that lets you finger GitHub users.
12
12
 
13
13
  -s, --sort [FIELD] Order on FIELD
14
14
  -r, --reverse Reverse standard order
15
+ -H, --no-header Suppress header and prefix repo name with user
15
16
  -h, --help Show this message
16
17
  -v, --version Show version
17
18
 
@@ -12,6 +12,9 @@ op = OptionParser.new {|o|
12
12
  o.separator "Specific options:"
13
13
  o.on("-s", "--sort [FIELD]", "Order on FIELD") { |field| opts[:sort] = field }
14
14
  o.on("-r", "--reverse", "Reverse standard order") { opts[:reverse] = true }
15
+ o.on("-H", "--no-header", "Suppress header and prefix repo name with user") {
16
+ opts[:noheader] = true
17
+ }
15
18
  o.on("-h", "--help", "Show this message") {
16
19
  require 'gitfinger'
17
20
  puts "gitfinger #{Gitfinger::VERSION}"
@@ -52,6 +55,7 @@ res = repos.map {|r|
52
55
  }
53
56
  %w( updated pushed ).each {|x| d[x] = d[x] && DateTime.parse(d[x]) }
54
57
  d['type'] = d['type'] ? 'fork' : 'source'
58
+ d['repo'] = "#{user}/#{d['repo']}" if opts[:noheader]
55
59
  d
56
60
  }
57
61
 
@@ -83,7 +87,7 @@ desc_length = `tput cols`.to_i - (placeholders.scan(/\d+/).map(&:to_i).reduce(0)
83
87
  placeholders += "%-#{desc_length}s"
84
88
 
85
89
  # print headers
86
- puts placeholders % res[0].keys
90
+ puts(placeholders % res[0].keys) unless opts[:noheader]
87
91
 
88
92
  res.each {|r|
89
93
  %w( updated pushed ).each {|x| r[x] = r[x] && fmt_datetime(r[x]) }
@@ -1,3 +1,3 @@
1
1
  module Gitfinger
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
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.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: octokit
16
- requirement: &4278520 !ruby/object:Gem::Requirement
16
+ requirement: &23756440 !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: *4278520
24
+ version_requirements: *23756440
25
25
  description: Finger GitHub users
26
26
  email:
27
27
  - dhchoi@gmail.com