Class: Gem::Release::Cmds::Release

Inherits:
Base
  • Object
show all
Defined in:
lib/gem/release/cmds/release.rb

Constant Summary collapse

DEFAULTS =
{
  tag:     false,
  push:    false,
  recurse: false
}.freeze
DESCR =
{
  host:    'Push to a compatible host other than rubygems.org',
  key:     'Use the API key from ~/.gem/credentials',
  tag:     'Shortcut for running the `gem tag` command',
  push:    'Push tag to the remote git repository',
  github:  'Create a GitHub release',
  recurse: 'Recurse into directories that contain gemspec files',

  # region github

  descr: 'Description of the release',
  repo:  "Full name of the repository on GitHub, e.g. svenfuchs/gem-release (defaults to the repo name from the gemspec's homepage if this is a GitHub URL)",
  token: 'GitHub OAuth token'

  # endregion github
}.freeze
MSGS =

endregion github

{
  release:   'Releasing %s with version %s',
  build:     'Building %s',
  push:      'Pushing %s',
  cleanup:   'Deleting left over gem file %s',
  git_dirty: 'Uncommitted changes found. Please commit or stash.',
}.freeze
CMDS =
{
  cleanup: 'rm -f %s'
}.freeze

Constants inherited from Base

Base::WIDTH

Constants included from Helper::Hash

Helper::Hash::MERGER

Instance Attribute Summary

Attributes inherited from Base

#args, #context, #gem, #opts

Instance Method Summary collapse

Methods inherited from Base

arg, args, #config, default, #defaults, descr, description, #in_dirs, #in_gem_dirs, inherited, #initialize, opt, opts, #pretend?, #quiet?, summary, usage

Methods included from Helper::String

#camelize, #underscore, #wrap

Methods included from Helper

#abort, #cmd, #gem_cmd

Methods included from Helper::Hash

#deep_merge, #except, #only, #symbolize_keys

Methods included from Registry

included

Constructor Details

This class inherits a constructor from Gem::Release::Cmds::Base

Instance Method Details

#runObject


100
101
102
103
104
105
106
107
# File 'lib/gem/release/cmds/release.rb', line 100

def run
  in_gem_dirs do
    validate
    release
  end
  tag    if opts[:tag]
  github if opts[:github]
end