airbrake-ruby 4.14.0 → 4.14.1

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
  SHA256:
3
- metadata.gz: 6b246c5d84c2bc6ff22b535260b416d37bbc2fca17fff01ae3705156ce68a74b
4
- data.tar.gz: 743b3190115223bf043cf8ecf7e9b5a8bb32b40206c146967d86489514247d99
3
+ metadata.gz: 8a99b9f69c92aab19bd33806452b720f4e193578d5ffa22f79faa780c38d9fa0
4
+ data.tar.gz: 6e19717eef99f7446b8f2e50e79e2eea6787d2b283c0a291821f09ab5e227a8f
5
5
  SHA512:
6
- metadata.gz: c798358c9215c8ba703fd81163378bcd828200a71cc2ad026f9569684ca654ac094d01f38548c2fe5919ad744456c7a42bd58304d961b5c1997b00e4a4df0f8f
7
- data.tar.gz: b7ed80303a34c3b0f58b51037063428384b4680273729f88062fd22146fcccfc55989a0f77ddc88a502859d234661a1243853d98fc1abc05f951a703962ec6af
6
+ metadata.gz: 8ece3a704ef7a11e8994e657e53526c684da53316cc609ff8efc05e5b14cf6eca8b2536233a8ab0bfd8c6bc0997f7c97a9ef073967a8fd85b69f960db9db5757
7
+ data.tar.gz: 28b983d5c3b2b3e7d2a31c5429ffb72b06103569444411c5e7231c76ce308ef143140f40d215401b178aa2022f912914ef7c3f7b14ec4f01c75398342dda97c0
@@ -83,6 +83,7 @@ module Airbrake
83
83
 
84
84
  if @pid != Process.pid && @workers.list.empty?
85
85
  @pid = Process.pid
86
+ @workers = ThreadGroup.new
86
87
  spawn_workers
87
88
  end
88
89
 
@@ -2,5 +2,5 @@
2
2
  # More information: http://semver.org/
3
3
  module Airbrake
4
4
  # @return [String] the library version
5
- AIRBRAKE_RUBY_VERSION = '4.14.0'.freeze
5
+ AIRBRAKE_RUBY_VERSION = '4.14.1'.freeze
6
6
  end
@@ -85,11 +85,31 @@ RSpec.describe Airbrake::ThreadPool do
85
85
  expect(subject).not_to have_workers
86
86
  end
87
87
 
88
- it "respawns workers on fork()", skip: %w[jruby].include?(RUBY_ENGINE) do
89
- pid = fork { expect(subject).to have_workers }
90
- Process.wait(pid)
91
- subject.close
92
- expect(subject).not_to have_workers
88
+ describe "forking behavior" do
89
+ before do
90
+ skip('fork() is unsupported on JRuby') if %w[jruby].include?(RUBY_ENGINE)
91
+ unless Process.respond_to?(:last_status)
92
+ skip('Process.last_status is unsupported on this Ruby')
93
+ end
94
+ end
95
+
96
+ it "respawns workers on fork()" do
97
+ pid = fork { expect(subject).to have_workers }
98
+ Process.wait(pid)
99
+ subject.close
100
+
101
+ expect(Process.last_status).to be_success
102
+ expect(subject).not_to have_workers
103
+ end
104
+
105
+ it "ensures that a new thread group is created per process" do
106
+ subject << 1
107
+ pid = fork { subject.has_workers? }
108
+ Process.wait(pid)
109
+ subject.close
110
+
111
+ expect(Process.last_status).to be_success
112
+ end
93
113
  end
94
114
  end
95
115
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.14.0
4
+ version: 4.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airbrake Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-10 00:00:00.000000000 Z
11
+ date: 2020-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbtree3