Sha256: 6b2d2828217efc2d1ea8361e762b71d9dcd72e7dc71bbc8afe6168743ea82a60

Contents?: true

Size: 1.33 KB

Versions: 31

Compression:

Stored size: 1.33 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

31 entries across 31 versions & 1 rubygems

Version Path
trusty-cms-5.0.6 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-5.0.5 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-5.0.4 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-5.0.3 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-5.0.2 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-5.0.1 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.3.5 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-5.0.0 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.3.4 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.3.3 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.3.2 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.3.1 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.3 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.2.3 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.2.2 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.2.1 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.2 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-4.1.9 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-3.8.2 lib/generators/trusty_cms/trusty_cms_generator.rb
trusty-cms-3.8.1 lib/generators/trusty_cms/trusty_cms_generator.rb