Module: Dev::Executables::Commands::Status
- Included in:
- Dev::Executable
- Defined in:
- lib/dev/executables/commands/status.rb
Instance Method Summary collapse
-
#status(app = nil) ⇒ nil
Stampa lo stato dell’app specificata o di tutte le app.
Instance Method Details
#status(app = nil) ⇒ nil
Stampa lo stato dell’app specificata o di tutte le app.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/dev/executables/commands/status.rb', line 10 def status(app = nil) if app.present? apps = [ app ] else apps = @project.apps end apps.each do |current_app| @project.current_app = current_app if @project.valid_app? Dir.chdir @project.app_folder current_branch = `git rev-parse --abbrev-ref HEAD` print "Status of app " puts current_app.teal puts print "\tbranch: " print current_branch.limegreen print "\tversion: " puts @project.app_version.try(:limegreen) || "not found".limegreen puts end end end |