Sha256: c97967b205fc2dee29fbdf49cf7bf35e1c0da6d9ea3df2df2e6736147e33adb2

Contents?: true

Size: 810 Bytes

Versions: 14

Compression:

Stored size: 810 Bytes

Contents

# Exception raised when a `Rails::Engine` has left its `'app/concerns'` path as `eager_load: true`
class Metasploit::Concern::Error::EagerLoad < Metasploit::Concern::Error::Base
  # @param engine [Rails::Engine] `Rails::Engine` where `engine.paths['app/concerns'].eager_load?` is `true`.
  def initialize(engine)
    @engine = engine
    engine_name = engine.class.name
    super(
        "#{engine_name}'s `app/concerns` is marked as `eager_load: true`.  This will cause circular dependency " \
        "errors when the concerns are loaded.  Declare `app/concerns` to stop it from inheriting `eager_load: true` " \
        "from `app`: \n" \
        "\n" \
        "  class #{engine_name} < Rails::Engine\n" \
        "    config.paths.add 'app/concerns', autoload: true\n" \
        "  end\n"
    )
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
metasploit-concern-5.0.3 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-5.0.2 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-5.0.1 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-5.0.0 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-4.0.5 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-4.0.4 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-4.0.3 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-4.0.2 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-4.0.1 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-4.0.0 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-3.0.2 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-3.0.1 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-3.0.0 lib/metasploit/concern/error/eager_load.rb
metasploit-concern-2.0.5 lib/metasploit/concern/error/eager_load.rb