-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba93619
commit 215295f
Showing
4 changed files
with
40 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
require 'rails/generators' | ||
require 'generators/geoblacklight/install_generator' | ||
require 'geoblacklight' | ||
require 'open-uri' | ||
|
||
namespace :geoblacklight do | ||
desc 'Copies the default SOLR config for the included Solr' | ||
task :configure_solr do | ||
files_urls = [ | ||
{ | ||
url: 'https://raw.githubusercontent.com/geoblacklight/geoblacklight-schema/master/conf/schema.xml', | ||
file: 'schema.xml' | ||
}, | ||
{ | ||
url: 'https://raw.githubusercontent.com/geoblacklight/geoblacklight-schema/master/conf/solrconfig.xml', | ||
file: 'solrconfig.xml' | ||
} | ||
] | ||
files_urls.each do |item| | ||
puts item.inspect | ||
begin | ||
open(item[:url]) do |io| | ||
IO.copy_stream(io, "jetty/solr/blacklight-core/conf/#{item[:file]}") | ||
end | ||
rescue Exception => e | ||
abort "Unable to download #{item[:file]} from #{item[:url]} #{e.message}" | ||
end | ||
end | ||
end | ||
|
||
# Leaving this task in for backwards compatibility | ||
desc 'Runs geoblacklight:configure_solr, you should just use geoblacklight:configure_solr' | ||
task :configure_jetty do | ||
Rake::Task['geoblacklight:configure_solr'].invoke | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters