bin/hubbard in hubbard-0.0.7 vs bin/hubbard in hubbard-0.0.8
- old
+ new
@@ -4,25 +4,10 @@
require 'yaml'
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')))
require 'hubbard'
-defaults = { :format => :text }
-options = {}
-OptionParser.new do |opts|
- formats = [:text, :yaml]
- opts.on("--private", "Create project with visibility set to private") do |o|
- options[:private] = o
- end
- opts.on("-f", "--format [FORMAT]", formats,
- "Select format (#{formats.join(', ')})") do |o|
- options[:format] = o
- end
-end.parse!
-OPTIONS = defaults.merge(options)
-OPTIONS.freeze
-
FileUtils.mkdir_p(File.join(Hubbard::HUB_DATA, "projects"))
FileUtils.mkdir_p(File.join(Hubbard::HUB_DATA, "accounts"))
def next_arg(msg)
if ARGV.length < 1
@@ -73,9 +58,24 @@
ARGV.clear
ENV['SSH_ORIGINAL_COMMAND'].split.each do |arg|
ARGV << arg
end
end
+
+defaults = { :format => :text }
+options = {}
+OptionParser.new do |opts|
+ formats = [:text, :yaml]
+ opts.on("--private", "Create project with visibility set to private") do |o|
+ options[:private] = o
+ end
+ opts.on("-f", "--format [FORMAT]", formats,
+ "Select format (#{formats.join(', ')})") do |o|
+ options[:format] = o
+ end
+end.parse!
+OPTIONS = defaults.merge(options)
+OPTIONS.freeze
command = next_arg "Please specify a command to run"
if command == "run-as"
if username != "admin"