appsignal 0.12.beta.45 → 0.12.beta.46
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66fd4a1ffd41f53418940bd58995fe9d0a67a7e0
|
4
|
+
data.tar.gz: 299446a2ccd7b9bc4ba194db6da7092237cc0303
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93316d994e6bf831e264f950d13ddba4cf27baedd8fc91ad18a676f0567f47080f865773d9811f4896c36519b3bcd5b246628ffd609d10a362895c1c0d6715f7
|
7
|
+
data.tar.gz: ff4fe3778ae5c7c3c0cade05e598a5f44c37d44366cc5205f231c410dd4ae10d6b2aaf0fdc3c60da71bbf3232e135b65e7c1c621ecd1e837a987ccdab6951a60
|
data/ext/agent.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
---
|
2
|
-
:version:
|
2
|
+
:version: 5a887a7
|
3
3
|
:triples:
|
4
4
|
x86_64-linux:
|
5
|
-
:checksum:
|
6
|
-
:download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
5
|
+
:checksum: 481ce01a72f60ad30dd5e1e71dd692b994e6bc0e81e392a4bff7c3c6d6854f8e
|
6
|
+
:download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5a887a7/appsignal-agent-x86_64-linux-static.tar.gz
|
7
7
|
:lib_filename: libappsignal.a
|
8
8
|
x86_64-darwin:
|
9
|
-
:checksum:
|
10
|
-
:download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
9
|
+
:checksum: 107da57143ffc0747f511d9b7e48dac01f3816038e6e4eaed2811a1c2d8b0443
|
10
|
+
:download_url: https://appsignal-agent-releases.global.ssl.fastly.net/5a887a7/appsignal-agent-x86_64-darwin-static.tar.gz
|
11
11
|
:lib_filename: libappsignal.a
|
@@ -4,11 +4,12 @@ module Appsignal
|
|
4
4
|
class SqlFormatter < Appsignal::EventFormatter
|
5
5
|
register 'sql.active_record'
|
6
6
|
|
7
|
-
SINGLE_QUOTED_STRING = /'(.?|[^'])
|
8
|
-
DOUBLE_QUOTED_STRING = /"(.?|[^"])
|
7
|
+
SINGLE_QUOTED_STRING = /'(.?|[^']).*'/.freeze
|
8
|
+
DOUBLE_QUOTED_STRING = /"(.?|[^"]).*"/.freeze
|
9
9
|
IN_OPERATOR_CONTENT = /(IN \()[^\)]+(\))/.freeze
|
10
10
|
NUMERIC = /\d*\.?\d+/.freeze
|
11
|
-
REPLACEMENT = '
|
11
|
+
REPLACEMENT = '?'.freeze
|
12
|
+
IN_REPLACEMENT = '\1?\2'.freeze
|
12
13
|
SCHEMA = 'SCHEMA'.freeze
|
13
14
|
|
14
15
|
attr_reader :adapter_uses_double_quoted_table_names
|
@@ -28,7 +29,7 @@ module Appsignal
|
|
28
29
|
sql_string.gsub!(DOUBLE_QUOTED_STRING, REPLACEMENT)
|
29
30
|
end
|
30
31
|
sql_string.gsub!(SINGLE_QUOTED_STRING, REPLACEMENT)
|
31
|
-
sql_string.gsub!(IN_OPERATOR_CONTENT,
|
32
|
+
sql_string.gsub!(IN_OPERATOR_CONTENT, IN_REPLACEMENT)
|
32
33
|
sql_string.gsub!(NUMERIC, REPLACEMENT)
|
33
34
|
[payload[:name], sql_string]
|
34
35
|
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -53,9 +53,9 @@ if active_record_present?
|
|
53
53
|
before { formatter.stub(:adapter_uses_double_quoted_table_names => false) }
|
54
54
|
|
55
55
|
context "single quoted data value" do
|
56
|
-
let(:sql) { "SELECT `table`.* FROM `table` WHERE `id` = 'secret'" }
|
56
|
+
let(:sql) { "SELECT `table`.* FROM `table` WHERE `id` = 'secret' ORDER BY `table`.`id` ASC LIMIT 1" }
|
57
57
|
|
58
|
-
it { should == ['Model load', "SELECT `table`.* FROM `table` WHERE `id` = ?"] }
|
58
|
+
it { should == ['Model load', "SELECT `table`.* FROM `table` WHERE `id` = ? ORDER BY `table`.`id` ASC LIMIT ?"] }
|
59
59
|
|
60
60
|
context "with escaped single quotes in the string" do
|
61
61
|
let(:sql) { "`id` = 'this is a \'big\' secret'" }
|
@@ -101,9 +101,9 @@ if active_record_present?
|
|
101
101
|
let(:connection_config) { {:adapter => 'postgresql'} }
|
102
102
|
|
103
103
|
context "single quoted data value" do
|
104
|
-
let(:sql) { "SELECT \"table\".* FROM \"table\" WHERE \"id\" = 'secret'" }
|
104
|
+
let(:sql) { "SELECT \"table\".* FROM \"table\" WHERE \"id\" = 'secret' ORDER BY \"table\".\"id\" ASC LIMIT 1" }
|
105
105
|
|
106
|
-
it { should == ['Model load', "SELECT \"table\".* FROM \"table\" WHERE \"id\" = ?"] }
|
106
|
+
it { should == ['Model load', "SELECT \"table\".* FROM \"table\" WHERE \"id\" = ? ORDER BY \"table\".\"id\" ASC LIMIT ?"] }
|
107
107
|
|
108
108
|
context "with an escaped single quote" do
|
109
109
|
let(:sql) { "\"id\" = 'this is a \'big\' secret'" }
|
@@ -22,8 +22,9 @@ describe "extension loading and operation" do
|
|
22
22
|
Appsignal.extension_loaded?.should be_true
|
23
23
|
end
|
24
24
|
|
25
|
-
it "should have a start method" do
|
25
|
+
it "should have a start and stop method" do
|
26
26
|
subject.start
|
27
|
+
subject.stop
|
27
28
|
end
|
28
29
|
|
29
30
|
context "with a valid config" do
|
@@ -31,8 +32,9 @@ describe "extension loading and operation" do
|
|
31
32
|
project_fixture_config.write_to_environment
|
32
33
|
end
|
33
34
|
|
34
|
-
it "should have a start method" do
|
35
|
+
it "should have a start and stop method" do
|
35
36
|
subject.start
|
37
|
+
subject.stop
|
36
38
|
end
|
37
39
|
|
38
40
|
it "should have a start_transaction method" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.beta.
|
4
|
+
version: 0.12.beta.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|