diff --git a/.gitignore b/.gitignore index dcf3f175f7..904f0be684 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ /db/test.sqlite3-journal -config/application.rb -config/config.yml config/env_vars.rb -config/secrets.yml -config/database.yml config/piwik.yml /vendor/cache /vendor/cache-old diff --git a/config/cloudinary.yml.example b/config/cloudinary.yml.example deleted file mode 100644 index ce0dec090f..0000000000 --- a/config/cloudinary.yml.example +++ /dev/null @@ -1,4 +0,0 @@ -production: - cloud_name: "sample" - api_key: "874837483274837" - api_secret: "a676b67565c6767a6767d6767f676fe1" diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 0000000000..a23b51194f --- /dev/null +++ b/config/database.yml @@ -0,0 +1,30 @@ +# SQLite version 3.x +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' + +development: + adapter: sqlite3 + database: db/development.sqlite3 + pool: 5 + timeout: 5000 + +## Warning: The database defined as "test" will be erased and +## re-generated from your development database when you run "rake". +## Do not set this db to the same as development or production. +test: + adapter: sqlite3 + database: db/test.sqlite3 + pool: 5 + timeout: 5000 + +production: + adapter: mysql2 + database: osem1prod + host: localhost + port: 3306 + username: osem1prod + password: <%= ENV['PRODUCTION_DB_PASS'] %> + charset: utf8 + collation: utf8_bin diff --git a/config/database.yml.example b/config/database.yml.example deleted file mode 100644 index 51a4dd459d..0000000000 --- a/config/database.yml.example +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/config/piwik.yml.example b/config/piwik.yml.example deleted file mode 100644 index f70e1f1e2b..0000000000 --- a/config/piwik.yml.example +++ /dev/null @@ -1,33 +0,0 @@ -# Configuration: -# -# disabled -# false if tracking tag should be shown -# use_async -# Set to true if you want to use asynchronous tracking -# url -# The url of your piwik instance (e.g. localhost/piwik/ -# id_site -# The id of your website inside Piwik -# -production: - piwik: - id_site: 1 - url: localhost - use_async: false - disabled: false - -development: - piwik: - id_site: 1 - url: localhost - disabled: true - use_async: false - hostname: localhost - -test: - piwik: - id_site: 1 - url: localhost - disabled: true - use_async: false - hostname: localhost diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 index 0000000000..e1fd8a931f --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,58 @@ +defaults: &defaults + # You can generate secret keys with 'rake secret' + +development: + <<: *defaults + secret_key_base: ccee5dcd24e804579b76bde90c06cb063fd3bade1fb3705996acba00c99a7a4397b45cf8a6e0f85a61e360f112b3a0d845d275381bf386c84a12077b1a7016c0 + devise_secret_key: 4ba3396d61a22f200176346e71c0df8437c0fc6b91ea2b101dc2d7984b46808eb3a4f3b9727f222566deecdceed41740c1a817477ef31ebe29ec3eca4a7f4900 + + # Sample data so that mocks work + google_key: 'sample' + google_secret: 'sample' + + facebook_key: 'sample' + facebook_secret: 'sample' + + suse_key: 'sample' + suse_secret: 'sample' + +test: + <<: *defaults + secret_key_base: 935635a16c57347ca66b874398b5a580f48b63a0659254d3c1d799b02cb39ec122e22df47f8e9950af4baf993968d6590903111659fe017314b43a24cff4575e + devise_secret_key: df7ccc4a7b92f580ebe30bcd44147a9f10ad63132c111bcb8554ddf404289dbcfa584b86c6fd02744df733dfa91c4cd0440fe6bb10bb4f125ead5b74dbefb797 + +production: + <<: *defaults + + # For rails cookies + secret_key_base: ENV['RAILS_SECRET_KEY_BASE'] + + # For devise login tokens + devise_secret_key: ENV['DEVISE_SECRET'] + + # Leave the variables' names empty, unless you use the providers, in which case you need to + # register your applicaton and add the actual keys. + + # If you add more providers, keep the format of the variables: provider_key, provider_secret + + # Register your appllication with Google from https://code.google.com/apis/console#:access + google_key: '' + google_secret: '' + + # Register your application with Facebook from https://developers.facebook.com/ + facebook_key: '' + facebook_secret: '' + + # Developers do not need to register their application for suse account to work. + # You must, however, add some sample value to the variables, for the login option to appear. + # For example: + #suse_key: 'sample data' + #suse_secret: 'sample data' + suse_key: '' + suse_secret: '' + + # Register your application with GitHub from https://github.com/settings/applications + github_key: '' + github_secret: '' + + # If you add more providers that do not require a key, you still have to create the 2 variables with sample data