Sha256: 06aa76b880aab2710fe302833e310396bfab6177bb9f6df33281fba47f9679cf

Contents?: true

Size: 1.11 KB

Versions: 13

Compression:

Stored size: 1.11 KB

Contents

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/v0.3.0/conf/schema.xml',
        file: 'schema.xml'
      },
      {
        url: 'https://raw.githubusercontent.com/geoblacklight/geoblacklight-schema/v0.3.0/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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
geoblacklight-1.0.0.pre1 lib/tasks/configure_solr.rake
geoblacklight-0.12.1 lib/tasks/configure_solr.rake
geoblacklight-0.12.0 lib/tasks/configure_solr.rake
geoblacklight-0.11.1 lib/tasks/configure_solr.rake
geoblacklight-0.11.0 lib/tasks/configure_solr.rake
geoblacklight-0.10.2 lib/tasks/configure_solr.rake
geoblacklight-0.10.1 lib/tasks/configure_solr.rake
geoblacklight-0.10.0 lib/tasks/configure_solr.rake
geoblacklight-0.9.2 lib/tasks/configure_solr.rake
geoblacklight-0.9.1 lib/tasks/configure_solr.rake
geoblacklight-0.9.0 lib/tasks/configure_solr.rake
geoblacklight-0.8.0 lib/tasks/configure_solr.rake
geoblacklight-0.7.1 lib/tasks/configure_solr.rake