appsignal 0.12.beta.39 → 0.12.beta.40

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: 7a7a0812a006296451ced17e5caf4ed0dcc24b66
4
- data.tar.gz: 9cf99ae0382bcb236f48b10c0b3c087ee31951b7
3
+ metadata.gz: 3120959a03123d8be3aa066bc8e27ceebb7e4663
4
+ data.tar.gz: 5e881f5caac168709e3021221a23b2b9680f5679
5
5
  SHA512:
6
- metadata.gz: f1b9f2b1ecfbd223672bac629303d12e3248d26d208e6155e2b9a59e64520c2a7a2f0a7e44ef2e614b305fbb35c3b86eccdc2c7004b7c2e98fdb95b2efc372c9
7
- data.tar.gz: bf59b508199dd15fc8eb38d96d4e095e1abca9801bdba559f94c2f9d231a3807820215c8de408360f18e2197c246fe1fb6d0ae561bd63562fc35800e810fecae
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
@@ -1,5 +1,5 @@
1
1
  require 'yaml'
2
2
 
3
3
  module Appsignal
4
- VERSION = '0.12.beta.39'
4
+ VERSION = '0.12.beta.40'
5
5
  end
@@ -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
- it "should add a before shutdown worker callback" do
27
- Puma.cli_config.options[:before_worker_shutdown].first.should be_a(Proc)
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.39
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-07 00:00:00.000000000 Z
12
+ date: 2015-10-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack