Skip to content

Instantly share code, notes, and snippets.


Moshe Weitzman weitzman

View GitHub Profile
View 9.6.0 release notes
This release features significant new features and a major refactor of our site alias remote communication. If Drush had a marketing department, they would have insisted on the number 10.0. We don't, so 9.6.0 it is. We did our very best to preserve existing APIs - please report any breakage.
- Now 100% ✅ on Windows. All PRs tested for regressions (via Appveyor).
- Now 100% ✅ for sqlite and postgres databases. Mysql has always been ✅. Our test bots run these tests every night.
- Add --filter to many commands (#3718). You may now filter output from any tabular commands. An example: `drush pm:list --filter=ctools`. [See docs for details and general info about output formats](
- Deprecate drush_invoke_process(), and These are no longer used by Drush core and commandfiles are encouraged to use their replacements like Drush::drush(). These APIs will be removed in Drush 10. This is a HUGE win for the maintaina
weitzman / dtt_artifacts.txt
Created Jan 22, 2019
Example artifacts list during a Drupal Test Traits test
View dtt_artifacts.txt
> phpunit --debug --colors --bootstrap=src/bootstrap.php --printer '\Drupal\Tests\Listeners\HtmlOutputPrinter' tests
PHPUnit 6.5.13 by Sebastian Bergmann and contributors.
[snip errors]
Tests: 10, Assertions: 20, Errors: 5.
HTML output was generated
weitzman / ExampleTest.php
Last active Jan 22, 2019
A test class that leverages Drupal Test Traits
View ExampleTest.php
// Use your module's testing namespace such as the one below.
namespace Drupal\Tests\moduleName\ExistingSite;
use Drupal\taxonomy\Entity\Vocabulary;
use Drupal\user\Entity\User;
use weitzman\DrupalTestTraits\ExistingSiteBase;
View config
Host *
IdentityFile /run/secrets/mass_id_rsa
View .bashrc
eval `ssh-agent -s` > /dev/null 2>&1
ssh-add /var/run/secrets/mass_id_rsa
View example.env.yml
# Copy and rename this file to .env at root of this project.
# Set a docker caching specification for the code mount.
# File access in hosted volumes can be very slow on Mac due to issues with the
# filesystem. Using cached or delegated here can really speed things up, but
# this isn't a cross-platform feature.
# See
View config.yml
- run: docker-compose stop --timeout 30 mysql
- run: docker login -u $DOCKER_USER -p $DOCKER_API_KEY
- run: docker commit $(docker-compose ps -q mysql) mass/mysql-sanitized:latest
- run: docker push mass/mysql-sanitized:latest
View Dockerfile
# Builds a MySQL image with local data directory. See 'command' in docker-compose.yml
# Approach borrowed from
FROM mysql:5.6
RUN ["mkdir", "–p", "/var/lib/mysql-image"]
RUN echo "[mysqld]" > /etc/mysql/conf.d/mass-vm.cnf \
&& echo "datadir = /var/lib/mysql-image" >> /etc/mysql/conf.d/mass-vm.cnf
weitzman / .ahoy.yml
Last active Jul 19, 2018 blog post
View .ahoy.yml
ahoyapi: v2
# These env variables come from
cmd: docker-compose exec -e COLUMNS=$(tput cols) -e LINES=$(tput lines) -e TERM=$TERM drupal "$@"
usage: Run a command in the container
cmd: ahoy exec bash
usage: Open a shell inside the container.
View config.diff
ubuntu@box921:~/mass$ git diff
diff --git a/conf/drupal/config/purge.logger_channels.yml b/conf/drupal/config/purge.logger_channels.yml
index e16c732..e5b869d 100644
--- a/conf/drupal/config/purge.logger_channels.yml
+++ b/conf/drupal/config/purge.logger_channels.yml
@@ -11,15 +11,3 @@ channels:
- 0
- 2
- 3
- -
You can’t perform that action at this time.