Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions features/plugin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Feature: Manage WordPress plugins
Plugin Zombieland details:
Name: Zombieland
Status: Inactive
Version: 0.1-alpha
Version: 0.1.0
Author: YOUR NAME HERE
Description: PLUGIN DESCRIPTION HERE
"""
Expand All @@ -61,8 +61,8 @@ Feature: Manage WordPress plugins

When I run `wp plugin list`
Then STDOUT should be a table containing rows:
| name | status | update | version |
| Zombieland | active | none | 0.1-alpha |
| name | status | update | version |
| Zombieland | active | none | 0.1.0 |

When I try `wp plugin uninstall Zombieland`
Then STDERR should contain:
Expand Down
12 changes: 10 additions & 2 deletions features/scaffold.feature
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,26 @@ Feature: WordPress code scaffolding
"""
And the {PLUGIN_DIR}/hello-world/hello-world.php file should contain:
"""
* Plugin Name: Hello World
* Plugin Name: Hello World
"""
And the {PLUGIN_DIR}/hello-world/hello-world.php file should contain:
"""
* @package Hello_World
* Version: 0.1.0
"""
And the {PLUGIN_DIR}/hello-world/hello-world.php file should contain:
"""
* @package Hello_World
"""

When I run `cat {PLUGIN_DIR}/hello-world/package.json`
Then STDOUT should be JSON containing:
"""
{"author":"Hello World Author"}
"""
And STDOUT should be JSON containing:
"""
{"version":"0.1.0"}
"""

Scenario: Scaffold a plugin by prompting
Given a WP install
Expand Down
2 changes: 1 addition & 1 deletion templates/plugin-packages.mustache
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{
"name": "{{plugin_slug}}",
"version": "0.0.0",
"version": "0.1.0",
"main": "Gruntfile.js",
"author": "{{plugin_author}}",
"devDependencies": {
Expand Down
19 changes: 10 additions & 9 deletions templates/plugin.mustache
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php
/**
* Plugin Name: {{plugin_name}}
* Version: 0.1-alpha
* Description: {{plugin_description}}
* Author: {{plugin_author}}
* Author URI: {{plugin_author_uri}}
* Plugin URI: {{plugin_uri}}
* Text Domain: {{textdomain}}
* Domain Path: /languages
* @package {{plugin_package}}
* Plugin Name: {{plugin_name}}
* Plugin URI: {{plugin_uri}}
* Description: {{plugin_description}}
* Author: {{plugin_author}}
* Author URI: {{plugin_author_uri}}
* Text Domain: {{textdomain}}
* Domain Path: /languages
* Version: 0.1.0
*
* @package {{plugin_package}}
*/