From ac99b28b32fcc304f05a24bc77b335bdbcd1faf6 Mon Sep 17 00:00:00 2001 From: Ryan Hawkins Date: Sat, 28 Jun 2025 14:05:24 -0600 Subject: [PATCH 1/3] Ensure cwd actually has a default Our default setting of cwd on the JSON config was happening after we had already deserialized it into a ruby config, so there was actually no default. --- src/ruby.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ruby.rs b/src/ruby.rs index de1a4b0..ed1df20 100644 --- a/src/ruby.rs +++ b/src/ruby.rs @@ -166,6 +166,11 @@ impl zed::Extension for RubyExtension { let mut connection = resolve_tcp_template(tcp_connection)?; let mut configuration: serde_json::Value = serde_json::from_str(&config.config) .map_err(|e| format!("`config` is not a valid JSON: {e}"))?; + if let Some(configuration) = configuration.as_object_mut() { + configuration + .entry("cwd") + .or_insert_with(|| worktree.root_path().into()); + } let ruby_config: RubyDebugConfig = serde_json::from_value(configuration.clone()) .map_err(|e| format!("`config` is not a valid rdbg config: {e}"))?; @@ -213,11 +218,6 @@ impl zed::Extension for RubyExtension { } } - if let Some(configuration) = configuration.as_object_mut() { - configuration - .entry("cwd") - .or_insert_with(|| worktree.root_path().into()); - } arguments.extend(ruby_config.args); if use_bundler { From 0194e010a4aec8be508a210ae6c7f625ece49f0e Mon Sep 17 00:00:00 2001 From: Ryan Hawkins Date: Sat, 28 Jun 2025 14:07:32 -0600 Subject: [PATCH 2/3] Bump extension version to 0.10.2 --- extension.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.toml b/extension.toml index 3291148..45831c7 100644 --- a/extension.toml +++ b/extension.toml @@ -1,7 +1,7 @@ id = "ruby" name = "Ruby" description = "Ruby support." -version = "0.10.1" +version = "0.10.2" schema_version = 1 authors = ["Vitaly Slobodin "] repository = "https://github.com/zed-extensions/ruby" From 9977df2492a4bbd9d8789a5a17b55e26f0aaf9c5 Mon Sep 17 00:00:00 2001 From: Ryan Hawkins Date: Sun, 29 Jun 2025 09:55:06 -0600 Subject: [PATCH 3/3] Undo extension version bump --- extension.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.toml b/extension.toml index 45831c7..3291148 100644 --- a/extension.toml +++ b/extension.toml @@ -1,7 +1,7 @@ id = "ruby" name = "Ruby" description = "Ruby support." -version = "0.10.2" +version = "0.10.1" schema_version = 1 authors = ["Vitaly Slobodin "] repository = "https://github.com/zed-extensions/ruby"