Sha256: 89a2a1d6a71c1579c00312651f1a725bbf06d63b95ff42e5f43c960aee1b7b20

Contents?: true

Size: 683 Bytes

Versions: 1

Compression:

Stored size: 683 Bytes

Contents

module Secondbureau
  class MountRailsInfoGenerator < Rails::Generators::Base

    def mount_sextant_route
      sextant_route = "\tmount_sextant if Rails.env.development?\n"
      inject_into_file 'config/routes.rb', sextant_route, :after => "Application.routes.draw do\n"
      sextant_route = "\tmount Secondbureau::Engine => 'secondbureau/' if Rails.env.development?\n"
      inject_into_file 'config/routes.rb', sextant_route, :after => "mount_sextant if Rails.env.development?\n"
    end

    def add_sextant_to_gemfile
      append_file 'Gemfile', <<-GEMS
gem 'sextant', group: :development
      GEMS
    end

    def run_bundle
      run "bundle install"
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
secondbureau-0.0.4 lib/generators/secondbureau/mount_rails_info_generator.rb