Class: MuchKeys::Rails
- Inherits:
-
Rails::Railtie
- Object
- Rails::Railtie
- MuchKeys::Rails
- Defined in:
- lib/muchkeys/rails.rb
Instance Method Summary collapse
Instance Method Details
#env_keys ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/muchkeys/rails.rb', line 11 def env_keys # parse all environments found in .env and populate them from consul unless File.exists?(Rails.root.join(".env")) raise IOError, ".env files are required for Muchkeys ENV injection to work" end File.read(Rails.root.join(".env")).each_line.map { |x| x.split("=")[0] } end |