Sha256: 2eb94b1f4417982ee9f374290e36f7f9fda3ae2adc00eed926d6a15d4dde1fc9

Contents?: true

Size: 928 Bytes

Versions: 3

Compression:

Stored size: 928 Bytes

Contents

require 'warden'
require 'pg'
require 's3'
require 'kaminari'
require 'observejs'
require 'pg_search'

module Ecrire
  class Application < Rails::Application
    require 'ecrire/config/environment'

    alias :require_environment! :initialize!

    initializer 'ecrire.secrets', before: :bootstrap_hook do |app|
      app.paths.add 'config/secrets', with: Dir.pwd + '/secrets.yml'
    end

    Rails.application.paths.add 'config/database', with: Dir.pwd + '/secrets.yml'

    if File.exist?(Dir.pwd + '/secrets.yml')
      require 'ecrire/theme/engine'
    else
      require 'ecrire/onboarding/engine'
    end

    def paths
      @paths ||= begin
         paths = super
         paths.add 'config/routes.rb', with: 'routes.rb'
         paths.add 'config/locales', with: 'locales', glob: "**/*.{rb,yml}"
         paths
       end
    end

    def self.onboarding?
      defined?(Ecrire::Onboarding::Engine)
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ecrire-0.26.2 lib/ecrire/application.rb
ecrire-0.26.1 lib/ecrire/application.rb
ecrire-0.26.0 lib/ecrire/application.rb