Class: Gjp::FinishCommand

Inherits:
BaseCommand show all
Defined in:
lib/gjp/commands/finish.rb

Instance Method Summary collapse

Methods inherited from BaseCommand

#checking_exceptions, #configure_log_level, #ensure_dry_running, #format_path, #print_generation_result, #verbose=, #very_verbose=, #very_very_verbose=

Methods included from Logging

#log

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/gjp/commands/finish.rb', line 7

def execute
  checking_exceptions do
    if Gjp::Project.new(".").finish(abort?)
      if abort?
        puts "Project reverted as before dry-run."
      else
        puts "Dry-run finished."
      end
    else
      puts "No dry-run is in progress."
    end
  end
end