bin/rvmpow in rvmpow-0.0.1 vs bin/rvmpow in rvmpow-0.0.2

- old
+ new

@@ -29,16 +29,21 @@ desc "restart", RvmPow::TOUCH_RESTART def restart exec_cmd { @pow.touchRestartFile } end + desc "always_restart", RvmPow::TOUCH_ALWAYS_RESTART + def always_restart + exec_cmd { @pow.touchAlwaysRestartFile} + end + desc "gitignore", RvmPow::ADD_GITIGNORE def gitignore exec_cmd { @pow.gitignorePowenv } end - desc "addRvmInfoToGemfile", RvmPow::ADD_GEMFILE + desc "gemfile", RvmPow::ADD_GEMFILE def gemfile exec_cmd { @pow.addRvmInfoToGemfile } end end @@ -59,10 +64,15 @@ desc "restart", RvmPow::REMOVE_RESTART def restart exec_cmd { @pow.deleteRestartFile } end + desc "always_restart", RvmPow::REMOVE_ALWAYS_RESTART + def always_restart + exec_cmd { @pow.deleteAlwaysRestartFile } + end + desc "powlink", RvmPow::REMOVE_LINK def powlink exec_cmd { @pow.deletePowLink } end @@ -98,10 +108,11 @@ \x5- touch restart.txt in ./tmp/ LONGDESC option :show, type: :boolean, desc: "open in default browser" + option :rackdev, type: :boolean, desc: "reload the app on each request (rack only - not needed for rails apps)" def init exec_cmd {nil} shitHappens = false @@ -144,10 +155,19 @@ else say_status "Failed", RvmPow::ADD_GEMFILE, :red shitHappens = true end + if options[:rackdev] + if @pow.touchAlwaysRestartFile + say_status "Done", RvmPow::TOUCH_ALWAYS_RESTART, :green + else + say_status "Failed", RvmPow::TOUCH_ALWAYS_RESTART, :red + shitHappens = true + end + end + if options[:show] if shitHappens say_status "Failed", "Open app in default browser canceled due to previous error(s)", :red say "Initialization failed.", :red else @@ -208,9 +228,17 @@ say_status "Done", RvmPow::REMOVE_LINK, :green else say_status "Failed", RvmPow::REMOVE_LINK, :red shitHappens = true end + + if @pow.deleteAlwaysRestartFile + say_status "Done", RvmPow::REMOVE_ALWAYS_RESTART, :green + else + say_status "Failed", RvmPow::REMOVE_ALWAYS_RESTART, :red + shitHappens = true + end + if shitHappens say "Reverting all changes failed.", :red end end \ No newline at end of file