From 385131461d6efceece0a8434ab6b775b7da2fd55 Mon Sep 17 00:00:00 2001 From: caylipp Date: Tue, 2 Jun 2026 14:00:42 +0200 Subject: [PATCH 1/9] #1942: Draft Ruby url updater --- .../tools/ide/url/tool/RubyUrlUpdater.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 url-updater/src/main/java/com/devonfw/tools/ide/url/tool/RubyUrlUpdater.java diff --git a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/RubyUrlUpdater.java b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/RubyUrlUpdater.java new file mode 100644 index 0000000000..c2c189b9bc --- /dev/null +++ b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/RubyUrlUpdater.java @@ -0,0 +1,28 @@ +package com.devonfw.tools.ide.url.tool; + +import com.devonfw.tools.ide.url.model.folder.UrlVersion; +import com.devonfw.tools.ide.url.updater.GithubUrlReleaseUpdater; + +public class RubyUrlUpdater extends GithubUrlReleaseUpdater { + + + @Override + public String getTool() { + return "ruby"; + } + + @Override + protected String getGithubOrganization() { + return "ruby"; + } + + @Override + protected String getGithubRepository() { + return "ruby"; + } + + @Override + protected void addVersion(UrlVersion urlVersion) { + String baseUrl = createGithubReleaseDownloadUrl() + } +} From fa3fd2459d15e2f8c6d2b2ff9a519692d1b7cfa7 Mon Sep 17 00:00:00 2001 From: caylipp Date: Wed, 3 Jun 2026 16:35:50 +0200 Subject: [PATCH 2/9] #1942: finalizing url updater and adding test --- .../tools/ide/url/tool/RubyUrlUpdater.java | 28 --------- .../ide/url/tool/ruby/RubyUrlUpdater.java | 54 ++++++++++++++++ .../tools/ide/url/updater/UpdateManager.java | 3 +- .../ide/url/tool/ruby/RubyUrlUpdaterMock.java | 29 +++++++++ .../ide/url/tool/ruby/RubyUrlUpdaterTest.java | 63 +++++++++++++++++++ 5 files changed, 148 insertions(+), 29 deletions(-) delete mode 100644 url-updater/src/main/java/com/devonfw/tools/ide/url/tool/RubyUrlUpdater.java create mode 100644 url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java create mode 100644 url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterMock.java create mode 100644 url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java diff --git a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/RubyUrlUpdater.java b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/RubyUrlUpdater.java deleted file mode 100644 index c2c189b9bc..0000000000 --- a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/RubyUrlUpdater.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.devonfw.tools.ide.url.tool; - -import com.devonfw.tools.ide.url.model.folder.UrlVersion; -import com.devonfw.tools.ide.url.updater.GithubUrlReleaseUpdater; - -public class RubyUrlUpdater extends GithubUrlReleaseUpdater { - - - @Override - public String getTool() { - return "ruby"; - } - - @Override - protected String getGithubOrganization() { - return "ruby"; - } - - @Override - protected String getGithubRepository() { - return "ruby"; - } - - @Override - protected void addVersion(UrlVersion urlVersion) { - String baseUrl = createGithubReleaseDownloadUrl() - } -} diff --git a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java new file mode 100644 index 0000000000..ce2d52d4ec --- /dev/null +++ b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java @@ -0,0 +1,54 @@ +package com.devonfw.tools.ide.url.tool.ruby; + +import com.devonfw.tools.ide.url.model.folder.UrlVersion; +import com.devonfw.tools.ide.url.updater.GithubUrlReleaseUpdater; +import com.devonfw.tools.ide.version.VersionComparisonResult; +import com.devonfw.tools.ide.version.VersionIdentifier; + +public class RubyUrlUpdater extends GithubUrlReleaseUpdater { + + private static final VersionIdentifier MIN_RUBY_VID = VersionIdentifier.of("2.4.0-7"); + + @Override + public String getTool() { + return "ruby"; + } + + @Override + protected String getGithubOrganization() { + return "oneclick"; + } + + @Override + protected String getGithubRepository() { + return "rubyinstaller2"; + } + + @Override + protected void addVersion(UrlVersion urlVersion) { + + VersionIdentifier vid = urlVersion.getVersionIdentifier(); + VersionComparisonResult result = vid.compareVersion(MIN_RUBY_VID); + + if (result.isEqual() || result.isGreater()) { + String baseUrl = createGithubReleaseDownloadUrl("RubyInstaller-${version}", "rubyinstaller-"); + + doAddVersion(urlVersion, baseUrl + "x64.7z", WINDOWS, X64); + } + } + + @Override + protected String getVersionPrefixToRemove() { + return "RubyInstaller-"; + } + + @Override + public String getCpeVendor() { + return "ruby-lang"; + } + + @Override + public String getCpeProduct() { + return "ruby"; + } +} diff --git a/url-updater/src/main/java/com/devonfw/tools/ide/url/updater/UpdateManager.java b/url-updater/src/main/java/com/devonfw/tools/ide/url/updater/UpdateManager.java index e3370dda23..def029b59f 100644 --- a/url-updater/src/main/java/com/devonfw/tools/ide/url/updater/UpdateManager.java +++ b/url-updater/src/main/java/com/devonfw/tools/ide/url/updater/UpdateManager.java @@ -51,6 +51,7 @@ import com.devonfw.tools.ide.url.tool.pycharm.PycharmUrlUpdater; import com.devonfw.tools.ide.url.tool.python.PythonUrlUpdater; import com.devonfw.tools.ide.url.tool.quarkus.QuarkusUrlUpdater; +import com.devonfw.tools.ide.url.tool.ruby.RubyUrlUpdater; import com.devonfw.tools.ide.url.tool.rust.RustUrlUpdater; import com.devonfw.tools.ide.url.tool.sonar.SonarUrlUpdater; import com.devonfw.tools.ide.url.tool.squirrelsql.SquirrelSqlUrlUpdater; @@ -82,7 +83,7 @@ public class UpdateManager extends AbstractProcessorWithTimeout { new JavaUrlUpdater(), new JenkinsUrlUpdater(), new JmcUrlUpdater(), new KotlincUrlUpdater(), new KotlincNativeUrlUpdater(), new LazyDockerUrlUpdater(), new MvnUrlUpdater(), new MvndUrlUpdater(), new NgUrlUpdater(), new NodeUrlUpdater(), new NpmUrlUpdater(), new OcUrlUpdater(), new PgAdminUrlUpdater(), new PipUrlUpdater(), new PycharmUrlUpdater(), - new PythonUrlUpdater(), new QuarkusUrlUpdater(), new RustUrlUpdater(), new DockerRancherDesktopUrlUpdater(), new SonarUrlUpdater(), + new PythonUrlUpdater(), new QuarkusUrlUpdater(), new RubyUrlUpdater(), new RustUrlUpdater(), new DockerRancherDesktopUrlUpdater(), new SonarUrlUpdater(), new SquirrelSqlUrlUpdater(), new TerraformUrlUpdater(), new TomcatUrlUpdater(), new UvUrlUpdater(), new VsCodeUrlUpdater(), new VsCodiumUrlUpdater()); diff --git a/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterMock.java b/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterMock.java new file mode 100644 index 0000000000..b302e55722 --- /dev/null +++ b/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterMock.java @@ -0,0 +1,29 @@ +package com.devonfw.tools.ide.url.tool.ruby; + +import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; + +/** + * Mock of {@link RubyUrlUpdater} to allow integration testing with WireMock. + */ +public class RubyUrlUpdaterMock extends RubyUrlUpdater { + + private final String baseUrl; + + private final WireMockRuntimeInfo wmRuntimeInfo; + + RubyUrlUpdaterMock(WireMockRuntimeInfo wireMockRuntimeInfo) { + super(); + this.wmRuntimeInfo = wireMockRuntimeInfo; + this.baseUrl = wireMockRuntimeInfo.getHttpBaseUrl(); + } + + @Override + protected String getDownloadBaseUrl() { + return this.baseUrl; + } + + @Override + protected String doGetVersionUrl() { + return this.baseUrl + "/repos/" + getGithubOrganization() + "/" + getGithubRepository() + "/releases"; + } +} diff --git a/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java b/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java new file mode 100644 index 0000000000..ad7ae5e07b --- /dev/null +++ b/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java @@ -0,0 +1,63 @@ +package com.devonfw.tools.ide.url.tool.ruby; + +import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.any; +import static com.github.tomakehurst.wiremock.client.WireMock.get; +import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; +import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching; + +import java.io.IOException; +import java.nio.file.Path; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import com.devonfw.tools.ide.url.model.folder.UrlRepository; +import com.devonfw.tools.ide.url.updater.AbstractUrlUpdaterTest; +import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; +import com.github.tomakehurst.wiremock.junit5.WireMockTest; + + +/** + * Test of {@link RubyUrlUpdater}. + */ +@WireMockTest +class RubyUrlUpdaterTest extends AbstractUrlUpdaterTest { + + /** + * Test of {@link RubyUrlUpdater} for the creation of download URLs and checksums. + * + * @param tempDir path to a temporary directory + * @param wmRuntimeInfo the {@link WireMockRuntimeInfo} + * @throws IOException if the test fails + */ + @Test + void testRubyUrlUpdater(@TempDir Path tempDir, WireMockRuntimeInfo wmRuntimeInfo) throws IOException { + + // arrange + stubFor(get(urlMatching("/repos/oneclick/rubyinstaller2/releases")) + .willReturn(aResponse() + .withStatus(200) + .withBody(readAndResolve( + PATH_INTEGRATION_TEST.resolve("RubyUrlUpdater").resolve("ruby-releases.json"), + wmRuntimeInfo)))); + + stubFor(any(urlMatching("/oneclick/rubyinstaller2/releases/download/.*")) + .willReturn(aResponse() + .withStatus(200) + .withBody(DOWNLOAD_CONTENT))); + + UrlRepository urlRepository = UrlRepository.load(tempDir); + RubyUrlUpdaterMock updater = new RubyUrlUpdaterMock(wmRuntimeInfo); + + // act + updater.update(urlRepository); + + // assert + Path rubyVersionDir = tempDir.resolve("ruby").resolve("ruby").resolve("2.4.0-7"); + + assertThat(rubyVersionDir.resolve("status.json")).exists(); + assertUrlVersionFile(rubyVersionDir, "windows_x64"); + + } +} From f03e78aa85e5fd106f29a13e2464840d7f68ab14 Mon Sep 17 00:00:00 2001 From: caylipp Date: Wed, 3 Jun 2026 16:36:03 +0200 Subject: [PATCH 3/9] #1942: add json --- .../RubyUrlUpdater/ruby-releases.json | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 url-updater/src/test/resources/integrationtest/RubyUrlUpdater/ruby-releases.json diff --git a/url-updater/src/test/resources/integrationtest/RubyUrlUpdater/ruby-releases.json b/url-updater/src/test/resources/integrationtest/RubyUrlUpdater/ruby-releases.json new file mode 100644 index 0000000000..46cf15a593 --- /dev/null +++ b/url-updater/src/test/resources/integrationtest/RubyUrlUpdater/ruby-releases.json @@ -0,0 +1,32 @@ +[ + { + "url": "https://api.github.com/repos/oneclick/rubyinstaller2/releases/1", + "assets_url": "https://api.github.com/repos/oneclick/rubyinstaller2/releases/1/assets", + "html_url": "https://github.com/oneclick/rubyinstaller2/releases/tag/RubyInstaller-2.4.0-1", + "id": 1, + "tag_name": "RubyInstaller-2.4.0-1", + "target_commitish": "master", + "name": "RubyInstaller-2.4.0-1", + "draft": false, + "prerelease": true, + "assets": [] + }, + { + "url": "https://api.github.com/repos/oneclick/rubyinstaller2/releases/2", + "assets_url": "https://api.github.com/repos/oneclick/rubyinstaller2/releases/2/assets", + "html_url": "https://github.com/oneclick/rubyinstaller2/releases/tag/RubyInstaller-2.4.0-7", + "id": 2, + "tag_name": "RubyInstaller-2.4.0-7", + "target_commitish": "master", + "name": "RubyInstaller-2.4.0-7", + "draft": false, + "prerelease": true, + "assets": [ + { + "name": "rubyinstaller-2.4.0-7-x64.7z", + "browser_download_url": "${testbaseurl}/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.4.0-7/rubyinstaller-2.4.0-7-x64.7z" + } + ] + } +] +`` From 9baaab235cd9a5fa02a8e4c406c749ef51c2632f Mon Sep 17 00:00:00 2001 From: caylipp Date: Fri, 5 Jun 2026 11:00:38 +0200 Subject: [PATCH 4/9] #1942: add todo --- .../com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java index ce2d52d4ec..32a2d4e67a 100644 --- a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java +++ b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java @@ -7,7 +7,8 @@ public class RubyUrlUpdater extends GithubUrlReleaseUpdater { - private static final VersionIdentifier MIN_RUBY_VID = VersionIdentifier.of("2.4.0-7"); + //TODo: alter versionen die getVersionPrefixToRemove nicht haben nicht mehr unterstützen. ggf. test anpassen. und prüfen. auch in json. + private static final VersionIdentifier MIN_RUBY_VID = VersionIdentifier.of("2.5.8-1"); @Override public String getTool() { @@ -37,11 +38,13 @@ protected void addVersion(UrlVersion urlVersion) { } } + @Override protected String getVersionPrefixToRemove() { return "RubyInstaller-"; } + @Override public String getCpeVendor() { return "ruby-lang"; From 1d47aaaf97384f4d3473693ecce5db7be3146986 Mon Sep 17 00:00:00 2001 From: caylipp Date: Tue, 23 Jun 2026 16:16:25 +0200 Subject: [PATCH 5/9] #1942: add changes to the url updater - change min version - add testcase for true negative --- .../com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java | 4 ++-- .../devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java | 6 ++++-- .../integrationtest/RubyUrlUpdater/ruby-releases.json | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java index 32a2d4e67a..896c3be536 100644 --- a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java +++ b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java @@ -7,8 +7,8 @@ public class RubyUrlUpdater extends GithubUrlReleaseUpdater { - //TODo: alter versionen die getVersionPrefixToRemove nicht haben nicht mehr unterstützen. ggf. test anpassen. und prüfen. auch in json. - private static final VersionIdentifier MIN_RUBY_VID = VersionIdentifier.of("2.5.8-1"); + // Older RubyInstaller releases are ignored because releases before 2.5.3-1 use unsupported legacy tag naming. + private static final VersionIdentifier MIN_RUBY_VID = VersionIdentifier.of("2.5.3-1"); @Override public String getTool() { diff --git a/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java b/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java index ad7ae5e07b..43e385ab59 100644 --- a/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java +++ b/url-updater/src/test/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdaterTest.java @@ -54,10 +54,12 @@ void testRubyUrlUpdater(@TempDir Path tempDir, WireMockRuntimeInfo wmRuntimeInfo updater.update(urlRepository); // assert - Path rubyVersionDir = tempDir.resolve("ruby").resolve("ruby").resolve("2.4.0-7"); - + Path rubyVersionDir = tempDir.resolve("ruby").resolve("ruby").resolve("2.5.3-1"); assertThat(rubyVersionDir.resolve("status.json")).exists(); assertUrlVersionFile(rubyVersionDir, "windows_x64"); + Path oldRubyVersionDir = tempDir.resolve("ruby").resolve("ruby").resolve("2.4.0-7"); + assertThat(oldRubyVersionDir).doesNotExist(); + } } diff --git a/url-updater/src/test/resources/integrationtest/RubyUrlUpdater/ruby-releases.json b/url-updater/src/test/resources/integrationtest/RubyUrlUpdater/ruby-releases.json index 46cf15a593..10ff8c9307 100644 --- a/url-updater/src/test/resources/integrationtest/RubyUrlUpdater/ruby-releases.json +++ b/url-updater/src/test/resources/integrationtest/RubyUrlUpdater/ruby-releases.json @@ -2,11 +2,11 @@ { "url": "https://api.github.com/repos/oneclick/rubyinstaller2/releases/1", "assets_url": "https://api.github.com/repos/oneclick/rubyinstaller2/releases/1/assets", - "html_url": "https://github.com/oneclick/rubyinstaller2/releases/tag/RubyInstaller-2.4.0-1", + "html_url": "https://github.com/oneclick/rubyinstaller2/releases/tag/RubyInstaller-2.5.3-1", "id": 1, - "tag_name": "RubyInstaller-2.4.0-1", + "tag_name": "RubyInstaller-2.5.3-1", "target_commitish": "master", - "name": "RubyInstaller-2.4.0-1", + "name": "RubyInstaller-2.5.3-1", "draft": false, "prerelease": true, "assets": [] From b378d55178e25a9fcfb38e5f85e11c80433983bd Mon Sep 17 00:00:00 2001 From: caylipp Date: Tue, 23 Jun 2026 16:26:54 +0200 Subject: [PATCH 6/9] #1942: add CHANGELOG entry --- CHANGELOG.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 8237e2c626..68b4e9a19b 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -5,6 +5,7 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDE == 2026.07.001 Release with new features and bugfixes: +* https://github.com/devonfw/IDEasy/issues/1942[#1942]: Create ruby url updater * https://github.com/devonfw/IDEasy/issues/1063[#1063]: Improve IDEasy user specific configuration documentation * https://github.com/devonfw/IDEasy/issues/1909[#1909]: add commandlet for Maven Daemon From cf9c5f82355c26266ca45054d1d9e3d66687b6ec Mon Sep 17 00:00:00 2001 From: Laert Llaveshi Date: Wed, 8 Jul 2026 10:18:13 +0200 Subject: [PATCH 7/9] #1943: CHANGELOG.adoc rebase fix --- CHANGELOG.adoc | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 68b4e9a19b..032791a914 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -6,7 +6,6 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDE Release with new features and bugfixes: * https://github.com/devonfw/IDEasy/issues/1942[#1942]: Create ruby url updater - * https://github.com/devonfw/IDEasy/issues/1063[#1063]: Improve IDEasy user specific configuration documentation * https://github.com/devonfw/IDEasy/issues/1909[#1909]: add commandlet for Maven Daemon * https://github.com/devonfw/IDEasy/issues/2068[#2068]: Isolate Claude Code configuration per IDEasy project From cf2c95787e3741577ef3dab41ffb13cd8d2b6643 Mon Sep 17 00:00:00 2001 From: Laert Llaveshi Date: Wed, 8 Jul 2026 10:08:47 +0200 Subject: [PATCH 8/9] #1943: Implement Ruby commandlet --- CHANGELOG.adoc | 1 + .../ide/commandlet/CommandletManagerImpl.java | 2 ++ .../com/devonfw/tools/ide/tool/ruby/Ruby.java | 30 +++++++++++++++++++ cli/src/main/resources/nls/Help.properties | 2 ++ cli/src/main/resources/nls/Help_de.properties | 2 ++ 5 files changed, 37 insertions(+) create mode 100644 cli/src/main/java/com/devonfw/tools/ide/tool/ruby/Ruby.java diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 032791a914..2475adff3a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -5,6 +5,7 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDE == 2026.07.001 Release with new features and bugfixes: +* https://github.com/devonfw/IDEasy/issues/1943[#1943]: Create ruby commandlet * https://github.com/devonfw/IDEasy/issues/1942[#1942]: Create ruby url updater * https://github.com/devonfw/IDEasy/issues/1063[#1063]: Improve IDEasy user specific configuration documentation * https://github.com/devonfw/IDEasy/issues/1909[#1909]: add commandlet for Maven Daemon diff --git a/cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java b/cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java index 580534f0f7..08103f9dc9 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java +++ b/cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java @@ -58,6 +58,7 @@ import com.devonfw.tools.ide.tool.pycharm.Pycharm; import com.devonfw.tools.ide.tool.python.Python; import com.devonfw.tools.ide.tool.quarkus.Quarkus; +import com.devonfw.tools.ide.tool.ruby.Ruby; import com.devonfw.tools.ide.tool.rust.Rust; import com.devonfw.tools.ide.tool.sonar.Sonar; import com.devonfw.tools.ide.tool.spring.Spring; @@ -138,6 +139,7 @@ public CommandletManagerImpl(IdeContext context) { add(new Terraform(context)); add(new Oc(context)); add(new Quarkus(context)); + add(new Ruby(context)); add(new Rust(context)); add(new Kotlinc(context)); add(new KotlincNative(context)); diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/ruby/Ruby.java b/cli/src/main/java/com/devonfw/tools/ide/tool/ruby/Ruby.java new file mode 100644 index 0000000000..10873b10a0 --- /dev/null +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/ruby/Ruby.java @@ -0,0 +1,30 @@ +package com.devonfw.tools.ide.tool.ruby; + +import java.util.Set; + +import com.devonfw.tools.ide.common.Tag; +import com.devonfw.tools.ide.context.IdeContext; +import com.devonfw.tools.ide.tool.LocalToolCommandlet; +import com.devonfw.tools.ide.tool.ToolCommandlet; + +/** + * {@link ToolCommandlet} for Ruby. + */ +public class Ruby extends LocalToolCommandlet { + + /** + * The constructor. + * + * @param context the {@link IdeContext}. + */ + public Ruby(IdeContext context) { + + super(context, "ruby", Set.of(Tag.RUBY)); + } + + @Override + public String getToolHelpArguments() { + + return "--help"; + } +} diff --git a/cli/src/main/resources/nls/Help.properties b/cli/src/main/resources/nls/Help.properties index 1e52f11056..ec95d1ec90 100644 --- a/cli/src/main/resources/nls/Help.properties +++ b/cli/src/main/resources/nls/Help.properties @@ -118,6 +118,8 @@ cmd.quarkus.detail=Quarkus is a Kubernetes-native Java framework for building cl cmd.repository=Set up pre-configured git repositories using 'ide repository setup ' cmd.repository.detail=Without further arguments this will set up all pre-configured git repositories.\nAlso, you can provide an explicit git repo as `` argument and IDEasy will automatically clone, build and set up your project based on the existing property file.\nRepositories are configured in 'settings/repository/.properties' and can therefore be shared with your project team for automatic or optional setup. cmd.repository.val.repository=The name of the properties file of the pre-configured git repository to set up, omit to set up all active repositories. +cmd.ruby=Tool commandlet for Ruby (programming language). +cmd.ruby.detail=Ruby is a dynamic, open-source programming language with a focus on simplicity and productivity. Detailed documentation can be found at https://www.ruby-lang.org/en/documentation/ cmd.rust=Tool commandlet for Rust (programming language). cmd.rust.detail=Rust is a programming-language focused on safety and performance. Detailed documentation can be found at https://www.rust-lang.org/learn cmd.set-edition=Set the edition of the selected tool. diff --git a/cli/src/main/resources/nls/Help_de.properties b/cli/src/main/resources/nls/Help_de.properties index 3c4f9787cf..c2dd76ba53 100644 --- a/cli/src/main/resources/nls/Help_de.properties +++ b/cli/src/main/resources/nls/Help_de.properties @@ -118,6 +118,8 @@ cmd.quarkus.detail=Quarkus ist ein Kubernetes-native Java-Framework zur Entwickl cmd.repository=Richtet das vorkonfigurierte Git Repository ein mittels 'ide repository setup '. cmd.repository.detail=Dies wird alle vorkonfigurierten Repositories einrichten. Rufen Sie einfach 'ide repository setup ' auf, ersetzen Sie durch den Namen Ihrer Projektkonfigurationsdatei, die sich in 'settings/repository/your_project_name' befindet und IDEasy wird Ihr Projekt basierend auf der vorhandenen Eigenschaftsdatei automatisch klonen, bauen und einrichten.\nWenn Sie den Projektnamen weglassen, werden alle im Repository-Verzeichnis gefundenen Projekte vorkonfiguriert. cmd.repository.val.repository=Der Name der Properties-Datei des vorkonfigurierten Git Repositories zum Einrichten. Falls nicht angegeben, werden alle aktiven Projekte eingerichtet. +cmd.ruby=Werkzeug Kommando für Ruby (Programmiersprache). +cmd.ruby.detail=Ruby ist eine dynamische, quelloffene Programmiersprache mit Fokus auf Einfachheit und Produktivität. Detaillierte Dokumentation findet sich unter https://www.ruby-lang.org/de/documentation/ cmd.rust=Werkzeug Kommando für Rust (Programmiersprache). cmd.rust.detail=Rust ist eine Programmiersprache mit Fokus auf Sicherheit und Performance. Detaillierte Dokumentation findet sich unter https://www.rust-lang.org/learn cmd.set-edition=Setzt die Edition des selektierten Werkzeugs. From e070c4f7469e7707f61c2f6459c3c3b6806fc9a9 Mon Sep 17 00:00:00 2001 From: Laert Llaveshi Date: Wed, 8 Jul 2026 14:08:41 +0200 Subject: [PATCH 9/9] #1943: Testing UrlUpdater fix --- .../tools/ide/url/tool/ruby/RubyUrlUpdater.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java index 896c3be536..c2abe2bb50 100644 --- a/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java +++ b/url-updater/src/main/java/com/devonfw/tools/ide/url/tool/ruby/RubyUrlUpdater.java @@ -32,12 +32,20 @@ protected void addVersion(UrlVersion urlVersion) { VersionComparisonResult result = vid.compareVersion(MIN_RUBY_VID); if (result.isEqual() || result.isGreater()) { - String baseUrl = createGithubReleaseDownloadUrl("RubyInstaller-${version}", "rubyinstaller-"); + String baseUrl = createGithubReleaseDownloadUrl("RubyInstaller-${version}", "rubyinstaller-${version}-"); doAddVersion(urlVersion, baseUrl + "x64.7z", WINDOWS, X64); } } + @Override + public String mapVersion(String version) { + int dateSeparator = version.indexOf(" - "); + if (dateSeparator >= 0) { + version = version.substring(0, dateSeparator); + } + return super.mapVersion(version); + } @Override protected String getVersionPrefixToRemove() {