Sha256: 3afe873f2a61b828bc4f652dd78f9151d6bd20b7e37d5303a6b2d009461c1169

Contents?: true

Size: 372 Bytes

Versions: 2

Compression:

Stored size: 372 Bytes

Contents

module Plug
  class InstallGenerator < Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)

    def copy_initializer_file
      copy_file 'plug.rb', 'config/initializers/plug.rb'
    end

    def mount_engine
      inject_into_file('config/routes.rb', "\n  mount Plug::Engine => '/plug', as: 'plug'\n\n", :before => /^end/)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plug-0.1.9 lib/generators/plug/install_generator.rb
plug-0.1.8 lib/generators/plug/install_generator.rb