matt-lowe/ProfanityFE — pull request #1 by sandersch (2013-11-17 05:23:18+00:00)
Title: Gemify ProfanityFE

This Pull Request formats this repo as [Ruby Gem](http://rubygems.org/) to make it easier to integrate with the wider Ruby community. It also includes a `profanity` executable that will be available in your path when the gem is installed. If we publish this to rubygems.org, installation will be as simple as `gem install profanity` and updates as simple as `gem update profanity`. We can also any external dependencies to the gemspec so that they get included in the install as well.

This mostly adds additional files, but also moves the main `profanity.rb` file inside of the `lib` directory. The file structure is explained below:

* `lib` – All of the ruby code for a gem should live in this directory. Currently this directory only includes the original, unmodified `profanity.rb`, plus `lib/profanity/version.rb` which exists solely for versioning purposes and is references from the gemspec. In order to integrate well with other ruby gems, there are some other code organization changes I'd like to suggest as well, but those don't necessarily have to be part of this PR.
* `bin` – Directory with a `profanity` executable that will be added to your path when the gem is installed
* `profanity.gemspec` – Defines the attributes of the gem. This includes version info, licensing information, author information, dependencies, and included files. Please review this to ensure that the author information I have in here meets your approval. We should make sure everything in here is correct before publishing.
* `Gemfile` – tells bundler to look in the `gemspec` for any dependencies. You don't have to use bundler, but I find that it greatly simplifies development and deployment. This file should never have to be updated.
* `.gitignore` – not strictly necessary for a gem, but this is automatically generated when gemify-ing a library with bundler and automatically ignores auto-generated artifacts from documentation and packaging tools.
* `Rakefile` – provides some tasks to make managing the gem easier. To see available tasks, use `rake -T`:

```
rake build # Build profanity-0.0.4.gem into the pkg directory
rake install # Build and install profanity-0.0.4.gem into system gems
rake release # Create tag v0.0.4 and build and push profanity-0.0.4.gem to Rubygems
```

#### Testing this PR

I recommend using bundler to install the gem from my git repo. Using bundler keeps the gem separate from your system gems, so it doesn't require root at all or pollute your system libraries. To install using bundler:

```
gem install bundler
echo 'gem "profanity", git: "git@github.com:sandersch/ProfanityFE.git", branch: "gemify"' > Gemfile
bundle install
bundle exec profanity
```

However, you can also clone the pull request and install the gem into your system gems by running `rake install`.

#### Installing from Rubygems.org

After this gem has been published to rubygems.org, installation will be as simple as `gem install profanity`. The included `profanity` executable should be available in your path.

### Publishing to Rubygems.org

I can publish the gem to rubygems.org and give you push permission after you create an account, or you can push it up yourself if you'd prefer. If you decide that you don't want to have anything to do with Ruby Gems, that is fine as well. This is your project; I am merely trying to make it easier to share with the rest of the world.