Permalink
Browse files

Add option to specify host on cmd line. Helpful if you manage several…

… geminaboxes.

Signed-off-by: Tom Lea <commit@tomlea.co.uk>
  • Loading branch information...
1 parent 01abc65 commit 3b68238eaf848675113ae0139d738008de1eb698 @wulffeld wulffeld committed with tomlea Jan 30, 2011
Showing with 6 additions and 2 deletions.
  1. +1 −1 geminabox.gemspec
  2. +5 −1 lib/rubygems/commands/inabox_command.rb
View
2 geminabox.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'geminabox'
- s.version = '0.2.9'
+ s.version = '0.2.10'
s.summary = 'Really simple rubygem hosting'
s.description = 'A sinatra based gem hosting app, with client side gem push style functionality.'
s.author = 'Tom Lea'
View
6 lib/rubygems/commands/inabox_command.rb
@@ -19,6 +19,10 @@ def initialize
add_option('-c', '--configure', "Configure GemInABox") do |value, options|
options[:configure] = true
end
+
+ add_option('-g', '--host HOST', "Host to upload to.") do |value, options|
+ options[:host] = value
+ end
end
def execute
@@ -88,7 +92,7 @@ def configure
end
def geminabox_host
- geminabox_host ||= Gem.configuration.load_file(config_path)[:host]
+ @geminabox_host ||= options[:host] || Gem.configuration.load_file(config_path)[:host]
end
def geminabox_host=(host)

0 comments on commit 3b68238

Please sign in to comment.