process_bot 0.1.28 → 0.1.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e123dbde56775d5539bb91d48be68c1f83a09a2b001c6a61a1334aa3dba2b1ab
4
- data.tar.gz: 34f9ff90352cad06e742ba69f7d4402d095678359caded93b20204f89b804a44
3
+ metadata.gz: 26b4a49cb5489140c90c0712ed2a9b686a43d531ab1290ee63fec7710371ca31
4
+ data.tar.gz: 857a0fc1d15a79dbb87a92f25ded46706953b0215e64f47d135eb96ba9cf90d3
5
5
  SHA512:
6
- metadata.gz: 8cbc29f75c5ffa3358f8614c11698fc4ac6548efa5a00a4d63a1004300707c80b395eb9229b877b06cc93c1d3b7e10987fa99d02f1942c67a133db277d9af49b
7
- data.tar.gz: 8042fcbf747ba1162120b87e54d64bd1ac972615eaca4288865864ea76747e27d94b697b8de97d0a38ede453abbc9c30e5a54fdc3af32052f9ff466c82b9d311
6
+ metadata.gz: 9d14944e3d8976d0077f20e83560558bd9af1d58247c849ef7cc03d4205c017925108fc2360cdd99059480f7aaf05e5fdaf464ea19fded430a540f168136963b
7
+ data.tar.gz: d22b2ec8c5c7483bad6bee7ab51060164f811b601f448e1f81bdd8b86e2c0b57eae39779e05347984c065a45449b59058586b490f3a3ebf421fc80f1a865998d
data/AGENTS.md CHANGED
@@ -9,7 +9,7 @@
9
9
  - Made graceful shutdown waiting optional and defaulted Capistrano to not wait.
10
10
  - Kept graceful handling synchronous and verified `bundle exec rspec`.
11
11
  - Enabled ProcessBot logging by default for Capistrano hooks (configurable via `process_bot_log`).
12
- - Always run RuboCop against changed or created Ruby files before pushing or opening a PR.
12
+ - Always run RuboCop against changed or created Ruby files.
13
13
  - Added `graceful_no_wait` command and Capistrano task for non-blocking graceful shutdowns.
14
14
  - Always add or update tests for new/changed functionality, and run them.
15
15
  - Added coverage for graceful_no_wait and Capistrano wait defaults.
data/CHANGELOG.md CHANGED
@@ -8,8 +8,8 @@
8
8
  - Add optional Sidekiq restart overlap and a new ProcessBot restart command.
9
9
  - Guard stop-related process scanning when subprocess PID/PGID is unavailable and fail stop loudly.
10
10
  - Wait briefly for subprocess PID assignment during stop; raise if PID is still missing so stop cannot silently succeed.
11
+
11
12
  - Require an active runner for custom stop commands to avoid constructing a fresh runner with no PID.
12
- - Buffer subprocess output by line before broadcasting it to control clients so Capistrano does not receive one-character log chunks.
13
13
 
14
14
  ## [0.1.0] - 2022-04-03
15
15
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- process_bot (0.1.28)
4
+ process_bot (0.1.29)
5
5
  knjrbfw (>= 0.0.116)
6
6
  pry
7
7
  rake
@@ -18,7 +18,7 @@ GEM
18
18
  http2 (0.0.36)
19
19
  string-cases (~> 0)
20
20
  io-console (0.8.2)
21
- json (2.18.0)
21
+ json (2.19.3)
22
22
  knjrbfw (0.0.116)
23
23
  datet
24
24
  http2
@@ -30,14 +30,14 @@ GEM
30
30
  lint_roller (1.1.0)
31
31
  method_source (1.1.0)
32
32
  parallel (1.27.0)
33
- parser (3.3.10.0)
33
+ parser (3.3.11.1)
34
34
  ast (~> 2.4.1)
35
35
  racc
36
36
  php4r (0.0.4)
37
37
  datet
38
38
  http2
39
39
  string-strtr
40
- prism (1.7.0)
40
+ prism (1.9.0)
41
41
  pry (0.16.0)
42
42
  coderay (~> 1.1)
43
43
  method_source (~> 1.0)
@@ -62,7 +62,7 @@ GEM
62
62
  diff-lcs (>= 1.2.0, < 2.0)
63
63
  rspec-support (~> 3.13.0)
64
64
  rspec-support (3.13.7)
65
- rubocop (1.82.1)
65
+ rubocop (1.86.0)
66
66
  json (~> 2.3)
67
67
  language_server-protocol (~> 3.17.0.2)
68
68
  lint_roller (~> 1.1.0)
@@ -70,10 +70,10 @@ GEM
70
70
  parser (>= 3.3.0.2)
71
71
  rainbow (>= 2.2.2, < 4.0)
72
72
  regexp_parser (>= 2.9.3, < 3.0)
73
- rubocop-ast (>= 1.48.0, < 2.0)
73
+ rubocop-ast (>= 1.49.0, < 2.0)
74
74
  ruby-progressbar (~> 1.7)
75
75
  unicode-display_width (>= 2.4.0, < 4.0)
76
- rubocop-ast (1.49.0)
76
+ rubocop-ast (1.49.1)
77
77
  parser (>= 3.3.7.2)
78
78
  prism (~> 1.7)
79
79
  rubocop-performance (1.26.1)
@@ -8,7 +8,6 @@ class ProcessBot::Process # rubocop:disable Metrics/ClassLength
8
8
 
9
9
  def_delegator :handler_instance, :graceful
10
10
  def_delegator :handler_instance, :graceful_no_wait
11
- def_delegator :handler_instance, :stop
12
11
 
13
12
  autoload :Handlers, "#{__dir__}/process/handlers"
14
13
  autoload :Runner, "#{__dir__}/process/runner"
@@ -122,6 +121,11 @@ class ProcessBot::Process # rubocop:disable Metrics/ClassLength
122
121
  logger.logs "Stop process #{args}"
123
122
  @stopped = true
124
123
  handler_instance.stop
124
+
125
+ if runner_instances.empty?
126
+ logger.logs "No runner instances remaining, signaling main loop to exit"
127
+ runner_events << {type: :stopped, runner_instance: nil}
128
+ end
125
129
  end
126
130
 
127
131
  def run
@@ -1,3 +1,3 @@
1
1
  module ProcessBot
2
- VERSION = "0.1.28".freeze
2
+ VERSION = "0.1.29".freeze
3
3
  end
@@ -60,18 +60,7 @@ private
60
60
  end
61
61
 
62
62
  def bumped_version
63
- major, minor, patch = version_segments
64
-
65
- case bump_type
66
- when "major"
67
- format_version(major + 1, 0, 0)
68
- when "minor"
69
- format_version(major, minor + 1, 0)
70
- when "patch"
71
- format_version(major, minor, patch + 1)
72
- else
73
- raise "Unsupported BUMP=#{bump_type.inspect}. Use patch, minor, major, or VERSION=x.y.z."
74
- end
63
+ build_version(*bumped_version_segments)
75
64
  end
76
65
 
77
66
  def version_segments
@@ -86,7 +75,22 @@ private
86
75
  @current_version ||= VERSION_FILE.read[/VERSION = "([^"]+)"\.freeze/, 1] || raise("Could not find current version")
87
76
  end
88
77
 
89
- def format_version(major, minor, patch)
78
+ def bumped_version_segments
79
+ segments = version_segments
80
+
81
+ case bump_type
82
+ when "major"
83
+ [segments[0] + 1, 0, 0]
84
+ when "minor"
85
+ [segments[0], segments[1] + 1, 0]
86
+ when "patch"
87
+ [segments[0], segments[1], segments[2] + 1]
88
+ else
89
+ raise "Unsupported BUMP=#{bump_type.inspect}. Use patch, minor, major, or VERSION=x.y.z."
90
+ end
91
+ end
92
+
93
+ def build_version(major, minor, patch)
90
94
  [major, minor, patch].join(".")
91
95
  end
92
96
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28
4
+ version: 0.1.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-04-09 00:00:00.000000000 Z
11
+ date: 2026-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: knjrbfw