Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Hardin committed Mar 16, 2012
1 parent b852f11 commit 4701afe
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions README.md
@@ -1,7 +1,7 @@
Note
----
* This gem is currently alpha. __You need to be invited to [SourceNinja Alpha](http://www.sourceninja.com/sign-up.html) in order to use this gem__.
* If you are using Heroku, please refer to the [Heroku Documentation](heroku-addon) and please ignore this documentation.
* If you are using Heroku, please refer to the [Heroku Documentationn](heroku-addon) and please ignore this documentation.

What is SourceNinja
-------------------
Expand All @@ -10,24 +10,31 @@ SourceNinja is an awesome service that allows you to stay informed of updates to
Visit [SourceNinja](http://sourceninja.com) to learn more.

What is the sourceninja gem
------------------------
---------------------------
The sourceninja gem is a gem that can be included in your rails application to allow seamless integration with SourceNinja. The sourceninja gem will send all of your gem files and versions to SourceNinja to begin managing your open source libraries.

Getting Started
---------------
First of all, you'll need the gem. If you're using Bundler, just add the following to your `Gemfile`.

gem 'sourceninja'
1. Create a [SourceNinja](http://sourceninja.com) account. Currently, you need to be part of our [alpha](http://www.sourceninja.com/sign-up.html).

Of course, as always, when you edit your Gemfile:

bundle install
2. Log into SourceNinja and create a product. The product you create will be paired with your application.

Before you can do anything with the sourceninja gem, you'll need to create your very own SourceNinja account (please read the notice above). Go ahead and do so at [http://sourceninja.com](http://sourceninja.com). Once created, you will need to create a product. This is the application you want SourceNinja to track.
3. After you create a product, you will be directed to a page asking what language your application is running. Select `Rails` from the menu on the left side.

Once your create a product, you will be directed to a page asking what language your application is running. Select `Rails` from the menu on the left side. You will be presented with two keys that you will need for the rest of the installation.
4. You will be presented with two values, you'll need these two values later.
```
SOURCENINJA_TOKEN="50a336d92da8ddea1ae0a6c0d06a172"
SOURCENINJA_PRODUCT_ID="477fcfa7-765a-4b91-b6a5-2ebe4c4f9d58"
```

You will then need to setup two environment variables in production, `ENV["SOURCENINJA_TOKEN"]` and `ENV["SOURCENINJA_PRODUCT_ID"]`. You could set these up in a configuration file that is only used in production, however, that is not suggested. You should setup the environment variables according to your hosting documentation.
5. Install the [sourceninja gem](http://github.com/SourceNinja/sourceninja-ruby). You can do this by adding the following line to your Gemfile.
```
gem "sourceninja", "~> 0.0.6"
```

6. Run `bundle install`.

7. Set the environment variables ```SOURCENINJA_TOKEN``` and ```SOURCENINJA_PRODUCT_ID``` using the values from step 4.

Updated Magically in Production
-----------------
Expand All @@ -43,10 +50,12 @@ If you would like to test sourceninja gem locally, you will want to create an in
ENV["SOURCENINJA_TOKEN"] ||= "1cea0be98caf02e830ac2aadbe44e4ee"
ENV["SOURCENINJA_PRODUCT_ID"] ||= "fb89e064-b48c-d0c3-81x4-a34a5b60a654"

Upon doing this, each time you start the rails server locally the data will be pushed.
Upon doing this, each time you start the rails server locally the data will be pushed. You could also use these steps if you want to manage a production instance and a development instance.

You could also use these steps if you want to manage a production instance and a development instance.
__Note: DO NOT DO THIS FOR PRODUCTION: No configuration files with sensitive information should ever be required within the application source and required config values should be read in from the ENV by supported libraries.__

Support
-------
Feel free to email us at support at sourceninja dot com if you have any questions or issues.

![sourceninja-ruby](http://cl.ly/2x001f2y042U3b05143Z/Screen%20shot%202012-03-16%20at%202.51.05%20PM.png)

0 comments on commit 4701afe

Please sign in to comment.