Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d16b458
Update quality status documents
JoelAdbu Aug 10, 2026
7a97ffc
#2186:
JoelAdbu Aug 6, 2026
e74d874
2186:
JoelAdbu Jul 29, 2026
5926c82
2186:
JoelAdbu Jul 29, 2026
d46f3c2
restored quality status documentation from devonfw
JoelAdbu Aug 10, 2026
90520c0
Merge remote-tracking branch 'upstream/main' into feature/2186-create…
maybeec Aug 16, 2026
70a8e59
Merge branch 'main' into feature/2186-create-obsidian-urlupdater
hohwille Aug 21, 2026
2868230
constructive review: quickfix for test that broke due to changes on main
hohwille Aug 21, 2026
f4cc127
Apply suggestion from @hohwille
hohwille Aug 21, 2026
e3f81ef
Fix syntax error in ObsidianUrlUpdaterTest
hohwille Aug 21, 2026
75bad32
Remove unnecessary blank line in ObsidianUrlUpdaterTest
hohwille Aug 21, 2026
02c5daa
keep alphabetical order
hohwille Aug 21, 2026
253a3b5
spotless harness can be so annoying
hohwille Aug 21, 2026
fc61bac
need to change my practices since spotless harness is preventing this…
hohwille Aug 21, 2026
2be9eef
Merge branch 'main' into feature/2186-create-obsidian-urlupdater
hohwille Aug 21, 2026
ede7bf6
Merge branch 'main' into feature/2186-create-obsidian-urlupdater
hohwille Aug 24, 2026
31532f5
Merge branch 'main' into feature/2186-create-obsidian-urlupdater
hohwille Aug 24, 2026
10929c4
Merge remote-tracking branch 'upstream/main' into feature/2186-create…
JoelAdbu Aug 25, 2026
b848b78
2203:
JoelAdbu Aug 25, 2026
b4ffc26
Merge branch 'main' into feature/2186-create-obsidian-urlupdater
hohwille Aug 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.devonfw.tools.ide.url.tool.obsidian;

import com.devonfw.tools.ide.url.model.folder.UrlVersion;
import com.devonfw.tools.ide.url.updater.GithubUrlReleaseUpdater;

/**
* {@link GithubUrlReleaseUpdater} for Obsidian.
*/
public class ObsidianUrlUpdater extends GithubUrlReleaseUpdater {

/**
* The Constructor.
*/
public ObsidianUrlUpdater() {
super();
}

/**
* Package-private constructor used for testing {@link ObsidianUrlUpdater}.
*
* @param downloadBaseUrl mock url used for download base.
* @param versionBaseUrl mock url used for version base.
*/
ObsidianUrlUpdater(String downloadBaseUrl, String versionBaseUrl) {
super(downloadBaseUrl, versionBaseUrl);
}

@Override
public String getTool() {
return "obsidian";
}

@Override
protected String getGithubOrganization() {
return "obsidianmd";
}

@Override
protected String getGithubRepository() {
return "obsidian-releases";
}

@Override
protected String getVersionPrefixToRemove() {
return "v";
}

@Override
protected void addVersion(UrlVersion urlVersion) {
String baseUrl = createGithubReleaseDownloadUrl("v${version}", "");

doAddVersion(urlVersion, baseUrl + "Obsidian-${version}.exe", WINDOWS, X64);
doAddVersion(urlVersion, baseUrl + "Obsidian-${version}.dmg", MAC, X64);
doAddVersion(urlVersion, baseUrl + "obsidian_${version}_amd64.deb", LINUX, X64);
doAddVersion(urlVersion, baseUrl + "obsidian-${version}.tar.gz", LINUX, X64);
Comment thread
JoelAdbu marked this conversation as resolved.
doAddVersion(urlVersion, baseUrl + "obsidian-${version}-arm64.tar.gz", LINUX, ARM64);
}

@Override
public String getCpeVendor() {
return "obsidian";
}

@Override
public String getCpeProduct() {
return "obsidian";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import com.devonfw.tools.ide.url.tool.ng.NgUrlUpdater;
import com.devonfw.tools.ide.url.tool.node.NodeUrlUpdater;
import com.devonfw.tools.ide.url.tool.npm.NpmUrlUpdater;
import com.devonfw.tools.ide.url.tool.obsidian.ObsidianUrlUpdater;
import com.devonfw.tools.ide.url.tool.oc.OcUrlUpdater;
import com.devonfw.tools.ide.url.tool.pgadmin.PgAdminUrlUpdater;
import com.devonfw.tools.ide.url.tool.pip.PipUrlUpdater;
Expand Down Expand Up @@ -89,10 +90,11 @@ public class UpdateManager extends AbstractProcessorWithTimeout {
new GcLogAnalyzerUrlUpdater(), new GCloudUrlUpdater(), new GcViewerUrlUpdater(), new GhUrlUpdater(), new GoUrlUpdater(), new GraalVmCommunityUpdater(),
new GraalVmOracleUrlUpdater(), new GradleUrlUpdater(), new HelmUrlUpdater(), new InsoUrlUpdater(), new IntellijUrlUpdater(), new JasyptUrlUpdater(),
new JavaAzulUrlUpdater(), 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 QuarkusUrlUpdater(), new RubyUrlUpdater(), new RubyJdxUrlUpdater(),
new RustUrlUpdater(), new DockerRancherDesktopUrlUpdater(), new SonarUrlUpdater(), new SquirrelSqlUrlUpdater(), new SoapUiUrlUpdater(),
new TerraformUrlUpdater(), new TomcatUrlUpdater(), new UvUrlUpdater(), new VsCodeUrlUpdater(), new VsCodiumUrlUpdater());
new LazyDockerUrlUpdater(), new MvnUrlUpdater(), new MvndUrlUpdater(), new NgUrlUpdater(), new NodeUrlUpdater(), new NpmUrlUpdater(),
new ObsidianUrlUpdater(), new OcUrlUpdater(), new PgAdminUrlUpdater(), new PipUrlUpdater(), new PycharmUrlUpdater(), new QuarkusUrlUpdater(),
new RubyUrlUpdater(), new RubyJdxUrlUpdater(), new RustUrlUpdater(), new DockerRancherDesktopUrlUpdater(), new SonarUrlUpdater(),
new SquirrelSqlUrlUpdater(), new SoapUiUrlUpdater(), new TerraformUrlUpdater(), new TomcatUrlUpdater(), new UvUrlUpdater(), new VsCodeUrlUpdater(),
new VsCodiumUrlUpdater());

/**
* The constructor.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package com.devonfw.tools.ide.url.tool.obsidian;

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 java.util.List;

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 ObsidianUrlUpdater}.
*/
@WireMockTest
public class ObsidianUrlUpdaterTest extends AbstractUrlUpdaterTest {

/**
* Test of {@link ObsidianUrlUpdater} for the creation of download URLs and checksums.
*
* @param tempDir Path to a temporary directory.
* @param wmRuntimeInfo the {@link WireMockRuntimeInfo}.
*/
@Test
void testObsidianUrlUpdater(@TempDir Path tempDir, WireMockRuntimeInfo wmRuntimeInfo) throws IOException {

// arrange
stubFor(get(urlMatching("/repos/obsidianmd/obsidian-releases/releases"))
.willReturn(aResponse()
.withStatus(200)
.withBody(readAndResolve(PATH_INTEGRATION_TEST.resolve("ObsidianUrlUpdater")
.resolve("obsidian-releases.json"), wmRuntimeInfo))));

stubFor(any(urlMatching("/obsidianmd/obsidian-releases/releases/download/v\\d+\\.\\d+\\.\\d+/Obsidian-.*\\.exe"))
.willReturn(aResponse()
.withStatus(200)
.withBody(DOWNLOAD_CONTENT)));
stubFor(any(urlMatching("/obsidianmd/obsidian-releases/releases/download/v\\d+\\.\\d+\\.\\d+/Obsidian-.*\\.dmg"))
.willReturn(aResponse()
.withStatus(200)
.withBody(DOWNLOAD_CONTENT)));
stubFor(any(urlMatching("/obsidianmd/obsidian-releases/releases/download/v\\d+\\.\\d+\\.\\d+/obsidian_.*_amd64\\.deb"))
.willReturn(aResponse()
.withStatus(200)
.withBody(DOWNLOAD_CONTENT)));
stubFor(any(urlMatching("/obsidianmd/obsidian-releases/releases/download/v\\d+\\.\\d+\\.\\d+/obsidian-.*\\.tar\\.gz"))
.willReturn(aResponse()
.withStatus(200)
.withBody(DOWNLOAD_CONTENT)));
stubFor(any(urlMatching("/obsidianmd/obsidian-releases/releases/download/v\\d+\\.\\d+\\.\\d+/obsidian-.*-arm64\\.tar\\.gz"))
.willReturn(aResponse()
.withStatus(200)
.withBody(DOWNLOAD_CONTENT)));

UrlRepository urlRepository = UrlRepository.load(tempDir);
ObsidianUrlUpdater updater = new ObsidianUrlUpdater(wmRuntimeInfo.getHttpBaseUrl(), wmRuntimeInfo.getHttpBaseUrl());

// act
update(updater, urlRepository);

// assert
List<String> expectedPlatforms = List.of("windows_x64", "mac_x64", "linux_x64");
Path obsidianDir = tempDir.resolve("obsidian").resolve("obsidian");
assertUrlVersion(obsidianDir.resolve("1.9.10"), expectedPlatforms);
assertUrlVersion(obsidianDir.resolve("1.10.6"), expectedPlatforms);
assertUrlVersion(obsidianDir.resolve("1.11.7"), expectedPlatforms);
assertUrlVersion(obsidianDir.resolve("1.12.7"), expectedPlatforms);
}
}
Loading