Skip to content

Commit

Permalink
Update plugin file and folder name to faustwp (#600)
Browse files Browse the repository at this point in the history
* chore: delete unused wp-env config

* chore: prepare for plugin file/folder rename

* refactor: plugin file/folder name to faustwp

* chore: update WPE Headless to FaustWP

* test: update e2e test db
  • Loading branch information
apmatthews authored Oct 21, 2021
1 parent 6274eda commit 90ad8b7
Show file tree
Hide file tree
Showing 60 changed files with 30 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
with:
php-version: '7.3'
- name: Install Dependencies
working-directory: plugins/wpe-headless
working-directory: plugins/faustwp
run: composer install
- name: Run Lint
working-directory: plugins/wpe-headless
working-directory: plugins/faustwp
run: composer lint
8 changes: 4 additions & 4 deletions .github/workflows/test-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Create Docker Containers
working-directory: ./plugins/wpe-headless
working-directory: ./plugins/faustwp
run: docker-compose up -d
- name: Sleep 15 seconds
run: sleep 15
- name: Setup testing framework
working-directory: ./plugins/wpe-headless
working-directory: ./plugins/faustwp
run: docker exec $(docker-compose ps -q wordpress) init-testing-environment.sh
- name: Run unit tests
working-directory: ./plugins/wpe-headless
run: docker exec -w /var/www/html/wp-content/plugins/wpe-headless $(docker-compose ps -q wordpress) composer test
working-directory: ./plugins/faustwp
run: docker exec -w /var/www/html/wp-content/plugins/faustwp $(docker-compose ps -q wordpress) composer test
8 changes: 0 additions & 8 deletions .wp-env.json

This file was deleted.

26 changes: 13 additions & 13 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ As this is a monorepo, you will not be able to check out this repository into `w

Instead, you can create symlinks to the themes/plugins in this repository. Best of all, this will also sync your work across multiple local sites!

#### WPE Headless Plugin
#### FaustWP Plugin

**Setup**
To begin working with the WPE Headless WordPress plugin, you will need to symlink the plugin from the monorepo to your WordPress plugin development directory.
To begin working with the FaustWP WordPress plugin, you will need to symlink the plugin from the monorepo to your WordPress plugin development directory.

```
ln -s /path/to/faustjs/plugins/wpe-headless /path/to/wordpress/wp-content/plugins/wpe-headless
ln -s /path/to/faustjs/plugins/faustwp /path/to/wordpress/wp-content/plugins/faustwp
```

**PHP Code Sniffer**
[PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer) is configured for the [WordPress code standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/).

Install the composer packages from within `wpe-headless` directory if you haven't already.
Install the composer packages from within `faustwp` directory if you haven't already.

```
composer install
Expand All @@ -62,7 +62,7 @@ composer phpcs:fix

**WordPress Unit Tests**

To run WordPress unit tests, first create the Docker containers from the `plugins/wpe-headless` directory:
To run WordPress unit tests, first create the Docker containers from the `plugins/faustwp` directory:

```
docker-compose up -d
Expand All @@ -77,7 +77,7 @@ docker-compose exec wordpress init-testing-environment.sh
Run the unit tests:

```
docker-compose exec -w /var/www/html/wp-content/plugins/wpe-headless wordpress composer test
docker-compose exec -w /var/www/html/wp-content/plugins/faustwp wordpress composer test
```

Finally, to remove the containers:
Expand Down Expand Up @@ -119,12 +119,12 @@ WP_HEADLESS_SECRET=00000000-0000-0000-0000-000000000001
### 3. WordPress Setup

1. Leave the node server running and open a new shell.
1. Move into the WPE Headless plugin directory `plugins/wpe-headless`.
1. Move into the FaustWP plugin directory `plugins/faustwp`.
1. Run `composer install` if you haven't already.
1. Prepare a test WordPress site.
1. Run `docker-compose up -d --build`. If building for the first time, it could take some time to download and build the images.
1. Run `docker-compose exec --workdir=/var/www/html/wp-content/plugins/wpe-headless --user=www-data wordpress wp plugin install wp-graphql --activate`
1. Run `docker-compose exec --workdir=/var/www/html/wp-content/plugins/wpe-headless --user=www-data wordpress wp db export tests/_data/dump.sql`
1. Run `docker-compose exec --workdir=/var/www/html/wp-content/plugins/faustwp --user=www-data wordpress wp plugin install wp-graphql --activate`
1. Run `docker-compose exec --workdir=/var/www/html/wp-content/plugins/faustwp --user=www-data wordpress wp db export tests/_data/dump.sql`
1. Copy `.env.testing.example` to `.env.testing`.
1. Run `vendor/bin/codecept run acceptance` to start the end-2-end tests.

Expand All @@ -139,12 +139,12 @@ WP_HEADLESS_SECRET=00000000-0000-0000-0000-000000000001

Developers with full GitHub repository access can create public releases:

### Release the wpe-headless plugin
### Release the FaustWP plugin

1. Update the `Version` in the file header at `plugins/wpe-headless/wpe-headless.php`.
2. Update the changelog and 'stable tag' in `plugins/wpe-headless/readme.txt`.
1. Update the `Version` in the file header at `plugins/faustwp/faustwp.php`.
2. Update the changelog and 'stable tag' in `plugins/faustwp/readme.txt`.
3. Commit and push your changes for review **(DO NOT MERGE YET)**.
4. Tag the approved commit with `plugin/wpe-headless/[version]`, for example: `git tag plugin/wpe-headless/0.3.5` and push the tag (`git push --tags`). Or use GitHub to [create a new release](https://github.com/wpengine/faustjs/releases/new) with that tag. This must be done prior to merging changes into the `canary` branch.
4. Tag the approved commit with `plugin/faustwp/[version]`, for example: `git tag plugin/faustwp/0.3.5` and push the tag (`git push --tags`). Or use GitHub to [create a new release](https://github.com/wpengine/faustjs/releases/new) with that tag. This must be done prior to merging changes into the `canary` branch.
5. Merge your changes into the `canary` branch

CircleCI will build and deploy the plugin zip. The latest version will be available here:
Expand Down
File renamed without changes.
Binary file added plugins/faustwp/.docker/mysql/dump.sql.gz
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions plugins/faustwp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
Thumbs.db
/vendor/

.env.testing
!.env.testing.example
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ services:
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: wordpress
WP_TESTS_DB_NAME: wordpress_unit_test
WP_PLUGIN_FOLDER: wpe-headless
WP_PLUGIN_FOLDER: faustwp
volumes:
- wordpress:/var/www/html
- ./:/var/www/html/wp-content/plugins/wpe-headless
- ./:/var/www/html/wp-content/plugins/faustwp

db:
image: mysql:5.7
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function display_plugin_row_notice( $plugin_file, $plugin_data ) {
$error = get_plugin_api_error();

?>
<tr class="plugin-update-tr active" id="wpe-headless-update" data-slug="wpe-headless" data-plugin="wpe-headless/wpe-headless.php">
<tr class="plugin-update-tr active" id="faustwp-update" data-slug="faustwp" data-plugin="faustwp/faustwp.php">
<td colspan="3" class="plugin-update">
<div class="update-message notice inline notice-error notice-alt">
<p>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function amOnHeadlessSite($path = '')
}

/**
* Visit the WPE Headless settings page.
* Visit the FaustWP settings page.
*/
public function amOnFaustWPSettingsPage()
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @return void
*/
function _manually_load_plugin() {
require dirname( dirname( __FILE__ ) ) . '/wpe-headless.php';
require dirname( dirname( __FILE__ ) ) . '/faustwp.php';
}

require $_tests_dir . '/includes/bootstrap.php';
Binary file removed plugins/wpe-headless/.docker/mysql/dump.sql.gz
Binary file not shown.
5 changes: 0 additions & 5 deletions plugins/wpe-headless/.gitignore

This file was deleted.

0 comments on commit 90ad8b7

Please sign in to comment.