lib/generators/spotlight/install_generator.rb in blacklight-spotlight-3.0.0.alpha.3 vs lib/generators/spotlight/install_generator.rb in blacklight-spotlight-3.0.0.alpha.4
- old
+ new
@@ -62,11 +62,13 @@
end
end
def add_helper
copy_file 'spotlight_helper.rb', 'app/helpers/spotlight_helper.rb'
- inject_into_class 'app/helpers/application_helper.rb', ApplicationHelper, ' include SpotlightHelper'
+ inject_into_file 'app/helpers/application_helper.rb', after: 'module ApplicationHelper' do
+ "\n include SpotlightHelper"
+ end
end
def add_model_mixin
if File.exist? 'app/models/solr_document.rb'
inject_into_file 'app/models/solr_document.rb', after: 'include Blacklight::Solr::Document' do
@@ -105,11 +107,13 @@
gem 'blacklight-gallery', '~> 1.1'
generate 'blacklight_gallery:install'
end
def add_oembed
- gem 'blacklight-oembed', '>= 0.1', github: 'sul-dlss/blacklight-oembed'
+ gem 'blacklight-oembed', '~> 1.0'
+ Bundler.with_clean_env { run 'bundle install' }
generate 'blacklight_oembed:install'
+ copy_file 'config/initializers/oembed.rb'
end
def add_mailer_defaults
if options[:mailer_default_url_host].present?
say 'Injecting a placeholder config.action_mailer.default_url_options; be sure to update it for your environment', :yellow