Sha256: d6aa62b556fda212ac53f27d6d741fe83ba5f65a3544b163f2d2b06382a85ec5

Contents?: true

Size: 1.06 KB

Versions: 3

Compression:

Stored size: 1.06 KB

Contents

require 'rails'
require 'surveyor_gui'
require 'haml' # required for view resolution

module SurveyorGui
  class Engine < Rails::Engine
    isolate_namespace SurveyorGui
    root = File.expand_path('../../', __FILE__)
    config.autoload_paths << root

    config.to_prepare do
      Dir.glob(root + "/surveyor_gui/models/*.rb").each do |c|
        require_dependency(c)
      end
      Dir.glob(root + "/surveyor_gui/helpers/*.rb").each do |c|
        require_dependency(c)
      end
      Dir.glob(root + "app/facades/*.rb").each do |c|
        require_dependency(c)
      end
      c = Dir.glob(File.expand_path('../',root)+'/app/controllers/surveyor_gui/surveyor_controller.rb').first
      require_dependency(c)
      Dir.glob(File.expand_path('../',root)+'/app/models/*.rb').each do |c|
        require_dependency(c)
      end
    end
    initializer "surveyor_gui.assets.precompile" do |app|
      app.config.assets.precompile += %w[surveyor_all.js surveyor_gui_all.js surveyor_all.css surveyor_gui_all.css surveyor_add_ons.js surveyor_add_ons.css *.png *.gif]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
surveyor_gui-0.1.2 lib/surveyor_gui/engine.rb
surveyor_gui-0.1.1 lib/surveyor_gui/engine.rb
surveyor_gui-0.1.0 lib/surveyor_gui/engine.rb