From e5a58b3e360842b442af6d8db240580c29cd5785 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 16 Oct 2022 10:41:21 -0500 Subject: [PATCH 1/6] feat(vscode): add debug launch config --- .vscode/launch.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..2487439f --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ + +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for XDebug", + "type": "php", + "request": "launch", + "port": 9000, + "pathMappings": { + "/hab/svc/php-runtime/var/site": "${workspaceRoot}", + "/hab/svc/php-runtime/var/site/php-classes/Emergence/Mueller": "${workspaceRoot:emergence-mueller}/php-classes/Emergence/Mueller" + }, + "ignore": [ + "**/vendor/**/*.php", + "**/src-compat/File.php" + ] + } + ] +} \ No newline at end of file From e21461a215c68aa623fb36db25d7975f03dc79e5 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 16 Oct 2022 12:04:21 -0500 Subject: [PATCH 2/6] feat(mueller): add local location check --- .../Investigator.config.d/codeforphilly.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php diff --git a/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php b/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php new file mode 100644 index 00000000..483e3f1a --- /dev/null +++ b/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php @@ -0,0 +1,52 @@ + 500, + 'function' => function (IUser $User, array &$userCache) { + if (!$User->Location) { + return false; + } + + $location = strtolower($User->Location); + + return ( + strpos($location, 'philly') !== false + || strpos($location, 'phila') !== false + || strpos($location, 'nj') !== false + || strpos($location, 'pa') !== false + || strpos($location, 'fishtown') !== false + || strpos($location, 'delaware') !== false + || strpos($location, 'chester') !== false + || strpos($location, 'drexel') !== false + || strpos($location, 'temple') !== false + || strpos($location, 'penn') !== false + || strpos($location, 'fairmount') !== false + || strpos($location, 'passyunk') !== false + || strpos($location, 'center city') !== false + || strpos($location, 'university city') !== false + || strpos($location, 'ucity') !== false + || strpos($location, 'new jersey') !== false + || strpos($location, 'south jersey') !== false + || strpos($location, 'swarthmore') !== false + || strpos($location, 'old city') !== false + || strpos($location, 'olde city') !== false + || strpos($location, 'northern liberties') !== false + || strpos($location, 'nolibs') !== false + || strpos($location, 'kingsessing') !== false + || strpos($location, 'kensington') !== false + || strpos($location, 'port richmond') !== false + || strpos($location, 'rittenhouse') !== false + || strpos($location, 'lansdale') !== false + || strpos($location, 'graduate hospital') !== false + || strpos($location, 'newtown square') !== false + || strpos($location, 'roxborough') !== false + || strpos($location, 'manayunk') !== false + || strpos($location, 'conshohocken') !== false + || strpos($location, 'cherry hill') !== false + ); + } +]; From 23676955e3b62fcc53c173b3f5df7ac4abfa9a8c Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 16 Oct 2022 12:05:47 -0500 Subject: [PATCH 3/6] chore(deps): bump laddr to v3.2.0 --- .holo/sources/laddr.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.holo/sources/laddr.toml b/.holo/sources/laddr.toml index ae1d2eb1..c7fdbbd4 100644 --- a/.holo/sources/laddr.toml +++ b/.holo/sources/laddr.toml @@ -1,3 +1,3 @@ [holosource] url = "https://github.com/CodeForPhilly/laddr" -ref = "refs/tags/v3.1.4" +ref = "refs/tags/v3.2.0" From 2c7b458f88cb3a9bde3a37879b66cd26b1501912 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 16 Oct 2022 12:11:20 -0500 Subject: [PATCH 4/6] fix(mueller): tighten local locations --- .../Mueller/Investigator.config.d/codeforphilly.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php b/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php index 483e3f1a..30d01d56 100644 --- a/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php +++ b/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php @@ -16,11 +16,9 @@ return ( strpos($location, 'philly') !== false || strpos($location, 'phila') !== false - || strpos($location, 'nj') !== false - || strpos($location, 'pa') !== false || strpos($location, 'fishtown') !== false || strpos($location, 'delaware') !== false - || strpos($location, 'chester') !== false + || strpos($location, 'west chester') !== false || strpos($location, 'drexel') !== false || strpos($location, 'temple') !== false || strpos($location, 'penn') !== false @@ -47,6 +45,7 @@ || strpos($location, 'manayunk') !== false || strpos($location, 'conshohocken') !== false || strpos($location, 'cherry hill') !== false + || strpos($location, 'phoenixville') !== false ); } ]; From 9da76838c88dd12faa4d1b807f7a32a0174b9e3d Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 16 Oct 2022 13:28:59 -0500 Subject: [PATCH 5/6] feat(mueller): add brewerytown to local locations --- .../Emergence/Mueller/Investigator.config.d/codeforphilly.php | 1 + 1 file changed, 1 insertion(+) diff --git a/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php b/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php index 30d01d56..742d1b80 100644 --- a/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php +++ b/php-config/Emergence/Mueller/Investigator.config.d/codeforphilly.php @@ -46,6 +46,7 @@ || strpos($location, 'conshohocken') !== false || strpos($location, 'cherry hill') !== false || strpos($location, 'phoenixville') !== false + || strpos($location, 'brewerytown') !== false ); } ]; From 392f2725423a1019cfd0fee63ba13591cb254885 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Sun, 16 Oct 2022 15:32:50 -0500 Subject: [PATCH 6/6] chore(deps): bump laddr to v3.2.1 --- .holo/sources/laddr.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.holo/sources/laddr.toml b/.holo/sources/laddr.toml index c7fdbbd4..66d0b0d3 100644 --- a/.holo/sources/laddr.toml +++ b/.holo/sources/laddr.toml @@ -1,3 +1,3 @@ [holosource] url = "https://github.com/CodeForPhilly/laddr" -ref = "refs/tags/v3.2.0" +ref = "refs/tags/v3.2.1"