Sha256: f74ee6be60f4089275efb638dc49f2486aca2bc05276036331edae2fe2f3622a

Contents?: true

Size: 702 Bytes

Versions: 8

Compression:

Stored size: 702 Bytes

Contents

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

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

    initializer 'webvalve.setup', after: :load_config_initializers do
      if WebValve.enabled?
        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

8 entries across 8 versions & 1 rubygems

Version Path
webvalve-1.0.1 lib/webvalve/railtie.rb
webvalve-1.0.0 lib/webvalve/railtie.rb
webvalve-0.12.0 lib/webvalve/railtie.rb
webvalve-0.11.0 lib/webvalve/railtie.rb
webvalve-0.10.0 lib/webvalve/railtie.rb
webvalve-0.9.10 lib/webvalve/railtie.rb
webvalve-0.9.9 lib/webvalve/railtie.rb
webvalve-0.9.8 lib/webvalve/railtie.rb