Sha256: 5627c3ed259a508deae81d033dc0948211fbbf5e793434622c85161b93c8c240

Contents?: true

Size: 865 Bytes

Versions: 8

Compression:

Stored size: 865 Bytes

Contents

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

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

    def copy_mongoid_config
      copy_file 'config/mongoid.yml', 'config/mongoid.yml'
    end

    def copy_assets
      directory 'public', 'public', :recursive => true
      copy_file 'config/assets.yml', 'config/assets.yml'
    end

    def copy_initializers
      copy_file 'config/initializers/carrierwave.rb', 'config/initializers/carrierwave.rb'

      @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'
    end

    def remove_index_html
      remove_file 'public/index.html'
    end

    def show_readme
      readme 'README'
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotive_cms-1.0.0.beta.2 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-1.0.0.beta lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta12 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta11 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta10 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta9 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta8 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta7 lib/generators/locomotive/install/install_generator.rb