Skip to content

Commit

Permalink
8.0.11 (#121)
Browse files Browse the repository at this point in the history
* back to dev

* downgraded simplesaml library

* Updated xml sitemap

* patched bricks

* added jira status map

* make lets encrypt routes always accessible

* HSD8-280 Fixed Undergraduate label

* added command to delete domains from cert

* HSD8-411 Add configuration for custom France-Stanford stylesheet and theme option

* Hsd8 370 rearchitect bugherd (#107)

* HSD8-370 Created connection config entities to track all connections

* moved resource methods into entity

* use cache in hooks form

* more improvements

* moved key configs

* Moved methods back into resource and make two resources

* cc fixes

* CC Fixes

* cleanup and improve UX of connection form

* stubbed out tests

* test

* start another test

* stubbed tests

* Reject duplicate jira comments

* cc fix

* added update support

* run all tests

* increasing test coverage

* hooks fom

* cc fix

* check connection to prevent error

* Hsd8-384 Set prefix on config entities (#109)

* HSD8-384 Prefix config entities with custom string

* set entity id on all config entities

* cc cleanup

* support webforms and ds modules

* cc fix

* Hsd8 213 change people users (#110)

* Create CNAME

* Set theme jekyll-theme-modernist

* Delete CNAME

* downgraded simplesaml library

* Updated xml sitemap

* patched bricks

* HSD8-213 Changed core people to users

* added jira status map

* cc cleanup

* fixed broken logic

* HSD8-411 HSD8-400 HSD8-410 HSD8-413 HSD8-397 HSD8-404 HSD8-403 HSD8-405 HSD8-408 France bugherd fixups (#112)

* HSD8-411

* HSD8-400-break-words

* HSD8-400 FIXUP

* HSD8-410-wildcard-removal-of-margin-last-item

* HSD8-410 FIXUP

* HSD8-413 decanter btn opitical alignment

* HSD8-397 accent dash default and custom update

* HSD8-404 rm card styles from people card on project pages

* HSD8-403 add spacing between person card and main content for project ct

* HSD8-405 add spacing beneath masthead and patch hero paragraph to offset

* CC FIXUP

* HSD8-408 increase space between labels

* Updated composer dependencies

* Hsd8 396 setup subtheme support (#115)

* HSD8-396 Subtheme support

* moved all config ignores to default and made custom local one

* ignored theme extensions

* dont do partial on dev

* fixed differences in config splits

* moved bugherd resource to prod split

* started documents

* documentation

* added Archaeology subtheme

* reverted archaeology

* added blocks to config ignore

* patched config_ignore

* fixed arch split

* added subtheme logos

* made site split more explicit

* stubbed out francestanford subtheme

* revert new themes to allow joe to learn the command

* added update hook

* cc fix

* cc fix

* added bugherd reset configs

* ignore bugherd api settings

* improved documentation

* dont prefix entities during install

* blt sync to prod

* More global and France-Stanford Tweaks (#116)

* HSD8-411

* HSD8-400-break-words

* HSD8-400 FIXUP

* HSD8-410-wildcard-removal-of-margin-last-item

* HSD8-410 FIXUP

* HSD8-413 decanter btn opitical alignment

* HSD8-397 accent dash default and custom update

* HSD8-404 rm card styles from people card on project pages

* HSD8-403 add spacing between person card and main content for project ct

* HSD8-405 add spacing beneath masthead and patch hero paragraph to offset

* CC FIXUP

* HSD8-408 increase space between labels

* HSD8-421

* HSD8-422 increase spacing between paragraph items

* fixed empty text and added test

* HSD8-420 projects related ct tweaks

* HSD8-419 reduce line length for layout

* FIXUP

* logged in FIXUP

* CC FIXUP

* fix search icon positioning (#117)

* fix search icon positioning

* CC FIXUP

* FIXUP

* FIXUP

* hide base subtheme

* made rabbit hole more general

* added regions to base subtheme

* HSD8-462 HSD8-461 Archaeology and France-Stanford Subthemes (#119)

* HSD8-462 archaeology subtheme

* HSD8-461 francestanford subtheme

* updated info.yml files

* theme cleanup

* CC FIXUP

* theme settings comment cleanup

* recompiled ckeditor

* Hsd8 387 field cleanup (#113)

* HSD8-387 Cleanup people fields

* started field delete script

* moved cleanup to a service

* fixed logical issue

* removed test data

* Added student type field

* cc cleanup

* let cron do purge

* only delete 1 field

* HSD8-388 Changed events node description

* HSD8-389 Removed byline from news

* disable hs_bugherd on local

* HSD8-392 Added setting to float image to the right (#114)

* New sites (#118)

* HSD8-456 HSD8-455 Symsys and math sites

* added sites to blt

* split behat tests

* fixed function name

* 8.0.11 release

* prefix bugfix

* prefix bugfix

*  HSD8-471 HSD8-472 HSD8-473 HSD8-474 Additional Global H&S Theme Fixups (#123)

* HSD8-471 redeuce vertical card pattern title size

* HSD8-472 fix decanter button text hover and focus and import overrides

* HSD8-473 increase layout body width

* HSD8-474 reduce size of third and fourth level subnav

* CC FIXUP

* CC FIXUP

* menu specificity FIXUP

* clean up

* simplified menu block styles (#124)

* simplified menu block styles

* fixup

* one more level
  • Loading branch information
pookmish authored Oct 18, 2018
1 parent 9af1899 commit ee964d5
Show file tree
Hide file tree
Showing 283 changed files with 22,691 additions and 3,148 deletions.
31 changes: 29 additions & 2 deletions .circleci/RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,37 @@ public function jobGenerateCoverageReport() {
* @return \Robo\Result
* The result tof the collection of tasks.
*/
public function jobRunBehatTests() {
public function jobRunBehatTestsFirst() {
$all_sites = $this->getSites();
$sites = array_slice($all_sites, 0, count($all_sites) / 2);
return $this->runBehatTest($sites);
}

/**
* Command to run behat tests.
*
* @return \Robo\Result
* The result tof the collection of tasks.
*/
public function jobRunBehatTestsSecond() {
$all_sites = $this->getSites();
$sites = array_slice($all_sites, count($all_sites) / 2);
return $this->runBehatTest($sites);
}

/**
* Run behat tests on the given sites.
*
* @param array $sites
* Array of site machine names.
*
* @return \Robo\Result
* Tasks collection.
*/
protected function runBehatTest(array $sites) {
$collection = $this->collectionBuilder();
$collection->addTaskList($this->setupSite());
foreach ($this->getSites() as $site) {
foreach ($sites as $site) {
$collection->addTaskList($this->syncAcquia($site));
$collection->addTaskList($this->runUpdatePath(TRUE));
$collection->addTaskList($this->runBehatTests(['global', $site]));
Expand Down
31 changes: 26 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ save_cache: &save_cache
#Jobs

### Job to run the update path and Behat tests.
behat_tests: &behat_tests
behat_tests_first: &behat_tests_first
<<: *defaults
steps:
- *add_ssh
Expand All @@ -57,7 +57,25 @@ behat_tests: &behat_tests
- restore_cache: *restore_cache
- run:
name: Run Behat tests
command: robo job:run-behat-tests
command: robo job:run-behat-tests-first
- save_cache: *save_cache
- store_test_results:
path: /var/www/html/artifacts/behat
- store_artifacts:
path: /var/www/html/artifacts

### Job to run the update path and Behat tests.
behat_tests_second: &behat_tests_second
<<: *defaults
steps:
- *add_ssh
- *add_known_hosts
- checkout
- *copy_robo
- restore_cache: *restore_cache
- run:
name: Run Behat tests
command: robo job:run-behat-tests-second
- save_cache: *save_cache
- store_test_results:
path: /var/www/html/artifacts/behat
Expand Down Expand Up @@ -97,10 +115,12 @@ code_coverage: &code_coverage
# Declare all of the jobs we should run.
version: 2
jobs:
run-behat-tests-first:
<<: *behat_tests_first
run-behat-tests-second:
<<: *behat_tests_second
run-functional-unit-tests:
<<: *functional_unit_tests
run-behat-tests:
<<: *behat_tests
run-code-coverage:
<<: *code_coverage

Expand All @@ -109,6 +129,7 @@ workflows:
version: 2
test_and_lint:
jobs:
- run-behat-tests-first
- run-behat-tests-second
- run-functional-unit-tests
- run-behat-tests
- run-code-coverage
3 changes: 3 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ checks:
method-lines:
config:
threshold: 40
method-count:
config:
threshold: 25

plugins:
# https://docs.codeclimate.com/docs/eslint
Expand Down
8 changes: 5 additions & 3 deletions blt/blt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ drush:
modules:
local:
enable: [dblog, devel, devel_debug_log, devel_generate, seckit, views_ui, config_import_de]
uninstall: [acquia_connector, purge, simplesamlphp_auth, shield, config_readonly, config_ignore]
uninstall: [acquia_connector, purge, simplesamlphp_auth, shield, config_readonly, hs_bugherd]
ci:
enable: [hs_config_readonly, hs_bugherd]
uninstall: [purge, acquia_connector, shield, simplesamlphp_auth]
dev:
enable: [acquia_connector, shield, config_import_de]
uninstall: [config_readonly, bugherdapi, config_ignore]
uninstall: [config_readonly, hs_bugherd]
test:
enable: [acquia_connector, shield]
uninstall: [config_readonly, bugherdapi]
uninstall: [config_readonly, hs_bugherd]
prod:
enable: [acquia_connector, hs_config_readonly, hs_bugherd]
uninstall: [shield]
Expand All @@ -41,6 +41,8 @@ multisites:
- mrc
- francestanford
- swshumsci_sandbox
- symsys
- mathematics
simplesamlphp: true
command-hooks:
post-deploy-build:
Expand Down
64 changes: 38 additions & 26 deletions blt/src/Commands/HumsciCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Acquia\Blt\Custom\Commands;

use Acquia\Blt\Robo\Commands\Artifact\AcHooksCommand;
use Drupal\Core\Serialization\Yaml;

/**
* Defines commands in the "humsci" namespace.
Expand Down Expand Up @@ -75,32 +76,6 @@ public function sync($options = [
}
}

/**
* Ask a question to the user.
*
* @param string $question
* The question to ask.
* @param string $default
* Default value.
* @param bool $required
* If a response is required.
*
* @return string
* Response to the question.
*/
protected function askQuestion($question, $default = '', $required = FALSE) {
if ($default) {
$response = $this->askDefault($question, $default);
}
else {
$response = $this->ask($question);
}
if ($required && !$response) {
return $this->askQuestion($question, $default, $required);
}
return $response;
}

/**
* Get the database name of the multisite.
*
Expand Down Expand Up @@ -273,4 +248,41 @@ public function updateAutoloader() {
shell_exec("cd $root && composer dump-autoload");
}

/**
* Create a new subtheme from the base subtheme.
*
* @command humsci:create-subtheme
*/
public function createSubtheme() {
$new_theme_name = $this->askQuestion('New Theme Name?', '', TRUE);
$new_machine_name = $this->askQuestion('New Machine Name?', preg_replace("/[^a-z]/", '_', strtolower($new_theme_name)), TRUE);
$new_machine_name = preg_replace("/[^a-z]/", '_', strtolower($new_machine_name));

$base_subtheme = $this->getConfigValue('docroot') . '/themes/humsci/su_humsci_subtheme';
$new_subtheme = $this->getConfigValue('docroot') . '/themes/humsci/' . $new_machine_name;

if (file_exists($new_subtheme)) {
$this->yell('Subtheme already exists');
return;
}

$this->taskCopyDir([$base_subtheme => $new_subtheme])->run();

foreach ($this->rglob("$new_subtheme/*") as $file) {
if (strpos($file, 'su_humsci_subtheme') !== FALSE) {
$new_file = str_replace('su_humsci_subtheme', $new_machine_name, $file);
$this->taskFilesystemStack()->rename($file, $new_file)->run();
}
}

$info = Yaml::decode(file_get_contents("$new_subtheme/$new_machine_name.info.yml"));
$info['name'] = $new_theme_name;
$info['libraries'] = ["$new_machine_name/base"];
$info['component-libraries'] = [
$new_machine_name => $info['component-libraries']['su_humsci_subtheme'],
];
unset($info['hidden']);
file_put_contents("$new_subtheme/$new_machine_name.info.yml", Yaml::encode($info));
}

}
2 changes: 1 addition & 1 deletion blt/src/Commands/HumsciConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected function importConfigSplit($task, $cm_core_key, $partial = FALSE) {
$task->drush("pm-enable")->arg('config_split');

// Local environments we don't want all the custom site created configs.
if (($this->getConfigValue('environment') == 'local' || $this->getConfigValue('environment') == 'dev') && !$partial) {
if (($this->getConfigValue('environment') == 'local') && !$partial) {
$task->drush("config-import")->arg($cm_core_key);
// Runs a second import to ensure splits are
// both defined and imported.
Expand Down
26 changes: 26 additions & 0 deletions blt/src/Commands/HumsciServerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
*/
class HumsciServerCommand extends AcHooksCommand {

use HumsciTrait;

protected $apiEndpoint = 'https://cloudapi.acquia.com/v1';

/**
Expand Down Expand Up @@ -146,6 +148,8 @@ public function humsciLetsEncryptAdd($environment = 'dev', $options = ['domains'

$domains = array_merge($domains, $options['domains']);
$domains = array_merge($domains, $this->getDomains());
$domains = array_unique($domains);
$this->removeDomains($domains);

$primary_domain = array_shift($domains);
asort($domains);
Expand Down Expand Up @@ -183,6 +187,28 @@ protected function getDomains() {
return $domains;
}

/**
* Ask the user if there are any domains on the current cert to be removed.
*
* @param array $existing_domains
* Array of current domains.
*
* @return array
* Array of remaining domains.
*/
protected function removeDomains(array &$existing_domains) {
$domains = [];
$choices = array_merge(['Done'], $existing_domains);
while ($remove_domain = $this->askChoice('Would you like to remove a domain?', $choices)) {
if ($remove_domain == 'Done') {
break;
}
unset($existing_domains[array_search($remove_domain, $existing_domains)]);
$choices = array_merge(['Done'], $existing_domains);
}
return $domains;
}

/**
* Get LetsEncrypt certificate file contents.
*
Expand Down
26 changes: 26 additions & 0 deletions blt/src/Commands/HumsciTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,30 @@ protected function rglob($pattern, $flags = 0) {
return $files;
}

/**
* Ask a question to the user.
*
* @param string $question
* The question to ask.
* @param string $default
* Default value.
* @param bool $required
* If a response is required.
*
* @return string
* Response to the question.
*/
protected function askQuestion($question, $default = '', $required = FALSE) {
if ($default) {
$response = $this->askDefault($question, $default);
}
else {
$response = $this->ask($question);
}
if ($required && !$response) {
return $this->askQuestion($question, $default, $required);
}
return $response;
}

}
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"drupal/viewfield": "^3.0@alpha",
"drupal/views_block_filter_block": "^1.0@beta",
"drupal/views_infinite_scroll": "^1.5",
"drupal/views_taxonomy_term_name_depth": "^3.3",
"drupal/views_taxonomy_term_name_depth": "6.x-dev",
"drupal/webform": "~5.0-beta18",
"drupal/xmlsitemap": "dev-1.x",
"drupal/yearonly": "^1.3",
Expand Down Expand Up @@ -233,6 +233,9 @@
"https://www.drupal.org/project/drupal/issues/564106": "https://www.drupal.org/files/issues/2018-06-27/views-more-link-token-replacement_564106_171.patch",
"Simplify Field Samples": "patches/contrib/core-simplify-samples.patch"
},
"drupal/config_ignore": {
"https://www.drupal.org/project/config_ignore/issues/2857247": "https://www.drupal.org/files/issues/2018-04-19/support-for-export-2857247-18.patch"
},
"drupal/menu_block": {
"https://www.drupal.org/project/menu_block/issues/2756675": "https://www.drupal.org/files/issues/2018-05-10/menu_block-follow-2756675-50.patch",
"https://www.drupal.org/project/menu_block/issues/2809699": "https://www.drupal.org/files/issues/2018-05-07/menu_block-label_configuration-2809699-77.patch"
Expand Down
Loading

0 comments on commit ee964d5

Please sign in to comment.