]> git.openstreetmap.org Git - rails.git/blob - config/initializers/config.rb
caaab0c2f838415178721bca7535a196dddaac77
[rails.git] / config / initializers / config.rb
1 Config.setup do |config|
2   # Name of the constant exposing loaded settings
3   config.const_name = "Settings"
4
5   # Ability to remove elements of the array set in earlier loaded settings file. For example value: '--'.
6   #
7   # config.knockout_prefix = nil
8
9   # Overwrite an existing value when merging a `nil` value.
10   # When set to `false`, the existing value is retained after merge.
11   #
12   # config.merge_nil_values = true
13
14   # Overwrite arrays found in previously loaded settings file. When set to `false`, arrays will be merged.
15   #
16   # config.overwrite_arrays = true
17
18   # Load environment variables from the `ENV` object and override any settings defined in files.
19   #
20   # config.use_env = false
21
22   # Define ENV variable prefix deciding which variables to load into config.
23   #
24   # config.env_prefix = 'Settings'
25
26   # What string to use as level separator for settings loaded from ENV variables. Default value of '.' works well
27   # with Heroku, but you might want to change it for example for '__' to easy override settings from command line, where
28   # using dots in variable names might not be allowed (eg. Bash).
29   #
30   # config.env_separator = '.'
31
32   # Ability to process variables names:
33   #   * nil  - no change
34   #   * :downcase - convert to lower case
35   #
36   # config.env_converter = :downcase
37
38   # Parse numeric values as integers instead of strings.
39   #
40   # config.env_parse_values = true
41
42   # Validate presence and type of specific config values. Check https://github.com/dry-rb/dry-validation for details.
43   #
44   config.schema do
45     required(:api_version).filled(:str?)
46     required(:max_request_area).filled(:number?)
47     required(:max_note_request_area).filled(:number?)
48     required(:tracepoints_per_page).filled(:int?)
49     required(:max_number_of_way_nodes).filled(:int?)
50     required(:api_timeout).filled(:int?)
51     required(:imagery_blacklist).maybe(:array?)
52   end
53 end