lib/rubygems/commands/inabox_command.rb in geminabox-0.2.9 vs lib/rubygems/commands/inabox_command.rb in geminabox-0.2.10
- old
+ new
@@ -17,10 +17,14 @@
super 'inabox', description
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
return configure if options[:configure]
setup
@@ -86,10 +90,10 @@
host = ask("Host:")
self.geminabox_host = host
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)
config = Gem.configuration.load_file(config_path).merge(:host => host)