lib/generators/spotlight/install_generator.rb in blacklight-spotlight-4.0.1 vs lib/generators/spotlight/install_generator.rb in blacklight-spotlight-4.0.2
- old
+ new
@@ -8,18 +8,10 @@
class Install < Rails::Generators::Base
source_root File.expand_path('templates', __dir__)
class_option :solr_update_class, type: :string, default: 'Spotlight::SolrDocument::AtomicUpdates'
class_option :mailer_default_url_host, type: :string, default: '' # e.g. localhost:3000
- # we're not using webpacker, so we need to re-add sprockets functionality
- def add_js_rails6
- return unless Rails.version.to_i == 6
-
- # By default rails generates javascript_pack_tag, we'll change this to javascript_include_tag
- gsub_file 'app/views/layouts/application.html.erb', /pack/, 'include'
- end
-
def add_manifest
append_to_file 'app/assets/javascripts/application.js', "\n//= require_tree .\n"
append_to_file 'app/assets/config/manifest.js', "\n//= link spotlight/manifest.js"
# Rails installed importmap by default, but we don't have importmap + Blacklight 7 working yet.
@@ -40,11 +32,11 @@
generate 'friendly_id'
end
def riiif
gem 'riiif'
- Bundler.with_clean_env { run 'bundle install' }
+ Bundler.with_unbundled_env { run 'bundle install' }
route "mount Riiif::Engine => '/images', as: 'riiif'"
copy_file 'config/initializers/riiif.rb'
end
def paper_trail
@@ -192,10 +184,10 @@
private
def bundle_install
inside destination_root do
- Bundler.with_clean_env { run 'bundle install' }
+ Bundler.with_unbundled_env { run 'bundle install' }
end
end
end
end