lukehorvat / env-dependencies

Ruby gem for defining which environment variables must be set in order for your Rails application to function properly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

env-dependencies Gem version

Ruby gem for defining which environment variables must be set in order for your Rails application to function properly.

Installation

Add this line to your application's Gemfile:

gem 'env-dependencies'

And then execute:

$ bundle install

Usage

Define an env_dependencies array in config/application.rb like so:

class Application < Rails::Application
  config.env_dependencies = [
    "CDN_URL",
    "JAVA_HOME",
    "ROLLBAR_ACCESS_TOKEN",
    "UI_DIR"
  ]
end

When your Rails application starts, an error will be raised immediately if any environment variables are not set. A nice precautionary measure!

Related

If you find this gem useful, you may also like path-dependencies.

About

Ruby gem for defining which environment variables must be set in order for your Rails application to function properly.

License:MIT License


Languages

Language:Ruby 100.0%