barkeep-client 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/bin/barkeep CHANGED
@@ -4,16 +4,7 @@ require "rubygems"
4
4
  require "dedent"
5
5
  require "yaml"
6
6
 
7
- require "barkeep/configuration"
8
- require "barkeep/version"
9
-
10
- COMMANDS = {
11
- "commit" => "Get information about a particular commit.",
12
- "unapproved" => "Find unapproved commits from a list or commit range.",
13
- "view" => "View a barkeep commit page in your browser."
14
- }
15
-
16
- COMMANDS.keys.each { |command| require "barkeep/#{command}" }
7
+ require "barkeep"
17
8
 
18
9
  def usage(exit_status)
19
10
  puts <<-EOS.dedent
@@ -21,7 +12,9 @@ def usage(exit_status)
21
12
  $ barkeep <command> [args]
22
13
  where <command> is one of:
23
14
  EOS
24
- COMMANDS.each { |command, purpose| puts " #{command.rjust(COMMANDS.keys.map(&:size).max)} | #{purpose}" }
15
+ BarkeepClient::COMMANDS.each do |command, purpose|
16
+ puts " #{command.rjust(BarkeepClient::COMMANDS.keys.map(&:size).max)} | #{purpose}"
17
+ end
25
18
  puts <<-EOS.dedent
26
19
 
27
20
  Type 'barkeep <command> --help' for more information about a particular command.
@@ -36,7 +29,7 @@ if ["-v", "--version"].include? sub_command
36
29
  puts "barkeep-client version #{BarkeepClient::VERSION}"
37
30
  exit
38
31
  end
39
- unless COMMANDS.include? sub_command
32
+ unless BarkeepClient::COMMANDS.include? sub_command
40
33
  puts sub_command ? "Error: unrecognized command '#{sub_command}'" : "Error: must provide command."
41
34
  puts
42
35
  usage(1)
data/lib/barkeep.rb ADDED
@@ -0,0 +1,12 @@
1
+ require "barkeep/configuration"
2
+ require "barkeep/version"
3
+
4
+ module BarkeepClient
5
+ COMMANDS = {
6
+ "commit" => "Get information about a particular commit.",
7
+ "unapproved" => "Find unapproved commits from a list or commit range.",
8
+ "view" => "View a barkeep commit page in your browser."
9
+ }
10
+
11
+ COMMANDS.keys.each { |command| require "barkeep/#{command}" }
12
+ end
@@ -1,3 +1,3 @@
1
1
  module BarkeepClient
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barkeep-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
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: 2011-12-27 00:00:00.000000000Z
12
+ date: 2012-01-26 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trollop
16
- requirement: &70185491808140 !ruby/object:Gem::Requirement
16
+ requirement: &11751060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.16.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70185491808140
24
+ version_requirements: *11751060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: dedent
27
- requirement: &70185491806960 !ruby/object:Gem::Requirement
27
+ requirement: &11741280 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 0.0.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70185491806960
35
+ version_requirements: *11741280
36
36
  description: A command-line client for Barkeep's REST API.
37
37
  email:
38
38
  - caleb@ooyala.com
@@ -50,6 +50,7 @@ files:
50
50
  - Rakefile
51
51
  - barkeep_client.gemspec
52
52
  - bin/barkeep
53
+ - lib/barkeep.rb
53
54
  - lib/barkeep/commit.rb
54
55
  - lib/barkeep/configuration.rb
55
56
  - lib/barkeep/constants.rb