diff --git a/README.md b/README.md index 075a315..c3f9c84 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # JOSM MapWithAI Plugin (formerly RapiD Plugin) -[![pipeline status](https://gitlab.com/gokaart/JOSM_MapWithAI/badges/master/pipeline.svg)](https://gitlab.com/gokaart/JOSM_MapWithAI/commits/master) +[![pipeline status](https://github.com/JOSM/MapWithAI/actions/workflows/ant.yml/badge.svg)](https://github.com/JOSM/MapWithAI/actions/workflows/ant.yml) [![code coverage](https://gitlab.com/gokaart/JOSM_MapWithAI/badges/master/coverage.svg)](https://codecov.io/github/gokaart/JOSM_MapWithAI?branch=master) [![license](https://img.shields.io/badge/license-GPLv2-blue.svg?style=flat-square)](./LICENSE) @@ -22,7 +22,7 @@ See the [wiki page](https://josm.openstreetmap.de/wiki/Help/Plugin/MapWithAI). ## Contributing -- The **source code** is hosted on [GitLab](https://gitlab.com/gokaart/JOSM_MapWithAI). +- The **source code** is hosted on [GitHub](https://github.com/JOSM/MapWithAI). - **Issues** are managed in [JOSM Trac](https://josm.openstreetmap.de/query?status=assigned&status=needinfo&status=new&status=reopened&component=Plugin+mapwithai&group=component&max=200&col=id&col=summary&col=component&col=status&col=type&col=priority&order=priority&report=17) - Report a [New Ticket](https://josm.openstreetmap.de/newticket?component=Plugin+mapwithai) - **Translations** are not currently done. diff --git a/build.gradle b/build.gradle index 813b374..5c6d4ad 100644 --- a/build.gradle +++ b/build.gradle @@ -225,16 +225,16 @@ spotless { josm { debugPort = 7055 manifest { - oldVersionDownloadLink 17903, "v1.8.7", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.8.7/mapwithai.jar") - oldVersionDownloadLink 17084, "v1.7.1.6", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.7.1.6/mapwithai.jar") - oldVersionDownloadLink 16645, "v1.6.8", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.6.8/mapwithai.jar") - oldVersionDownloadLink 16284, "v1.5.10", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.5.10/mapwithai.jar") - oldVersionDownloadLink 16220, "v1.4.7", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.4.7/mapwithai.jar") - oldVersionDownloadLink 15820, "v1.3.11", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.3.11/mapwithai.jar") - oldVersionDownloadLink 15737, "v1.2.7", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.2.7/mapwithai.jar") - oldVersionDownloadLink 15609, "v1.1.12", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.1.12/mapwithai.jar") - oldVersionDownloadLink 15542, "v1.0.9", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.0.9/mapwithai.jar") - oldVersionDownloadLink 15233, "v0.2.14", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v0.2.14/mapwithai.jar") + oldVersionDownloadLink 17903, "v1.8.7", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.8.7/mapwithai.jar") + oldVersionDownloadLink 17084, "v1.7.1.6", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.7.1.6/mapwithai.jar") + oldVersionDownloadLink 16645, "v1.6.8", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.6.8/mapwithai.jar") + oldVersionDownloadLink 16284, "v1.5.10", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.5.10/mapwithai.jar") + oldVersionDownloadLink 16220, "v1.4.7", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.4.7/mapwithai.jar") + oldVersionDownloadLink 15820, "v1.3.11", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.3.11/mapwithai.jar") + oldVersionDownloadLink 15737, "v1.2.7", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.2.7/mapwithai.jar") + oldVersionDownloadLink 15609, "v1.1.12", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.1.12/mapwithai.jar") + oldVersionDownloadLink 15542, "v1.0.9", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.0.9/mapwithai.jar") + oldVersionDownloadLink 15233, "v0.2.14", new URL("https://github.com/JOSM/MapWithAI/releases/download/v0.2.14/mapwithai.jar") } i18n { pathTransformer = getPathTransformer(project.projectDir, "gitlab.com/${gitlabGroup}/${gitlabRepositoryName}/blob") diff --git a/gradle.properties b/gradle.properties index d2da1f5..df4d2e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ plugin.canloadatruntime = true plugin.author = Taylor Smock plugin.class = org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin plugin.icon = images/dialogs/mapwithai.svg -plugin.link = https://gitlab.com/gokaart/JOSM_MapWithAI +plugin.link = https://github.com/JOSM/MapWithAI plugin.description = Allows the use of MapWithAI data in JOSM (same data as used in RapiD) plugin.requires = utilsplugin2;apache-http diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java index 4e28f9c..5b17cdb 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java @@ -185,7 +185,7 @@ public class MapWithAIPreferences extends DefaultTabPreferenceSetting { kaartLogo.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - OpenBrowser.displayUrl("https://gitlab.com/gokaart/JOSM_MapWithAI"); + OpenBrowser.displayUrl("https://github.com/JOSM/MapWithAI"); } }); kaartLogo.setCursor(new Cursor(Cursor.HAND_CURSOR)); diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/mapwithai/MapWithAIProvidersPanel.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/mapwithai/MapWithAIProvidersPanel.java index 1a9ecc7..5abe121 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/mapwithai/MapWithAIProvidersPanel.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/mapwithai/MapWithAIProvidersPanel.java @@ -402,8 +402,8 @@ public class MapWithAIProvidersPanel extends JPanel { add(defaultToolbar, GBC.eol().anchor(GBC.SOUTH).insets(0, 0, 5, 0)); HtmlPanel help = new HtmlPanel( - tr("New default entries can be added in the GitLab Repository.", - "https://gitlab.com/gokaart/JOSM_MapWithAI/-/blob/pages/public/json/sources.json")); + tr("New default entries can be added in the GitHub Repository.", + "https://github.com/JOSM/MapWithAI/blob/pages/json/sources.json")); help.enableClickableHyperlinks(); add(help, GBC.eol().insets(10, 0, 0, 0).fill(GBC.HORIZONTAL)); diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java index c2c1f53..5e13592 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java @@ -29,7 +29,7 @@ import org.openstreetmap.josm.tools.Territories; * definition file. *
* The format is specified in the MapWithAI
+ * "https://github.com/JOSM/MapWithAI/blob/pages/json/sources.json">MapWithAI
* source.
*/
public class MapWithAISourceReader extends CommonSourceReader> implements Closeable {
diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/spi/preferences/MapWithAIUrls.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/spi/preferences/MapWithAIUrls.java
index e920e00..5874a83 100644
--- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/spi/preferences/MapWithAIUrls.java
+++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/spi/preferences/MapWithAIUrls.java
@@ -2,10 +2,12 @@
package org.openstreetmap.josm.plugins.mapwithai.spi.preferences;
public class MapWithAIUrls implements IMapWithAIUrls {
+ /** The base url */
+ private static final String BASE_URL = "https://josm.github.io/MapWithAI/";
/** The default url for additional conflation servers */
- private static final String DEFAULT_CONFLATION_JSON = "https://gokaart.gitlab.io/JOSM_MapWithAI/json/conflation_servers.json";
+ private static final String DEFAULT_CONFLATION_JSON = BASE_URL + "json/conflation_servers.json";
/** The default URL for the MapWithAI sources */
- private static final String DEFAULT_MAPWITHAI_SOURCES_JSON = "https://gokaart.gitlab.io/JOSM_MapWithAI/json/sources.json";
+ private static final String DEFAULT_MAPWITHAI_SOURCES_JSON = BASE_URL + "json/sources.json";
/** The default url for the MapWithAI paint style */
private static final String DEFAULT_PAINT_STYLE_RESOURCE_URL = "https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1";
diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtils.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtils.java
index e8f4fd8..0087451 100644
--- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtils.java
+++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtils.java
@@ -25,7 +25,7 @@ import org.openstreetmap.josm.tools.Logging;
*
*/
public final class BlacklistUtils {
- static final String DEFAULT_BLACKLIST_URL = "https://gokaart.gitlab.io/JOSM_MapWithAI/json/blacklisted_versions.json";
+ static final String DEFAULT_BLACKLIST_URL = "https://josm.github.io/MapWithAI/json/blacklisted_versions.json";
private static String blacklistUrl = DEFAULT_BLACKLIST_URL;
private BlacklistUtils() {
diff --git a/src/test/resources/wiremock/mappings/josm_mapwithai_json_conflation_serversjson-fb2197f1-81fd-445d-bb90-b6219d187af6.json b/src/test/resources/wiremock/mappings/josm_mapwithai_json_conflation_serversjson-fb2197f1-81fd-445d-bb90-b6219d187af6.json
index 9cf9636..4592877 100644
--- a/src/test/resources/wiremock/mappings/josm_mapwithai_json_conflation_serversjson-fb2197f1-81fd-445d-bb90-b6219d187af6.json
+++ b/src/test/resources/wiremock/mappings/josm_mapwithai_json_conflation_serversjson-fb2197f1-81fd-445d-bb90-b6219d187af6.json
@@ -2,7 +2,7 @@
"id" : "fb2197f1-81fd-445d-bb90-b6219d187af6",
"name" : "josm_mapwithai_json_conflation_serversjson",
"request" : {
- "url" : "/JOSM_MapWithAI/json/conflation_servers.json",
+ "url" : "/MapWithAI/json/conflation_servers.json",
"method" : "GET"
},
"response" : {
@@ -21,4 +21,4 @@
"uuid" : "fb2197f1-81fd-445d-bb90-b6219d187af6",
"persistent" : true,
"insertionIndex" : 43
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/wiremock/mappings/josm_mapwithai_json_sourcesjson-23497750-675c-440a-986a-34dd14b047f8.json b/src/test/resources/wiremock/mappings/josm_mapwithai_json_sourcesjson-23497750-675c-440a-986a-34dd14b047f8.json
index 842f69d..c0a6a1a 100644
--- a/src/test/resources/wiremock/mappings/josm_mapwithai_json_sourcesjson-23497750-675c-440a-986a-34dd14b047f8.json
+++ b/src/test/resources/wiremock/mappings/josm_mapwithai_json_sourcesjson-23497750-675c-440a-986a-34dd14b047f8.json
@@ -2,7 +2,7 @@
"id" : "23497750-675c-440a-986a-34dd14b047f8",
"name" : "josm_mapwithai_json_sourcesjson",
"request" : {
- "urlPattern" : "(\/gokaart)?\/JOSM_MapWithAI\/(-\/raw\/pages\/public\/)?json\/sources.json",
+ "urlPattern" : "\/MapWithAI\/?json\/sources.json",
"method" : "GET"
},
"response" : {
diff --git a/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/MapWithAIConfig.java b/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/MapWithAIConfig.java
index 9361395..bf38e4c 100644
--- a/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/MapWithAIConfig.java
+++ b/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/MapWithAIConfig.java
@@ -50,12 +50,12 @@ public @interface MapWithAIConfig {
@Override
public String getConflationServerJson() {
- return this.wireMockServer.baseUrl() + "/JOSM_MapWithAI/json/conflation_servers.json";
+ return this.wireMockServer.baseUrl() + "/MapWithAI/json/conflation_servers.json";
}
@Override
public String getMapWithAISourcesJson() {
- return this.wireMockServer.baseUrl() + "/JOSM_MapWithAI/json/sources.json";
+ return this.wireMockServer.baseUrl() + "/MapWithAI/json/sources.json";
}
@Override
diff --git a/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/Wiremock.java b/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/Wiremock.java
index 36f203e..3fc04e8 100644
--- a/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/Wiremock.java
+++ b/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/Wiremock.java
@@ -184,8 +184,8 @@ public @interface Wiremock {
if (wireMockServer.getStubMappings().stream().filter(mapping -> mapping.getRequest().getUrl() != null)
.noneMatch(mapping -> mapping.getRequest().getUrl()
- .equals("/JOSM_MapWithAI/json/conflation_servers.json"))) {
- wireMockServer.stubFor(WireMock.get("/JOSM_MapWithAI/json/conflation_servers.json")
+ .equals("/MapWithAI/json/conflation_servers.json"))) {
+ wireMockServer.stubFor(WireMock.get("/MapWithAI/json/conflation_servers.json")
.willReturn(WireMock.aResponse().withBody("{}")).atPriority(-5));
}
}
diff --git a/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtilsTest.java b/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtilsTest.java
index 2f2aff5..8222221 100644
--- a/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtilsTest.java
+++ b/src/test/unit/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtilsTest.java
@@ -40,7 +40,7 @@ class BlacklistUtilsTest {
TestUtils.assumeWorkingJMockit();
wireMock = new WireMockServer(options().dynamicPort());
wireMock.start();
- BlacklistUtils.setBlacklistUrl(wireMock.baseUrl() + "/JOSM_MapWithAI/json/blacklisted_versions.json");
+ BlacklistUtils.setBlacklistUrl(wireMock.baseUrl() + "/MapWithAI/json/blacklisted_versions.json");
new MapWithAIPluginMock();
}
@@ -58,7 +58,7 @@ class BlacklistUtilsTest {
@Test
void testArrayBad() {
- wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
+ wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json"))
.willReturn(aResponse().withStatus(200).withBody("[\"" + MapWithAIPlugin.getVersionInfo() + "\"]"))
.build());
assertTrue(BlacklistUtils.isBlacklisted());
@@ -66,37 +66,35 @@ class BlacklistUtilsTest {
@Test
void testArrayGood() {
- wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
+ wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json"))
.willReturn(aResponse().withStatus(200).withBody("[null, 0, false]")).build());
assertFalse(BlacklistUtils.isBlacklisted());
}
@Test
void testObjectBad() {
- wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
- .willReturn(aResponse().withStatus(200)
- .withBody("{ \"" + MapWithAIPlugin.getVersionInfo() + "\": \"reason here\"}"))
- .build());
+ wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json")).willReturn(aResponse()
+ .withStatus(200).withBody("{ \"" + MapWithAIPlugin.getVersionInfo() + "\": \"reason here\"}")).build());
assertTrue(BlacklistUtils.isBlacklisted());
}
@Test
void testObjectGood() {
- wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
+ wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json"))
.willReturn(aResponse().withStatus(200).withBody("{ \"version\": \"reason here\"}")).build());
assertFalse(BlacklistUtils.isBlacklisted());
}
@Test
void testNullJson() {
- wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
+ wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json"))
.willReturn(aResponse().withStatus(200).withBody("null")).build());
assertTrue(BlacklistUtils.isBlacklisted());
}
@Test
void testBrokenJson() {
- wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json")).willReturn(
+ wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json")).willReturn(
aResponse().withStatus(200).withBody("{ \"" + MapWithAIPlugin.getVersionInfo() + "\": \"reason here\""))
.build());
assertTrue(BlacklistUtils.isBlacklisted());
@@ -105,14 +103,14 @@ class BlacklistUtilsTest {
@Test
void testNoResponse() {
wireMock.addStubMapping(
- get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json")).willReturn(noContent()).build());
+ get(urlMatching("/MapWithAI/json/blacklisted_versions.json")).willReturn(noContent()).build());
assertTrue(BlacklistUtils.isBlacklisted());
}
@Test
void testNotFound() {
wireMock.addStubMapping(
- get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json")).willReturn(notFound()).build());
+ get(urlMatching("/MapWithAI/json/blacklisted_versions.json")).willReturn(notFound()).build());
assertTrue(BlacklistUtils.isBlacklisted());
}
}