barkeep-client 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/barkeep_client.gemspec +1 -1
- data/bin/barkeep +1 -1
- data/lib/barkeep/commit.rb +1 -1
- data/lib/barkeep/unapproved.rb +11 -11
- metadata +33 -63
data/barkeep_client.gemspec
CHANGED
data/bin/barkeep
CHANGED
@@ -26,7 +26,7 @@ unless COMMANDS.include? sub_command
|
|
26
26
|
COMMANDS.each { |command, purpose| puts " #{command.rjust(COMMANDS.keys.map(&:size).max)} | #{purpose}" }
|
27
27
|
puts <<-EOS.dedent
|
28
28
|
|
29
|
-
Type 'barkeep <command> --help' for more information about a particular command.
|
29
|
+
Type 'barkeep <command> --help' for more information about a particular command.
|
30
30
|
EOS
|
31
31
|
exit 1
|
32
32
|
end
|
data/lib/barkeep/commit.rb
CHANGED
@@ -10,7 +10,7 @@ module BarkeepClient
|
|
10
10
|
def self.commit(configuration)
|
11
11
|
options = Trollop::options do
|
12
12
|
banner <<-EOS.dedent
|
13
|
-
Barkeep's 'commit' command shows information about a particular commit.
|
13
|
+
Barkeep's 'commit' command shows information about a particular commit given its SHA.
|
14
14
|
|
15
15
|
Usage:
|
16
16
|
$ barkeep commit [options] <commit>
|
data/lib/barkeep/unapproved.rb
CHANGED
@@ -15,38 +15,38 @@ module BarkeepClient
|
|
15
15
|
|
16
16
|
Usage:
|
17
17
|
$ barkeep unapproved [options] <commit-range>
|
18
|
-
where <commit-range> is a
|
18
|
+
where <commit-range> is a commit range specified using git's range syntax (see `man gitrevisions`).
|
19
19
|
For example:
|
20
20
|
|
21
21
|
$ barkeep unapproved abc123
|
22
|
+
$ barkeep unapproved ^abc123 def456
|
22
23
|
$ barkeep unapproved abc123..def456
|
23
24
|
|
24
25
|
[options] can include:
|
25
26
|
EOS
|
26
27
|
opt :stop_on_unapproved, "Stop and print a message on the first unapproved commit."
|
27
28
|
end
|
28
|
-
Trollop::die "must provide a commit range"
|
29
|
+
Trollop::die "must provide a commit range" if ARGV.empty?
|
29
30
|
|
30
31
|
repo = File.basename(`git rev-parse --show-toplevel`).strip
|
31
32
|
if repo.empty?
|
32
33
|
Trollop::die "need to be in a git repo"
|
33
34
|
end
|
34
35
|
|
35
|
-
commit_range = ARGV
|
36
|
-
|
37
|
-
when /^#{SHA_REGEX}$/
|
38
|
-
commits_string = `git rev-parse #{commit_range}`
|
39
|
-
when /^#{SHA_REGEX}\.\.(#{SHA_REGEX})?$/, /^\.\.#{SHA_REGEX}$/
|
40
|
-
commits_string = `git log --format='%H' #{commit_range}`
|
41
|
-
else
|
42
|
-
Trollop::die "#{commit_range} is an invalid commit range specification"
|
43
|
-
end
|
36
|
+
commit_range = ARGV.join(" ")
|
37
|
+
commits_string = `git log --format='%H' #{commit_range}`
|
44
38
|
exit(1) unless $?.to_i.zero?
|
45
39
|
commits = commits_string.split("\n").map(&:strip)
|
46
40
|
|
47
41
|
if commits.empty?
|
48
42
|
puts "No commits in range."
|
49
43
|
exit 0
|
44
|
+
elsif commits.size > 100
|
45
|
+
puts "Warning: #{commits.size} commits in range. Lookup could be very slow. Proceed? [yN]"
|
46
|
+
unless STDIN.gets.downcase.strip =~ /^y(es)?/
|
47
|
+
puts "Aborting."
|
48
|
+
exit 0
|
49
|
+
end
|
50
50
|
end
|
51
51
|
|
52
52
|
unapproved_commits = {}
|
metadata
CHANGED
@@ -1,65 +1,46 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: barkeep-client
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
version: 0.0.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Caleb Spare
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-12-08 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: trollop
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70206455274940 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
18
|
+
requirements:
|
27
19
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 83
|
30
|
-
segments:
|
31
|
-
- 1
|
32
|
-
- 16
|
33
|
-
- 2
|
20
|
+
- !ruby/object:Gem::Version
|
34
21
|
version: 1.16.2
|
35
22
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: dedent
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: *70206455274940
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: dedent
|
27
|
+
requirement: &70206455274460 !ruby/object:Gem::Requirement
|
41
28
|
none: false
|
42
|
-
requirements:
|
29
|
+
requirements:
|
43
30
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 27
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
- 0
|
49
|
-
- 2
|
31
|
+
- !ruby/object:Gem::Version
|
50
32
|
version: 0.0.2
|
51
33
|
type: :runtime
|
52
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70206455274460
|
53
36
|
description: A command-line client for Barkeep's REST API.
|
54
|
-
email:
|
37
|
+
email:
|
55
38
|
- caleb@ooyala.com
|
56
|
-
executables:
|
39
|
+
executables:
|
57
40
|
- barkeep
|
58
41
|
extensions: []
|
59
|
-
|
60
42
|
extra_rdoc_files: []
|
61
|
-
|
62
|
-
files:
|
43
|
+
files:
|
63
44
|
- .gitignore
|
64
45
|
- .rbenv-version
|
65
46
|
- Gemfile
|
@@ -71,39 +52,28 @@ files:
|
|
71
52
|
- lib/barkeep/commit.rb
|
72
53
|
- lib/barkeep/constants.rb
|
73
54
|
- lib/barkeep/unapproved.rb
|
74
|
-
has_rdoc: true
|
75
55
|
homepage: https://github.com/ooyala/barkeep
|
76
56
|
licenses: []
|
77
|
-
|
78
57
|
post_install_message:
|
79
58
|
rdoc_options: []
|
80
|
-
|
81
|
-
require_paths:
|
59
|
+
require_paths:
|
82
60
|
- lib
|
83
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
84
62
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
|
90
|
-
- 0
|
91
|
-
version: "0"
|
92
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
68
|
none: false
|
94
|
-
requirements:
|
95
|
-
- -
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
|
98
|
-
segments:
|
99
|
-
- 0
|
100
|
-
version: "0"
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
101
73
|
requirements: []
|
102
|
-
|
103
74
|
rubyforge_project: barkeep-client
|
104
|
-
rubygems_version: 1.
|
75
|
+
rubygems_version: 1.8.10
|
105
76
|
signing_key:
|
106
77
|
specification_version: 3
|
107
78
|
summary: Barkeep command-line client
|
108
79
|
test_files: []
|
109
|
-
|