appsignal 2.10.5 → 2.10.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/ext/agent.yml +19 -19
- data/lib/appsignal.rb +6 -3
- data/lib/appsignal/cli/notify_of_deploy.rb +1 -1
- data/lib/appsignal/event_formatter.rb +1 -2
- data/lib/appsignal/hooks/net_http.rb +8 -13
- data/lib/appsignal/minutely.rb +1 -2
- data/lib/appsignal/rack/js_exception_catcher.rb +3 -4
- data/lib/appsignal/system.rb +0 -6
- data/lib/appsignal/utils/deprecation_message.rb +2 -2
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/cli/notify_of_deploy_spec.rb +4 -2
- data/spec/lib/appsignal/config_spec.rb +7 -7
- data/spec/lib/appsignal/event_formatter_spec.rb +5 -4
- data/spec/lib/appsignal/minutely_spec.rb +4 -4
- data/spec/lib/appsignal/rack/js_exception_catcher_spec.rb +9 -5
- data/spec/lib/appsignal/system_spec.rb +0 -36
- data/spec/lib/appsignal_spec.rb +2 -2
- metadata +2 -3
- data/lib/appsignal/integrations/net_http.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e50a778f6ba1e9f4147ca4ce5b05b930131572ac4a427e94916d517fc25cc8cf
|
4
|
+
data.tar.gz: 750530a66bf499dd130a52987a7df7428ce55a0bb7d034fceb9603850ff4648d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50728b8fa3a9a4f24d9b662b4f69b2337f57367d2e0b373b45247123e2628c02bbcc1d9792f1ecab784a6e1e93bf95b20bb04ac6c38eb5dd78342eb4d0be6cab
|
7
|
+
data.tar.gz: 11ff3543333791541973623f246e015f8f186a8941a0260d5025e1e2201d9ab657ef78ada39ef3a7998f11258f423157743b726d3d4e62c94777977659b4853a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.10.7
|
4
|
+
- Revert fix for compatibility with the `http_logger` gem. PR #604.
|
5
|
+
For more information, see issue #603 about our reasoning and discussion.
|
6
|
+
|
7
|
+
## 2.10.6
|
8
|
+
- Check if queued payloads are for correct app and not expired
|
9
|
+
|
3
10
|
## 2.10.5
|
4
11
|
- Improve Ruby 1.9 compatibility. PR #591
|
5
12
|
- Add grape.skip_appsignal_error request env. PR #588
|
data/ext/agent.yml
CHANGED
@@ -1,70 +1,70 @@
|
|
1
1
|
---
|
2
|
-
version:
|
2
|
+
version: 96b684b
|
3
3
|
mirrors:
|
4
4
|
- https://appsignal-agent-releases.global.ssl.fastly.net
|
5
5
|
- https://d135dj0rjqvssy.cloudfront.net
|
6
6
|
triples:
|
7
7
|
x86_64-darwin:
|
8
8
|
static:
|
9
|
-
checksum:
|
9
|
+
checksum: 6278d03abdcacde207e210374601b0a98eabace8cbc9fb74dffea3c18fc8a252
|
10
10
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
11
11
|
dynamic:
|
12
|
-
checksum:
|
12
|
+
checksum: b0ad069bbff68acde7ef19de47938fa786771bae4821c757718f1894b9654a93
|
13
13
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
14
14
|
universal-darwin:
|
15
15
|
static:
|
16
|
-
checksum:
|
16
|
+
checksum: 6278d03abdcacde207e210374601b0a98eabace8cbc9fb74dffea3c18fc8a252
|
17
17
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
18
18
|
dynamic:
|
19
|
-
checksum:
|
19
|
+
checksum: b0ad069bbff68acde7ef19de47938fa786771bae4821c757718f1894b9654a93
|
20
20
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
21
21
|
i686-linux:
|
22
22
|
static:
|
23
|
-
checksum:
|
23
|
+
checksum: f3e79a575241a50d7968fe4743c4f4e5aebb840e0b8664d055383caf696d5d38
|
24
24
|
filename: appsignal-i686-linux-all-static.tar.gz
|
25
25
|
dynamic:
|
26
|
-
checksum:
|
26
|
+
checksum: 0df11c9fe85c9c94336dfb4df788032c78eda1ea648f98e8c1e4e213258816e1
|
27
27
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
28
28
|
x86-linux:
|
29
29
|
static:
|
30
|
-
checksum:
|
30
|
+
checksum: f3e79a575241a50d7968fe4743c4f4e5aebb840e0b8664d055383caf696d5d38
|
31
31
|
filename: appsignal-i686-linux-all-static.tar.gz
|
32
32
|
dynamic:
|
33
|
-
checksum:
|
33
|
+
checksum: 0df11c9fe85c9c94336dfb4df788032c78eda1ea648f98e8c1e4e213258816e1
|
34
34
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
35
35
|
i686-linux-musl:
|
36
36
|
static:
|
37
|
-
checksum:
|
37
|
+
checksum: 07ab5749b532f1cc6cb45a3334fd950f6d15edacbe6d1bfe25af75b24df73cd1
|
38
38
|
filename: appsignal-i686-linux-musl-all-static.tar.gz
|
39
39
|
x86-linux-musl:
|
40
40
|
static:
|
41
|
-
checksum:
|
41
|
+
checksum: 07ab5749b532f1cc6cb45a3334fd950f6d15edacbe6d1bfe25af75b24df73cd1
|
42
42
|
filename: appsignal-i686-linux-musl-all-static.tar.gz
|
43
43
|
x86_64-linux:
|
44
44
|
static:
|
45
|
-
checksum:
|
45
|
+
checksum: d0e8f48973bca7d783d654404617bb5ab4f47756deb6805c4876bfcda83981cd
|
46
46
|
filename: appsignal-x86_64-linux-all-static.tar.gz
|
47
47
|
dynamic:
|
48
|
-
checksum:
|
48
|
+
checksum: aff7569b04416cd40440d228c5b9881b860e1ecf597bc996ac02c2735f49d993
|
49
49
|
filename: appsignal-x86_64-linux-all-dynamic.tar.gz
|
50
50
|
x86_64-linux-musl:
|
51
51
|
static:
|
52
|
-
checksum:
|
52
|
+
checksum: 2e3db648d0883f2a7e72f1207ec0976b97d144cafe0a3e755df2d91ca93d113f
|
53
53
|
filename: appsignal-x86_64-linux-musl-all-static.tar.gz
|
54
54
|
dynamic:
|
55
|
-
checksum:
|
55
|
+
checksum: 5da62f954d761af47da16f34ab675b46fedd7b91b485574bf895b43896f61ce0
|
56
56
|
filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
|
57
57
|
x86_64-freebsd:
|
58
58
|
static:
|
59
|
-
checksum:
|
59
|
+
checksum: 8dc226834ef39bac43dbc4a5c6a812c50c34669b0607036dd9494ac587e72d6a
|
60
60
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
61
61
|
dynamic:
|
62
|
-
checksum:
|
62
|
+
checksum: 0edfbaa450c89dba5750b306043efc00b82851dce2b75fa6ee62de07d30b4a3b
|
63
63
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
64
64
|
amd64-freebsd:
|
65
65
|
static:
|
66
|
-
checksum:
|
66
|
+
checksum: 8dc226834ef39bac43dbc4a5c6a812c50c34669b0607036dd9494ac587e72d6a
|
67
67
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
68
68
|
dynamic:
|
69
|
-
checksum:
|
69
|
+
checksum: 0edfbaa450c89dba5750b306043efc00b82851dce2b75fa6ee62de07d30b4a3b
|
70
70
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
data/lib/appsignal.rb
CHANGED
@@ -6,6 +6,7 @@ require "securerandom"
|
|
6
6
|
require "appsignal/logger"
|
7
7
|
require "appsignal/helpers/instrumentation"
|
8
8
|
require "appsignal/helpers/metrics"
|
9
|
+
require "appsignal/utils/deprecation_message"
|
9
10
|
|
10
11
|
# AppSignal for Ruby gem's main module.
|
11
12
|
#
|
@@ -15,9 +16,9 @@ require "appsignal/helpers/metrics"
|
|
15
16
|
# {Appsignal::Helpers::Metrics}) for ease of use.
|
16
17
|
module Appsignal
|
17
18
|
class << self
|
18
|
-
extend Gem::Deprecate
|
19
19
|
include Helpers::Instrumentation
|
20
20
|
include Helpers::Metrics
|
21
|
+
include Utils::DeprecationMessage
|
21
22
|
|
22
23
|
# Accessor for the AppSignal configuration.
|
23
24
|
# Return the current AppSignal configuration.
|
@@ -280,16 +281,18 @@ module Appsignal
|
|
280
281
|
|
281
282
|
# @deprecated No replacement
|
282
283
|
def is_ignored_error?(error) # rubocop:disable Naming/PredicateName
|
284
|
+
deprecation_message "Appsignal.is_ignored_error? is deprecated " \
|
285
|
+
"with no replacement and will be removed in version 3.0."
|
283
286
|
Appsignal.config[:ignore_errors].include?(error.class.name)
|
284
287
|
end
|
285
288
|
alias :is_ignored_exception? :is_ignored_error?
|
286
|
-
deprecate :is_ignored_error?, :none, 2017, 3
|
287
289
|
|
288
290
|
# @deprecated No replacement
|
289
291
|
def is_ignored_action?(action) # rubocop:disable Naming/PredicateName
|
292
|
+
deprecation_message "Appsignal.is_ignored_action? is deprecated " \
|
293
|
+
"with no replacement and will be removed in version 3.0."
|
290
294
|
Appsignal.config[:ignore_actions].include?(action)
|
291
295
|
end
|
292
|
-
deprecate :is_ignored_action?, :none, 2017, 3
|
293
296
|
|
294
297
|
private
|
295
298
|
|
@@ -94,7 +94,7 @@ module Appsignal
|
|
94
94
|
"see our documentation for more information on the recommended " \
|
95
95
|
"method: " \
|
96
96
|
"https://docs.appsignal.com/application/markers/deploy-markers.html"
|
97
|
-
deprecation_message message
|
97
|
+
deprecation_message message
|
98
98
|
end
|
99
99
|
|
100
100
|
private
|
@@ -91,8 +91,7 @@ module Appsignal
|
|
91
91
|
"Formatter for '#{name}' is using a deprecated registration " \
|
92
92
|
"method. This event formatter will not be loaded. " \
|
93
93
|
"Please update the formatter according to the documentation at: " \
|
94
|
-
"https://docs.appsignal.com/ruby/instrumentation/event-formatters.html"
|
95
|
-
logger
|
94
|
+
"https://docs.appsignal.com/ruby/instrumentation/event-formatters.html"
|
96
95
|
|
97
96
|
EventFormatter.deprecated_formatter_classes[name] = self
|
98
97
|
end
|
@@ -13,20 +13,15 @@ module Appsignal
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def install
|
16
|
-
|
17
|
-
|
18
|
-
Net::HTTP.send(:prepend, Appsignal::Integrations::NetHttpIntegration)
|
19
|
-
else
|
20
|
-
Net::HTTP.class_eval do
|
21
|
-
alias request_without_appsignal request
|
16
|
+
Net::HTTP.class_eval do
|
17
|
+
alias request_without_appsignal request
|
22
18
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
19
|
+
def request(request, body = nil, &block)
|
20
|
+
Appsignal.instrument(
|
21
|
+
"request.net_http",
|
22
|
+
"#{request.method} #{use_ssl? ? "https" : "http"}://#{request["host"] || address}"
|
23
|
+
) do
|
24
|
+
request_without_appsignal(request, body, &block)
|
30
25
|
end
|
31
26
|
end
|
32
27
|
end
|
data/lib/appsignal/minutely.rb
CHANGED
@@ -33,8 +33,7 @@ module Appsignal
|
|
33
33
|
# @return [void]
|
34
34
|
def <<(probe)
|
35
35
|
deprecation_message "Deprecated `Appsignal::Minute.probes <<` " \
|
36
|
-
"call. Please use `Appsignal::Minutely.probes.register` instead."
|
37
|
-
logger
|
36
|
+
"call. Please use `Appsignal::Minutely.probes.register` instead."
|
38
37
|
register probe.object_id, probe
|
39
38
|
end
|
40
39
|
|
@@ -28,10 +28,9 @@ module Appsignal
|
|
28
28
|
def initialize(app, _options = nil)
|
29
29
|
Appsignal.logger.debug \
|
30
30
|
"Initializing Appsignal::Rack::JSExceptionCatcher"
|
31
|
-
|
32
|
-
"Please use the official AppSignal JavaScript
|
33
|
-
"https://docs.appsignal.com/front-end/"
|
34
|
-
deprecation_message message, Appsignal.logger
|
31
|
+
deprecation_message "The Appsignal::Rack::JSExceptionCatcher is " \
|
32
|
+
"deprecated. Please use the official AppSignal JavaScript " \
|
33
|
+
"integration instead. https://docs.appsignal.com/front-end/"
|
35
34
|
@app = app
|
36
35
|
end
|
37
36
|
|
data/lib/appsignal/system.rb
CHANGED
@@ -76,14 +76,8 @@ module Appsignal
|
|
76
76
|
ldd_version && ldd_version[0]
|
77
77
|
end
|
78
78
|
|
79
|
-
# @api private
|
80
79
|
def self.jruby?
|
81
80
|
RUBY_PLATFORM == "java"
|
82
81
|
end
|
83
|
-
|
84
|
-
# @api private
|
85
|
-
def self.ruby_2_or_up?
|
86
|
-
versionify(RUBY_VERSION) >= versionify("2.0")
|
87
|
-
end
|
88
82
|
end
|
89
83
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Appsignal
|
2
2
|
module Utils
|
3
3
|
module DeprecationMessage
|
4
|
-
def deprecation_message(message, logger)
|
5
|
-
$
|
4
|
+
def deprecation_message(message, logger = Appsignal.logger)
|
5
|
+
$stderr.puts "appsignal WARNING: #{message}"
|
6
6
|
logger.warn message
|
7
7
|
end
|
8
8
|
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -5,6 +5,8 @@ describe Appsignal::CLI::NotifyOfDeploy do
|
|
5
5
|
|
6
6
|
let(:out_stream) { std_stream }
|
7
7
|
let(:output) { out_stream.read }
|
8
|
+
let(:err_stream) { std_stream }
|
9
|
+
let(:stderr) { err_stream.read }
|
8
10
|
|
9
11
|
define :include_deploy_notification do
|
10
12
|
match do |log|
|
@@ -32,7 +34,7 @@ describe Appsignal::CLI::NotifyOfDeploy do
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def run
|
35
|
-
|
37
|
+
capture_std_streams(out_stream, err_stream) do
|
36
38
|
run_cli("notify_of_deploy", options)
|
37
39
|
end
|
38
40
|
end
|
@@ -130,7 +132,7 @@ describe Appsignal::CLI::NotifyOfDeploy do
|
|
130
132
|
it "prints a deprecation message" do
|
131
133
|
run
|
132
134
|
deprecation_message = "This command (appsignal notify_of_deploy) has been deprecated"
|
133
|
-
expect(
|
135
|
+
expect(stderr).to include("appsignal WARNING: #{deprecation_message}")
|
134
136
|
expect(log).to contains_log :warn, deprecation_message
|
135
137
|
end
|
136
138
|
|
@@ -323,11 +323,11 @@ describe Appsignal::Config do
|
|
323
323
|
end
|
324
324
|
|
325
325
|
describe "support for old config keys" do
|
326
|
-
let(:
|
327
|
-
let(:
|
326
|
+
let(:err_stream) { std_stream }
|
327
|
+
let(:stderr) { err_stream.read }
|
328
328
|
let(:config) { project_fixture_config(env, {}, test_logger(log)) }
|
329
329
|
let(:log) { StringIO.new }
|
330
|
-
before {
|
330
|
+
before { capture_std_streams(std_stream, err_stream) { config } }
|
331
331
|
|
332
332
|
describe ":api_key" do
|
333
333
|
context "without :push_api_key" do
|
@@ -338,7 +338,7 @@ describe Appsignal::Config do
|
|
338
338
|
expect(config.config_hash).to_not have_key :api_key
|
339
339
|
|
340
340
|
message = "Old configuration key found. Please update the 'api_key' to 'push_api_key'"
|
341
|
-
expect(
|
341
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
342
342
|
expect(log_contents(log)).to contains_log :warn, message
|
343
343
|
end
|
344
344
|
end
|
@@ -351,7 +351,7 @@ describe Appsignal::Config do
|
|
351
351
|
expect(config.config_hash).to_not have_key :api_key
|
352
352
|
|
353
353
|
message = "Old configuration key found. Please update the 'api_key' to 'push_api_key'"
|
354
|
-
expect(
|
354
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
355
355
|
expect(log_contents(log)).to contains_log :warn, message
|
356
356
|
end
|
357
357
|
end
|
@@ -366,7 +366,7 @@ describe Appsignal::Config do
|
|
366
366
|
expect(config.config_hash).to_not have_key :ignore_exceptions
|
367
367
|
|
368
368
|
message = "Old configuration key found. Please update the 'ignore_exceptions' to 'ignore_errors'"
|
369
|
-
expect(
|
369
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
370
370
|
expect(log_contents(log)).to contains_log :warn, message
|
371
371
|
end
|
372
372
|
end
|
@@ -379,7 +379,7 @@ describe Appsignal::Config do
|
|
379
379
|
expect(config.config_hash).to_not have_key :ignore_exceptions
|
380
380
|
|
381
381
|
message = "Old configuration key found. Please update the 'ignore_exceptions' to 'ignore_errors'"
|
382
|
-
expect(
|
382
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
383
383
|
expect(log_contents(log)).to contains_log :warn, message
|
384
384
|
end
|
385
385
|
end
|
@@ -116,7 +116,8 @@ describe Appsignal::EventFormatter do
|
|
116
116
|
end
|
117
117
|
|
118
118
|
context "when registering deprecated formatters" do
|
119
|
-
let(:
|
119
|
+
let(:err_stream) { std_stream }
|
120
|
+
let(:stderr) { err_stream.read }
|
120
121
|
let(:deprecated_formatter) do
|
121
122
|
Class.new(Appsignal::EventFormatter) do
|
122
123
|
register "mock.deprecated"
|
@@ -133,16 +134,16 @@ describe Appsignal::EventFormatter do
|
|
133
134
|
"https://docs.appsignal.com/ruby/instrumentation/event-formatters.html"
|
134
135
|
|
135
136
|
logs = capture_logs do
|
136
|
-
|
137
|
+
capture_std_streams(std_stream, err_stream) { deprecated_formatter }
|
137
138
|
end
|
138
139
|
expect(logs).to contains_log :warn, message
|
139
|
-
expect(
|
140
|
+
expect(stderr).to include "appsignal WARNING: #{message}"
|
140
141
|
|
141
142
|
expect(klass.deprecated_formatter_classes.keys).to include("mock.deprecated")
|
142
143
|
end
|
143
144
|
|
144
145
|
it "initializes deprecated formatters" do
|
145
|
-
|
146
|
+
capture_std_streams(std_stream, err_stream) { deprecated_formatter }
|
146
147
|
klass.initialize_deprecated_formatters
|
147
148
|
|
148
149
|
expect(klass.registered?("mock.deprecated")).to be_truthy
|
@@ -285,19 +285,19 @@ describe Appsignal::Minutely do
|
|
285
285
|
end
|
286
286
|
|
287
287
|
describe "#<<" do
|
288
|
-
let(:
|
289
|
-
let(:
|
288
|
+
let(:err_stream) { std_stream }
|
289
|
+
let(:stderr) { err_stream.read }
|
290
290
|
let(:log_stream) { std_stream }
|
291
291
|
let(:log) { log_contents(log_stream) }
|
292
292
|
before { Appsignal.logger = test_logger(log_stream) }
|
293
293
|
|
294
294
|
it "adds the probe, but prints a deprecation warning" do
|
295
295
|
probe = lambda {}
|
296
|
-
|
296
|
+
capture_std_streams(std_stream, err_stream) { collection << probe }
|
297
297
|
deprecation_message = "Deprecated " \
|
298
298
|
"`Appsignal::Minute.probes <<` call. Please use " \
|
299
299
|
"`Appsignal::Minutely.probes.register` instead."
|
300
|
-
expect(
|
300
|
+
expect(stderr).to include "appsignal WARNING: #{deprecation_message}"
|
301
301
|
expect(log).to contains_log :warn, deprecation_message
|
302
302
|
expect(collection[probe.object_id]).to eql(probe)
|
303
303
|
end
|
@@ -11,18 +11,22 @@ describe Appsignal::Rack::JSExceptionCatcher do
|
|
11
11
|
before { Appsignal.config = config }
|
12
12
|
|
13
13
|
describe "#initialize" do
|
14
|
+
let(:out_stream) { std_stream }
|
15
|
+
let(:err_stream) { std_stream }
|
16
|
+
let(:output) { out_stream.read }
|
17
|
+
let(:stderr) { err_stream.read }
|
18
|
+
|
14
19
|
it "logs to the logger" do
|
15
|
-
stdout = std_stream
|
16
|
-
stderr = std_stream
|
17
20
|
log = capture_logs do
|
18
|
-
capture_std_streams(
|
21
|
+
capture_std_streams(out_stream, err_stream) do
|
19
22
|
Appsignal::Rack::JSExceptionCatcher.new(app, options)
|
20
23
|
end
|
21
24
|
end
|
22
25
|
expect(log).to contains_log(:warn, deprecation_message)
|
23
26
|
expect(log).to contains_log(:debug, "Initializing Appsignal::Rack::JSExceptionCatcher")
|
24
|
-
expect(
|
25
|
-
expect(stderr
|
27
|
+
expect(stderr).to include "appsignal WARNING: #{deprecation_message}"
|
28
|
+
expect(stderr).to_not include("appsignal:")
|
29
|
+
expect(output).to be_empty
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
@@ -93,40 +93,4 @@ describe Appsignal::System do
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
96
|
-
|
97
|
-
describe ".ruby_2_or_up?" do
|
98
|
-
around do |example|
|
99
|
-
original_ruby_version = RUBY_VERSION
|
100
|
-
Object.send(:remove_const, "RUBY_VERSION")
|
101
|
-
Object.const_set("RUBY_VERSION", ruby_version)
|
102
|
-
example.run
|
103
|
-
Object.send(:remove_const, "RUBY_VERSION")
|
104
|
-
Object.const_set("RUBY_VERSION", original_ruby_version)
|
105
|
-
end
|
106
|
-
subject { described_class.ruby_2_or_up? }
|
107
|
-
|
108
|
-
context "when on Ruby 1.9" do
|
109
|
-
let(:ruby_version) { "1.9.3-p533" }
|
110
|
-
|
111
|
-
it "returns false" do
|
112
|
-
is_expected.to be(false)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
context "when on Ruby 2.0" do
|
117
|
-
let(:ruby_version) { "2.0.0" }
|
118
|
-
|
119
|
-
it "returns true" do
|
120
|
-
is_expected.to be(true)
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
|
-
context "when on Ruby 2.x" do
|
125
|
-
let(:ruby_version) { "2.1.0" }
|
126
|
-
|
127
|
-
it "returns true" do
|
128
|
-
is_expected.to be(true)
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end
|
132
96
|
end
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -949,7 +949,7 @@ describe Appsignal do
|
|
949
949
|
|
950
950
|
it "outputs deprecated warning" do
|
951
951
|
subject
|
952
|
-
expect(stderr).to include("Appsignal.is_ignored_error? is deprecated with no replacement
|
952
|
+
expect(stderr).to include("Appsignal.is_ignored_error? is deprecated with no replacement")
|
953
953
|
end
|
954
954
|
|
955
955
|
context "when error is not in the ignored list" do
|
@@ -981,7 +981,7 @@ describe Appsignal do
|
|
981
981
|
|
982
982
|
it "outputs deprecated warning" do
|
983
983
|
subject
|
984
|
-
expect(stderr).to include("Appsignal.is_ignored_action? is deprecated with no replacement
|
984
|
+
expect(stderr).to include("Appsignal.is_ignored_action? is deprecated with no replacement")
|
985
985
|
end
|
986
986
|
|
987
987
|
context "when action is not in the ingore list" 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: 2.10.
|
4
|
+
version: 2.10.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -227,7 +227,6 @@ files:
|
|
227
227
|
- lib/appsignal/integrations/delayed_job_plugin.rb
|
228
228
|
- lib/appsignal/integrations/grape.rb
|
229
229
|
- lib/appsignal/integrations/mongo_ruby_driver.rb
|
230
|
-
- lib/appsignal/integrations/net_http.rb
|
231
230
|
- lib/appsignal/integrations/object.rb
|
232
231
|
- lib/appsignal/integrations/padrino.rb
|
233
232
|
- lib/appsignal/integrations/que.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Appsignal
|
4
|
-
module Integrations
|
5
|
-
module NetHttpIntegration
|
6
|
-
def request(request, body = nil, &block)
|
7
|
-
Appsignal.instrument(
|
8
|
-
"request.net_http",
|
9
|
-
"#{request.method} #{use_ssl? ? "https" : "http"}://#{request["host"] || address}"
|
10
|
-
) do
|
11
|
-
super
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|