From 907f19644687c6a3e2c3107df49eacb70eac8b3d Mon Sep 17 00:00:00 2001 From: Ty Date: Tue, 18 Jun 2024 01:03:33 -0400 Subject: [PATCH] Change name depending on url in claim, remove references to existing profile, and add another test --- src/serviceProviders/pronounspage.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/serviceProviders/pronounspage.js b/src/serviceProviders/pronounspage.js index ee8707c..ca61f4a 100644 --- a/src/serviceProviders/pronounspage.js +++ b/src/serviceProviders/pronounspage.js @@ -18,7 +18,7 @@ limitations under the License. * @module serviceProviders/pronounspage * @example * import { ServiceProviderDefinitions } from 'doipjs'; - * const sp = ServiceProviderDefinitions.data.pronounspage.processURI('https://pronouns.page/@Alice'); + * const sp = ServiceProviderDefinitions.data.pronounspage.processURI('https://pronouns.page/@doipjs'); */ import * as E from '../enums.js' @@ -45,7 +45,7 @@ export function processURI (uri) { return new ServiceProvider({ about: { id: 'pronounspage', - name: 'pronouns.page', + name: match[1], homepage: 'https://pronouns.page' }, profile: { @@ -90,35 +90,39 @@ export function processURI (uri) { export const tests = [ { - uri: 'https://pronouns.page/@Alice', + uri: 'https://pronouns.page/@doipjs', shouldMatch: true }, { - uri: 'https://pronouns.page/@Alice#she/her', + uri: 'https://pronouns.page/@doipjs#it/its', shouldMatch: true }, { - uri: 'https://pronouns.page/u/Alice', + uri: 'https://pronouns.page/u/doipjs', shouldMatch: true }, { - uri: 'https://nl.pronouns.page/u/Alice', + uri: 'https://nl.pronouns.page/u/doipjs', shouldMatch: true }, { - uri: 'https://pronombr.es/@Alice', + uri: 'https://lad.pronouns.page/u/doipjs', shouldMatch: true }, { - uri: 'https://pronoms.fr/@Alice', + uri: 'https://pronombr.es/@doipjs', shouldMatch: true }, { - uri: 'https://zaimki.pl/@Alice', + uri: 'https://pronoms.fr/@doipjs', shouldMatch: true }, { - uri: 'https://pronouns.page/Alice', + uri: 'https://zaimki.pl/@doipjs', + shouldMatch: true + }, + { + uri: 'https://pronouns.page/doipjs', shouldMatch: false } ]