Class: Bumpit

Inherits:
Object
  • Object
show all
Defined in:
lib/bumpit/managers/base.rb,
lib/bumpit.rb,
lib/bumpit/version.rb,
lib/bumpit/managers.rb,
lib/bumpit/managers/yarn.rb,
lib/bumpit/managers/bundler.rb

Overview

:nocov:

Defined Under Namespace

Modules: Managers

Constant Summary collapse

WORD_WRAP_MATCHER =
/(.{1,78})(?:[^\S\n]+\n?|\n*\Z|\n)|\n/
WORD_WRAP_PREFIX =
"* "
VERSION =
"0.3.1"

Instance Method Summary collapse

Constructor Details

#initialize(commit: false, pristine: false, verify: nil) ⇒ void

Initialize an instance.

Parameters:

  • commit (Boolean) (defaults to: false)

    Whether or not to commit the changes.

  • pristine (Boolean) (defaults to: false)

    Whether or not to require a pristine directory.

  • verify (String) (defaults to: nil)

    Optional command to verify the changes.



18
19
20
21
22
# File 'lib/bumpit.rb', line 18

def initialize(commit: false, pristine: false, verify: nil)
  @commit   = commit
  @pristine = pristine
  @verify   = verify
end

Instance Method Details

#callvoid

This method returns an undefined value.

Bump it!



27
28
29
30
31
32
# File 'lib/bumpit.rb', line 27

def call
  ensure_pristine!
  bump!
  verify!
  commit!
end