sqreen 1.2.01484936161 → 1.3.01487852305
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: a5b38201a0bb6e725b4756a87d69ec098ec6948e
|
4
|
+
data.tar.gz: 5e2d908ec523816f43e8acc92ac146c975642fce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d3f5bbe7fa33598ad38ad9eadf3d47cf6346bb3f95bc270a85ebf1d4f287ab82fa4655959fc379e1407c0a009df5773f2e81e769104b645cb7b9981e1e54b03
|
7
|
+
data.tar.gz: fd4a8048f4df1c070e3c8cfb8b79f5518ff7959a0bc867d4f6f215737e3806696028c4e12f6f7db43d081d045c1d32fb54d1f48b315719c1f3a8421a8d8b7eb0
|
@@ -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: ruby
|
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
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- lib/sqreen/metrics/collect.rb
|
80
80
|
- lib/sqreen/metrics/sum.rb
|
81
81
|
- lib/sqreen/metrics_store.rb
|
82
|
+
- lib/sqreen/middleware.rb
|
82
83
|
- lib/sqreen/payload_creator.rb
|
83
84
|
- lib/sqreen/performance_notifications.rb
|
84
85
|
- lib/sqreen/performance_notifications/log.rb
|
@@ -131,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
132
|
version: '0'
|
132
133
|
requirements: []
|
133
134
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.6.
|
135
|
+
rubygems_version: 2.6.10
|
135
136
|
signing_key:
|
136
137
|
specification_version: 4
|
137
138
|
summary: Sqreen Ruby agent
|