From d0153fc8dc08c02784e094c18c2174484259086d Mon Sep 17 00:00:00 2001 From: Alain Bourgeois Date: Wed, 27 Dec 2023 12:12:08 +0100 Subject: [PATCH 1/7] Update lib/handlers/put.js Co-authored-by: Ted Thibodeau Jr --- lib/handlers/put.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlers/put.js b/lib/handlers/put.js index 168278a46..4979dc9c5 100644 --- a/lib/handlers/put.js +++ b/lib/handlers/put.js @@ -11,7 +11,7 @@ async function handler (req, res, next) { res.header('MS-Author-Via', 'SPARQL') const contentType = req.get('content-type') - // check if a folder or resource with same name exists + // check whether a folder or resource with same name exists try { const ldp = req.app.locals.ldp await ldp.checkItemName(req) From b348b4bcb13f1785e8266830fb4e06f460cfc282 Mon Sep 17 00:00:00 2001 From: Alain Bourgeois Date: Wed, 27 Dec 2023 12:12:18 +0100 Subject: [PATCH 2/7] Update lib/ldp.js Co-authored-by: Ted Thibodeau Jr --- lib/ldp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldp.js b/lib/ldp.js index c24cc12b0..72a586458 100644 --- a/lib/ldp.js +++ b/lib/ldp.js @@ -158,7 +158,7 @@ class LDP { extension = '' } - // allways return a valid URL. + // always return a valid URL. const resourceUrl = await ldp.getAvailableUrl(hostname, containerPath, { slug, extension, container }) debug.handlers('POST -- Will create at: ' + resourceUrl) From 8018f1f851b365c1d43a8bcebd15ea52982970f2 Mon Sep 17 00:00:00 2001 From: Alain Bourgeois Date: Wed, 27 Dec 2023 12:12:27 +0100 Subject: [PATCH 3/7] Update lib/ldp.js Co-authored-by: Ted Thibodeau Jr --- lib/ldp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldp.js b/lib/ldp.js index 72a586458..1a586eb9a 100644 --- a/lib/ldp.js +++ b/lib/ldp.js @@ -327,7 +327,7 @@ class LDP { } catch (err) { } } - // check if a document (or container) has the same name than a document (or container) + // check whether a document (or container) has the same name as another document (or container) async checkItemName (url) { let testName, testPath const { hostname, pathname } = this.resourceMapper._parseUrl(url) // (url.url || url) From 057157b785b0e4c9eecc827f26f86e5802292927 Mon Sep 17 00:00:00 2001 From: Alain Bourgeois Date: Wed, 27 Dec 2023 12:12:40 +0100 Subject: [PATCH 4/7] Update lib/ldp.js Co-authored-by: Ted Thibodeau Jr --- lib/ldp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldp.js b/lib/ldp.js index 1a586eb9a..a4bfc07a5 100644 --- a/lib/ldp.js +++ b/lib/ldp.js @@ -585,7 +585,7 @@ class LDP { let itemName = slug.endsWith(extension) || slug.endsWith(this.suffixAcl) || slug.endsWith(this.suffixMeta) ? slug : slug + extension try { - // check resource exists + // check whether resource exists const context = container ? '/' : '' await this.resourceMapper.mapUrlToFile({ url: (requestUrl + itemName + context) }) itemName = `${uuid.v1()}-${itemName}` From a99473db3b7685a0d113b5fda24a0999923e8f9b Mon Sep 17 00:00:00 2001 From: Alain Bourgeois Date: Wed, 27 Dec 2023 12:12:47 +0100 Subject: [PATCH 5/7] Update lib/ldp.js Co-authored-by: Ted Thibodeau Jr --- lib/ldp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldp.js b/lib/ldp.js index a4bfc07a5..b785d6e18 100644 --- a/lib/ldp.js +++ b/lib/ldp.js @@ -591,7 +591,7 @@ class LDP { itemName = `${uuid.v1()}-${itemName}` } catch (e) { try { - // check resource with same name exists + // check whether resource with same name exists const context = !container ? '/' : '' await this.resourceMapper.mapUrlToFile({ url: (requestUrl + itemName + context) }) itemName = `${uuid.v1()}-${itemName}` From 9e14a1d59bc30e21759fbb14e8100ee5f0cca756 Mon Sep 17 00:00:00 2001 From: bourgeoa Date: Wed, 27 Dec 2023 16:02:02 +0100 Subject: [PATCH 6/7] failing test in CI --- test/surface/run-solid-test-suite.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/surface/run-solid-test-suite.sh b/test/surface/run-solid-test-suite.sh index 8256f593b..39549ec95 100755 --- a/test/surface/run-solid-test-suite.sh +++ b/test/surface/run-solid-test-suite.sh @@ -57,7 +57,7 @@ teardown || true setup $1 waitForNss server runTests webid-provider-tests v2.0.3 -runTests solid-crud-tests v6.0.0 +runTestsFromGit solid-crud-tests issue#1743 waitForNss thirdparty # runTests web-access-control-tests v7.1.0 runTestsFromGit web-access-control-tests patchAppendNewDocument From 4860cbbb12b295486b04960e038f7db3ac54f001 Mon Sep 17 00:00:00 2001 From: bourgeoa Date: Wed, 27 Dec 2023 16:32:16 +0100 Subject: [PATCH 7/7] update solid-crud-tests --- test/surface/run-solid-test-suite.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/surface/run-solid-test-suite.sh b/test/surface/run-solid-test-suite.sh index 39549ec95..d55540bcc 100755 --- a/test/surface/run-solid-test-suite.sh +++ b/test/surface/run-solid-test-suite.sh @@ -57,7 +57,7 @@ teardown || true setup $1 waitForNss server runTests webid-provider-tests v2.0.3 -runTestsFromGit solid-crud-tests issue#1743 +runTestsFromGit solid-crud-tests v6.0.0-issue#1743 waitForNss thirdparty # runTests web-access-control-tests v7.1.0 runTestsFromGit web-access-control-tests patchAppendNewDocument