lib/generators/spotlight/install_generator.rb in blacklight-spotlight-0.17.1 vs lib/generators/spotlight/install_generator.rb in blacklight-spotlight-0.18.0
- old
+ new
@@ -9,11 +9,11 @@
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 path'
+ '# ' + match.strip + ' # replaced by spotlight root path'
end
route "root to: 'spotlight/exhibits#index'"
end
def friendly_id
@@ -76,14 +76,14 @@
end
def add_search_builder_mixin
if File.exist? 'app/models/search_builder.rb'
inject_into_file 'app/models/search_builder.rb', after: "include Blacklight::Solr::SearchBuilderBehavior\n" do
- "\n include Spotlight::Catalog::AccessControlsEnforcement::SearchBuilder\n"
+ "\n include Spotlight::AccessControlsEnforcementSearchBuilder\n"
end
else
- say 'Unable to find SearchBuilder class; add `include Spotlight::Catalog::AccessControlsEnforcement::SearchBuilder` to the class manually.'
+ say 'Unable to find SearchBuilder class; add `include Spotlight::AccessControlsEnforcementSearchBuilder` to the class manually.'
end
end
def add_example_catalog_controller
copy_file 'catalog_controller.rb', 'app/controllers/catalog_controller.rb'
@@ -93,10 +93,10 @@
gem 'blacklight-gallery', '>= 0.3.0'
generate 'blacklight_gallery:install'
end
def add_oembed
- gem 'blacklight-oembed'
+ gem 'blacklight-oembed', '>= 0.1.0'
generate 'blacklight_oembed:install'
end
def add_mailer_defaults
if options[:mailer_default_url_host].present?