git-whistles 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git-whistles (0.8.1)
4
+ git-whistles (0.8.2)
5
5
  pivotal-tracker (~> 0.5.6)
6
6
  term-ansicolor
7
7
 
@@ -20,11 +20,12 @@ class App < Git::Whistles::App
20
20
  super
21
21
  parse_args!(args)
22
22
 
23
- results = `git for-each-ref --sort=-committerdate --count=#{options.results} refs/remotes/origin/#{options.pattern} --format='[%(committerdate:relative)] (%(authorname)) %(refname)'`
23
+ results = `git for-each-ref --sort=-committerdate --format='[%(committerdate:relative)] (%(authorname)) %(refname)' refs/remotes/origin/ | grep '#{options.pattern}'`
24
24
  results = results.split("\n")
25
25
 
26
26
  if results.any?
27
- puts "Latest #{ [results.length, options.results].min } pushed branches:"
27
+ results = results.slice(0, [results.length, options.nr_results].min)
28
+ puts "Latest #{ results.length } pushed branches:"
28
29
 
29
30
  results.each do |branch|
30
31
  puts branch.gsub('refs/remotes/origin/', '')
@@ -36,7 +37,7 @@ class App < Git::Whistles::App
36
37
 
37
38
  def defaults
38
39
  {
39
- :results => 20,
40
+ :nr_results => 20,
40
41
  :pattern => ''
41
42
  }
42
43
  end
@@ -49,7 +50,7 @@ Usage: git latest-pushes [-n NR_RESULTS] [-p PATTERN]
49
50
  }
50
51
 
51
52
  op.on("-n", "--n [NR_RESULTS]", "Number of results to display, defaults to 20") do |n|
52
- options.nr_results = n
53
+ options.nr_results = n.to_i
53
54
  end
54
55
 
55
56
  op.on("-p", "--p [PATTERN]", "Pattern to lookup. Eg. -p my-team-name") do |pattern|
@@ -25,7 +25,7 @@ class App < Git::Whistles::App
25
25
 
26
26
  output = []
27
27
  merges.lines.each do |merge|
28
- merge.match /(#\d+).*from(.*)/
28
+ merge.match /(#\d+).*from (.*)/
29
29
  output << $1.strip + ' ' + $2.strip
30
30
  end
31
31
 
@@ -4,7 +4,7 @@ require 'pathname'
4
4
 
5
5
  module Git
6
6
  module Whistles
7
- VERSION = "0.8.1"
7
+ VERSION = "0.8.2"
8
8
  GEMDIR = Pathname.new(__FILE__).parent.parent.parent
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-whistles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-11-20 00:00:00.000000000 Z
13
+ date: 2013-12-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  segments:
170
170
  - 0
171
- hash: -255167621400502632
171
+ hash: -780717699858244118
172
172
  required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  none: false
174
174
  requirements: