RevisioneerRails
A Rails engine to easily display deployment informations gathered by revisioneer. In order to use it you first need to have an account for it.
To add deployments to revisioneer you need to integrate it into your deployment process.
If you are using mina to power your deployments you might want to take a look at mina-revisioneer to automatically push informations to revisioneer.
Installation
Add this line to your application's Gemfile:
# Gemfile
gem "revisioneer_rails"
Generator
run:
rails generate revisioneer *your-api-token*
Manuel
Next mount the engine to wherever you want the revisions to be displayed:
# routes.rb
mount RevisioneerRails::Engine => "/revisions"
You need to add your revisioneer credentials to to a configuration file not under version control:
development: &dev
endpoint: "https://revisioneer.io"
api_token: "your api token"
production:
<<: *dev
and write an initializer which loads the configuration:
# config/initializers/revisioneer.rb
obj = YAML.load_file(Rails.root.join("config", "revisioneer.yml"))[Rails.env]
RevisioneerRails.configure do |config|
config.url = obj["endpoint"]
config.api_token = obj["api_token"]
end unless obj.empty?
Lastly, restart your application server
Views
You can generate the views for the revisions page with:
rails generate revisioneer:views
It generates the views under app/views/revisioneer_rails/revisions
TODO
- add tests for the revisioneer client
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request