Sha256: 5771bc6eda61d3e9413cb4e506584a70cf7d041f9e836ac0388caefdf6e49f62
Contents?: true
Size: 1.11 KB
Versions: 36
Compression:
Stored size: 1.11 KB
Contents
module Spree module Generators class SiteGenerator < Rails::Generators::Base source_root File.expand_path("../../templates", __FILE__) desc "Configures an existing Rails application to use Spree." def create_lib_files template 'spree_site.rb', "lib/spree_site.rb" end def additional_tweaks remove_file "public/index.html" append_file "public/robots.txt", <<-ROBOTS User-agent: * Disallow: /checkouts Disallow: /orders Disallow: /countries Disallow: /line_items Disallow: /password_resets Disallow: /states Disallow: /user_sessions Disallow: /users ROBOTS append_file "db/seeds.rb", <<-SEEDS \n Rake::Task["db:load_dir"].invoke( "default" ) puts "Default data has been loaded" SEEDS end def config_middleware application 'config.middleware.use "SeoAssist"' application 'config.middleware.use "RedirectLegacyProductUrl"' end def require_site application "require 'spree_site'" end end end end
Version data entries
36 entries across 36 versions & 7 rubygems