Sha256: 115d76c6f0758aa70d25f6de4b9451bab4dc7633800ed18782c994a20a66ffc3

Contents?: true

Size: 963 Bytes

Versions: 3

Compression:

Stored size: 963 Bytes

Contents

require "<%= namespaced_name %>/configuration"

<%= wrap_in_modules <<-rb.strip_heredoc
  class Engine < ::Rails::Engine
  #{mountable? ? '  isolate_namespace ' + camelized_modules : ' '}
  #{api? ? "  config.generators.api_only = true" : ' '}
    \n
    # Initialize engine dependencies on wrapper application
    Gem.loaded_specs["#{ name }"].dependencies.each do |d|
      begin
        require d.name
      rescue LoadError => e
        # Put exceptions here.
      end
    end
    \n
    # Uncomment if migrations need to be shared
    # initializer :append_migrations do |app|
    #   unless app.root.to_s.match root.to_s
    #     config.paths["db/migrate"].expanded.each do |expanded_path|
    #       app.config.paths["db/migrate"] << expanded_path
    #     end
    #   end
    # end
    \n
    config.to_prepare do
      # Dir[Engine.root.join("{app,lib}/**/*_decorator.rb")].each do |c|
      #   require_dependency(c)
      # end
    end
  end
rb
%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pluginizer-0.2.2 templates/lib/%namespaced_name%/engine.rb.tt
pluginizer-0.2.1 templates/lib/%namespaced_name%/engine.rb.tt
pluginizer-0.2.0 templates/lib/%namespaced_name%/engine.rb.tt