From 405a5ef4686bd09a70238f98ae99187a233e3a03 Mon Sep 17 00:00:00 2001 From: Tom Johnson Date: Mon, 19 Aug 2019 11:42:17 -0700 Subject: [PATCH] Force overwrite of `solr/conf` files if they have changes Blacklight generates Solr configuration into `solr/conf`. Since ActiveFedora now generates its configurations into the same directory, any differing files will be treated as conflicts by `Rails::Generators::Base`. Adding `force: true` to the step that copies these files ensures that the AF versions of these files are installed without requiring confusing user feedback at generation time. --- lib/generators/active_fedora/config/solr/solr_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/active_fedora/config/solr/solr_generator.rb b/lib/generators/active_fedora/config/solr/solr_generator.rb index 7feb3c774..c6d26d625 100644 --- a/lib/generators/active_fedora/config/solr/solr_generator.rb +++ b/lib/generators/active_fedora/config/solr/solr_generator.rb @@ -7,7 +7,7 @@ class Config::SolrGenerator < Rails::Generators::Base def generate # Overwrite the configuration files that Blacklight has installed copy_file 'solr.yml', 'config/solr.yml', force: true - directory 'solr', 'solr' + directory 'solr', 'solr', force: true end def solr_wrapper_config