spring 4.2.0 → 4.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76dbc0667df96e4ee560e9613dba5fbdf1dd1733eb93b4cfa8e9b9abe0ce4b88
4
- data.tar.gz: 072b98f72493233f29ad64e034070ad4910807cd13d133772d29b1b1588e87ad
3
+ metadata.gz: 58ff21d566fae5a1ed7025a46e8237e45756ecbaaa219573e90cab80fe2fb0c8
4
+ data.tar.gz: 2831c92a62ae470829dfac0fc295942cafd33da7daa04e2f0c863fdd8859b098
5
5
  SHA512:
6
- metadata.gz: 631a222c8b71faf7f115576537d857bd5e0d4824a9bdcc09ffcb694ef737af0af6570dfb112178efec1bbde9a1d5582bcfabfb1cd2ef8ea94b1404558580bd6d
7
- data.tar.gz: c4d7ebbacf5c6b0a00263b96328e13160cfcea8033cb54ef4247d9aca3ee7f7c1f7d17a57865b10c24847c1653e99c61b37d2a8b130b45536aff994257944269
6
+ metadata.gz: 2282af745105b6c7beed9d42ad9c6b3a801187eda13fe32c58a390b6a4461fafad7ac47ed13650d1efe25fceb4fb6b39fdd46dd7e96ba939024f770c04be6e06
7
+ data.tar.gz: 81ac1da9669749b949edd5e11a99ee1883eadaf0e845b5c02d164a9c44216c1628cd7d06298f92db52533906fdd0cf7469170e97ed6b8089c16cc260e245acc8
@@ -6,8 +6,6 @@ module Spring
6
6
  module Client
7
7
  class Run < Command
8
8
  FORWARDED_SIGNALS = %w(INT QUIT USR1 USR2 INFO WINCH) & Signal.list.keys
9
- CONNECT_TIMEOUT = 1
10
- BOOT_TIMEOUT = 20
11
9
 
12
10
  attr_reader :server
13
11
 
@@ -74,7 +72,7 @@ module Spring
74
72
  env.socket_path.unlink if env.socket_path.exist?
75
73
 
76
74
  pid = Process.spawn(server_process_env, env.server_command, out: File::NULL)
77
- timeout = Time.now + BOOT_TIMEOUT
75
+ timeout = Time.now + Spring.boot_timeout
78
76
 
79
77
  @server_booted = true
80
78
 
@@ -85,7 +83,7 @@ module Spring
85
83
  exit status.exitstatus
86
84
  elsif Time.now > timeout
87
85
  $stderr.puts "Starting Spring server with `#{env.server_command}` " \
88
- "timed out after #{BOOT_TIMEOUT} seconds"
86
+ "timed out after #{Spring.boot_timeout} seconds"
89
87
  exit 1
90
88
  end
91
89
 
@@ -122,7 +120,7 @@ module Spring
122
120
  end
123
121
 
124
122
  def verify_server_version
125
- unless IO.select([server], [], [], CONNECT_TIMEOUT)
123
+ unless IO.select([server], [], [], Spring.connect_timeout)
126
124
  raise "Error connecting to Spring server"
127
125
  end
128
126
 
@@ -151,7 +149,7 @@ module Spring
151
149
  server.send_io client
152
150
  send_json server, "args" => args, "default_rails_env" => default_rails_env, "spawn_env" => spawn_env, "reset_env" => reset_env
153
151
 
154
- if IO.select([server], [], [], CONNECT_TIMEOUT)
152
+ if IO.select([server], [], [], Spring.connect_timeout)
155
153
  server.gets or raise CommandNotFound
156
154
  else
157
155
  raise "Error connecting to Spring server"
@@ -1,8 +1,11 @@
1
1
  require "spring/errors"
2
2
 
3
3
  module Spring
4
+ @connect_timeout = 5
5
+ @boot_timeout = 20
6
+
4
7
  class << self
5
- attr_accessor :application_root
8
+ attr_accessor :application_root, :connect_timeout, :boot_timeout
6
9
  attr_writer :quiet
7
10
 
8
11
  def gemfile
@@ -1,3 +1,3 @@
1
1
  module Spring
2
- VERSION = "4.2.0"
2
+ VERSION = "4.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spring
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Leighton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-09 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Preloads your application so things like console, rake and tests run
14
14
  faster