Sha256: 605c8fd991eb87c3b159ec2ad99870269801648c05b2c69058c20743193f866e

Contents?: true

Size: 1.32 KB

Versions: 65

Compression:

Stored size: 1.32 KB

Contents

class TrustyCmsGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)
  argument :project_name, type: :string, default: "trusty"

  def generate_config
    template "Rakefile.erb", "Rakefile"
    template "config.ru.erb", "config.ru"

    template "boot.rb.erb", "config/boot.rb"
    template "environment.rb.erb", "config/environment.rb"
    template "application.rb.erb", "config/application.rb"
    template "preinitializer.rb.erb", "config/preinitializer.rb"
    template "routes.rb.erb", "config/routes.rb"
    template "database.yml.erb", "config/database.yml"

    template "environments/development.rb.erb", "config/environments/development.rb"
    template "environments/test.rb.erb", "config/environments/test.rb"
    template "environments/production.rb.erb", "config/environments/production.rb"

    template "initializers/trusty_cms_config.rb.erb", "config/initializers/trusty_cms_config.rb"
    template "initializers/secret_token.rb.erb", "config/initializers/secret_token.rb"
    template "initializers/session_store.rb.erb", "config/initializers/session_store.rb"

    remove_file 'app/controllers/application_controller.rb'
    remove_file 'app/helpers/application_helper.rb'
    remove_file 'app/assets/javascripts/application.js'
    remove_file 'app/views/layouts/application.html.erb'
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
trusty-cms-7.0.22 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.21 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.20 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.19 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.18 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.17 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.16 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.14 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.13 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.12 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.15 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.9.1 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.11 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.10 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.9 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.8 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.7 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.6 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.5 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-7.0.4 lib/generators/trusty_cms/trusty_cms_generator.rb