Sha256: c76dd9b55e558e17a568852242ebc42dfce83abe50631c4b95dbf3b0ca9821a5
Contents?: true
Size: 564 Bytes
Versions: 1
Compression:
Stored size: 564 Bytes
Contents
class MuchKeys::Rails < Rails::Railtie config.before_configuration do MuchKeys.configure do |config| config.application_name = Rails.application.class.parent_name.underscore end MuchKeys.populate_environment!(*env_keys) end 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
muchkeys-0.5.0 | lib/muchkeys/rails.rb |