class Perpetuus::Command
Public Instance Methods
deploy()
click to toggle source
# File lib/perpetuus/command.rb, line 15 def deploy synchronize_changes_with_remote_repository build = Perpetuus::Build.new unless build.builded_with_success? puts "Build Fail!".red puts "Your code can't be deployed!" puts "Check the status at https://travis-ci.org/#{build.username}/#{build.repository}" puts build.last_build return false end Perpetuus.push_to_heroku end
setup()
click to toggle source
# File lib/perpetuus/command.rb, line 8 def setup @rails_app_name = ask_wizard("What's the name of rails project?", "rails") puts "CREATING RAILS APP...".green Perpetuus.new_rails_app(@rails_app_name) end
Private Instance Methods
ask_wizard(question, label)
click to toggle source
# File lib/perpetuus/command.rb, line 30 def ask_wizard(question, label) ask "\033[1m\033[30m\033[46m" + (label.upcase || "label").rjust(10) + "\033[0m\033[36m" + " #{question}\033[0m" end
git_pull()
click to toggle source
# File lib/perpetuus/command.rb, line 40 def git_pull system "git pull" end
git_push()
click to toggle source
# File lib/perpetuus/command.rb, line 44 def git_push system "git push" end
synchronize_changes_with_remote_repository()
click to toggle source
# File lib/perpetuus/command.rb, line 35 def synchronize_changes_with_remote_repository git_pull git_push end