Sha256: 34955a8f76f778fc5e407cb9c2d7cc525e451fb4a2928a5566c0ff96c8047f7a

Contents?: true

Size: 834 Bytes

Versions: 1

Compression:

Stored size: 834 Bytes

Contents

require 'discard'
require 'digest'

module Hist
  class Engine < ::Rails::Engine
    isolate_namespace Hist

    engine_name 'hist'

    config.autoload_paths += %W(
    #{config.root}/app/controllers/concerns
      #{config.root}/app/models/concerns
      #{config.root}/lib/form_builders
      #{config.root}/app/workers
    )

    initializer "hist" do |app|
      # use a proc instead of a string
      app.config.assets.precompile << proc { |path| path =~ /\hist\/.+\.(eot|svg|ttf|woff|png|css|js)\z/ }
    end

    # Could we just run "load_tasks" here instead?
    # This makes our rake tasks visible.
    rake_tasks do
      Dir.chdir(File.expand_path(File.join(File.dirname(__FILE__), '..'))) do
        Dir.glob(File.join('tasks', '*.rake')).each do |railtie|
          load railtie
        end
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hist-0.2.0 lib/hist/engine.rb