Class: Bunup::CLI
- Inherits:
-
Object
- Object
- Bunup::CLI
- Defined in:
- lib/bunup/cli.rb
Overview
Parse args, run services, handle output, and handle exits
Constant Summary collapse
- COMMITING_MSG =
'Commiting Gemfile and Gemfile.lock changes'
- E_DIRTY_GEMFILE =
'Gemfile and/or Gemfile.lock has changes that would ' \ 'be overwritten. Please stash or commit your changes before running ' \ 'bunup.'
- GIT_REF_UPDATE_WARNING =
'WARNING: %<gem_name>s is installed from a git ' \ 'repo and is being updated from %<installed_version>s to ' \ '%<newest_version>s. This update could include breaking changes. ' \ 'Continue? [y/N] '
- MAJOR_VERSION_UPDATE_WARNING_FMT =
'WARNING: %<gem_name>s is being ' \ 'updated from %<installed_version>s to %<newest_version>s. This is ' \ 'a major version update with possible breaking changes. ' \ 'Continue? [y/N] '
- UPDATING_MSG_FMT =
'(%<remaining>s) Updating %<gem_name>s ' \ '%<installed_version>s -> %<newest_version>s'
Instance Method Summary collapse
-
#initialize(args) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
Instance Method Details
#run ⇒ Object
27 28 29 30 31 32 |
# File 'lib/bunup/cli.rb', line 27 def run abort(E_DIRTY_GEMFILE) unless ::Bunup::Services::Commiter.clean_gemfile? @gems = build_gems update_and_commit_changes exit @exit_status end |