Library for pushing details(commits, tag, username, env) about the current app


Add this line to your application's Gemfile:

gem 'deployments'

And then execute:

$ bundle

Or install it yourself as:

$ gem install deployments


If you are using Rails 2 or non Rails gem you should add the next following code into Rakefile:

  require 'deployments/gem_tasks'

At first you need to create in the config folder deployments.yml file with receiver server url and domains of different envs of your application:

    server: "your deployments server that will save build version"
    domain: ""
    api_key: "development api key"
    domain: ""
    api_key: "staging api key"

Add to your capistrano recipes the next following line, changing your_app_env to the deployment environment like 'staging' or 'development':

  require 'deployments'

  after 'deploy' do
    run <<-CMD
      rake deployments:push app_env=your_app_env

Request params:

      :author => "author",
      :commit_attributes => {
        "commit id" => {
          "message" => "Add readme file",
          "created_at" => "2012-05-23 10:38:46 +0300"
        "commit id" => {
          "message" => "Change readme file",
          "created_at" => "2012-05-23 10:39:18 +0300"
      :env => "staging",
      :version => "1.0.1",
      :host_name => ""
    :api_key => "account api key"

Also you can use capistrano recipes of the gem, you need to add:

  require 'deployments/recipes'

It will add capistrano hook "after 'deploy'" for pushing deployment details to the server after deploy.

Now you can get request version.txt file from public folder, it will show the latest tag name of the project.



  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request