appsignal 4.0.4-java → 4.0.5-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/ext/agent.rb +27 -27
- data/lib/appsignal/config.rb +7 -0
- data/lib/appsignal/hooks/at_exit.rb +1 -0
- data/lib/appsignal/hooks/puma.rb +5 -1
- data/lib/appsignal/integrations/puma.rb +45 -0
- data/lib/appsignal/rack/abstract_middleware.rb +3 -47
- data/lib/appsignal/rack/event_handler.rb +2 -0
- data/lib/appsignal/rack/hanami_middleware.rb +5 -1
- data/lib/appsignal/rack.rb +68 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/check_in/cron_spec.rb +75 -83
- data/spec/lib/appsignal/check_in/scheduler_spec.rb +65 -106
- data/spec/lib/appsignal/config_spec.rb +13 -0
- data/spec/lib/appsignal/hooks/at_exit_spec.rb +11 -0
- data/spec/lib/appsignal/hooks/puma_spec.rb +31 -23
- data/spec/lib/appsignal/integrations/puma_spec.rb +150 -0
- data/spec/lib/appsignal/probes_spec.rb +1 -6
- data/spec/lib/appsignal/rack/abstract_middleware_spec.rb +41 -122
- data/spec/lib/appsignal/rack_spec.rb +180 -0
- data/spec/spec_helper.rb +0 -7
- data/spec/support/helpers/config_helpers.rb +2 -1
- data/spec/support/matchers/contains_log.rb +10 -3
- data/spec/support/mocks/hash_like.rb +10 -0
- data/spec/support/mocks/puma_mock.rb +43 -0
- metadata +6 -2
@@ -1,14 +1,21 @@
|
|
1
1
|
RSpec::Matchers.define :contains_log do |level, message|
|
2
|
-
|
2
|
+
log_level_prefix = level.upcase
|
3
3
|
|
4
4
|
match do |actual|
|
5
|
-
|
5
|
+
case message
|
6
|
+
when Regexp
|
7
|
+
/\[#{log_level_prefix}\] #{message}/.match?(actual)
|
8
|
+
else
|
9
|
+
expected_log_line = "[#{log_level_prefix}] #{message}"
|
10
|
+
actual.include?(expected_log_line)
|
11
|
+
end
|
6
12
|
end
|
7
13
|
|
8
14
|
failure_message do |actual|
|
9
15
|
<<~MESSAGE
|
10
16
|
Did not contain log line:
|
11
|
-
#{
|
17
|
+
Log level: #{log_level_prefix}
|
18
|
+
Message: #{message}
|
12
19
|
|
13
20
|
Received logs:
|
14
21
|
#{actual}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
class PumaMock
|
2
|
+
module MiniSSL
|
3
|
+
class SSLError < StandardError
|
4
|
+
def self.to_s
|
5
|
+
"Puma::MiniSSL::SSLError"
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
class HttpParserError < StandardError
|
11
|
+
def self.to_s
|
12
|
+
"Puma::HttpParserError"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
class HttpParserError501 < StandardError
|
17
|
+
def self.to_s
|
18
|
+
"Puma::HttpParserError501"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.stats
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.cli_config
|
26
|
+
@cli_config ||= CliConfig.new
|
27
|
+
end
|
28
|
+
|
29
|
+
class Server
|
30
|
+
end
|
31
|
+
|
32
|
+
module Const
|
33
|
+
VERSION = "6.0.0".freeze
|
34
|
+
end
|
35
|
+
|
36
|
+
class CliConfig
|
37
|
+
attr_accessor :options
|
38
|
+
|
39
|
+
def initialize
|
40
|
+
@options = {}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
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: 4.0.
|
4
|
+
version: 4.0.5
|
5
5
|
platform: java
|
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: 2024-
|
13
|
+
date: 2024-09-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -268,6 +268,7 @@ files:
|
|
268
268
|
- lib/appsignal/integrations/mongo_ruby_driver.rb
|
269
269
|
- lib/appsignal/integrations/net_http.rb
|
270
270
|
- lib/appsignal/integrations/object.rb
|
271
|
+
- lib/appsignal/integrations/puma.rb
|
271
272
|
- lib/appsignal/integrations/que.rb
|
272
273
|
- lib/appsignal/integrations/railtie.rb
|
273
274
|
- lib/appsignal/integrations/rake.rb
|
@@ -387,6 +388,7 @@ files:
|
|
387
388
|
- spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb
|
388
389
|
- spec/lib/appsignal/integrations/net_http_spec.rb
|
389
390
|
- spec/lib/appsignal/integrations/object_spec.rb
|
391
|
+
- spec/lib/appsignal/integrations/puma_spec.rb
|
390
392
|
- spec/lib/appsignal/integrations/que_spec.rb
|
391
393
|
- spec/lib/appsignal/integrations/railtie_spec.rb
|
392
394
|
- spec/lib/appsignal/integrations/resque_spec.rb
|
@@ -464,7 +466,9 @@ files:
|
|
464
466
|
- spec/support/mocks/dummy_app.rb
|
465
467
|
- spec/support/mocks/fake_gc_profiler.rb
|
466
468
|
- spec/support/mocks/fake_gvl_tools.rb
|
469
|
+
- spec/support/mocks/hash_like.rb
|
467
470
|
- spec/support/mocks/mock_probe.rb
|
471
|
+
- spec/support/mocks/puma_mock.rb
|
468
472
|
- spec/support/shared_examples/instrument.rb
|
469
473
|
- spec/support/stubs/appsignal/loaders/loader_stub.rb
|
470
474
|
- spec/support/stubs/delayed_job.rb
|