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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8559930eac7fb625c2b63984d509da6c3446b0f9
4
- data.tar.gz: 12a76e3a8d5b276d735fe3eb0aee2dcf7cd73302
3
+ metadata.gz: 80d6f12c6d9e5e3fd7e1d664e390442be1ad9774
4
+ data.tar.gz: 589b6f266a23b3bca8393b476ec7aa18467e96ff
5
5
  SHA512:
6
- metadata.gz: e2f1839f881a0245846c553266e5fe7507252c6fdeb3392bcb23ba89a9fe6b40858b8baa81b5e7bc24b184579669f92365f1b1f9ac8c0244786b4a35c5e94786
7
- data.tar.gz: 4989ab7ada1beeceba50adbb8ce9e91dc258263e6b39cc1edba3d752da32f75136184af9c0be11ccc25b41d8465db3df40dedaaad7b5592781477ed4f39e9f0a
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
@@ -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.size > 0
153
+ return '' unless re && !re.empty?
154
154
  res = re[0]
155
- return '' unless res && res.size > 0
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
- case v
235
- when Array
236
- obj[k] = rencode_array(v, max_depth)
237
- when Hash
238
- obj[k] = rencode_payload(v, max_depth)
239
- when String
240
- obj[k] = enforce_encoding(v)
241
- end
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
- obj
247
+ nobj
244
248
  end
245
249
 
246
250
  def self.rencode_array(array, max_depth)
@@ -2,5 +2,5 @@
2
2
  # Please refer to our terms for more information: https://www.sqreen.io/terms.html
3
3
  # Warning This file is auto generated! DO NOT edit.
4
4
  module Sqreen
5
- VERSION = "1.2.01484936161".freeze
5
+ VERSION = "1.3.01487852305".freeze
6
6
  end
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.2.01484936161
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-01-20 00:00:00.000000000 Z
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.8
134
+ rubygems_version: 2.6.10
134
135
  signing_key:
135
136
  specification_version: 4
136
137
  summary: Sqreen Ruby agent