einhorn 0.8.2 → 1.0.1

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +15 -0
  3. data/README.md +7 -38
  4. data/einhorn.gemspec +23 -21
  5. data/example/pool_worker.rb +2 -2
  6. data/example/thin_example +8 -8
  7. data/example/time_server +5 -5
  8. data/lib/einhorn/client.rb +8 -8
  9. data/lib/einhorn/command/interface.rb +92 -98
  10. data/lib/einhorn/command.rb +75 -85
  11. data/lib/einhorn/compat.rb +7 -7
  12. data/lib/einhorn/event/abstract_text_descriptor.rb +32 -36
  13. data/lib/einhorn/event/ack_timer.rb +2 -2
  14. data/lib/einhorn/event/command_server.rb +7 -9
  15. data/lib/einhorn/event/connection.rb +1 -3
  16. data/lib/einhorn/event/loop_breaker.rb +2 -1
  17. data/lib/einhorn/event/persistent.rb +2 -2
  18. data/lib/einhorn/event/timer.rb +4 -4
  19. data/lib/einhorn/event.rb +20 -20
  20. data/lib/einhorn/prctl.rb +2 -2
  21. data/lib/einhorn/prctl_linux.rb +13 -14
  22. data/lib/einhorn/safe_yaml.rb +17 -0
  23. data/lib/einhorn/version.rb +1 -1
  24. data/lib/einhorn/worker.rb +26 -30
  25. data/lib/einhorn/worker_pool.rb +9 -9
  26. data/lib/einhorn.rb +120 -125
  27. metadata +37 -110
  28. data/.gitignore +0 -17
  29. data/.travis.yml +0 -10
  30. data/CONTRIBUTORS +0 -6
  31. data/Gemfile +0 -11
  32. data/History.txt +0 -4
  33. data/README.md.in +0 -94
  34. data/Rakefile +0 -27
  35. data/test/_lib.rb +0 -12
  36. data/test/integration/_lib/fixtures/env_printer/env_printer.rb +0 -26
  37. data/test/integration/_lib/fixtures/exit_during_upgrade/exiting_server.rb +0 -23
  38. data/test/integration/_lib/fixtures/exit_during_upgrade/upgrade_reexec.rb +0 -6
  39. data/test/integration/_lib/fixtures/pdeathsig_printer/pdeathsig_printer.rb +0 -29
  40. data/test/integration/_lib/fixtures/signal_timeout/sleepy_server.rb +0 -23
  41. data/test/integration/_lib/fixtures/upgrade_project/upgrading_server.rb +0 -24
  42. data/test/integration/_lib/helpers/einhorn_helpers.rb +0 -148
  43. data/test/integration/_lib/helpers.rb +0 -4
  44. data/test/integration/_lib.rb +0 -6
  45. data/test/integration/pdeathsig.rb +0 -26
  46. data/test/integration/startup.rb +0 -31
  47. data/test/integration/upgrading.rb +0 -204
  48. data/test/unit/_lib/bad_worker.rb +0 -7
  49. data/test/unit/_lib/sleep_worker.rb +0 -5
  50. data/test/unit/einhorn/client.rb +0 -88
  51. data/test/unit/einhorn/command/interface.rb +0 -49
  52. data/test/unit/einhorn/command.rb +0 -135
  53. data/test/unit/einhorn/event.rb +0 -89
  54. data/test/unit/einhorn/worker_pool.rb +0 -39
  55. data/test/unit/einhorn.rb +0 -96
  56. /data/{LICENSE → LICENSE.txt} +0 -0
data/lib/einhorn.rb CHANGED
@@ -1,18 +1,36 @@
1
- require 'fcntl'
2
- require 'optparse'
3
- require 'pp'
4
- require 'set'
5
- require 'socket'
6
- require 'tmpdir'
7
- require 'yaml'
8
- require 'shellwords'
1
+ require "fcntl"
2
+ require "optparse"
3
+ require "pp"
4
+ require "set"
5
+ require "socket"
6
+ require "tmpdir"
7
+ require "yaml"
8
+ require "shellwords"
9
+ require "einhorn/safe_yaml"
9
10
 
10
11
  module Einhorn
11
12
  module AbstractState
12
- def default_state; raise NotImplementedError.new('Override in extended modules'); end
13
- def state; @state ||= default_state; end
14
- def state=(v); @state = v; end
15
- def dumpable_state; state; end
13
+ def default_state
14
+ raise NotImplementedError.new("Override in extended modules")
15
+ end
16
+
17
+ def state
18
+ @state ||= default_state
19
+ end
20
+
21
+ def state=(v)
22
+ @state = v
23
+ end
24
+
25
+ def dumpable_state
26
+ state
27
+ end
28
+
29
+ def respond_to_missing?(name)
30
+ ((name.to_s =~ /(.*)=$/) && state.has_key?($1.to_sym)) ||
31
+ state.has_key?(name) ||
32
+ default_state.has_key?(name)
33
+ end
16
34
 
17
35
  def method_missing(name, *args)
18
36
  if (name.to_s =~ /(.*)=$/) && state.has_key?($1.to_sym)
@@ -37,39 +55,39 @@ module Einhorn
37
55
  # about backwards/forwards compatibility for upgrades/downgrades
38
56
  def self.default_state
39
57
  {
40
- :children => {},
41
- :config => {:number => 1, :backlog => 100, :seconds => 1},
42
- :versions => {},
43
- :version => 0,
44
- :sockets => {},
45
- :orig_cmd => nil,
46
- :bind => [],
47
- :bind_fds => [],
48
- :bound_ports => [],
49
- :cmd => nil,
50
- :script_name => nil,
51
- :respawn => true,
52
- :upgrading => false,
53
- :smooth_upgrade => false,
54
- :reloading_for_upgrade => false,
55
- :path => nil,
56
- :cmd_name => nil,
57
- :verbosity => 1,
58
- :generation => 0,
59
- :last_spinup => nil,
60
- :ack_mode => {:type => :timer, :timeout => 1},
61
- :kill_children_on_exit => false,
62
- :command_socket_as_fd => false,
63
- :socket_path => nil,
64
- :pidfile => nil,
65
- :lockfile => nil,
66
- :consecutive_deaths_before_ack => 0,
67
- :last_upgraded => nil,
68
- :nice => {:master => nil, :worker => nil, :renice_cmd => '/usr/bin/renice'},
69
- :reexec_commandline => nil,
70
- :drop_environment_variables => [],
71
- :signal_timeout => nil,
72
- :preloaded => false
58
+ children: {},
59
+ config: {number: 1, backlog: 100, seconds: 1},
60
+ versions: {},
61
+ version: 0,
62
+ sockets: {},
63
+ orig_cmd: nil,
64
+ bind: [],
65
+ bind_fds: [],
66
+ bound_ports: [],
67
+ cmd: nil,
68
+ script_name: nil,
69
+ respawn: true,
70
+ upgrading: false,
71
+ smooth_upgrade: false,
72
+ reloading_for_upgrade: false,
73
+ path: nil,
74
+ cmd_name: nil,
75
+ verbosity: 1,
76
+ generation: 0,
77
+ last_spinup: nil,
78
+ ack_mode: {type: :timer, timeout: 1},
79
+ kill_children_on_exit: false,
80
+ command_socket_as_fd: false,
81
+ socket_path: nil,
82
+ pidfile: nil,
83
+ lockfile: nil,
84
+ consecutive_deaths_before_ack: 0,
85
+ last_upgraded: nil,
86
+ nice: {master: nil, worker: nil, renice_cmd: "/usr/bin/renice"},
87
+ reexec_commandline: nil,
88
+ drop_environment_variables: [],
89
+ signal_timeout: nil,
90
+ preloaded: false
73
91
  }
74
92
  end
75
93
  end
@@ -78,20 +96,20 @@ module Einhorn
78
96
  extend AbstractState
79
97
  def self.default_state
80
98
  {
81
- :whatami => :master,
82
- :script_name => nil,
83
- :argv => [],
84
- :environ => {},
85
- :has_outstanding_spinup_timer => false,
86
- :stateful => nil,
99
+ whatami: :master,
100
+ script_name: nil,
101
+ argv: [],
102
+ environ: {},
103
+ has_outstanding_spinup_timer: false,
104
+ stateful: nil,
87
105
  # Holds references so that the GC doesn't go and close your sockets.
88
- :socket_handles => Set.new
106
+ socket_handles: Set.new
89
107
  }
90
108
  end
91
109
  end
92
110
 
93
111
  def self.restore_state(state)
94
- parsed = YAML.load(state)
112
+ parsed = SafeYAML.load(state)
95
113
  updated_state, message = update_state(Einhorn::State, "einhorn", parsed[:state])
96
114
  Einhorn::State.state = updated_state
97
115
  Einhorn::Event.restore_persistent_descriptors(parsed[:persistent_descriptors])
@@ -113,15 +131,13 @@ module Einhorn
113
131
  # them all
114
132
  dead = []
115
133
  updated_state[:children].each do |pid, v|
116
- begin
117
- pid = Process.wait(pid, Process::WNOHANG)
118
- dead << pid if pid
119
- rescue Errno::ECHILD
120
- dead << pid
121
- end
134
+ pid = Process.wait(pid, Process::WNOHANG)
135
+ dead << pid if pid
136
+ rescue Errno::ECHILD
137
+ dead << pid
122
138
  end
123
139
  Einhorn::Event::Timer.open(0) do
124
- dead.each {|pid| Einhorn::Command.cleanup(pid)}
140
+ dead.each { |pid| Einhorn::Command.cleanup(pid) }
125
141
  end
126
142
  end
127
143
 
@@ -130,12 +146,12 @@ module Einhorn
130
146
  deleted_keys = updated_state.keys - default.keys
131
147
  return [updated_state, message.first] if added_keys.length == 0 && deleted_keys.length == 0
132
148
 
133
- added_keys.each {|key| updated_state[key] = default[key]}
134
- deleted_keys.each {|key| updated_state.delete(key)}
149
+ added_keys.each { |key| updated_state[key] = default[key] }
150
+ deleted_keys.each { |key| updated_state.delete(key) }
135
151
 
136
152
  message << "adding default values for #{added_keys.inspect}"
137
153
  message << "deleting values for #{deleted_keys.inspect}"
138
- message = "State format for #{store_name} has changed: #{message.join(', ')}"
154
+ message = "State format for #{store_name} has changed: #{message.join(", ")}"
139
155
 
140
156
  # Can't print yet, since state hasn't been set, so we pass along the message.
141
157
  [updated_state, message]
@@ -150,14 +166,14 @@ module Einhorn
150
166
  sd = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
151
167
  Einhorn::Compat.cloexec!(sd, false)
152
168
 
153
- if flags.include?('r') || flags.include?('so_reuseaddr')
169
+ if flags.include?("r") || flags.include?("so_reuseaddr")
154
170
  sd.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, 1)
155
171
  end
156
172
 
157
173
  sd.bind(Socket.pack_sockaddr_in(port, addr))
158
174
  sd.listen(Einhorn::State.config[:backlog])
159
175
 
160
- if flags.include?('n') || flags.include?('o_nonblock')
176
+ if flags.include?("n") || flags.include?("o_nonblock")
161
177
  fl = sd.fcntl(Fcntl::F_GETFL)
162
178
  sd.fcntl(Fcntl::F_SETFL, fl | Fcntl::O_NONBLOCK)
163
179
  end
@@ -167,28 +183,28 @@ module Einhorn
167
183
  end
168
184
 
169
185
  # Implement these ourselves so it plays nicely with state persistence
170
- def self.log_debug(msg, tag=nil)
171
- $stderr.puts("#{log_tag} DEBUG: #{msg}\n") if Einhorn::State.verbosity <= 0
186
+ def self.log_debug(msg, tag = nil)
187
+ warn("#{log_tag} DEBUG: #{msg}\n") if Einhorn::State.verbosity <= 0
172
188
  $stderr.flush
173
- self.send_tagged_message(tag, msg) if tag
189
+ send_tagged_message(tag, msg) if tag
174
190
  end
175
- def self.log_info(msg, tag=nil)
176
- $stderr.puts("#{log_tag} INFO: #{msg}\n") if Einhorn::State.verbosity <= 1
191
+
192
+ def self.log_info(msg, tag = nil)
193
+ warn("#{log_tag} INFO: #{msg}\n") if Einhorn::State.verbosity <= 1
177
194
  $stderr.flush
178
- self.send_tagged_message(tag, msg) if tag
195
+ send_tagged_message(tag, msg) if tag
179
196
  end
180
- def self.log_error(msg, tag=nil)
181
- $stderr.puts("#{log_tag} ERROR: #{msg}\n") if Einhorn::State.verbosity <= 2
197
+
198
+ def self.log_error(msg, tag = nil)
199
+ warn("#{log_tag} ERROR: #{msg}\n") if Einhorn::State.verbosity <= 2
182
200
  $stderr.flush
183
- self.send_tagged_message(tag, "ERROR: #{msg}") if tag
201
+ send_tagged_message(tag, "ERROR: #{msg}") if tag
184
202
  end
185
203
 
186
- def self.send_tagged_message(tag, message, last=false)
204
+ def self.send_tagged_message(tag, message, last = false)
187
205
  Einhorn::Command::Interface.send_tagged_message(tag, message, last)
188
206
  end
189
207
 
190
- private
191
-
192
208
  def self.log_tag
193
209
  case whatami = Einhorn::TransientState.whatami
194
210
  when :master
@@ -201,17 +217,16 @@ module Einhorn
201
217
  "[UNKNOWN (#{whatami.inspect}) #{$$}]"
202
218
  end
203
219
  end
204
-
205
- public
220
+ private_class_method :log_tag
206
221
 
207
222
  def self.which(cmd)
208
- if cmd.include?('/')
209
- return cmd if File.exists?(cmd)
223
+ if cmd.include?("/")
224
+ return cmd if File.exist?(cmd)
210
225
  raise "Could not find #{cmd}"
211
226
  else
212
- ENV['PATH'].split(':').each do |f|
227
+ ENV["PATH"].split(":").each do |f|
213
228
  abs = File.join(f, cmd)
214
- return abs if File.exists?(abs)
229
+ return abs if File.exist?(abs)
215
230
  end
216
231
  raise "Could not find #{cmd} in PATH"
217
232
  end
@@ -221,19 +236,19 @@ module Einhorn
221
236
  def self.is_script(file)
222
237
  File.open(file) do |f|
223
238
  bytes = f.read(2)
224
- bytes == '#!'
239
+ bytes == "#!"
225
240
  end
226
241
  end
227
242
 
228
243
  def self.preload
229
- if path = Einhorn::State.path
244
+ if (path = Einhorn::State.path)
230
245
  set_argv(Einhorn::State.cmd, false)
231
246
 
232
247
  begin
233
248
  # Reset preloaded state to false - this allows us to monitor for failed preloads during reloads.
234
249
  Einhorn::State.preloaded = false
235
250
  # If it's not going to be requireable, then load it.
236
- if !path.end_with?('.rb') && File.exists?(path)
251
+ if !path.end_with?(".rb") && File.exist?(path)
237
252
  log_info("Loading #{path} (if this hangs, make sure your code can be properly loaded as a library)", :upgrade)
238
253
  load path
239
254
  else
@@ -242,7 +257,7 @@ module Einhorn
242
257
 
243
258
  force_move_to_oldgen if Einhorn::State.config[:gc_before_fork]
244
259
  end
245
- rescue Exception => e
260
+ rescue StandardError, LoadError => e
246
261
  log_info("Proceeding with postload -- could not load #{path}: #{e} (#{e.class})\n #{e.backtrace.join("\n ")}", :upgrade)
247
262
  else
248
263
  if defined?(einhorn_main)
@@ -274,7 +289,7 @@ module Einhorn
274
289
  def self.set_argv(cmd, set_ps_name)
275
290
  # TODO: clean up this hack
276
291
  idx = 0
277
- if cmd[0] =~ /(^|\/)ruby$/
292
+ if /(^|\/)ruby$/.match?(cmd[0])
278
293
  idx = 1
279
294
  elsif !is_script(cmd[0])
280
295
  log_info("WARNING: Going to set $0 to #{cmd[idx]}, but it doesn't look like a script")
@@ -291,7 +306,7 @@ module Einhorn
291
306
  $0 = worker_ps_name
292
307
  end
293
308
 
294
- ARGV[0..-1] = cmd[idx+1..-1]
309
+ ARGV[0..-1] = cmd[idx + 1..-1]
295
310
  log_info("Set#{set_ps_name ? " $0 = #{$0.inspect}, " : nil} ARGV = #{ARGV.inspect}")
296
311
  end
297
312
 
@@ -304,15 +319,15 @@ module Einhorn
304
319
  end
305
320
 
306
321
  def self.worker_ps_name
307
- Einhorn::State.cmd_name ? "ruby #{Einhorn::State.cmd_name}" : Einhorn::State.orig_cmd.join(' ')
322
+ Einhorn::State.cmd_name ? "ruby #{Einhorn::State.cmd_name}" : Einhorn::State.orig_cmd.join(" ")
308
323
  end
309
324
 
310
325
  def self.renice_self
311
326
  whatami = Einhorn::TransientState.whatami
312
- return unless nice = Einhorn::State.nice[whatami]
327
+ return unless (nice = Einhorn::State.nice[whatami])
313
328
  pid = $$
314
329
 
315
- unless nice.kind_of?(Fixnum)
330
+ unless nice.is_a?(Integer)
316
331
  raise "Nice must be a fixnum: #{nice.inspect}"
317
332
  end
318
333
 
@@ -334,28 +349,9 @@ module Einhorn
334
349
  end
335
350
  end
336
351
 
337
- # This duplicates some code from the environment path, but is
338
- # deprecated so that's ok.
339
- def self.socketify!(cmd)
340
- cmd.map! do |arg|
341
- if arg =~ /^(.*=|)srv:([^:]+):(\d+)((?:,\w+)*)$/
342
- log_error("Using deprecated command-line configuration for Einhorn; should upgrade to the environment variable interface.")
343
- opt = $1
344
- host = $2
345
- port = $3
346
- flags = $4.split(',').select {|flag| flag.length > 0}.map {|flag| flag.downcase}
347
- Einhorn::State.sockets[[host, port]] ||= bind(host, port, flags)[0]
348
- fd = Einhorn::State.sockets[[host, port]]
349
- "#{opt}#{fd}"
350
- else
351
- arg
352
- end
353
- end
354
- end
355
-
356
352
  # Construct and a command and args that can be used to re-exec
357
353
  # Einhorn for upgrades.
358
- def self.upgrade_commandline(einhorn_flags=[])
354
+ def self.upgrade_commandline(einhorn_flags = [])
359
355
  cmdline = []
360
356
  if Einhorn::State.reexec_commandline
361
357
  cmdline += Einhorn::State.reexec_commandline
@@ -363,7 +359,7 @@ module Einhorn
363
359
  cmdline << Einhorn::TransientState.script_name
364
360
  end
365
361
  cmdline += einhorn_flags
366
- cmdline << '--'
362
+ cmdline << "--"
367
363
  cmdline += Einhorn::State.cmd
368
364
  [cmdline[0], cmdline[1..-1]]
369
365
  end
@@ -375,7 +371,7 @@ module Einhorn
375
371
  upgrade_sentinel = fork do
376
372
  Einhorn::TransientState.whatami = :upgrade_sentinel
377
373
  Einhorn.initialize_reload_environment
378
- Einhorn::Compat.exec(*Einhorn.upgrade_commandline(['--upgrade-check']))
374
+ Einhorn::Compat.exec(*Einhorn.upgrade_commandline(["--upgrade-check"]))
379
375
  end
380
376
  Process.wait(upgrade_sentinel)
381
377
  $?.exitstatus.zero?
@@ -400,10 +396,10 @@ module Einhorn
400
396
  # startup. Currently, this means the bundler and rbenv versions.
401
397
  def self.dump_environment_info
402
398
  log_info("Running under Ruby #{RUBY_VERSION}", :environment)
403
- log_info("Rbenv ruby version: #{ENV['RBENV_VERSION']}", :environment) if ENV['RBENV_VERSION']
399
+ log_info("Rbenv ruby version: #{ENV["RBENV_VERSION"]}", :environment) if ENV["RBENV_VERSION"]
404
400
  begin
405
- bundler_gem = Gem::Specification.find_by_name('bundler')
406
- log_info("Using Bundler #{bundler_gem.version.to_s}", :environment)
401
+ bundler_gem = Gem::Specification.find_by_name("bundler")
402
+ log_info("Using Bundler #{bundler_gem.version}", :environment)
407
403
  rescue Gem::LoadError
408
404
  end
409
405
  end
@@ -424,7 +420,6 @@ module Einhorn
424
420
  # TODO: don't actually alter ARGV[0]?
425
421
  Einhorn::State.cmd[0] = which(Einhorn::State.cmd[0])
426
422
  socketify_env!
427
- socketify!(Einhorn::State.cmd)
428
423
  end
429
424
 
430
425
  set_master_ps_name
@@ -459,10 +454,10 @@ module Einhorn
459
454
  end
460
455
  end
461
456
 
462
- require 'einhorn/command'
463
- require 'einhorn/compat'
464
- require 'einhorn/client'
465
- require 'einhorn/event'
466
- require 'einhorn/worker'
467
- require 'einhorn/worker_pool'
468
- require 'einhorn/version'
457
+ require "einhorn/command"
458
+ require "einhorn/compat"
459
+ require "einhorn/client"
460
+ require "einhorn/event"
461
+ require "einhorn/worker"
462
+ require "einhorn/worker_pool"
463
+ require "einhorn/version"
metadata CHANGED
@@ -1,134 +1,101 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: einhorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - Greg Brockman
8
- autorequire:
7
+ - Stripe
8
+ - Mike Perham
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-29 00:00:00.000000000 Z
11
+ date: 2025-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rack
14
+ name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '13'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: pry
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
26
+ version: '13'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: minitest
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
- - - "<"
31
+ - - "~>"
60
32
  - !ruby/object:Gem::Version
61
- version: '5.0'
33
+ version: '5'
62
34
  type: :development
63
35
  prerelease: false
64
36
  version_requirements: !ruby/object:Gem::Requirement
65
37
  requirements:
66
- - - "<"
38
+ - - "~>"
67
39
  - !ruby/object:Gem::Version
68
- version: '5.0'
40
+ version: '5'
69
41
  - !ruby/object:Gem::Dependency
70
42
  name: mocha
71
43
  requirement: !ruby/object:Gem::Requirement
72
44
  requirements:
73
45
  - - "~>"
74
46
  - !ruby/object:Gem::Version
75
- version: '0.13'
47
+ version: '2'
76
48
  type: :development
77
49
  prerelease: false
78
50
  version_requirements: !ruby/object:Gem::Requirement
79
51
  requirements:
80
52
  - - "~>"
81
53
  - !ruby/object:Gem::Version
82
- version: '0.13'
54
+ version: '2'
83
55
  - !ruby/object:Gem::Dependency
84
- name: chalk-rake
56
+ name: subprocess
85
57
  requirement: !ruby/object:Gem::Requirement
86
58
  requirements:
87
- - - ">="
59
+ - - "~>"
88
60
  - !ruby/object:Gem::Version
89
- version: '0'
61
+ version: '1'
90
62
  type: :development
91
63
  prerelease: false
92
64
  version_requirements: !ruby/object:Gem::Requirement
93
65
  requirements:
94
- - - ">="
66
+ - - "~>"
95
67
  - !ruby/object:Gem::Version
96
- version: '0'
68
+ version: '1'
97
69
  - !ruby/object:Gem::Dependency
98
- name: subprocess
70
+ name: fiddle
99
71
  requirement: !ruby/object:Gem::Requirement
100
72
  requirements:
101
- - - ">="
73
+ - - "~>"
102
74
  - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
75
+ version: '1.1'
76
+ type: :runtime
105
77
  prerelease: false
106
78
  version_requirements: !ruby/object:Gem::Requirement
107
79
  requirements:
108
- - - ">="
80
+ - - "~>"
109
81
  - !ruby/object:Gem::Version
110
- version: '0'
82
+ version: '1.1'
111
83
  description: Einhorn makes it easy to run multiple instances of an application server,
112
84
  all listening on the same port. You can also seamlessly restart your workers without
113
85
  dropping any requests. Einhorn requires minimal application-level support, making
114
86
  it easy to use with an existing project.
115
87
  email:
116
- - gdb@stripe.com
88
+ - support+github@stripe.com
89
+ - mperham@gmail.com
117
90
  executables:
118
91
  - einhorn
119
92
  - einhornsh
120
93
  extensions: []
121
94
  extra_rdoc_files: []
122
95
  files:
123
- - ".gitignore"
124
- - ".travis.yml"
125
- - CONTRIBUTORS
126
- - Gemfile
127
- - History.txt
128
- - LICENSE
96
+ - Changes.md
97
+ - LICENSE.txt
129
98
  - README.md
130
- - README.md.in
131
- - Rakefile
132
99
  - bin/einhorn
133
100
  - bin/einhornsh
134
101
  - einhorn.gemspec
@@ -150,36 +117,18 @@ files:
150
117
  - lib/einhorn/event/timer.rb
151
118
  - lib/einhorn/prctl.rb
152
119
  - lib/einhorn/prctl_linux.rb
120
+ - lib/einhorn/safe_yaml.rb
153
121
  - lib/einhorn/third.rb
154
122
  - lib/einhorn/version.rb
155
123
  - lib/einhorn/worker.rb
156
124
  - lib/einhorn/worker_pool.rb
157
- - test/_lib.rb
158
- - test/integration/_lib.rb
159
- - test/integration/_lib/fixtures/env_printer/env_printer.rb
160
- - test/integration/_lib/fixtures/exit_during_upgrade/exiting_server.rb
161
- - test/integration/_lib/fixtures/exit_during_upgrade/upgrade_reexec.rb
162
- - test/integration/_lib/fixtures/pdeathsig_printer/pdeathsig_printer.rb
163
- - test/integration/_lib/fixtures/signal_timeout/sleepy_server.rb
164
- - test/integration/_lib/fixtures/upgrade_project/upgrading_server.rb
165
- - test/integration/_lib/helpers.rb
166
- - test/integration/_lib/helpers/einhorn_helpers.rb
167
- - test/integration/pdeathsig.rb
168
- - test/integration/startup.rb
169
- - test/integration/upgrading.rb
170
- - test/unit/_lib/bad_worker.rb
171
- - test/unit/_lib/sleep_worker.rb
172
- - test/unit/einhorn.rb
173
- - test/unit/einhorn/client.rb
174
- - test/unit/einhorn/command.rb
175
- - test/unit/einhorn/command/interface.rb
176
- - test/unit/einhorn/event.rb
177
- - test/unit/einhorn/worker_pool.rb
178
- homepage: https://github.com/stripe/einhorn
125
+ homepage: https://github.com/contribsys/einhorn
179
126
  licenses:
180
127
  - MIT
181
- metadata: {}
182
- post_install_message:
128
+ metadata:
129
+ bug_tracker_uri: https://github.com/contribsys/einhorn/issues
130
+ documentation_uri: https://github.com/contribsys/einhorn/wiki
131
+ changelog_uri: https://github.com/contribsys/einhorn/blob/main/Changes.md
183
132
  rdoc_options: []
184
133
  require_paths:
185
134
  - lib
@@ -187,36 +136,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
136
  requirements:
188
137
  - - ">="
189
138
  - !ruby/object:Gem::Version
190
- version: '0'
139
+ version: 2.5.0
191
140
  required_rubygems_version: !ruby/object:Gem::Requirement
192
141
  requirements:
193
142
  - - ">="
194
143
  - !ruby/object:Gem::Version
195
144
  version: '0'
196
145
  requirements: []
197
- rubygems_version: 3.1.2
198
- signing_key:
146
+ rubygems_version: 3.6.2
199
147
  specification_version: 4
200
148
  summary: 'Einhorn: the language-independent shared socket manager'
201
- test_files:
202
- - test/_lib.rb
203
- - test/integration/_lib.rb
204
- - test/integration/_lib/fixtures/env_printer/env_printer.rb
205
- - test/integration/_lib/fixtures/exit_during_upgrade/exiting_server.rb
206
- - test/integration/_lib/fixtures/exit_during_upgrade/upgrade_reexec.rb
207
- - test/integration/_lib/fixtures/pdeathsig_printer/pdeathsig_printer.rb
208
- - test/integration/_lib/fixtures/signal_timeout/sleepy_server.rb
209
- - test/integration/_lib/fixtures/upgrade_project/upgrading_server.rb
210
- - test/integration/_lib/helpers.rb
211
- - test/integration/_lib/helpers/einhorn_helpers.rb
212
- - test/integration/pdeathsig.rb
213
- - test/integration/startup.rb
214
- - test/integration/upgrading.rb
215
- - test/unit/_lib/bad_worker.rb
216
- - test/unit/_lib/sleep_worker.rb
217
- - test/unit/einhorn.rb
218
- - test/unit/einhorn/client.rb
219
- - test/unit/einhorn/command.rb
220
- - test/unit/einhorn/command/interface.rb
221
- - test/unit/einhorn/event.rb
222
- - test/unit/einhorn/worker_pool.rb
149
+ test_files: []
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp