lib/arii/csvdetector.rb in arii-1.2.1 vs lib/arii/csvdetector.rb in arii-1.2.2

- old
+ new

@@ -14,20 +14,20 @@ ## # == Detect the changes # def detect object - ARII::Config.log.debug(self.class.name) {"Monitoring #{object[:uri]}"} + ARII::Config.log.debug(self.class.name) { "Monitoring #{object[:uri]}" } CSV.new(open(object[:uri]), :headers => :first_row).each do |row| begin unless object[:cache].nil? then @response = Cashier.verify row[object[:cache].to_i], object, row, object[:seed] else @response = Cashier.verify row[0], object, row, object[:seed] end rescue Exception => e - ARII::Config.log.error(self.class.name) {"Loading error: #{e}"} + ARII::Config.log.error(self.class.name) { "Loading error: #{e}" } end begin # Process ARIIcache response @@ -38,24 +38,24 @@ end end # The actual processing # if @cache[:cache][:status] == 100 then - ARII::Config.log.info(self.class.name) {"Not on cache, generating payload"} + ARII::Config.log.info(self.class.name) { "Not on cache, generating payload" } payload = Hash.new object[:selectors].each do |selector| - selector.each do |k,v| + selector.each do |k, v| payload[k] = row[v.to_i] end end # add payload object to payloads list @payloads.push payload end rescue Exception => e - ARII::Config.log.error(self.class.name) {"Processing error: #{e}"} + ARII::Config.log.error(self.class.name) { "Processing error: #{e}" } end @cache[:templates] end end end