Skip to content

justinvt/SWF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ENVY

Envy allows you to use namespaced environment variables, simply by defining environment variables with a common prefix.

For instance, let's say you have:


	
EC2_ACCESS_KEY='abcdefg'

EC2_SECRET_KEY='0123456789'

CAMPFIRE_API_TOKEN='zyxwvutsr'

CAMPFIRE_SUBDOMAIN='SOULCOMPRANCER'


Envy lets you do...



require 'envy'

Envy.namespace(:ec2, :campfire)

puts CAMPFIRE

# {:api_token => 'zyxwvutsr', :subdomain => 'SOULCOMPRANCER'}

puts Envy::EC2[:access_key]  

# 'abcdefg'



Envy will try to define a global constant (EC2), but will also always define a constant within the Envy module (Envy::EC2), in case some sort of conflict prevents the global constant from working properly.

About

A gem that creates the illusion of namespaced env variables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages