Project

config_env

0.0
No commit activity in last 3 years
No release in over 3 years
Configurate ENV with Ruby syntax. Upload to Heroku
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
~> 10.3
~> 0.10
~> 2.14
 Project Readme

Configurate ENV with Ruby syntax. Upload to Heroku

Code Climate Dependency Status

Features:

  • Describe ENV['key'] configuration with Ruby syntax
  • Upload configuration to Heroku

Usage

    gem 'config_env'
    ConfigEnv.init("#{__dir__}/env.rb")

Create file config/env.rb:

    config_env do
      set 'all_env_key', '1'
    end

    config_env :test do
      set 'test_key', '2'
    end

    config_env :production, :development do
      set 'production_and_development_key', '3'
    end

Add to application.rb

    ConfigEnv.init("#{__dir__}/env.rb")

Add line to .gitignore

config/env.rb

Upload configurated variables to Heroku

Add to Rakefile

    require 'config_env/rake_tasks'
    ConfigEnv.init("#{__dir__}/config/env.rb")

Run

    rake config_env:heroku
    rake config_env:heroku[app]

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