Make use of dotenv

This commit is contained in:
Henne Vogelsang 2016-04-22 16:14:41 +02:00
parent fee8adba4b
commit d79a9b6fc1
4 changed files with 60 additions and 0 deletions

5
.gitignore vendored
View file

@ -31,3 +31,8 @@ pickle-email-*.html
/doc/app /doc/app
.ruby-version .ruby-version
.vagrant/ .vagrant/
.env
.env.production
.env.development
.env.test
.env.local

View file

@ -171,6 +171,10 @@ gem 'ruby-oembed'
# for uploading images to the cloud # for uploading images to the cloud
gem 'cloudinary' gem 'cloudinary'
# for setting app configuration in the environment
gem 'dotenv-rails'
# Use guard and spring for testing in development
group :development do group :development do
# to launch specs when files are modified # to launch specs when files are modified
gem 'guard-rspec', '~> 4.2.8' gem 'guard-rspec', '~> 4.2.8'

View file

@ -162,6 +162,10 @@ GEM
docile (1.1.5) docile (1.1.5)
domain_name (0.5.20160310) domain_name (0.5.20160310)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
dotenv (2.1.1)
dotenv-rails (2.1.1)
dotenv (= 2.1.1)
railties (>= 4.0, < 5.1)
erubis (2.7.0) erubis (2.7.0)
execjs (2.6.0) execjs (2.6.0)
factory_girl (4.5.0) factory_girl (4.5.0)
@ -544,6 +548,7 @@ DEPENDENCIES
delayed_job_active_record delayed_job_active_record
devise devise
devise_ichain_authenticatable devise_ichain_authenticatable
dotenv-rails
factory_girl_rails factory_girl_rails
font-awesome-rails font-awesome-rails
formtastic (~> 3.1.1) formtastic (~> 3.1.1)

46
dotenv.example Normal file
View file

@ -0,0 +1,46 @@
# Set environment variables for OSEM in this file
# and copy it to .env or .env.rails_environment
# (like env.production or env.development)
#
# The following is a list of variables and default
# values that OSEM uses to configure some aspects
# of the app
# The name of your page
OSEM_NAME="OSEM"
# The host this OSEM instance runs on. Used for
# generating urls in emails sent
OSEM_HOSTNAME="localhost:3000"
# The address OSEM uses for sending mails
OSEM_EMAIL_ADDRESS="no-reply@localhost"
# The api key for transifex.com.
# See TRANSLATION.md for details
OSEM_TRANSIFEX_APIKEY=""
# The errbit host to post exceptions to
OSEM_ERRBIT_HOST=""
# The api key for the errbit host
OSEM_ERRBIT_APIKEY=""
# OMNIAUTH Developer Key/Secret for GOOGLE
OSEM_GOOGLE_KEY=''
OSEM_GOOGLE_SECRET=''
# OMNIAUTH Developer Key/Secret for Facebook
OSEM_FACEBOOK_KEY=''
OSEM_FACEBOOK_SECRET=''
# OMNIAUTH Developer Key/Secret for GitHub
OSEM_GITHUB_KEY=''
OSEM_GITHUB_SECRET=''
# Disable linting of factories in the test suite.
# Speeds up turn around times of tests
OSEM_FACTORY_LINT="false"
# Enable the usage of the devise ichain plugin
OSEM_ICHAIN_ENABLED=false