Sha256: c2332f4020fbdc5aa5ac562345eb642e36faa5720d622daad2a84281ee6f43cc

Contents?: true

Size: 635 Bytes

Versions: 3

Compression:

Stored size: 635 Bytes

Contents

module WebValve
  class Railtie < ::Rails::Railtie
    if WebValve.enabled?
      initializer 'webvalve.set_autoload_paths', before: :set_autoload_paths do |app|
        WebValve.config_paths << app.root

        WebValve.config_paths.each do |root|
          app.config.eager_load_paths << root.join('webvalve').to_s
        end
      end

      initializer 'webvalve.setup' do
        WebValve.config_paths.each do |root|
          path = root.join('config', 'webvalve.rb').to_s
          load path if File.exist?(path)
        end

        config.after_initialize do
          WebValve.setup
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
webvalve-0.9.6 lib/webvalve/railtie.rb
webvalve-0.9.5 lib/webvalve/railtie.rb
webvalve-0.9.4 lib/webvalve/railtie.rb