appsignal 0.8.11 → 0.8.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/appsignal.rb +1 -0
- data/lib/appsignal/aggregator/middleware/action_view_sanitizer.rb +1 -1
- data/lib/appsignal/aggregator/middleware/active_record_sanitizer.rb +2 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/aggregator/middleware/action_view_sanitizer_spec.rb +13 -1
- data/spec/lib/appsignal/aggregator/middleware/active_record_sanitizer_spec.rb +6 -0
- data/spec/lib/appsignal_spec.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eba4ca3bafc6cb95c61c0135695eda9ada7a3128
|
4
|
+
data.tar.gz: 5e89621bb70dfb4cdadde2f996e5d4d83ecab9a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 113615a0525a2904cf5f6873032cc767bda1c842c1524383184dd722e27e3b01b41cda320b4497dd68d4119ff83303f43d55b169f8a3e58ff77f3d7be6d3b26a
|
7
|
+
data.tar.gz: ea517cd6039e98f8cc62f26e5d6e43ef4bf97a1c444f71309652354173874facc9a98075d97ba989235ee6e45624fe7048c5c341b0b286c70e131ebb3c5cd8ee
|
data/CHANGELOG.md
CHANGED
data/lib/appsignal.rb
CHANGED
@@ -16,7 +16,7 @@ module Appsignal
|
|
16
16
|
def call(event)
|
17
17
|
if event.name == TARGET_EVENT_NAME
|
18
18
|
unless schema_query?(event) || adapter_uses_prepared_statements?
|
19
|
-
query_string = event.payload[:sql]
|
19
|
+
query_string = event.payload[:sql].dup
|
20
20
|
if query_string
|
21
21
|
if adapter_uses_double_quoted_table_names?
|
22
22
|
query_string.gsub!(SINGLE_QUOTE, SANITIZED_VALUE)
|
@@ -28,6 +28,7 @@ module Appsignal
|
|
28
28
|
end
|
29
29
|
query_string.gsub!(IN_ARRAY, SANITIZED_VALUE)
|
30
30
|
query_string.gsub!(NUMERIC_DATA, SANITIZED_VALUE)
|
31
|
+
event.payload[:sql] = query_string
|
31
32
|
end
|
32
33
|
end
|
33
34
|
event.payload.delete(:connection_id)
|
data/lib/appsignal/version.rb
CHANGED
@@ -25,7 +25,19 @@ if rails_present?
|
|
25
25
|
before { sanitizer.call(event) { } }
|
26
26
|
|
27
27
|
it "should strip Rails root from the path" do
|
28
|
-
|
28
|
+
subject[:identifier].should == 'app/views/home/index/html.erb'
|
29
|
+
end
|
30
|
+
|
31
|
+
context "with a frozen identifier" do
|
32
|
+
let(:payload) do
|
33
|
+
{
|
34
|
+
:identifier => '/var/www/app/20130101/app/views/home/index/html.erb'.freeze
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
it "should strip Rails root from the path" do
|
39
|
+
subject[:identifier].should == 'app/views/home/index/html.erb'
|
40
|
+
end
|
29
41
|
end
|
30
42
|
end
|
31
43
|
end
|
@@ -142,6 +142,12 @@ if rails_present?
|
|
142
142
|
|
143
143
|
it { should == 'SET client_min_messages TO 22' }
|
144
144
|
end
|
145
|
+
|
146
|
+
context "with a a frozen sql string" do
|
147
|
+
let(:sql) { "SELECT `table`.* FROM `table` WHERE `id` = 'secret'".freeze }
|
148
|
+
|
149
|
+
it { should == "SELECT `table`.* FROM `table` WHERE `id` = ?" }
|
150
|
+
end
|
145
151
|
end
|
146
152
|
|
147
153
|
describe "#schema_query?" do
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -396,9 +396,8 @@ describe Appsignal do
|
|
396
396
|
context "without agent" do
|
397
397
|
let(:agent) { nil }
|
398
398
|
|
399
|
-
it "should not
|
400
|
-
|
401
|
-
agent.should_not_receive(:paused=).with(false)
|
399
|
+
it "should not crash" do
|
400
|
+
# just execute the after block
|
402
401
|
end
|
403
402
|
end
|
404
403
|
|
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.8.
|
4
|
+
version: 0.8.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-05-
|
15
|
+
date: 2014-05-26 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|