Skip to content

Commit

Permalink
Travis Update
Browse files Browse the repository at this point in the history
  • Loading branch information
barttenbrinke committed Feb 8, 2012
1 parent 333daa4 commit a031bfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
@@ -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
6 changes: 5 additions & 1 deletion lib/request_log_analyzer/aggregator/database_inserter.rb
Expand Up @@ -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
Expand Down

0 comments on commit a031bfb

Please sign in to comment.