From 90802574d9a15222113ee7def3168b88a64b3d9f Mon Sep 17 00:00:00 2001 From: BillClinton Date: Fri, 28 Oct 2022 11:57:52 -0400 Subject: [PATCH 1/2] docs: added workfflow for adding fixture data --- docs/development/running-tests/fixtures.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/development/running-tests/fixtures.md diff --git a/docs/development/running-tests/fixtures.md b/docs/development/running-tests/fixtures.md new file mode 100644 index 00000000..9ed4b97e --- /dev/null +++ b/docs/development/running-tests/fixtures.md @@ -0,0 +1,8 @@ +# Adding fixture data + +You can use this workflow for identifying and capturing fixture changes: +- load existing fixture data by running `load-fixtures` at the studio command prompt +- Take a complete snapshot of the database `dump-sql > .scratch/snapshot.before-changes.sql` +- Create new records using the UI +- Take a complete snapshot `dump-sql > .scratch/snapshot.after-changes.sql` +- Open up the two .sql files in a visual diff viewer and manually transplant the added records over to their appropriate fixture files in the repo \ No newline at end of file From 06275a76e4e5bf34874862d0d259d9d707c7ab2e Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Tue, 20 Dec 2022 16:41:00 -0500 Subject: [PATCH 2/2] fix: ensure generated SSH keys have no carriage returns --- php-classes/Emergence/Git/Source.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php-classes/Emergence/Git/Source.php b/php-classes/Emergence/Git/Source.php index 9ad0ca5e..5ab39253 100644 --- a/php-classes/Emergence/Git/Source.php +++ b/php-classes/Emergence/Git/Source.php @@ -182,11 +182,11 @@ public function getDeployKey() public function setDeployKey(KeyPair $keyPair) { $privateKeyPath = $this->getPrivateKeyPath(); - file_put_contents($privateKeyPath, $keyPair->getPrivateKey().PHP_EOL); + file_put_contents($privateKeyPath, str_replace("\r\n", "\n", $keyPair->getPrivateKey()).PHP_EOL); chmod($privateKeyPath, 0600); $publicKeyPath = $this->getPublicKeyPath(); - file_put_contents($publicKeyPath, $keyPair->getPublicKey().PHP_EOL); + file_put_contents($publicKeyPath, str_replace("\r\n", "\n", $keyPair->getPublicKey()).PHP_EOL); chmod($publicKeyPath, 0600); $this->deployKey = $keyPair;