Permalink
Browse files

Travis Update

  • Loading branch information...
1 parent 333daa4 commit a031bfbfa75fabe782e4787874c743f424f8e1ad @barttenbrinke barttenbrinke committed Feb 8, 2012
Showing with 6 additions and 3 deletions.
  1. +1 −2 .travis.yml
  2. +5 −1 lib/request_log_analyzer/aggregator/database_inserter.rb
View
@@ -1,10 +1,9 @@
script: bundle exec rake
rvm:
- 1.8.7
- - 1.9.1
- 1.9.2
+ - 1.9.3
- ruby-head
- ree
- rbx
- - rbx-2.0
- jruby
@@ -36,7 +36,11 @@ def aggregate(request)
request.lines.each do |line|
class_columns = database.get_class(line[:line_type]).column_names.reject { |column| ['id', 'source_id', 'request_id'].include?(column) }
attributes = Hash[*line.select { |(k, v)| class_columns.include?(k.to_s)}.flatten]
- attributes.each{|k,v| attributes[k] = v.force_encoding("UTF-8") if v.is_a?(String) }
+
+ # Fix encoding patch for 1.9.2
+ attributes.each do |k,v|
+ attributes[k] = v.force_encoding("UTF-8") if v.is_a?(String) && "".respond_to?("force_encoding")
+ end
@request_object.send("#{line[:line_type]}_lines").build(attributes)
end

0 comments on commit a031bfb

Please sign in to comment.