configured settings & secrets
This commit is contained in:
parent
f076db259f
commit
465b465528
3
.gitignore
vendored
3
.gitignore
vendored
@ -54,3 +54,6 @@ application.yml
|
|||||||
|
|
||||||
# Ignore Byebug command history file.
|
# Ignore Byebug command history file.
|
||||||
.byebug_history
|
.byebug_history
|
||||||
|
|
||||||
|
# Ignore application configuration
|
||||||
|
/config/application.yml
|
||||||
|
1
Gemfile
1
Gemfile
@ -1,6 +1,7 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'figaro', '~> 1.1.1'
|
gem 'figaro', '~> 1.1.1'
|
||||||
|
gem 'settingslogic', '~> 2.0.9'
|
||||||
gem 'bcrypt', '~> 3.1.7'
|
gem 'bcrypt', '~> 3.1.7'
|
||||||
gem 'mysql2', '>= 0.3.18', '< 0.5'
|
gem 'mysql2', '>= 0.3.18', '< 0.5'
|
||||||
gem 'rails', '~> 5.0.0'
|
gem 'rails', '~> 5.0.0'
|
||||||
|
@ -209,6 +209,7 @@ GEM
|
|||||||
sprockets (>= 2.8, < 4.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
sprockets-rails (>= 2.0, < 4.0)
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
tilt (>= 1.1, < 3)
|
tilt (>= 1.1, < 3)
|
||||||
|
settingslogic (2.0.9)
|
||||||
shellany (0.0.1)
|
shellany (0.0.1)
|
||||||
slop (3.6.0)
|
slop (3.6.0)
|
||||||
spring (1.7.2)
|
spring (1.7.2)
|
||||||
@ -274,6 +275,7 @@ DEPENDENCIES
|
|||||||
rails-erd
|
rails-erd
|
||||||
rubocop (~> 0.42.0)
|
rubocop (~> 0.42.0)
|
||||||
sass-rails (~> 5.0)
|
sass-rails (~> 5.0)
|
||||||
|
settingslogic (~> 2.0.9)
|
||||||
spring
|
spring
|
||||||
spring-watcher-listen (~> 2.0.0)
|
spring-watcher-listen (~> 2.0.0)
|
||||||
turbolinks (~> 5)
|
turbolinks (~> 5)
|
||||||
|
6
app/services/skill_config.rb
Normal file
6
app/services/skill_config.rb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
class SkillConfig < Settingslogic
|
||||||
|
source "#{Rails.root}/config/application.yml"
|
||||||
|
namespace Rails.env
|
||||||
|
suppress_errors Rails.env.production?
|
||||||
|
load!
|
||||||
|
end
|
21
config/application.yml.sample
Normal file
21
config/application.yml.sample
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Add configuration values here, as shown below.
|
||||||
|
|
||||||
|
defaults: &defaults
|
||||||
|
mysql_host: "localhost"
|
||||||
|
mysql_usr: "user"
|
||||||
|
mysql_pwd: "password"
|
||||||
|
mailjet_key: "api-key"
|
||||||
|
mailjet_secret: "api-secret"
|
||||||
|
default_mail_from: "skills-assessment@dev.perficientxd.com"
|
||||||
|
|
||||||
|
development:
|
||||||
|
<<: *defaults
|
||||||
|
|
||||||
|
test:
|
||||||
|
<<: *defaults
|
||||||
|
|
||||||
|
production:
|
||||||
|
<<: *defaults
|
||||||
|
mysql_usr: "user"
|
||||||
|
mysql_pwd: "password!"
|
||||||
|
secret_key_base: "super-long-secret-key-base"
|
@ -13,9 +13,9 @@ default: &default
|
|||||||
adapter: mysql2
|
adapter: mysql2
|
||||||
encoding: utf8
|
encoding: utf8
|
||||||
pool: 5
|
pool: 5
|
||||||
username: root
|
host: <%= ENV['mysql_host'] %>
|
||||||
password: root
|
username: <%= ENV['mysql_usr'] %>
|
||||||
host: localhost
|
password: <%= ENV['mysql_pwd'] %>
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *default
|
<<: *default
|
||||||
@ -50,5 +50,5 @@ test:
|
|||||||
production:
|
production:
|
||||||
<<: *default
|
<<: *default
|
||||||
database: skill-assessment-app_production
|
database: skill-assessment-app_production
|
||||||
username: skill-assessment-app
|
username: <%= ENV['mysql_usr'] %>
|
||||||
password: <%= ENV['SKILL-ASSESSMENT-APP_DATABASE_PASSWORD'] %>
|
password: <%= ENV['mysql_pwd'] %>
|
||||||
|
Loading…
Reference in New Issue
Block a user