Use dot notation to access ENV vars. A handy companion to dotenv-* gems
EnvInquiry::Env.https_enabled? instead of ENV['HTTPS_ENABLED'] == 'true'
Add this line to your application's Gemfile:
gem 'env_inquiry'
And then execute:
$ bundle
Or install it yourself as:
$ gem install env_inquiry
In Rails (optional)
# auto-load in config/initializers/whatever.rb
require 'env_inquiry'
EnvInquiry::Env.inquire
require 'env_inquiry'
EnvInquiry::Env.inquire
EnvInquiry::Env.https_enabled?
# feel free to shorten in your app with something like:
EnvInq = EnvInquiry::Env
EnvInq.https_enabled?
$ bundle exec rspec spec
- Fork it ( http://github.com/servicient/env_inquiry/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request