appsignal 0.12.beta.39 → 0.12.beta.40
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/lib/appsignal/integrations/puma.rb +1 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/integrations/puma_spec.rb +20 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3120959a03123d8be3aa066bc8e27ceebb7e4663
|
|
4
|
+
data.tar.gz: 5e881f5caac168709e3021221a23b2b9680f5679
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b659edf8928555f1b014fe0de55dccb65d64ae6b61601eb5ad2110da87828844b46bee7d144ec7d6d790f8b66d49740bb856e5b81a58d850a92b6eb36808a1e
|
|
7
|
+
data.tar.gz: 959a6706ef1e0f570e7446105472cb3113a9aeb37b298a5c2f85ad1f0bb1e7c7efa70a9496d7c972115239642c6de80ac4cd301be946ef480522a5a0f156804e
|
|
@@ -2,6 +2,7 @@ if defined?(::Puma) && ::Puma.respond_to?(:cli_config)
|
|
|
2
2
|
Appsignal.logger.info('Loading Puma integration')
|
|
3
3
|
|
|
4
4
|
if ::Puma.cli_config
|
|
5
|
+
::Puma.cli_config.options[:before_worker_shutdown] ||= []
|
|
5
6
|
::Puma.cli_config.options[:before_worker_shutdown] << Proc.new do |id|
|
|
6
7
|
Appsignal.stop
|
|
7
8
|
end
|
data/lib/appsignal/version.rb
CHANGED
|
@@ -14,17 +14,33 @@ describe "Puma integration" do
|
|
|
14
14
|
|
|
15
15
|
def initialize
|
|
16
16
|
@options = {}
|
|
17
|
-
@options[:before_worker_shutdown] = []
|
|
18
17
|
end
|
|
19
18
|
end
|
|
20
19
|
end
|
|
21
20
|
before do
|
|
22
|
-
load file
|
|
23
21
|
start_agent
|
|
24
22
|
end
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
context "with a nil before worker shutdown" do
|
|
25
|
+
before do
|
|
26
|
+
Puma.cli_config.options.delete(:before_worker_shutdown)
|
|
27
|
+
load file
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "should add a before shutdown worker callback" do
|
|
31
|
+
Puma.cli_config.options[:before_worker_shutdown].first.should be_a(Proc)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
context "with an existing before worker shutdown" do
|
|
36
|
+
before do
|
|
37
|
+
Puma.cli_config.options[:before_worker_shutdown] = []
|
|
38
|
+
load file
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it "should add a before shutdown worker callback" do
|
|
42
|
+
Puma.cli_config.options[:before_worker_shutdown].first.should be_a(Proc)
|
|
43
|
+
end
|
|
28
44
|
end
|
|
29
45
|
|
|
30
46
|
context "without Puma" 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: 0.12.beta.
|
|
4
|
+
version: 0.12.beta.40
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Beekman
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-10-
|
|
12
|
+
date: 2015-10-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rack
|