Code Monkey home page Code Monkey logo

capistrano-figaro's Introduction

capistrano-figaro

Capistrano plugin that integrates with Figaro, loading your configuration for use during deployment.

Gem Version Build Status Code Climate Coverage Status Dependency Status

Installation

Add the gem to your Gemfile and run bundle install:

group :development do
  gem 'capistrano-figaro'
end

Then add the gem to your Capfile:

require 'capistrano/figaro'

Usage

There is nothing else you need to do. All your configuration values from application.yml will be automatically loaded as environment variables when you invoke a Capistrano task.

Your configuration values will be available as either ENV['setting'] or Figaro.env.setting:

set :some_option, ENV['some_option']
set :other_option, Figaro.env.other_option

Configuring

The default location of the configuration file used by Figaro is config/application.yml. You may change this location by setting the :figaro_path variable:

set :figaro_path, 'path/to/file.yml'

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 a new Pull Request

License

The capistrano-figaro plugin is free software released under the MIT License. See LICENSE for details.

capistrano-figaro's People

Contributors

runar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

capistrano-figaro's Issues

README update ?

Just to notify in case some changes happened over time in capistrano;
I only managed to have working, wrapping it within default_env :

set :default_env, {
  'pg_password' => Figaro.env.pg_password,
  ...
}

Just having set :pg_password, Figaro.env.pg_password was not okay

Maybe I did some wrong somewhere and that seems obvious here ?

Fix code style issues

The following style issues from Code Climate should be fixed:

  • Line is too long. [100/80]

    s.description   = 'This gem allows the usage of ENV variables from Figaro in Capistrano settings.’
    

    Found in capistrano-figaro.gemspec

  • Prefer $INPUT_RECORD_SEPARATOR or $RS from the English library over $/.

    s.files         = `git ls-files`.split($/)
    

    Found in capistrano-figaro.gemspec

  • Use snake_case for source file names.
    Found in lib/capistrano-figaro.rb

  • File.exists? is deprecated in favor of File.exist?.

    unless File.exists?(fetch(:figaro_path))
    

    Found in lib/capistrano/tasks/figaro.rake

  • Use fail instead of raise to signal exceptions.

    raise LoadError, 'Configuration file not found!’
    

    Found in lib/capistrano/tasks/figaro.rake

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.