Sha256: 58750aa67fb488c18aa495e5234d9ae0f7fa56584d8c4cbc1ea2832b293562e5
Contents?: true
Size: 835 Bytes
Versions: 5
Compression:
Stored size: 835 Bytes
Contents
require 'rails/generators' require 'generators/geoblacklight/install_generator' namespace :geoblacklight do namespace :solr do desc "Put sample data into solr" task :seed => :environment do docs = JSON::parse(File.read("#{Rails.root}/spec/fixtures/geoblacklight_schema/selected.json")) Blacklight.solr.add docs Blacklight.solr.commit end desc "Ingests a GeoHydra transformed.json" task :ingest_all => :environment do docs = JSON::parse(File.read("#{Rails.root}/tmp/transformed.json")) docs.each do |doc| Blacklight.solr.add doc Blacklight.solr.commit end end end namespace :downloads do desc 'Delete all cached downloads' task delete: :environment do FileUtils.rm_rf Dir.glob("#{Rails.root}/tmp/cache/downloads/*") end end end
Version data entries
5 entries across 5 versions & 1 rubygems