lib/mortar/command/projects.rb in mortar-0.13.4 vs lib/mortar/command/projects.rb in mortar-0.13.5

- old
+ new

@@ -90,10 +90,11 @@ args = [name,] is_public = false if options[:public] is_public= true + ask_public(is_public) end validate_project_name(name) project_id = register_api_call(name,is_public) Mortar::Command::run("generate:project", [name]) FileUtils.cd(name) @@ -122,11 +123,11 @@ name = shift_argument unless name error("Usage: mortar projects:register PROJECT\nMust specify PROJECT.") end validate_arguments! - + ask_public(options[:public]) #nil is non existant project_id because it hasn't been posted yet register_do(name, options[:public], options[:embedded], nil) end alias_command "register", "projects:register" @@ -225,19 +226,19 @@ rescue Mortar::Command::CommandFailed => cf error("Currently in git repo. You can not fork a new project inside of an existing git repository.") end end is_public = options[:public] - + ask_public(is_public) git.clone(git_url, name, "base") Dir.chdir(name) # register a nil project id because it hasn't been created yet register_project(name, is_public, nil) do |project_result| git.remote_add("mortar", project_result['git_url']) git.push_master # We want the default remote to be the Mortar managed repo. git.git("fetch --all") - git.git("branch --set-upstream-to mortar/master") + git.set_upstream('mortar/master') display "Your project is ready for use. Type 'mortar help' to see the commands you can perform on the project.\n\n" end end alias_command "fork", "projects:fork"