sqreen 1.2.01484936161-java → 1.3.01487852305-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sqreen/frameworks/rails.rb +2 -0
- data/lib/sqreen/middleware.rb +14 -0
- data/lib/sqreen/session.rb +15 -11
- data/lib/sqreen/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80d6f12c6d9e5e3fd7e1d664e390442be1ad9774
|
4
|
+
data.tar.gz: 589b6f266a23b3bca8393b476ec7aa18467e96ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8530af6c65152bae1b101e83ea95670fe12526bde359eef1264c7a5932fd30aabe8fa3c27ae80efb8d1b49e71889d270b5da465227f75c5a6fa37a881ddd7ee
|
7
|
+
data.tar.gz: 39fe29b1e0c6bd20772301479d431ba279741b8b4071c6c0b3e239cbe215c4334eafc7468e5615c762f65fdc77b74644e6097ae56481a039a8055e170ad1af58
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# Please refer to our terms for more information: https://www.sqreen.io/terms.html
|
4
4
|
|
5
5
|
require 'sqreen/frameworks/generic'
|
6
|
+
require 'sqreen/middleware'
|
6
7
|
|
7
8
|
module Sqreen
|
8
9
|
module Frameworks
|
@@ -73,6 +74,7 @@ module Sqreen
|
|
73
74
|
class Init < ::Rails::Railtie
|
74
75
|
def self.startup
|
75
76
|
initializer 'sqreen.startup' do |app|
|
77
|
+
app.middleware.insert_before(Rack::Runtime, Sqreen::Middleware)
|
76
78
|
yield app
|
77
79
|
end
|
78
80
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.io/terms.html
|
3
|
+
|
4
|
+
module Sqreen
|
5
|
+
class Middleware
|
6
|
+
def initialize(app)
|
7
|
+
@app = app
|
8
|
+
end
|
9
|
+
|
10
|
+
def call(env)
|
11
|
+
@app.call(env)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/sqreen/session.rb
CHANGED
@@ -150,9 +150,9 @@ module Sqreen
|
|
150
150
|
th = Thread.current
|
151
151
|
return '' unless th
|
152
152
|
re = th.to_s.scan(/:(0x.*)>/)
|
153
|
-
return '' unless re && re.
|
153
|
+
return '' unless re && !re.empty?
|
154
154
|
res = re[0]
|
155
|
-
return '' unless res && res.
|
155
|
+
return '' unless res && !res.empty?
|
156
156
|
res[0]
|
157
157
|
end
|
158
158
|
|
@@ -230,17 +230,21 @@ module Sqreen
|
|
230
230
|
return obj if max_depth < 0
|
231
231
|
return rencode_array(obj, max_depth) if obj.is_a?(Array)
|
232
232
|
return enforce_encoding(obj) unless obj.is_a?(Hash)
|
233
|
+
nobj = {}
|
233
234
|
obj.each do |k, v|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
235
|
+
safe_k = rencode_payload(k, max_depth)
|
236
|
+
nobj[safe_k] = case v
|
237
|
+
when Array
|
238
|
+
rencode_array(v, max_depth)
|
239
|
+
when Hash
|
240
|
+
rencode_payload(v, max_depth)
|
241
|
+
when String
|
242
|
+
enforce_encoding(v)
|
243
|
+
else # for example integers
|
244
|
+
v
|
245
|
+
end
|
242
246
|
end
|
243
|
-
|
247
|
+
nobj
|
244
248
|
end
|
245
249
|
|
246
250
|
def self.rencode_array(array, max_depth)
|
data/lib/sqreen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqreen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.01487852305
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sqreen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/sqreen/metrics/collect.rb
|
79
79
|
- lib/sqreen/metrics/sum.rb
|
80
80
|
- lib/sqreen/metrics_store.rb
|
81
|
+
- lib/sqreen/middleware.rb
|
81
82
|
- lib/sqreen/payload_creator.rb
|
82
83
|
- lib/sqreen/performance_notifications.rb
|
83
84
|
- lib/sqreen/performance_notifications/log.rb
|
@@ -130,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
131
|
version: '0'
|
131
132
|
requirements: []
|
132
133
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.6.
|
134
|
+
rubygems_version: 2.6.10
|
134
135
|
signing_key:
|
135
136
|
specification_version: 4
|
136
137
|
summary: Sqreen Ruby agent
|