Class: Gem::Commands::BumpCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::BumpCommand
- Includes:
- CommandOptions, Gem::Commands, GemRelease, Helpers
- Defined in:
- lib/rubygems/commands/bump_command.rb
Constant Summary collapse
- OPTIONS =
{ :version => 'patch', :push => false, :tag => false, :release => false }
Constants included from GemRelease
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ BumpCommand
constructor
A new instance of BumpCommand.
Constructor Details
#initialize ⇒ BumpCommand
Returns a new instance of BumpCommand.
12 13 14 15 16 17 18 19 |
# File 'lib/rubygems/commands/bump_command.rb', line 12 def initialize super 'bump', 'Bump the gem version', OPTIONS option :version, '-v', 'Target version: next [major|minor|patch] or a given version number [x.x.x]' option :push, '-p', 'Push to origin' option :tag, '-t', 'Create a git tag and push --tags to origin' option :release, '-r', 'Build gem from a gemspec and push to rubygems.org' end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
8 9 10 |
# File 'lib/rubygems/commands/bump_command.rb', line 8 def arguments @arguments end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
8 9 10 |
# File 'lib/rubygems/commands/bump_command.rb', line 8 def usage @usage end |
Instance Method Details
#execute ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/rubygems/commands/bump_command.rb', line 21 def execute bump commit push if [:push] || [:tag] release if [:release] tag if [:tag] end |