Skip to content

Commit

Permalink
Add option to specify host on cmd line. Helpful if you manage several…
Browse files Browse the repository at this point in the history
… geminaboxes.

Signed-off-by: Tom Lea <commit@tomlea.co.uk>
  • Loading branch information
Martin Moen Wulffeld authored and tomlea committed Jan 31, 2011
1 parent 01abc65 commit 3b68238
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 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'
Expand Down
6 changes: 5 additions & 1 deletion lib/rubygems/commands/inabox_command.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3b68238

Please sign in to comment.