Sha256: 65356a82490046757c274fc2cc4c8406c43567b898b7e0c51434a13373a883ac

Contents?: true

Size: 525 Bytes

Versions: 17

Compression:

Stored size: 525 Bytes

Contents

class JobNotifier::InstallGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def create_initializer
    template "initializer.rb", "config/initializers/job_notifier.rb"
  end

  def mount_routes
    line = "Rails.application.routes.draw do\n"
    inject_into_file "config/routes.rb", after: line do <<-"HERE".gsub(/^ {4}/, '')
      mount JobNotifier::Engine => "/job_notifier"
    HERE
    end
  end

  def copy_engine_migrations
    rake "railties:install:migrations"
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
job_notifier-3.0.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-2.0.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.5.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.4.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.3.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.2.4 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.2.3 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.2.2 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.2.1 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.2.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.1.1 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.1.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-1.0.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-0.2.1 lib/generators/job_notifier/install/install_generator.rb
job_notifier-0.2.0 lib/generators/job_notifier/install/install_generator.rb
job_notifier-0.1.1 lib/generators/job_notifier/install/install_generator.rb
job_notifier-0.1.0 lib/generators/job_notifier/install/install_generator.rb