Sha256: 3d17e61e5c40c7140f0073d4be197be98371d7cd763fac76ec04331b0fe76ed8

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

module EnvJson
  # Rails hook to autoload ENV from JSON file before configuration
  class Railtie < Rails::Railtie
    config.before_configuration { load_env }

    # railtie hook to load env with Rails.env as environment name and config/env.json files as source
    def load_env
      EnvJson.load_env_from_source_with_overrides(Rails.root.join('config/env.json'))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
env_json-0.1.0 lib/env_json/railtie.rb