Skip to content

Commit

Permalink
add config gem
Browse files Browse the repository at this point in the history
  • Loading branch information
konto-andrzeja committed Jul 2, 2016
1 parent 8081bdf commit 366cc60
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
/log/*
!/log/.keep
/tmp

config/settings.local.yml
config/settings/*.local.yml
config/environments/*.local.yml
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ gem 'puma', '~> 2.9.1'
gem 'capybara'
gem 'poltergeist', '>= 1.9.0'
gem 'launchy'
gem 'config'
7 changes: 6 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ GEM
xpath (~> 2.0)
cliver (0.3.2)
concurrent-ruby (1.0.2)
config (1.2.1)
activesupport (>= 3.0)
deep_merge (~> 1.0, >= 1.0.1)
deep_merge (1.0.1)
erubis (2.7.0)
faker (1.6.3)
i18n (~> 0.5)
Expand Down Expand Up @@ -130,6 +134,7 @@ PLATFORMS
DEPENDENCIES
active_model_serializers
capybara
config
faker
launchy
pg (~> 0.15)
Expand All @@ -138,4 +143,4 @@ DEPENDENCIES
rails (= 4.2.6)

BUNDLED WITH
1.11.2
1.12.3
32 changes: 32 additions & 0 deletions config/initializers/config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Config.setup do |config|
# Name of the constant exposing loaded settings
config.const_name = 'Settings'

# Ability to remove elements of the array set in earlier loaded settings file. For example value: '--'.
#
# config.knockout_prefix = nil

# Load environment variables from the `ENV` object and override any settings defined in files.
#
# config.use_env = false

# Define ENV variable prefix deciding which variables to load into config.
#
# config.env_prefix = 'Settings'

# What string to use as level separator for settings loaded from ENV variables. Default value of '.' works well
# with Heroku, but you might want to change it for example for '__' to easy override settings from command line, where
# using dots in variable names might not be allowed (eg. Bash).
#
# config.env_separator = '.'

# Ability to process variables names:
# * nil - no change
# * :downcase - convert to lower case
#
# config.env_converter = nil

# Parse numeric values as integers instead of strings.
#
# config.env_parse_values = false
end
Empty file added config/settings.yml
Empty file.
Empty file added config/settings/development.yml
Empty file.
Empty file added config/settings/production.yml
Empty file.
Empty file added config/settings/test.yml
Empty file.

0 comments on commit 366cc60

Please sign in to comment.