Sha256: a4e65e4ba30e2c93f8a2b2627c0c87783aa9812f8aafa74227e0fd10f4fb4739

Contents?: true

Size: 1.08 KB

Versions: 2

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require "anyway/version"

require "anyway/ext/deep_dup"
require "anyway/ext/deep_freeze"
require "anyway/ext/hash"
require "anyway/ext/flatten_names"

require "anyway/utils/deep_merge"
require "anyway/utils/which"

require "anyway/settings"
require "anyway/tracing"
require "anyway/config"
require "anyway/auto_cast"
require "anyway/type_casting"
require "anyway/env"
require "anyway/loaders"
require "anyway/rbs"

module Anyway # :nodoc:
  class << self
    def env
      @env ||= ::Anyway::Env.new
    end

    def loaders
      @loaders ||= ::Anyway::Loaders::Registry.new
    end
  end

  # Configure default loaders
  loaders.append :yml, Loaders::YAML
  loaders.append :ejson, Loaders::EJSON if Utils.which("ejson")
  loaders.append :env, Loaders::Env

  if ENV.key?("DOPPLER_TOKEN") && ENV["ANYWAY_CONFIG_DISABLE_DOPPLER"] != "true"
    loaders.append :doppler, Loaders::Doppler
  end
end

if defined?(::Rails::VERSION)
  require "anyway/rails"
else
  require "anyway/rails/autoload"
end

require "anyway/testing" if ENV["RACK_ENV"] == "test" || ENV["RAILS_ENV"] == "test"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
runger_config-3.0.1 lib/anyway_config.rb
runger_config-3.0.0 lib/anyway_config.rb