Sha256: 7574e491ea0906f6662322a9aed1d7eb80b7ad36cc16484c5a0ec57c274a5021

Contents?: true

Size: 1.17 KB

Versions: 23

Compression:

Stored size: 1.17 KB

Contents

module MyDashboard
  class Railtie < ::Rails::Railtie

    initializer 'configure assets' do |app|
      app.configure do
        config.assets.paths.unshift       MyDashboard::Engine.root.join('vendor', 'assets', 'fonts', 'my_dashboard')
        config.assets.paths.unshift       MyDashboard::Engine.root.join('vendor', 'assets', 'javascripts', 'my_dashboard')
        config.assets.paths.unshift       MyDashboard::Engine.root.join('vendor', 'assets', 'stylesheets', 'my_dashboard')
        config.assets.paths.unshift       MyDashboard.config.widgets_js_path
        config.assets.paths.unshift       MyDashboard.config.widgets_css_path

        config.assets.precompile << /\.(?:svg|eot|woff|ttf)$/
      end
    end

    initializer 'require my_dashboard jobs' do
      Dir[MyDashboard.config.jobs_path.join('**', '*.rb')].each { |file| require file }
    end

    initializer 'fix redis child connection' do
      if defined?(::PhusionPassenger)
        ::PhusionPassenger.on_event(:starting_worker_process) do |forked|
          if forked
            ::MyDashboard.redis.client.disconnect
            ::MyDashboard.redis.client.connect
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
my_dashboard-0.8.6 lib/my_dashboard/railtie.rb
my_dashboard-0.8.5 lib/my_dashboard/railtie.rb
my_dashboard-0.8.4 lib/my_dashboard/railtie.rb
my_dashboard-0.8.3 lib/my_dashboard/railtie.rb
my_dashboard-0.8.1 lib/my_dashboard/railtie.rb
my_dashboard-0.8.0 lib/my_dashboard/railtie.rb
my_dashboard-0.7.2 lib/my_dashboard/railtie.rb
my_dashboard-0.7.1 lib/my_dashboard/railtie.rb
my_dashboard-0.7.0 lib/my_dashboard/railtie.rb
my_dashboard-0.6.0 lib/my_dashboard/railtie.rb
my_dashboard-0.5.10 lib/my_dashboard/railtie.rb
my_dashboard-0.5.9 lib/my_dashboard/railtie.rb
my_dashboard-0.5.8 lib/my_dashboard/railtie.rb
my_dashboard-0.5.7 lib/my_dashboard/railtie.rb
my_dashboard-0.5.6 lib/my_dashboard/railtie.rb
my_dashboard-0.5.5 lib/my_dashboard/railtie.rb
my_dashboard-0.5.4 lib/my_dashboard/railtie.rb
my_dashboard-0.5.3 lib/my_dashboard/railtie.rb
my_dashboard-0.5.2 lib/my_dashboard/railtie.rb
my_dashboard-0.5.1 lib/my_dashboard/railtie.rb