Class: Stove::Action::Dev

Inherits:
Base
  • Object
show all
Defined in:
lib/stove/actions/dev.rb

Instance Attribute Summary

Attributes inherited from Base

#cookbook, #options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Mixin::Optionable

extended, included

Methods included from Mixin::Validatable

#validate

Constructor Details

This class inherits a constructor from Stove::Action::Base

Instance Method Details

#dev_versionObject



16
17
18
19
20
# File 'lib/stove/actions/dev.rb', line 16

def dev_version
  split = cookbook.version.split('.').map(&:to_i)
  split[2] += 1
  split.join('.')
end

#runObject



6
7
8
9
10
11
12
13
14
# File 'lib/stove/actions/dev.rb', line 6

def run
  log.info('Bumping for development release')
  log.debug("Version is currently #{cookbook.version}")
  log.debug("Bumped version is #{dev_version}")

  cookbook.bump(dev_version)

  log.debug("Version is now #{cookbook.version}")
end