heroku-bartender 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/heroku-bartender CHANGED
@@ -2,5 +2,50 @@
2
2
  $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
3
3
 
4
4
  require 'heroku/bartender'
5
+ require 'choice'
5
6
 
6
- Heroku::Bartender::Server.run!
7
+ Choice.options do
8
+ banner "Usage: #{File.basename(__FILE__)} [-hpv] path_to_git_repo"
9
+ header ''
10
+ header 'Server options:'
11
+
12
+ option :host do
13
+ d = "0.0.0.0"
14
+ short '-h'
15
+ long '--host=HOST'
16
+ desc "The hostname or ip of the host to bind to (default #{d})"
17
+ default d
18
+ end
19
+
20
+ option :port do
21
+ d = 4567
22
+ short '-p'
23
+ long '--port=PORT'
24
+ desc "The port to listen on (default #{d})"
25
+ cast Integer
26
+ default d
27
+ end
28
+
29
+ separator ''
30
+ separator 'Common options: '
31
+
32
+ option :help do
33
+ long '--help'
34
+ desc 'Show this message'
35
+ end
36
+
37
+ option :version do
38
+ short '-v'
39
+ long '--version'
40
+ desc 'Show version'
41
+ action do
42
+ puts "#{File.basename(__FILE__)} v#{Heroku::Bartender::VERSION}"
43
+ exit
44
+ end
45
+ end
46
+ end
47
+
48
+ options = Choice.choices
49
+
50
+
51
+ Heroku::Bartender::Server.run! :host => options[:host], :port => options[:port]
@@ -2,3 +2,4 @@ require "heroku/bartender/commit"
2
2
  require "heroku/bartender/log"
3
3
  require "heroku/bartender/command"
4
4
  require "heroku/bartender/server"
5
+ require "heroku/bartender/version"
@@ -1,5 +1,5 @@
1
1
  module Heroku
2
2
  module Bartender
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: heroku-bartender
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sebastian Arcila-Valenzuela
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-08 00:00:00 -05:00
13
+ date: 2011-03-09 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency