-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from itk-dev/feature/hashi-corp-vault
Added HashiCorp vault key provider
- Loading branch information
Showing
27 changed files
with
1,554 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
script_dir=$(pwd) | ||
module_name=$(basename "$script_dir") | ||
drupal_dir=vendor/drupal-module-unit-tests-analysis | ||
# Relative to $drupal_dir | ||
module_path=web/modules/contrib/$module_name | ||
|
||
cd "$script_dir" || exit | ||
|
||
drupal_composer() { | ||
composer --working-dir="$drupal_dir" --no-interaction "$@" | ||
} | ||
|
||
# Create new Drupal 10 project | ||
if [ ! -f "$drupal_dir/composer.json" ]; then | ||
composer --no-interaction create-project drupal/recommended-project:^10 "$drupal_dir" | ||
fi | ||
# Copy our code into the modules folder | ||
mkdir -p "$drupal_dir/$module_path" | ||
# https://stackoverflow.com/a/15373763 | ||
rsync --archive --compress . --filter=':- .gitignore' --exclude "$drupal_dir" --exclude .git "$drupal_dir/$module_path" | ||
|
||
drupal_composer config minimum-stability dev | ||
|
||
drupal_composer --append repositories.os2web/os2web_key path "$module_path" | ||
|
||
# Allow ALL plugins | ||
# https://getcomposer.org/doc/06-config.md#allow-plugins | ||
drupal_composer config --no-plugins allow-plugins true | ||
|
||
# Making Drupal 10 compatible | ||
drupal_composer require psr/http-message:^1.0 | ||
drupal_composer require mglaman/composer-drupal-lenient | ||
drupal_composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/coc_forms_auto_export", "drupal/webform_node_element"]' | ||
|
||
drupal_composer require wikimedia/composer-merge-plugin | ||
drupal_composer config extra.merge-plugin.include "$module_path/composer.json" | ||
# https://www.drupal.org/project/drupal/issues/3220043#comment-14845434 | ||
drupal_composer require --dev symfony/phpunit-bridge | ||
drupal_composer --no-interaction install | ||
|
||
# Run PHPUnit | ||
(cd "$drupal_dir" && vendor/bin/phpunit --configuration web/core/phpunit.xml.dist "$module_path/tests/src/Unit/KeyHelperUnitTest.php") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Drupal\os2web_key\Exception; | ||
|
||
/** | ||
* OS2Web key base exception. | ||
*/ | ||
class Exception extends \Exception { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Drupal\os2web_key\Exception; | ||
|
||
/** | ||
* File exception. | ||
*/ | ||
class FileException extends Exception { | ||
|
||
} |
Oops, something went wrong.