Class: Ecrire::Configuration
- Inherits:
-
Rails::Application::Configuration
- Object
- Rails::Application::Configuration
- Ecrire::Configuration
- Defined in:
- lib/ecrire/configuration.rb
Instance Method Summary collapse
- #database_configuration ⇒ Object
-
#paths ⇒ Object
Return paths based off Rails default plus some customization.
- #secret_key_base ⇒ Object
- #secret_token ⇒ Object
Instance Method Details
#database_configuration ⇒ Object
32 33 34 35 36 |
# File 'lib/ecrire/configuration.rb', line 32 def database_configuration { Rails.env => Ecrire::Application.secrets.database } end |
#paths ⇒ Object
Return paths based off Rails default plus some customization.
These paths are Ecrire’s, not the users’s theme.
For the user’s paths, look at Ecrire::Theme::Engine.paths
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ecrire/configuration.rb', line 19 def paths @paths ||= begin paths = super paths.add 'config/secrets', with: Ecrire::Theme.path + 'secrets.yml' paths.add 'config/database', with: Ecrire::Theme.path + 'secrets.yml' paths.add 'config/routes.rb', with: 'routes.rb' paths.add 'config/locales', with: 'locales', glob: "**/*.{rb,yml}" paths.add 'lib/tasks', with: 'tasks', glob: '**/*.rake' paths end end |
#secret_key_base ⇒ Object
4 5 6 |
# File 'lib/ecrire/configuration.rb', line 4 def secret_key_base SecureRandom.hex(16) end |
#secret_token ⇒ Object
8 9 10 |
# File 'lib/ecrire/configuration.rb', line 8 def secret_token SecureRandom.hex(16) end |