From d79a9b6fc1d0f75bf0c351b8db054d9578de2574 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Fri, 22 Apr 2016 16:14:41 +0200 Subject: [PATCH] Make use of dotenv --- .gitignore | 5 +++++ Gemfile | 4 ++++ Gemfile.lock | 5 +++++ dotenv.example | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 dotenv.example diff --git a/.gitignore b/.gitignore index ea3e8de3..4d5fd427 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,8 @@ pickle-email-*.html /doc/app .ruby-version .vagrant/ +.env +.env.production +.env.development +.env.test +.env.local diff --git a/Gemfile b/Gemfile index 20b346f1..93505e29 100644 --- a/Gemfile +++ b/Gemfile @@ -171,6 +171,10 @@ gem 'ruby-oembed' # for uploading images to the cloud gem 'cloudinary' +# for setting app configuration in the environment +gem 'dotenv-rails' + +# Use guard and spring for testing in development group :development do # to launch specs when files are modified gem 'guard-rspec', '~> 4.2.8' diff --git a/Gemfile.lock b/Gemfile.lock index fe930585..95f4f966 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -162,6 +162,10 @@ GEM docile (1.1.5) domain_name (0.5.20160310) 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) execjs (2.6.0) factory_girl (4.5.0) @@ -544,6 +548,7 @@ DEPENDENCIES delayed_job_active_record devise devise_ichain_authenticatable + dotenv-rails factory_girl_rails font-awesome-rails formtastic (~> 3.1.1) diff --git a/dotenv.example b/dotenv.example new file mode 100644 index 00000000..bee645ee --- /dev/null +++ b/dotenv.example @@ -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