Skip to content

Commit e51082f

Browse files
committed
DEBUG
1 parent f25aac9 commit e51082f

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source "https://rubygems.org"
44

55
gemspec
66

7-
gem "bundler", "~> 4.0.0.beta2"
7+
gem "bundler", "~> 4.0.0"
88
gem "minitest", "~> 5.25"
99
gem "test-unit", require: false
1010

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ PLATFORMS
135135
x86_64-linux
136136

137137
DEPENDENCIES
138-
bundler (~> 4.0.0.beta2)
138+
bundler (~> 4.0.0)
139139
debug (~> 1.9)
140140
minitest (~> 5.25)
141141
mocha (~> 2.3)
@@ -212,4 +212,4 @@ CHECKSUMS
212212
yard-sorbet (0.9.0) sha256=03d1aa461b9e9c82b886919a13aa3e09fcf4d1852239d2967ed97e92723ffe21
213213

214214
BUNDLED WITH
215-
4.0.0.beta2
215+
4.0.0

test/integration_test.rb

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def test_uses_same_bundler_version_as_main_app
126126
stringio
127127
128128
BUNDLED WITH
129-
4.0.0.beta1
129+
4.0.0
130130
LOCKFILE
131131
File.write(File.join(dir, "Gemfile.lock"), lockfile_contents)
132132

@@ -140,7 +140,7 @@ def test_uses_same_bundler_version_as_main_app
140140
launch(dir, "ruby-lsp")
141141
end
142142

143-
assert_match(/BUNDLED WITH\n\s*4.0.0.beta1/, File.read(File.join(dir, ".ruby-lsp", "Gemfile.lock")))
143+
assert_match(/BUNDLED WITH\n\s*4.0.0/, File.read(File.join(dir, ".ruby-lsp", "Gemfile.lock")))
144144
end
145145
end
146146

@@ -165,7 +165,7 @@ def test_does_not_use_custom_binstubs_if_they_are_in_the_path
165165
stringio
166166
167167
BUNDLED WITH
168-
4.0.0.beta1
168+
4.0.0
169169
LOCKFILE
170170
File.write(File.join(dir, "Gemfile.lock"), lockfile_contents)
171171

@@ -187,7 +187,7 @@ def test_does_not_use_custom_binstubs_if_they_are_in_the_path
187187
launch(dir, "ruby-lsp", { "PATH" => "#{bin_path}#{File::PATH_SEPARATOR}#{ENV["PATH"]}" })
188188
end
189189

190-
assert_match(/BUNDLED WITH\n\s*4.0.0.beta1/, File.read(File.join(dir, ".ruby-lsp", "Gemfile.lock")))
190+
assert_match(/BUNDLED WITH\n\s*4.0.0/, File.read(File.join(dir, ".ruby-lsp", "Gemfile.lock")))
191191
end
192192
end
193193

@@ -233,7 +233,7 @@ def test_launch_mode_with_full_bundle
233233
stringio
234234
235235
BUNDLED WITH
236-
2.5.7
236+
4.0.0
237237
LOCKFILE
238238
File.write(File.join(dir, "Gemfile.lock"), lockfile_contents)
239239

@@ -353,7 +353,7 @@ def test_launch_mode_update_does_not_modify_main_lockfile
353353
ruby-lsp-rails
354354
355355
BUNDLED WITH
356-
4.0.0.beta1
356+
4.0.0
357357
LOCKFILE
358358
File.write(File.join(dir, "Gemfile.lock"), lockfile_contents)
359359

@@ -472,9 +472,9 @@ def launch(workspace_path, exec = "ruby-lsp-launcher", extra_env = {})
472472
})
473473

474474
# First message is the log of initializing Ruby LSP
475-
read_message(stdout)
475+
read_message(stdout, stderr)
476476
# Verify that initialization didn't fail
477-
initialize_response = read_message(stdout)
477+
initialize_response = read_message(stdout, stderr)
478478
refute(initialize_response[:error], initialize_response.dig(:error, :message))
479479

480480
send_message(stdin, { id: 2, method: "shutdown" })
@@ -504,8 +504,10 @@ def send_message(stdin, message)
504504
stdin.flush
505505
end
506506

507-
def read_message(stdout)
507+
def read_message(stdout, stderr)
508508
headers = stdout.gets("\r\n\r\n")
509+
flunk(stderr.read) unless headers
510+
509511
length = headers[/Content-Length: (\d+)/i, 1].to_i
510512
JSON.parse(stdout.read(length), symbolize_names: true)
511513
end

0 commit comments

Comments
 (0)