lib/generators/spotlight/install_generator.rb in blacklight-spotlight-0.7.2 vs lib/generators/spotlight/install_generator.rb in blacklight-spotlight-0.8.0

- old
+ new

@@ -9,22 +9,31 @@ class_option :mailer_default_url_host, type: :string, default: '' # e.g. localhost:3000 def inject_spotlight_routes route "mount Spotlight::Engine, at: 'spotlight'" gsub_file 'config/routes.rb', /^\s*root.*/ do |match| - '#' + match + ' # replaced by spotlight_root' + '#' + match + ' # replaced by spotlight root path' end - - route 'spotlight_root' + route "root to: 'spotlight/exhibits#index'" end def friendly_id gem 'friendly_id' generate 'friendly_id' end def paper_trail generate 'paper_trail:install' + end + + def sitemaps + gem 'sitemap_generator' + copy_file 'config/sitemap.rb', 'config/sitemap.rb' + + say <<-EOS.strip_heredoc, :red + Added a default sitemap_generator configuration in config/sitemap.rb; please + update the default host to match your environment + EOS end def assets copy_file 'spotlight.scss', 'app/assets/stylesheets/spotlight.scss' copy_file 'spotlight.js', 'app/assets/javascripts/spotlight.js'