lib/railties/blacklight.rake in blacklight-6.0.2 vs lib/railties/blacklight.rake in blacklight-6.1.0

- old
+ new

@@ -13,11 +13,11 @@ namespace :index do desc "Put sample data into solr" task :seed => [:environment] do require 'yaml' - docs = YAML::load(File.open(File.join(Blacklight.root, 'solr', 'sample_solr_documents.yml'))) + docs = YAML.load(File.open(File.join(Blacklight.root, 'solr', 'sample_solr_documents.yml'))) conn = Blacklight.default_index.connection conn.add docs conn.commit end end @@ -76,10 +76,10 @@ print " - search_results: " begin response, docs = controller.search_results(q: '{!lucene}*:*') - if response.header['status'] == 0 and docs.length > 0 + if response.header['status'] == 0 and docs.any? puts "OK" else errors += 1 end