Sha256: 71022939e94e5b5cde14e8540a6c22c0da98da6908aad820b4874e3900de7e44

Contents?: true

Size: 583 Bytes

Versions: 11

Compression:

Stored size: 583 Bytes

Contents

module Delayed
  module Web
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)
      desc 'Installs Delayed::Web'

      def install
        template 'initializer.rb', 'config/initializers/delayed_web.rb'
        route 'mount Delayed::Web::Engine, at: \'/jobs\''
        if assets?
          application "config.assets.precompile << 'delayed/web/application.css'"
        end
      end

    private

      def assets?
        Rails::Generators.options.fetch(:rails, {}).fetch(:assets, false)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
delayed-web-0.4.9 lib/generators/delayed/web/install_generator.rb
delayed-web-0.4.7 lib/generators/delayed/web/install_generator.rb
delayed-web-0.4.6 lib/generators/delayed/web/install_generator.rb
delayed-web-0.4.5 lib/generators/delayed/web/install_generator.rb
delayed-web-0.4.4 lib/generators/delayed/web/install_generator.rb
delayed-web-0.4.3 lib/generators/delayed/web/install_generator.rb
delayed-web-0.4.2 lib/generators/delayed/web/install_generator.rb
delayed-web-0.4.1 lib/generators/delayed/web/install_generator.rb
delayed-web-0.4.0 lib/generators/delayed/web/install_generator.rb
delayed-web-0.3.0 lib/generators/delayed/web/install_generator.rb
delayed-web-0.2.0 lib/generators/delayed/web/install_generator.rb