lib/supernova/solr_indexer.rb in supernova-0.3.3 vs lib/supernova/solr_indexer.rb in supernova-0.3.4

- old
+ new

@@ -10,11 +10,11 @@ def field_definitions @field_definitions ||= {} end def has(key, attributes) - field_definitions[key] = attributes + field_definitions[key] = attributes.is_a?(Hash) ? attributes : { :type => attributes } end def clazz(class_name =:only_return) @clazz = class_name if class_name != :only_return @clazz @@ -188,8 +188,8 @@ cmd = if options[:local] %(curl -s '#{solr_url}/update/json?commit=true\\&stream.file=#{index_file_path}') else %(cd #{File.dirname(index_file_path)} && curl -s '#{solr_url}/update/json?commit=true' --data-binary @#{File.basename(index_file_path)} -H 'Content-type:application/json') end - system(cmd) + Kernel.send(:`, cmd) end end \ No newline at end of file