Skip to content

Commit 4ea08a7

Browse files
authored
[DDS-1343] Init bay_platform_dependencies module (#79)
1 parent 248d471 commit 4ea08a7

File tree

8 files changed

+19
-87
lines changed

8 files changed

+19
-87
lines changed

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
1-
# baywatch
2-
3-
Configuration for integration with Bay hosting platform
4-
5-
## Features
6-
7-
- Ensures dependencies required for the bay hosting platform are installed.
8-
- Allows configuring the default `Reply-To` email address via `SMTP_REPLYTO`
9-
environment variable.
1+
# Baywatch
2+
Drupal configuration and deployment tooling for SDP specific features.

baywatch.info.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies:
2323
- smtp:smtp
2424
- config_split:config_split
2525
- jwt:jwt
26+
- bay_platform_dependencies:bay_platform_dependencies
2627
config_devel:
2728
optional:
2829
- password_policy.password_policy.password_policy_sdpa

baywatch.install

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ function baywatch_install() {
4343
$baywatch->enable_tide_content_collection();
4444
$baywatch->enable_tide_logs();
4545
$baywatch->enable_tide_site_alert();
46+
$baywatch->enable_bay_platform_dependencies();
4647
}
4748

4849
/**
@@ -570,3 +571,11 @@ function baywatch_update_8030() {
570571
$baywatch = new BaywatchOperation();
571572
$baywatch->enable_tide_site_alert();
572573
}
574+
575+
/**
576+
* Enables bay_platform_dependencies module.
577+
*/
578+
function baywatch_update_8030() {
579+
$baywatch = new BaywatchOperation();
580+
$baywatch->enable_bay_platform_dependencies();
581+
}

baywatch.module

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,3 @@
66
* Procedural hooks for baywatch module.
77
*/
88

9-
/**
10-
* Implements hook_mail_alter().
11-
*/
12-
function baywatch_mail_alter(&$message) {
13-
// Ensures that the Reply-To header points to a no-reply address if it is
14-
// using the default value. This is to ensure the SES verified address
15-
// doesn't get spammed. The second check ensures that modules which change
16-
// the reply-to (such as webform) still function correctly.
17-
//
18-
// The SMTP_REPLYTO environment variable is set in lagoon.
19-
$reply_to = getenv("SMTP_REPLYTO") ?: '';
20-
if ($reply_to && ($message['from'] == $message['reply-to'])) {
21-
$message['reply-to'] = $reply_to;
22-
$message['headers']['Reply-to'] = $reply_to;
23-
}
24-
}

composer.json

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,16 @@
77
"drupal/autologout": "^1.3",
88
"drush/drush": "^10.3",
99
"drupal/coi": "^3",
10-
"drupal/purge": "3.3",
1110
"drupal/purge_queuer_url": "^1.0@RC",
12-
"drupal/section_purger": "dev-updates_to_compatible_with_drupal_9",
13-
"drupal/redis": "^1.0",
14-
"drupal/smtp": "^1.2",
1511
"drupal/queue_mail": "^1",
1612
"drupal/jwt": "^1.0",
1713
"drupal/config_split": "^1.4",
18-
"dpc-sdp/tide_logs": "1.0.0"
14+
"dpc-sdp/bay_platform_dependencies": "^1.0"
1915
},
20-
"exclude": [
21-
"drupal/section_purger"
22-
],
2316
"repositories": {
2417
"drupal": {
2518
"type": "composer",
26-
"url": "https://packages.drupal.org/8",
27-
"exclude": [
28-
"drupal/section_purger"
29-
]
30-
},
31-
"drupal/section_purger": {
32-
"type": "git",
33-
"url": "https://git.drupalcode.org/issue/section_purge-3227034.git"
34-
},
35-
"dpc-sdp/tide_logs": {
36-
"type": "vcs",
37-
"no-api": true,
38-
"url": "https://github.com/dpc-sdp/tide_logs"
19+
"url": "https://packages.drupal.org/8"
3920
}
4021
},
4122
"minimum-stability": "dev",

config/optional/key.key.section_io_password.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

config/optional/section_purger.settings.8714ff77fc.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/BaywatchOperation.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,5 +413,10 @@ public function enable_tide_site_alert() {
413413
$this->baywatch_install_module('tide_site_alert');
414414
}
415415

416+
public function enable_bay_platform_dependencies() {
417+
// Enable bay_platform_dependencies module.
418+
$this->baywatch_install_module('bay_platform_dependencies');
419+
}
420+
416421
}
417422

0 commit comments

Comments
 (0)