Class: Abak::Flow::Commands::Compare
- Inherits:
-
Object
- Object
- Abak::Flow::Commands::Compare
- Defined in:
- lib/abak-flow/commands/compare.rb
Instance Method Summary collapse
-
#initialize ⇒ Compare
constructor
TODO : Быть может стоит сделать include ANSI.
- #run(args, options) ⇒ Object
Constructor Details
Instance Method Details
#run(args, options) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/abak-flow/commands/compare.rb', line 18 def run(args, ) Checkup.new.process( Array.new, ::Commander::Command::Options.new) current = @git.current_branch head = Branch.new(.head || current) base = Branch.new(.base || head.extract_base_name) if head.current? say ANSI.white { I18n.t("commands.compare.updating", branch: ANSI.bold { head }, upstream: ANSI.bold { "#{@repository.origin}" }) } head.update else say ANSI.yellow { I18n.t("commands.compare.diverging", branch: ANSI.bold { head }) } end say ANSI.green { head.compare_link(base) } end |