<commit_before># gem release [![Build Status](https://secure.travis-ci.org/svenfuchs/gem-release.png)](http://travis-ci.org/svenfuchs/gem-release)

This gem plugin adds a `bootstrap`, `bump`, `tag` and a `release` command to the rubygems `gem` command.

The `bump` command

 * bumps the version number defined in `lib/[gem_name]/version.rb` to the next major, minor or patch level or to a given, particular version number

The `tag` command

 * executes `git tag -am "tag [tag_name]" [tag_name]` and
 * executes `git push --tags origin`

... with `tag_name` being the version number as specified in your .gemspec preceded  by `v` (e.g. `v0.0.1`).

The `release` command

 * builds a gem from your gemspec and
 * pushes it to rubygems.org
 * deletes the gem file
 * optionally invokes the `tag` command

The `gemspec` command

 * generates an initial `[gem_name].gemspec` file with sane defaults (will overwrite an existing gemspec)

The `bootstrap` command

 * generates an initial `[gem_name].gemspec` file with sane defaults and scaffolds: `lib/[gem_name]/version.rb`, `README.md`, `test/`
 * optionally inits a git repo, creates it on github and pushes it to github (requires git config for `github.user` and `github.token` to be set)

## Installation

Obviously ...

    $ gem install gem-release

## Usage

    $ gem release your.gemspec       # builds the gem and pushes it to rubygems.org
    $ gem release                    # uses the first *.gemspec in the current working directory
    $ gem release --tag              # also executes gem tag

    $ gem tag                        # creates a git tag and pushes tags to the origin repository

    $ gem gemspec                    # generates a [gem_name].gemspec using  Dir["{lib/**/*,[A-Z]*}"]
    $ gem gemspec --strategy gig     # uses s.files = `git ls-files app lib`.split("\n")

    $ gem bootstrap                  # generates a [gem_name].gemspec using the current directory name
                                     #  and scaffolds lib/[gem_name]/version.rb, README, test/
    $ gem bootstrap your_gem         # creates a your_gem directory, bootstraps your_gem and inits a git repo
    $ gem bootstrap --github         # inits a git repo, creates it on github and pushes it to github
                                     #  (requires git config for github.user and github.token to be set)

    $ gem bump                       # Bump the gem version to the next patch level (e.g. 0.0.1 to 0.0.2)
    $ gem bump --version 1.1.1       # Bump the gem version to the given version number
    $ gem bump --version major       # Bump the gem version to the next major level (e.g. 0.0.1 to 1.0.0)
    $ gem bump --version minor       # Bump the gem version to the next minor level (e.g. 0.0.1 to 0.1.0)
    $ gem bump --version patch       # Bump the gem version to the next patch level (e.g. 0.0.1 to 0.0.2)
    $ gem bump --push                # Bump and git push to origin
    $ gem bump --tag                 # Bump and tag gem and pushes tags to the origin repository
    $ gem bump --release             # Bump and release gem
    $ gem bump --tag --release       # Bump, tag, push and release gem
    $ gem bump --no-commit           # Bump the gem version but don't git commit
                                     #  (will be ignored if combined with push, tag or release)

When bumping versions for a gem named `foo-bar`, the following paths will be searched in order for `version.rb`:

    `lib/foo-bar/version.rb`
    `lib/foo/bar/version.rb`
    `lib/foo_bar/version.rb`<commit_msg>added key, host and quiet options to usage descriptions for release and bump<commit_after># gem release [![Build Status](https://secure.travis-ci.org/svenfuchs/gem-release.png)](http://travis-ci.org/svenfuchs/gem-release)

This gem plugin adds a `bootstrap`, `bump`, `tag` and a `release` command to the rubygems `gem` command.

The `bump` command

 * bumps the version number defined in `lib/[gem_name]/version.rb` to the next major, minor or patch level or to a given, particular version number

The `tag` command

 * executes `git tag -am "tag [tag_name]" [tag_name]` and
 * executes `git push --tags origin`

... with `tag_name` being the version number as specified in your .gemspec preceded  by `v` (e.g. `v0.0.1`).

The `release` command

 * builds a gem from your gemspec and
 * pushes it to rubygems.org (or another gemcutter-compatible host)
 * deletes the gem file
 * optionally invokes the `tag` command

The `gemspec` command

 * generates an initial `[gem_name].gemspec` file with sane defaults (will overwrite an existing gemspec)

The `bootstrap` command

 * generates an initial `[gem_name].gemspec` file with sane defaults and scaffolds: `lib/[gem_name]/version.rb`, `README.md`, `test/`
 * optionally inits a git repo, creates it on github and pushes it to github (requires git config for `github.user` and `github.token` to be set)

## Installation

Obviously ...

    $ gem install gem-release

## Usage

    $ gem release your.gemspec       # builds the gem and pushes it to rubygems.org
    $ gem release                    # uses the first *.gemspec in the current working directory
    $ gem release --tag              # also executes gem tag
    $ gem release --key KEY          # use the specified API key from ~/.gem/credentials
    $ gem release --host HOST        # push to a gemcutter-compatible host other than rubygems.org
    $ gem release --quiet            # suppress output status messages

    $ gem tag                        # creates a git tag and pushes tags to the origin repository

    $ gem gemspec                    # generates a [gem_name].gemspec using  Dir["{lib/**/*,[A-Z]*}"]
    $ gem gemspec --strategy git     # uses s.files = `git ls-files app lib`.split("\n")

    $ gem bootstrap                  # generates a [gem_name].gemspec using the current directory name
                                     #  and scaffolds lib/[gem_name]/version.rb, README, test/
    $ gem bootstrap your_gem         # creates a your_gem directory, bootstraps your_gem and inits a git repo
    $ gem bootstrap --github         # inits a git repo, creates it on github and pushes it to github
                                     #  (requires git config for github.user and github.token to be set)

    $ gem bump                       # Bump the gem version to the next patch level (e.g. 0.0.1 to 0.0.2)
    $ gem bump --version 1.1.1       # Bump the gem version to the given version number
    $ gem bump --version major       # Bump the gem version to the next major level (e.g. 0.0.1 to 1.0.0)
    $ gem bump --version minor       # Bump the gem version to the next minor level (e.g. 0.0.1 to 0.1.0)
    $ gem bump --version patch       # Bump the gem version to the next patch level (e.g. 0.0.1 to 0.0.2)
    $ gem bump --push                # Bump and git push to origin
    $ gem bump --tag                 # Bump and tag gem and pushes tags to the origin repository
    $ gem bump --release             # Bump and release gem
    $ gem bump --release --key KEY   # Bump and release the gem, using the specified API key from ~/.gem/credentials
    $ gem bump --release --host HOST # Bump and release the gem to a gemcutter-compatible host other than rubygems.org
    $ gem bump --release --quiet     # Bump and release the gem, suppressing output status messages
    $ gem bump --tag --release       # Bump, tag, push and release gem
    $ gem bump --no-commit           # Bump the gem version but don't git commit
                                     #  (will be ignored if combined with push, tag or release)

When bumping versions for a gem named `foo-bar`, the following paths will be searched in order for `version.rb`:

    `lib/foo-bar/version.rb`
    `lib/foo/bar/version.rb`
    `lib/foo_bar/version.rb`
{'fraction_non_alphanumeric': 0.09213051823416507, 'fraction_numerical': 0.007677543186180422, 'mean_word_length': 2.300675675675676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1131219', 'n_tokens_mistral': 2315, 'n_tokens_neox': 2167, 'n_words': 970}