Sha256: 524349ca5372b5df770f77e881833d311974d27a48abb575a469717870c76bc7

Contents?: true

Size: 924 Bytes

Versions: 13

Compression:

Stored size: 924 Bytes

Contents

module Locomotive
  class InstallGenerator < Rails::Generators::Base

    source_root File.expand_path('../../../../../', __FILE__)

    def copy_initializers
      @source_paths = nil # reset it for the find_in_source_paths method

      Locomotive::InstallGenerator.source_root(File.expand_path('../templates', __FILE__))

      template 'locomotive.rb', 'config/initializers/locomotive.rb'

      template 'carrierwave.rb', 'config/initializers/carrierwave.rb'

      template 'dragonfly.rb', 'config/initializers/dragonfly.rb'

      template 'mongoid.yml', 'config/mongoid.yml'
    end

    def insert_engine_routes
      route %(
  mount Locomotive::Engine => '/locomotive', :as => 'locomotive' # you can change the value of the path, by default set to "/locomotive"
      )
    end

    def remove_index_html
      remove_file 'public/index.html'
    end

    def show_readme
      readme 'README'
    end

  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
tribeca_cms-0.1.1 lib/generators/locomotive/install/install_generator.rb
tribeca_cms-2.0.0.rc12 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc12 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc11 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc10 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc9 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc8 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc7 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc6 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc5 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc4 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc2 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-2.0.0.rc1 lib/generators/locomotive/install/install_generator.rb