appsignal 2.10.4 → 2.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +148 -2
- data/CHANGELOG.md +9 -0
- data/Rakefile +7 -1
- data/appsignal.gemspec +5 -2
- data/build_matrix.yml +12 -2
- data/ext/agent.yml +19 -19
- data/lib/appsignal.rb +6 -3
- data/lib/appsignal/cli/diagnose.rb +1 -1
- 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 +13 -8
- data/lib/appsignal/integrations/grape.rb +2 -1
- data/lib/appsignal/integrations/net_http.rb +16 -0
- data/lib/appsignal/minutely.rb +1 -2
- data/lib/appsignal/rack/js_exception_catcher.rb +3 -4
- data/lib/appsignal/system.rb +6 -0
- data/lib/appsignal/transaction.rb +6 -1
- data/lib/appsignal/utils/deprecation_message.rb +2 -2
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/auth_check_spec.rb +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.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/integrations/grape_spec.rb +10 -0
- 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 +36 -0
- data/spec/lib/appsignal/transaction_spec.rb +14 -1
- data/spec/lib/appsignal/transmitter_spec.rb +3 -1
- data/spec/lib/appsignal_spec.rb +2 -2
- data/spec/spec_helper.rb +15 -1
- data/support/install_deps +4 -1
- metadata +18 -17
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.10.6
|
4
|
+
- Check if queued payloads are for correct app and not expired
|
5
|
+
|
6
|
+
## 2.10.5
|
7
|
+
- Improve Ruby 1.9 compatibility. PR #591
|
8
|
+
- Add grape.skip_appsignal_error request env. PR #588
|
9
|
+
More information: https://docs.appsignal.com/ruby/integrations/grape.html
|
10
|
+
- Fix compatibility with the `http_logger` gem. Fix `SystemStackError`. PR #597
|
11
|
+
|
3
12
|
## 2.10.4
|
4
13
|
- Fix `Appsignal::Transaction#set_http_or_background_action` helper (used by
|
5
14
|
`Appsignal.monitor_transaction`), to allow overwriting the action name of a
|
data/Rakefile
CHANGED
@@ -59,6 +59,7 @@ namespace :build_matrix do
|
|
59
59
|
|
60
60
|
env = [
|
61
61
|
env_map("RUBY_VERSION", ruby_version),
|
62
|
+
env_map("GEMSET", gem["gem"]),
|
62
63
|
env_map("BUNDLE_GEMFILE", "gemfiles/#{gem["gem"]}.gemfile")
|
63
64
|
]
|
64
65
|
rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
|
@@ -364,7 +365,12 @@ end
|
|
364
365
|
begin
|
365
366
|
require "rspec/core/rake_task"
|
366
367
|
desc "Run the AppSignal gem test suite."
|
367
|
-
RSpec::Core::RakeTask.new :test
|
368
|
+
RSpec::Core::RakeTask.new :test do |t|
|
369
|
+
is_jruby = defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
|
370
|
+
unless is_jruby
|
371
|
+
t.rspec_opts = "--exclude-pattern=spec/lib/appsignal/extension/jruby_spec.rb"
|
372
|
+
end
|
373
|
+
end
|
368
374
|
rescue LoadError # rubocop:disable Lint/HandleExceptions
|
369
375
|
# When running rake install, there is no RSpec yet.
|
370
376
|
end
|
data/appsignal.gemspec
CHANGED
@@ -39,9 +39,12 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
39
39
|
|
40
40
|
gem.add_development_dependency "rake", "~> 11"
|
41
41
|
gem.add_development_dependency "rspec", "~> 3.8"
|
42
|
-
gem.add_development_dependency "pry"
|
43
42
|
gem.add_development_dependency "timecop"
|
44
43
|
gem.add_development_dependency "webmock"
|
45
|
-
gem.add_development_dependency "rubocop", "0.50.0"
|
46
44
|
gem.add_development_dependency "yard", ">= 0.9.20"
|
45
|
+
is_modern_ruby = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0.0")
|
46
|
+
if is_modern_ruby
|
47
|
+
gem.add_development_dependency "pry"
|
48
|
+
gem.add_development_dependency "rubocop", "0.50.0"
|
49
|
+
end
|
47
50
|
end
|
data/build_matrix.yml
CHANGED
@@ -34,14 +34,14 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
|
|
34
34
|
- checkout
|
35
35
|
- sem-version ruby $RUBY_VERSION
|
36
36
|
- ./support/check_versions
|
37
|
-
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE),$_BUNDLER_CACHE-bundler-$RUBY_VERSION
|
37
|
+
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE),$_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET,$_BUNDLER_CACHE-bundler-$RUBY_VERSION
|
38
38
|
- cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE),$_GEMS_CACHE-gems-$RUBY_VERSION
|
39
39
|
- ./support/install_deps
|
40
40
|
- ./support/bundler_wrapper install --jobs=3 --retry=3
|
41
41
|
epilogue:
|
42
42
|
on_pass:
|
43
43
|
commands:
|
44
|
-
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE) .bundle
|
44
|
+
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE) .bundle
|
45
45
|
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE) $HOME/.gem
|
46
46
|
|
47
47
|
blocks:
|
@@ -53,6 +53,8 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
|
|
53
53
|
env_vars:
|
54
54
|
- name: RUBY_VERSION
|
55
55
|
value: 2.6.5
|
56
|
+
- name: GEMSET
|
57
|
+
value: no_dependencies
|
56
58
|
- name: BUNDLE_GEMFILE
|
57
59
|
value: gemfiles/no_dependencies.gemfile
|
58
60
|
commands:
|
@@ -65,6 +67,8 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
|
|
65
67
|
env_vars:
|
66
68
|
- name: RUBY_VERSION
|
67
69
|
value: 2.6.5
|
70
|
+
- name: GEMSET
|
71
|
+
value: no_dependencies
|
68
72
|
- name: BUNDLE_GEMFILE
|
69
73
|
value: gemfiles/no_dependencies.gemfile
|
70
74
|
commands:
|
@@ -81,8 +85,13 @@ matrix:
|
|
81
85
|
minimal:
|
82
86
|
- "no_dependencies"
|
83
87
|
- "rails-5.2"
|
88
|
+
- "rails-6.0"
|
84
89
|
|
85
90
|
ruby:
|
91
|
+
- ruby: "1.9.3-p551"
|
92
|
+
rubygems: "2.7.8"
|
93
|
+
bundler: "1.17.3"
|
94
|
+
gems: "none"
|
86
95
|
- ruby: "2.0.0-p648"
|
87
96
|
rubygems: "2.7.8"
|
88
97
|
bundler: "1.17.3"
|
@@ -148,6 +157,7 @@ matrix:
|
|
148
157
|
- "2.2.10"
|
149
158
|
- "2.3.8"
|
150
159
|
- "2.4.9"
|
160
|
+
- "jruby-9.1.17.0"
|
151
161
|
- gem: "resque"
|
152
162
|
bundler: "1.17.3"
|
153
163
|
- gem: "sequel"
|
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
|
|
@@ -337,7 +337,7 @@ module Appsignal
|
|
337
337
|
path = File.expand_path("../../../../ext/install.report", __FILE__)
|
338
338
|
raw_report = File.read(path)
|
339
339
|
Utils.parse_yaml(raw_report)
|
340
|
-
rescue => e
|
340
|
+
rescue StandardError, Psych::SyntaxError => e # rubocop:disable Lint/ShadowedException
|
341
341
|
{
|
342
342
|
"parsing_error" => {
|
343
343
|
"error" => "#{e.class}: #{e}",
|
@@ -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,15 +13,20 @@ module Appsignal
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def install
|
16
|
-
|
17
|
-
|
16
|
+
if Appsignal::System.ruby_2_or_up?
|
17
|
+
require "appsignal/integrations/net_http"
|
18
|
+
Net::HTTP.send(:prepend, Appsignal::Integrations::NetHttpIntegration)
|
19
|
+
else
|
20
|
+
Net::HTTP.class_eval do
|
21
|
+
alias request_without_appsignal request
|
18
22
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
def request(request, body = nil, &block)
|
24
|
+
Appsignal.instrument(
|
25
|
+
"request.net_http",
|
26
|
+
"#{request.method} #{use_ssl? ? "https" : "http"}://#{request["host"] || address}"
|
27
|
+
) do
|
28
|
+
request_without_appsignal(request, body, &block)
|
29
|
+
end
|
25
30
|
end
|
26
31
|
end
|
27
32
|
end
|
@@ -23,7 +23,8 @@ module Appsignal
|
|
23
23
|
begin
|
24
24
|
app.call(env)
|
25
25
|
rescue Exception => error # rubocop:disable Lint/RescueException
|
26
|
-
|
26
|
+
# Do not set error if "grape.skip_appsignal_error" is set to `true`.
|
27
|
+
transaction.set_error(error) unless env["grape.skip_appsignal_error"]
|
27
28
|
raise error
|
28
29
|
ensure
|
29
30
|
request_method = request.request_method.to_s.upcase
|
@@ -0,0 +1,16 @@
|
|
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
|
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,8 +76,14 @@ module Appsignal
|
|
76
76
|
ldd_version && ldd_version[0]
|
77
77
|
end
|
78
78
|
|
79
|
+
# @api private
|
79
80
|
def self.jruby?
|
80
81
|
RUBY_PLATFORM == "java"
|
81
82
|
end
|
83
|
+
|
84
|
+
# @api private
|
85
|
+
def self.ruby_2_or_up?
|
86
|
+
versionify(RUBY_VERSION) >= versionify("2.0")
|
87
|
+
end
|
82
88
|
end
|
83
89
|
end
|
@@ -248,7 +248,12 @@ module Appsignal
|
|
248
248
|
Appsignal::Utils::Data.generate(data)
|
249
249
|
)
|
250
250
|
rescue RuntimeError => e
|
251
|
-
|
251
|
+
begin
|
252
|
+
inspected_data = data.inspect
|
253
|
+
Appsignal.logger.error("Error generating data (#{e.class}: #{e.message}) for '#{inspected_data}'")
|
254
|
+
rescue => e
|
255
|
+
Appsignal.logger.error("Error generating data (#{e.class}: #{e.message}). Can't inspect data.")
|
256
|
+
end
|
252
257
|
end
|
253
258
|
|
254
259
|
def sample_data
|
@@ -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
@@ -38,7 +38,7 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :send_report => :yes_cli_i
|
|
38
38
|
# Because this is saved on the class rather than an instance of the
|
39
39
|
# class we need to clear it like this in case a certain test doesn't
|
40
40
|
# generate a report.
|
41
|
-
cli_class.remove_instance_variable :@data
|
41
|
+
cli_class.send :remove_instance_variable, :@data
|
42
42
|
end
|
43
43
|
|
44
44
|
if DependencyHelper.rails_present?
|
@@ -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
|
|