Sha256: 4299e9e3a229f1571ed6abefb6e51dd114428eaafc3d7d7c21afd6a60252b7f4

Contents?: true

Size: 1.12 KB

Versions: 14

Compression:

Stored size: 1.12 KB

Contents

module Decko
  # decko configuration (also see cardio/railtie)
  class Railtie < Rails::Railtie
    config.assets.enabled = false
    # config.assets.version = "1.0" # does the version matter if not enabled??

    config.before_configuration do |app|
      gem_root = Decko.gem_root
      app.config.tap do |c|
        c.allow_concurrency = false
        c.filter_parameters += [:password]
        c.autoload_paths += Dir["#{gem_root}/lib"]

        c.paths.tap do |p|
          # if this directory is named lib/tasks, it will get run by decko/engine,
          # which currently breaks because of the aliases to card tasks, which
          # aren't available there.
          #
          # Ideally we'd fix that and follow the naming convention.
          p["lib/tasks"] << "#{gem_root}/lib/rake_tasks"

          p["config/environments"].unshift "#{gem_root}/config/environments"
          p["config/initializers"].unshift "#{gem_root}/config/initializers"

          unless p["config/routes.rb"].existent.present?
            p["config/routes.rb"] << "#{gem_root}/config/application_routes.rb"
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
decko-0.16.0 lib/decko/railtie.rb
decko-0.15.6 lib/decko/railtie.rb
decko-0.15.5 lib/decko/railtie.rb
decko-0.15.4 lib/decko/railtie.rb
decko-0.15.3 lib/decko/railtie.rb
decko-0.15.2.pre1 lib/decko/railtie.rb
decko-0.15.1.1 lib/decko/railtie.rb
decko-0.15.1 lib/decko/railtie.rb
decko-0.15.0 lib/decko/railtie.rb
decko-0.14.2 lib/decko/railtie.rb
decko-0.14.1 lib/decko/railtie.rb
decko-0.14.0 lib/decko/railtie.rb
decko-0.13.4 lib/decko/railtie.rb
decko-0.13.3 lib/decko/railtie.rb