Skip to content

Commit 96503e6

Browse files
committed
Update URL locations
Signed-off-by: Taylor Smock <[email protected]>
1 parent 207161b commit 96503e6

File tree

13 files changed

+39
-39
lines changed

13 files changed

+39
-39
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JOSM MapWithAI Plugin (formerly RapiD Plugin)
22

3-
[![pipeline status](https://gitlab.com/gokaart/JOSM_MapWithAI/badges/master/pipeline.svg)](https://gitlab.com/gokaart/JOSM_MapWithAI/commits/master)
3+
[![pipeline status](https://github.com/JOSM/MapWithAI/actions/workflows/ant.yml/badge.svg)](https://github.com/JOSM/MapWithAI/actions/workflows/ant.yml)
44
[![code coverage](https://gitlab.com/gokaart/JOSM_MapWithAI/badges/master/coverage.svg)](https://codecov.io/github/gokaart/JOSM_MapWithAI?branch=master)
55
[![license](https://img.shields.io/badge/license-GPLv2-blue.svg?style=flat-square)](./LICENSE)
66

@@ -22,7 +22,7 @@ See the [wiki page](https://josm.openstreetmap.de/wiki/Help/Plugin/MapWithAI).
2222

2323
## Contributing
2424

25-
- The **source code** is hosted on [GitLab](https://gitlab.com/gokaart/JOSM_MapWithAI).
25+
- The **source code** is hosted on [GitHub](https://github.com/JOSM/MapWithAI).
2626
- **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)
2727
- Report a [New Ticket](https://josm.openstreetmap.de/newticket?component=Plugin+mapwithai)
2828
- **Translations** are not currently done.

build.gradle

+10-10
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,16 @@ spotless {
225225
josm {
226226
debugPort = 7055
227227
manifest {
228-
oldVersionDownloadLink 17903, "v1.8.7", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.8.7/mapwithai.jar")
229-
oldVersionDownloadLink 17084, "v1.7.1.6", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.7.1.6/mapwithai.jar")
230-
oldVersionDownloadLink 16645, "v1.6.8", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.6.8/mapwithai.jar")
231-
oldVersionDownloadLink 16284, "v1.5.10", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.5.10/mapwithai.jar")
232-
oldVersionDownloadLink 16220, "v1.4.7", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.4.7/mapwithai.jar")
233-
oldVersionDownloadLink 15820, "v1.3.11", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.3.11/mapwithai.jar")
234-
oldVersionDownloadLink 15737, "v1.2.7", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.2.7/mapwithai.jar")
235-
oldVersionDownloadLink 15609, "v1.1.12", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.1.12/mapwithai.jar")
236-
oldVersionDownloadLink 15542, "v1.0.9", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v1.0.9/mapwithai.jar")
237-
oldVersionDownloadLink 15233, "v0.2.14", new URL("https://gokaart.gitlab.io/JOSM_MapWithAI/dist/v0.2.14/mapwithai.jar")
228+
oldVersionDownloadLink 17903, "v1.8.7", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.8.7/mapwithai.jar")
229+
oldVersionDownloadLink 17084, "v1.7.1.6", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.7.1.6/mapwithai.jar")
230+
oldVersionDownloadLink 16645, "v1.6.8", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.6.8/mapwithai.jar")
231+
oldVersionDownloadLink 16284, "v1.5.10", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.5.10/mapwithai.jar")
232+
oldVersionDownloadLink 16220, "v1.4.7", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.4.7/mapwithai.jar")
233+
oldVersionDownloadLink 15820, "v1.3.11", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.3.11/mapwithai.jar")
234+
oldVersionDownloadLink 15737, "v1.2.7", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.2.7/mapwithai.jar")
235+
oldVersionDownloadLink 15609, "v1.1.12", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.1.12/mapwithai.jar")
236+
oldVersionDownloadLink 15542, "v1.0.9", new URL("https://github.com/JOSM/MapWithAI/releases/download/v1.0.9/mapwithai.jar")
237+
oldVersionDownloadLink 15233, "v0.2.14", new URL("https://github.com/JOSM/MapWithAI/releases/download/v0.2.14/mapwithai.jar")
238238
}
239239
i18n {
240240
pathTransformer = getPathTransformer(project.projectDir, "gitlab.com/${gitlabGroup}/${gitlabRepositoryName}/blob")

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugin.canloadatruntime = true
88
plugin.author = Taylor Smock
99
plugin.class = org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin
1010
plugin.icon = images/dialogs/mapwithai.svg
11-
plugin.link = https://gitlab.com/gokaart/JOSM_MapWithAI
11+
plugin.link = https://github.com/JOSM/MapWithAI
1212
plugin.description = Allows the use of MapWithAI data in JOSM (same data as used in RapiD)
1313

1414
plugin.requires = utilsplugin2;apache-http

src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private Component getSettingsPanel(PreferenceTabbedPane gui) {
185185
kaartLogo.addMouseListener(new MouseAdapter() {
186186
@Override
187187
public void mouseClicked(MouseEvent e) {
188-
OpenBrowser.displayUrl("https://gitlab.com/gokaart/JOSM_MapWithAI");
188+
OpenBrowser.displayUrl("https://github.com/JOSM/MapWithAI");
189189
}
190190
});
191191
kaartLogo.setCursor(new Cursor(Cursor.HAND_CURSOR));

src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/mapwithai/MapWithAIProvidersPanel.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ public void mouseClicked(MouseEvent e) {
402402
add(defaultToolbar, GBC.eol().anchor(GBC.SOUTH).insets(0, 0, 5, 0));
403403

404404
HtmlPanel help = new HtmlPanel(
405-
tr("New default entries can be added in the <a href=\"{0}\">GitLab Repository</a>.",
406-
"https://gitlab.com/gokaart/JOSM_MapWithAI/-/blob/pages/public/json/sources.json"));
405+
tr("New default entries can be added in the <a href=\"{0}\">GitHub Repository</a>.",
406+
"https://github.com/JOSM/MapWithAI/blob/pages/json/sources.json"));
407407
help.enableClickableHyperlinks();
408408
add(help, GBC.eol().insets(10, 0, 0, 0).fill(GBC.HORIZONTAL));
409409

src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/MapWithAISourceReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* definition file.
3030
* <p>
3131
* The format is specified in the <a href=
32-
* "https://gitlab.com/gokaart/JOSM_MapWithAI/-/blob/pages/public/json/sources.json">MapWithAI
32+
* "https://github.com/JOSM/MapWithAI/blob/pages/json/sources.json">MapWithAI
3333
* source</a>.
3434
*/
3535
public class MapWithAISourceReader extends CommonSourceReader<List<MapWithAIInfo>> implements Closeable {

src/main/java/org/openstreetmap/josm/plugins/mapwithai/spi/preferences/MapWithAIUrls.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
package org.openstreetmap.josm.plugins.mapwithai.spi.preferences;
33

44
public class MapWithAIUrls implements IMapWithAIUrls {
5+
/** The base url */
6+
private static final String BASE_URL = "https://josm.github.io/MapWithAI/";
57
/** The default url for additional conflation servers */
6-
private static final String DEFAULT_CONFLATION_JSON = "https://gokaart.gitlab.io/JOSM_MapWithAI/json/conflation_servers.json";
8+
private static final String DEFAULT_CONFLATION_JSON = BASE_URL + "json/conflation_servers.json";
79
/** The default URL for the MapWithAI sources */
8-
private static final String DEFAULT_MAPWITHAI_SOURCES_JSON = "https://gokaart.gitlab.io/JOSM_MapWithAI/json/sources.json";
10+
private static final String DEFAULT_MAPWITHAI_SOURCES_JSON = BASE_URL + "json/sources.json";
911
/** The default url for the MapWithAI paint style */
1012
private static final String DEFAULT_PAINT_STYLE_RESOURCE_URL = "https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1";
1113

src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
*/
2727
public final class BlacklistUtils {
28-
static final String DEFAULT_BLACKLIST_URL = "https://gokaart.gitlab.io/JOSM_MapWithAI/json/blacklisted_versions.json";
28+
static final String DEFAULT_BLACKLIST_URL = "https://josm.github.io/MapWithAI/json/blacklisted_versions.json";
2929
private static String blacklistUrl = DEFAULT_BLACKLIST_URL;
3030

3131
private BlacklistUtils() {

src/test/resources/wiremock/mappings/josm_mapwithai_json_conflation_serversjson-fb2197f1-81fd-445d-bb90-b6219d187af6.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id" : "fb2197f1-81fd-445d-bb90-b6219d187af6",
33
"name" : "josm_mapwithai_json_conflation_serversjson",
44
"request" : {
5-
"url" : "/JOSM_MapWithAI/json/conflation_servers.json",
5+
"url" : "/MapWithAI/json/conflation_servers.json",
66
"method" : "GET"
77
},
88
"response" : {
@@ -21,4 +21,4 @@
2121
"uuid" : "fb2197f1-81fd-445d-bb90-b6219d187af6",
2222
"persistent" : true,
2323
"insertionIndex" : 43
24-
}
24+
}

src/test/resources/wiremock/mappings/josm_mapwithai_json_sourcesjson-23497750-675c-440a-986a-34dd14b047f8.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id" : "23497750-675c-440a-986a-34dd14b047f8",
33
"name" : "josm_mapwithai_json_sourcesjson",
44
"request" : {
5-
"urlPattern" : "(\/gokaart)?\/JOSM_MapWithAI\/(-\/raw\/pages\/public\/)?json\/sources.json",
5+
"urlPattern" : "\/MapWithAI\/?json\/sources.json",
66
"method" : "GET"
77
},
88
"response" : {

src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/MapWithAIConfig.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ public WireMockMapWithAIUrls(final WireMockServer wireMockServer) {
5050

5151
@Override
5252
public String getConflationServerJson() {
53-
return this.wireMockServer.baseUrl() + "/JOSM_MapWithAI/json/conflation_servers.json";
53+
return this.wireMockServer.baseUrl() + "/MapWithAI/json/conflation_servers.json";
5454
}
5555

5656
@Override
5757
public String getMapWithAISourcesJson() {
58-
return this.wireMockServer.baseUrl() + "/JOSM_MapWithAI/json/sources.json";
58+
return this.wireMockServer.baseUrl() + "/MapWithAI/json/sources.json";
5959
}
6060

6161
@Override

src/test/unit/org/openstreetmap/josm/plugins/mapwithai/testutils/annotations/Wiremock.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ public void beforeEach(ExtensionContext context) throws Exception {
184184

185185
if (wireMockServer.getStubMappings().stream().filter(mapping -> mapping.getRequest().getUrl() != null)
186186
.noneMatch(mapping -> mapping.getRequest().getUrl()
187-
.equals("/JOSM_MapWithAI/json/conflation_servers.json"))) {
188-
wireMockServer.stubFor(WireMock.get("/JOSM_MapWithAI/json/conflation_servers.json")
187+
.equals("/MapWithAI/json/conflation_servers.json"))) {
188+
wireMockServer.stubFor(WireMock.get("/MapWithAI/json/conflation_servers.json")
189189
.willReturn(WireMock.aResponse().withBody("{}")).atPriority(-5));
190190
}
191191
}

src/test/unit/org/openstreetmap/josm/plugins/mapwithai/tools/BlacklistUtilsTest.java

+10-12
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static void setup() {
4040
TestUtils.assumeWorkingJMockit();
4141
wireMock = new WireMockServer(options().dynamicPort());
4242
wireMock.start();
43-
BlacklistUtils.setBlacklistUrl(wireMock.baseUrl() + "/JOSM_MapWithAI/json/blacklisted_versions.json");
43+
BlacklistUtils.setBlacklistUrl(wireMock.baseUrl() + "/MapWithAI/json/blacklisted_versions.json");
4444
new MapWithAIPluginMock();
4545
}
4646

@@ -58,45 +58,43 @@ static void tearDown() {
5858

5959
@Test
6060
void testArrayBad() {
61-
wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
61+
wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json"))
6262
.willReturn(aResponse().withStatus(200).withBody("[\"" + MapWithAIPlugin.getVersionInfo() + "\"]"))
6363
.build());
6464
assertTrue(BlacklistUtils.isBlacklisted());
6565
}
6666

6767
@Test
6868
void testArrayGood() {
69-
wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
69+
wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json"))
7070
.willReturn(aResponse().withStatus(200).withBody("[null, 0, false]")).build());
7171
assertFalse(BlacklistUtils.isBlacklisted());
7272
}
7373

7474
@Test
7575
void testObjectBad() {
76-
wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
77-
.willReturn(aResponse().withStatus(200)
78-
.withBody("{ \"" + MapWithAIPlugin.getVersionInfo() + "\": \"reason here\"}"))
79-
.build());
76+
wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json")).willReturn(aResponse()
77+
.withStatus(200).withBody("{ \"" + MapWithAIPlugin.getVersionInfo() + "\": \"reason here\"}")).build());
8078
assertTrue(BlacklistUtils.isBlacklisted());
8179
}
8280

8381
@Test
8482
void testObjectGood() {
85-
wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
83+
wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json"))
8684
.willReturn(aResponse().withStatus(200).withBody("{ \"version\": \"reason here\"}")).build());
8785
assertFalse(BlacklistUtils.isBlacklisted());
8886
}
8987

9088
@Test
9189
void testNullJson() {
92-
wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json"))
90+
wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json"))
9391
.willReturn(aResponse().withStatus(200).withBody("null")).build());
9492
assertTrue(BlacklistUtils.isBlacklisted());
9593
}
9694

9795
@Test
9896
void testBrokenJson() {
99-
wireMock.addStubMapping(get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json")).willReturn(
97+
wireMock.addStubMapping(get(urlMatching("/MapWithAI/json/blacklisted_versions.json")).willReturn(
10098
aResponse().withStatus(200).withBody("{ \"" + MapWithAIPlugin.getVersionInfo() + "\": \"reason here\""))
10199
.build());
102100
assertTrue(BlacklistUtils.isBlacklisted());
@@ -105,14 +103,14 @@ void testBrokenJson() {
105103
@Test
106104
void testNoResponse() {
107105
wireMock.addStubMapping(
108-
get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json")).willReturn(noContent()).build());
106+
get(urlMatching("/MapWithAI/json/blacklisted_versions.json")).willReturn(noContent()).build());
109107
assertTrue(BlacklistUtils.isBlacklisted());
110108
}
111109

112110
@Test
113111
void testNotFound() {
114112
wireMock.addStubMapping(
115-
get(urlMatching("/JOSM_MapWithAI/json/blacklisted_versions.json")).willReturn(notFound()).build());
113+
get(urlMatching("/MapWithAI/json/blacklisted_versions.json")).willReturn(notFound()).build());
116114
assertTrue(BlacklistUtils.isBlacklisted());
117115
}
118116
}

0 commit comments

Comments
 (0)