I fixed some issues in #17. These are remaining broken tests:
1) Failure:
PayloadSerializerTest#test_serializes_metrics_as_json [./test/unit/serializers/payload_serializer_test.rb:113]:
--- expected
+++ actual
@@ -1 +1 @@
-[{"total_call_time"=>0.033245704, "total_exclusive_time"=>0.033245704, "call_count"=>16, "min_call_time"=>0.000613518, "max_call_time"=>0.005338062, "key"=>{"scope"=>{"name"=>"apps/checkin", "bucket"=>"Controller"}, "desc"=>"SELECT * from users where filter=?", "name"=>"all", "bucket"=>"ActiveRecord", "extra"=>{"user"=>"cooluser"}}}, {"total_call_time"=>0.113403176, "total_exclusive_time"=>0.078132089, "call_count"=>2, "min_call_time"=>0.034881757, "max_call_time"=>0.078521419, "key"=>{"scope"=>nil, "desc"=>nil, "name"=>"apps/checkin", "bucket"=>"Controller", "extra"=>{}}}]
+[{"total_call_time"=>0.113403176, "total_exclusive_time"=>0.078132089, "call_count"=>2, "max_call_time"=>0.078521419, "min_call_time"=>0.034881757, "key"=>{"desc"=>nil, "scope"=>nil, "name"=>"apps/checkin", "bucket"=>"Controller", "extra"=>{}}}, {"total_call_time"=>0.033245704, "total_exclusive_time"=>0.033245704, "call_count"=>16, "max_call_time"=>0.005338062, "min_call_time"=>0.000613518, "key"=>{"desc"=>"SELECT * from users where filter=?", "scope"=>{"name"=>"apps/checkin", "bucket"=>"Controller"}, "name"=>"all", "bucket"=>"ActiveRecord", "extra"=>{"user"=>"cooluser"}}}]
2) Failure:
PayloadSerializerTest#test_serializes_slow_transactions_as_json [./test/unit/serializers/payload_serializer_test.rb:198]:
--- expected
+++ actual
@@ -1 +1 @@
-[{"context"=>{"user"=>{"hello"=>"goodbye"}, "this"=>"that"}, "metrics"=>[{"total_call_time"=>0.033245704, "total_exclusive_time"=>0.033245704, "call_count"=>16, "min_call_time"=>0.000613518, "max_call_time"=>0.005338062, "key"=>{"scope"=>{"name"=>"apps/checkin", "bucket"=>"Controller"}, "desc"=>"SELECT * from users where filter=?", "name"=>"all", "bucket"=>"ActiveRecord", "extra"=>{"user"=>"cooluser"}}}, {"total_call_time"=>0.113403176, "total_exclusive_time"=>0.078132089, "call_count"=>2, "min_call_time"=>0.034881757, "max_call_time"=>0.078521419, "key"=>{"scope"=>nil, "desc"=>nil, "name"=>"apps/checkin", "bucket"=>"Controller", "extra"=>{}}}], "total_call_time"=>1.23, "uri"=>"http://example.com/blabla", "time"=>"2015-11-22 06:26:28 -0700", "prof"=>[], "key"=>{"name"=>"something/else", "bucket"=>"Buckethead"}}]
+[{"context"=>{"user"=>{"hello"=>"goodbye"}, "this"=>"that"}, "metrics"=>[{"total_call_time"=>0.113403176, "total_exclusive_time"=>0.078132089, "call_count"=>2, "max_call_time"=>0.078521419, "min_call_time"=>0.034881757, "key"=>{"desc"=>nil, "scope"=>nil, "name"=>"apps/checkin", "bucket"=>"Controller", "extra"=>{}}}, {"total_call_time"=>0.033245704, "total_exclusive_time"=>0.033245704, "call_count"=>16, "max_call_time"=>0.005338062, "min_call_time"=>0.000613518, "key"=>{"desc"=>"SELECT * from users where filter=?", "scope"=>{"name"=>"apps/checkin", "bucket"=>"Controller"}, "name"=>"all", "bucket"=>"ActiveRecord", "extra"=>{"user"=>"cooluser"}}}], "total_call_time"=>1.23, "time"=>"Sun Nov 22 06:26:28 -0700 2015", "uri"=>"http://example.com/blabla", "prof"=>[], "key"=>{"name"=>"something/else", "bucket"=>"Buckethead"}}]
3) Failure:
ScoutApm::Utils::SqlSanitizerTest#test_postgres_simple_select_of_first [./test/unit/sql_sanitizer_test.rb:21]:
--- expected
+++ actual
@@ -1 +1 @@
-"SELECT \"users\".* FROM \"users\" ORDER BY \"users\".\"id\" ASC LIMIT 1"
+"SELECT \"users\".* FROM \"users\" ORDER BY \"users\".\"id\" ASC LIMIT ?"
4) Failure:
ScoutApm::Utils::SqlSanitizerTest#test_mysql_limit [./test/unit/sql_sanitizer_test.rb:57]:
--- expected
+++ actual
@@ -1 +1 @@
-"SELECT `blogs`.* FROM `blogs` ORDER BY `blogs`.`id` ASC LIMIT 1"
+"SELECT `blogs`.* FROM `blogs` ORDER BY `blogs`.`id` ASC LIMIT ?"
5) Error:
ScoutApm::Utils::SqlSanitizerTest#test_scrubs_invalid_encoding:
NoMethodError: undefined method `force_encoding' for "SELECT `blogs`.* FROM `blogs` WHERE (title = 'a\255c')":String
./test/unit/sql_sanitizer_test.rb:71:in `test_scrubs_invalid_encoding'