|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +Config.setup do |config| |
| 4 | + # Name of the constant exposing loaded settings |
| 5 | + config.const_name = "Settings" |
| 6 | + |
| 7 | + # Ability to remove elements of the array set in earlier loaded settings file. For example value: '--'. |
| 8 | + # |
| 9 | + # config.knockout_prefix = nil |
| 10 | + |
| 11 | + # Overwrite an existing value when merging a `nil` value. |
| 12 | + # When set to `false`, the existing value is retained after merge. |
| 13 | + # |
| 14 | + # config.merge_nil_values = true |
| 15 | + |
| 16 | + # Overwrite arrays found in previously loaded settings file. When set to `false`, arrays will be merged. |
| 17 | + # |
| 18 | + # config.overwrite_arrays = true |
| 19 | + |
| 20 | + # Defines current environment, affecting which settings file will be loaded. |
| 21 | + # Default: `Rails.env` |
| 22 | + # |
| 23 | + # config.environment = ENV.fetch('ENVIRONMENT', :development) |
| 24 | + |
| 25 | + # Load environment variables from the `ENV` object and override any settings defined in files. |
| 26 | + # |
| 27 | + # config.use_env = false |
| 28 | + |
| 29 | + # Define ENV variable prefix deciding which variables to load into config. |
| 30 | + # |
| 31 | + # Reading variables from ENV is case-sensitive. If you define lowercase value below, ensure your ENV variables are |
| 32 | + # prefixed in the same way. |
| 33 | + # |
| 34 | + # When not set it defaults to `config.const_name`. |
| 35 | + # |
| 36 | + config.env_prefix = "SETTINGS" |
| 37 | + |
| 38 | + # What string to use as level separator for settings loaded from ENV variables. Default value of '.' works well |
| 39 | + # with Heroku, but you might want to change it for example for '__' to easy override settings from command line, where |
| 40 | + # using dots in variable names might not be allowed (eg. Bash). |
| 41 | + # |
| 42 | + # config.env_separator = '.' |
| 43 | + |
| 44 | + # Ability to process variables names: |
| 45 | + # * nil - no change |
| 46 | + # * :downcase - convert to lower case |
| 47 | + # |
| 48 | + # config.env_converter = :downcase |
| 49 | + |
| 50 | + # Parse numeric values as integers instead of strings. |
| 51 | + # |
| 52 | + # config.env_parse_values = true |
| 53 | + |
| 54 | + # Validate presence and type of specific config values. Check https://github.com/dry-rb/dry-validation for details. |
| 55 | + # |
| 56 | + # config.schema do |
| 57 | + # required(:name).filled |
| 58 | + # required(:age).maybe(:int?) |
| 59 | + # required(:email).filled(format?: EMAIL_REGEX) |
| 60 | + # end |
| 61 | + |
| 62 | + # Evaluate ERB in YAML config files at load time. |
| 63 | + # |
| 64 | + # config.evaluate_erb_in_yaml = true |
| 65 | + |
| 66 | + # Name of directory and file to store config keys |
| 67 | + # |
| 68 | + # config.file_name = 'settings' |
| 69 | + # config.dir_name = 'settings' |
| 70 | + |
| 71 | + # Load extra sources from a path. These can be file paths (strings), |
| 72 | + # hashes, or custom source objects that respond to 'load' |
| 73 | + # |
| 74 | + # config.extra_sources = [ |
| 75 | + # 'path/to/extra_source.yml', # String: loads extra_source.yml |
| 76 | + # { api_key: ENV['API_KEY'] }, # Hash: direct hash source |
| 77 | + # MyCustomSource.new, # Custom source object |
| 78 | + # ] |
| 79 | +end |
0 commit comments