Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Update management of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
joegatt committed Sep 6, 2013
1 parent f074ffe commit 12a4a76
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 31 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ doc/
*~
.project
.DS_Store
.ruby-*

# Ignore files with passwords etc (except sample and model files)
secret*
/config/secret.yml
!secret.rb
!secret_token.rb
!secret*.example
!secret.sample.yml

# Ignore resource files
/public/resources/*/*.*
Expand All @@ -30,4 +31,4 @@ secret*
trial

* Ignore coverage
coverage
coverage
Binary file removed app/assets/images/rails.png
Binary file not shown.
Binary file added app/assets/images/static/debug-bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion app/models/secret.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
class Secret < Settingslogic
source "#{Rails.root}/config/secret.yml"
secret_file = "#{ Rails.root }/config/secret.yml"
secret_sample_file = "#{ Rails.root }/config/secret.sample.yml"
source_file = (File.exists? secret_file) ? secret_file : secret_sample_file

source source_file
namespace Rails.env
end
2 changes: 1 addition & 1 deletion app/models/settings.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Settings < Settingslogic
source "#{Rails.root}/config/nembrot.yml"
source "#{ Rails.root }/config/settings.yml"
namespace Rails.env
end
26 changes: 0 additions & 26 deletions config/html5_rails.yml

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit 12a4a76

Please sign in to comment.