Class: Rake::GemMaintenance::VersionBumpTask

Inherits:
TaskLib
  • Object
show all
Defined in:
lib/rake/gem/maintenance/version_bump_task.rb

Overview

Defines Rake tasks for version bumping with gem-release.

Creates: version:bump and bump (alias)

Constant Summary collapse

VALID_TYPES =
%w[patch minor major].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ VersionBumpTask

Returns a new instance of VersionBumpTask.

Yields:

  • (_self)

Yield Parameters:



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rake/gem/maintenance/version_bump_task.rb', line 17

def initialize
  super
  @namespace_name = :version
  @default_type = "patch"
  @commit_message_template = "chore(release): %<version>s"
  @create_alias = true
  @amend_with_gemfile_lock = true

  yield self if block_given?

  define_tasks
end

Instance Attribute Details

#amend_with_gemfile_lockObject

Returns the value of attribute amend_with_gemfile_lock.



14
15
16
# File 'lib/rake/gem/maintenance/version_bump_task.rb', line 14

def amend_with_gemfile_lock
  @amend_with_gemfile_lock
end

#commit_message_templateObject

Returns the value of attribute commit_message_template.



14
15
16
# File 'lib/rake/gem/maintenance/version_bump_task.rb', line 14

def commit_message_template
  @commit_message_template
end

#create_aliasObject

Returns the value of attribute create_alias.



14
15
16
# File 'lib/rake/gem/maintenance/version_bump_task.rb', line 14

def create_alias
  @create_alias
end

#default_typeObject

Returns the value of attribute default_type.



14
15
16
# File 'lib/rake/gem/maintenance/version_bump_task.rb', line 14

def default_type
  @default_type
end

#namespace_nameObject

Returns the value of attribute namespace_name.



14
15
16
# File 'lib/rake/gem/maintenance/version_bump_task.rb', line 14

def namespace_name
  @namespace_name
end