Sha256: 0921f4d60dbca29a7fb01e6d841bf76a5bebed29bb3a56a4200bbb50bf38cc80

Contents?: true

Size: 777 Bytes

Versions: 6

Compression:

Stored size: 777 Bytes

Contents

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

    def self.source_root
      @_locomotive_source_root ||= File.expand_path('../templates', __FILE__)
    end

    def copy_initializer
      template 'locomotive.rb', 'config/initializers/locomotive.rb'
    end

    def seed_db
      append_file 'db/seeds.rb', %{
# Uncomment the following lines if you want to create the first website / account
#account = Account.create! :name => 'Admin', :email => 'admin@example.com', :password => 'locomotive', :password_confirmation => 'locomotive'
#site = Site.new :name => 'Locomotive test website', :subdomain => 'test'
#site.memberships.build :account => account, :admin => true
#site.save!}
    end

    def show_readme
      readme 'README'
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
locomotive_cms-0.0.4.beta5 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta4 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta3 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta2 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4.beta1 lib/generators/locomotive/install/install_generator.rb
locomotive_cms-0.0.4 lib/generators/locomotive/install/install_generator.rb