Socket
Book a DemoInstallSign in
Socket

envm

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envm

1.1.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Envm

Manage environment variables within your Ruby project

Installation

Add this line to your application's Gemfile:

gem 'envm', github: "teespring/envm"

And then execute:

$ bundle

Or install it yourself as:

$ gem install envm

Usage

require 'envm'

# Configure the environment variable manifest file
# Supported formats: YML
Envm::Config.manifest_path = File.join(Rails.root, "config", "env.yml")

# you'll have to manually call setup
Envm.setup

# Access allowed environment varables
Envm["DATABASE_URL"]
#=> "mysql2://root@localhost:3306/teespring_dev"

# Access disallowed environment varables
Envm["DATABASE_URLX"]
#=> fail Envm::EnvVarNotFoundError, "DATABASE_URLX was not found"

# Access environment varables using Ruby's ENV
ENV["DATABASE_URL"]
# => STDERR.puts "Warning: deprecated usage of ENV with value 'DATABASE_URL'"

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 13 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.