Sha256: d4993060a0096d6daff4384ce2f805f84711df3ce64f963bae82dc356194f562

Contents?: true

Size: 1.89 KB

Versions: 2

Compression:

Stored size: 1.89 KB

Contents

# Vendorise

[![Gem Version](https://badge.fury.io/rb/vendorise.png)](http://badge.fury.io/rb/vendorise)
[![Build Status](https://travis-ci.org/New-Bamboo/vendorise.png)](https://travis-ci.org/New-Bamboo/vendorise)

Sometimes you need to use a gem that is only available in a private git repository. There are a few ways to do this:

* Install an SSH certificate on your server, but it's not always an option (for example, if you use [Heroku](http://heroku.com))
* Use [Gemfury](http://gemfury.com), but that costs money and potentially creates privacy concerns
* Hard-code an oauth token into your Gemfile (if the gem is hosted on [github](http://github.com)), but then anyone with access to the code also has access to all of your github repositories

Vendorise offers a different way of accessing privately hosted gems, by using git's subtree command to download the gem on your development machine and commit it into the source tree of your repository.

By using subtree, updating the code is straightforward and your server does not need to have access to the private git repository. For more explanation about git subtree and why you'd want to use it, I recommend reading [Alternatives To Git Submodule: Git Subtree](http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/).

*Note:* vendorise relies on the git subtree command to work - only recent versions of git have this

## Installation

If you're using bundler add this line to your application's Gemfile:

    gem 'vendorise', group: :development

Or if you don't use bundler:

    $ gem install vendorise

## Usage

1. Run `rake vendorise:gem[repo_url]` to vendorise the gem hosted at `repo_url` into `/vendor/gems`.
2. Add `gem '<gem_name>', path: 'vendor/gems/<gem_name>'` to your Gemfile

You can update the gem at any time by running the rake task again. Vendorise always uses the code from the master branch on git (tags are not supported yet).

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vendorise-0.2.0 README.md
vendorise-0.1.1 README.md