0.01
No commit activity in last 3 years
No release in over 3 years
Automatic EJSON decryption for Capistrano
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 10.0

Runtime

>= 1.0.0, ~> 1.0
 Project Readme

Capistrano::EJSON

This gem makes it easy to use ejson in applications that are deployed through Capistrano.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-ejson', '~> 1.0.0'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-ejson

Usage

Require in Capfile to use the default task:

require 'capistrano/ejson'

The task ejson:decrypt will run after deploy:updated.

By default the file config/secrets.ejson will be decrypted to config/secrets.json. You can change this behavior by specifying the following config variables:

set :ejson_file, "config/secrets.ejson"
set :ejson_output_file, "config/secrets.json"

By default capistrano-ejson decrypts the secrets file from the machine that does the deploy and then uploads the resulting config to the servers. You can set :ejson_deploy_mode to :remote to perform the decryption remotely, which will run something like ejson decrypt -o config/secrets.json config/secrets.ejson on the remote hosts. If you need to use sudo or bundle exec, you should use the SSHKit command map.

Contributing

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