OSDN Git Service
scribu [Sun, 17 Feb 2013 02:14:02 +0000 (04:14 +0200)]
throw stream output instead of using assertEquals()
scribu [Sun, 17 Feb 2013 02:08:24 +0000 (04:08 +0200)]
disable unkown assoc warnings when a generic assoc specifier is present in the synopsis
scribu [Sun, 17 Feb 2013 01:58:18 +0000 (03:58 +0200)]
add missing $obj_type property to User_Command
scribu [Sun, 17 Feb 2013 01:49:53 +0000 (03:49 +0200)]
make 'should run without errors' failure more descriptive
scribu [Sun, 17 Feb 2013 01:11:01 +0000 (03:11 +0200)]
replace 'return code should be 0' with 'it should run without errors'
scribu [Sun, 17 Feb 2013 00:34:46 +0000 (02:34 +0200)]
add ability to save result from previous command
scribu [Sun, 17 Feb 2013 00:09:53 +0000 (02:09 +0200)]
add test for wp user generate
scribu [Sun, 17 Feb 2013 00:00:07 +0000 (02:00 +0200)]
remove boilerplate feature description
scribu [Sat, 16 Feb 2013 23:59:09 +0000 (01:59 +0200)]
use WP_CLI::warning() instead of passing false to WP_CLI::error()
scribu [Sat, 16 Feb 2013 23:58:49 +0000 (01:58 +0200)]
test deleting the previously created user
scribu [Sat, 16 Feb 2013 23:38:45 +0000 (01:38 +0200)]
add function test for wp user create
Cristi Burcă [Sun, 17 Feb 2013 02:09:44 +0000 (18:09 -0800)]
Merge pull request #305 from goldenapples/post-create-from-file
Post create from file
Cristi Burcă [Sat, 16 Feb 2013 23:12:31 +0000 (15:12 -0800)]
Merge pull request #306 from wp-cli/behat
Stop using PHPUnit Story
scribu [Sat, 16 Feb 2013 22:58:19 +0000 (00:58 +0200)]
update readme
scribu [Sat, 16 Feb 2013 21:44:56 +0000 (23:44 +0200)]
convert PHPUnit Story specs to Behat features
scribu [Sat, 16 Feb 2013 21:23:23 +0000 (23:23 +0200)]
dependencies: replace phpunit-story with behat
scribu [Sat, 16 Feb 2013 20:55:48 +0000 (22:55 +0200)]
move db commands to Command_Runner
goldenapples [Fri, 15 Feb 2013 20:59:13 +0000 (12:59 -0800)]
Don't check if php://stdin is_file
It'll let you down every time.
goldenapples [Fri, 15 Feb 2013 01:28:08 +0000 (17:28 -0800)]
Add filename completion for `wp post create` command
Uses bash default filename completion for `wp post create`
goldenapples [Fri, 15 Feb 2013 18:29:04 +0000 (10:29 -0800)]
Update man page for `wp post create`
Still can't get synopsis to render correctly though. After adding
optional positional argument to synopsis, all calls generate an 'unknown
parameter' warning.
goldenapples [Fri, 15 Feb 2013 00:18:59 +0000 (16:18 -0800)]
Allow `wp post create` to read from file or STDIN
If a filename is passed as the first argument to `wp post create`, that
file will be read for the post's content. If the first argument is '-',
then post content will be read from STDIN.
If an unreadable filename is given, `wp post create` exits with an
error.
scribu [Fri, 15 Feb 2013 00:00:54 +0000 (02:00 +0200)]
add man page for wp post edit. see #302
Cristi Burcă [Thu, 14 Feb 2013 23:55:54 +0000 (15:55 -0800)]
Merge pull request #302 from goldenapples/system-editor
Introduce system editor function in \WP_CLI\Utils
goldenapples [Thu, 14 Feb 2013 23:34:22 +0000 (15:34 -0800)]
Whitespace cleanup
Use spaces for inner-line spacing
goldenapples [Thu, 14 Feb 2013 23:29:16 +0000 (15:29 -0800)]
Make error messages and output codes more logical
Use `WP_CLI::error` for any fatal errors. Output a warning rather than
an error if user aborts the editor (At this point it exits without
performing any action just like an error would, but it shouldn't be
considered an error. Also, its possible that commands using the editor
function will go on to perform other actions.)
Also, whitespace cleanup and minor refactoring... making a helper
method `_edit()` in post.php to make editor functions more reusable.
scribu [Thu, 14 Feb 2013 15:09:01 +0000 (17:09 +0200)]
allow whitespace before the 'require' statement in wp-config.php. see #288
Cristi Burcă [Thu, 14 Feb 2013 14:35:46 +0000 (06:35 -0800)]
Merge pull request #304 from nb/exit-on-eof
Exit on end-of-file
Nikolay Bachiyski [Thu, 14 Feb 2013 14:28:40 +0000 (16:28 +0200)]
Exit on end-of-file
It's a common practice shells to exit on end-of-file. WP-CLI doesn't do
this.
I traced the reason to the fact we're not checking the exit code from
the `read` builtin. If it timeouts or receives end-of-file, it's
non-zero. In both these cases it makes sense to exit.
goldenapples [Wed, 13 Feb 2013 23:59:24 +0000 (15:59 -0800)]
Use file_put_contents/file_get_contents instead of fwrite/fread
Much simpler this way. Also does away with the need to check for empty
output, although now we have to check the return value of
`launch_editor_for_input` strictly against false, since its possible for
it to return an empty string now (editing a post and deleting all the
content).
goldenapples [Wed, 13 Feb 2013 19:23:45 +0000 (11:23 -0800)]
Handle error caused by reading empty file
`fread()` will throw an error if trying to read an empty file (ie if
user deleted all post content or quit the editor on `wp post create`.
Detect that and fail gracefully.
goldenapples [Wed, 13 Feb 2013 19:21:20 +0000 (11:21 -0800)]
Use WP_CLI::launch to open editor
Also use wp_tempnam to create file, and give the created file a
meaningful name rather than just using system or php's tempfile name.
scribu [Wed, 13 Feb 2013 16:43:11 +0000 (18:43 +0200)]
remove @@PHP_DIR@@ reference. see #301
Cristi Burcă [Wed, 13 Feb 2013 16:39:10 +0000 (08:39 -0800)]
Merge pull request #300 from wp-cli/simplify-scaffolds
Simplify parameters for `scaffold post-type` and `scaffold taxonomy`
scribu [Wed, 13 Feb 2013 16:19:46 +0000 (18:19 +0200)]
regenerate manpages
scribu [Wed, 13 Feb 2013 16:17:39 +0000 (18:17 +0200)]
remove superfluous parameters from post and taxonomy scaffolds
scribu [Wed, 13 Feb 2013 15:47:05 +0000 (17:47 +0200)]
fix indenting for term command. see #286
Cristi Burcă [Wed, 13 Feb 2013 15:29:17 +0000 (07:29 -0800)]
Merge pull request #286 from wp-cli/term-command
A term command with subcommands for creating, updating, deleting and lis...
scribu [Wed, 13 Feb 2013 15:23:46 +0000 (17:23 +0200)]
add generated man pages
scribu [Wed, 13 Feb 2013 15:23:14 +0000 (17:23 +0200)]
replace <parent> with <term-id> for wp term update
scribu [Wed, 13 Feb 2013 15:18:28 +0000 (17:18 +0200)]
use format_items() utility in wp user list
scribu [Wed, 13 Feb 2013 15:07:24 +0000 (17:07 +0200)]
replace <parent> with <term-id>
goldenapples [Fri, 8 Feb 2013 23:33:54 +0000 (15:33 -0800)]
Introduce system editor function in \WP_CLI\Utils
Adds a function called `launch_editor_for_input()` which launches the
system's editor to allow file editing of post content, etc. Should
account for system line-endings properly, but probably needs testing on
Windows to be sure. Function returns false if no change (ie user :q!'s
out of vim), or updated content if any change is made.
Also adds two new subcommands to `wp post`:
- `wp post create --edit` Launches the editor to build the post
content before creating post.
- `wp post edit <id>` Edits post <id>'s content in system editor.
scribu [Tue, 12 Feb 2013 04:37:07 +0000 (06:37 +0200)]
delete files used for generating pear packages.
see #301. closes #39
Cristi Burcă [Wed, 13 Feb 2013 00:33:27 +0000 (16:33 -0800)]
Merge pull request #301 from wp-cli/phar
Distribute as a Phar archive
scribu [Wed, 13 Feb 2013 00:20:42 +0000 (02:20 +0200)]
set version to 0.9.0-alpha
scribu [Wed, 13 Feb 2013 00:07:32 +0000 (02:07 +0200)]
allow specifying where to create the phar archive
scribu [Tue, 12 Feb 2013 23:57:58 +0000 (01:57 +0200)]
add templates to phar archive
scribu [Tue, 12 Feb 2013 23:33:50 +0000 (01:33 +0200)]
make manpages work from a Phar archive
scribu [Tue, 12 Feb 2013 23:32:18 +0000 (01:32 +0200)]
add shebang to Phar stub
scribu [Tue, 12 Feb 2013 22:43:56 +0000 (00:43 +0200)]
use DirectoryIterator, since glob() doesn't work on Phar archives
scribu [Tue, 12 Feb 2013 22:26:14 +0000 (00:26 +0200)]
handle --quiet parameter
scribu [Tue, 12 Feb 2013 22:20:53 +0000 (00:20 +0200)]
add ignored paths
scribu [Tue, 12 Feb 2013 22:07:53 +0000 (00:07 +0200)]
first pass at creating a Phar archive
scribu [Tue, 12 Feb 2013 02:27:01 +0000 (04:27 +0200)]
show validation warnings only when generating man pages. see #298
Cristi Burcă [Tue, 12 Feb 2013 02:19:34 +0000 (18:19 -0800)]
Merge pull request #298 from wp-cli/synopsis-lint
Synopsis linting
scribu [Tue, 12 Feb 2013 02:17:01 +0000 (04:17 +0200)]
fix post generate and user generate synopses
closes #296
scribu [Tue, 12 Feb 2013 01:59:19 +0000 (03:59 +0200)]
the 'repeating' flavour can also be optional
scribu [Tue, 12 Feb 2013 01:40:20 +0000 (03:40 +0200)]
add 'repeating' flavour
scribu [Tue, 12 Feb 2013 00:41:06 +0000 (02:41 +0200)]
first pass at moving arg checking into SynopsisParser
Also, doesn't nest accepted parameters by type
scribu [Mon, 11 Feb 2013 22:12:57 +0000 (00:12 +0200)]
refactor pattern generation
scribu [Mon, 11 Feb 2013 21:24:34 +0000 (23:24 +0200)]
ignore empty synopsis tokens
scribu [Mon, 11 Feb 2013 21:14:28 +0000 (23:14 +0200)]
show warnings for invalid tokens when generating man pages
scribu [Mon, 11 Feb 2013 20:17:43 +0000 (22:17 +0200)]
make synopsis parser return unknown tokens
Cristi Burcă [Mon, 11 Feb 2013 20:04:03 +0000 (12:04 -0800)]
Merge pull request #297 from wp-cli/synopsis-tests
Add unit tests for synopsis parser
scribu [Mon, 11 Feb 2013 19:53:28 +0000 (21:53 +0200)]
use assertCount() instead of assertEquals()
scribu [Mon, 11 Feb 2013 19:51:12 +0000 (21:51 +0200)]
add test for combined param types
scribu [Mon, 11 Feb 2013 19:41:05 +0000 (21:41 +0200)]
check that other parameter types are 0
scribu [Mon, 11 Feb 2013 17:14:07 +0000 (19:14 +0200)]
add tests for SynopsisParser
scribu [Mon, 11 Feb 2013 18:53:55 +0000 (20:53 +0200)]
introduce SynopsisParser class
scribu [Mon, 11 Feb 2013 18:10:31 +0000 (20:10 +0200)]
make cmd runner return command string, for easy debugging
scribu [Sun, 10 Feb 2013 16:31:33 +0000 (18:31 +0200)]
add --force flag to wp core download. fixes #221
scribu [Sun, 10 Feb 2013 15:35:17 +0000 (17:35 +0200)]
Use `cp -r` instead of `mv` for moving WP files into the current dir
This allows installing WP into a directory that already has a wp-content
dir.
Props @carlalexander. Closes #293
Cristi Burcă [Sun, 10 Feb 2013 15:24:35 +0000 (07:24 -0800)]
Merge pull request #295 from ocean90/fix-no-wp-install-error
Fix error output if no WordPress install exists
Dominik Schilling [Sun, 10 Feb 2013 10:53:33 +0000 (11:53 +0100)]
Fix error output if no WordPress install exists
Daniel Bachhuber [Mon, 4 Feb 2013 02:40:19 +0000 (18:40 -0800)]
Accept a parent when creating a new term
Daniel Bachhuber [Mon, 4 Feb 2013 00:34:57 +0000 (16:34 -0800)]
Man pages
Daniel Bachhuber [Sun, 3 Feb 2013 23:31:14 +0000 (15:31 -0800)]
Abstract output of data to a format_items() utility function
Daniel Bachhuber [Sun, 3 Feb 2013 23:00:30 +0000 (15:00 -0800)]
A term command with subcommands for creating, updating, deleting and listing taxonomy terms
Cristi Burcă [Fri, 8 Feb 2013 19:27:10 +0000 (11:27 -0800)]
Merge pull request #291 from wp-cli/fix-291
"Error Connecting To Database" HTML output
scribu [Fri, 8 Feb 2013 02:14:44 +0000 (04:14 +0200)]
fix WP_CLI::error() not exiting
scribu [Fri, 8 Feb 2013 01:12:09 +0000 (03:12 +0200)]
tests: separate stdout from stderr
The more precise assertions expose several buggy tests.
Also reverts WP_CLI::error() second parameter to $label, since sending
the first line to STDERR and subsequent ones to STDOUT is confusing.
If you want to have a multiline error message, just insert \n
characters.
scribu [Fri, 8 Feb 2013 00:28:07 +0000 (02:28 +0200)]
add our own wp_die() handler
scribu [Thu, 7 Feb 2013 22:21:55 +0000 (00:21 +0200)]
make 'wp install' imply 'empty dir'
scribu [Thu, 7 Feb 2013 22:19:34 +0000 (00:19 +0200)]
add test case
scribu [Thu, 7 Feb 2013 01:14:50 +0000 (03:14 +0200)]
move /templates/ out of /php/ since it doesn't contain PHP files
scribu [Wed, 6 Feb 2013 18:08:38 +0000 (20:08 +0200)]
regenerate some manpages
scribu [Wed, 6 Feb 2013 18:04:00 +0000 (20:04 +0200)]
generate manpage for scaffold _s. see #285
Cristi Burcă [Wed, 6 Feb 2013 18:01:46 +0000 (10:01 -0800)]
Merge pull request #285 from drrobotnik/master
Added wp scaffold _s
Brandon Lavigne [Wed, 6 Feb 2013 17:51:21 +0000 (09:51 -0800)]
added success message if remote request code is 200
Cristi Burcă [Wed, 6 Feb 2013 17:24:58 +0000 (09:24 -0800)]
Merge pull request #289 from jmslbam/master
Scaffold filename using slug and not machinename
Brandon Lavigne [Wed, 6 Feb 2013 17:20:46 +0000 (09:20 -0800)]
fixed undefined variables
Jaime Martinez [Wed, 6 Feb 2013 17:16:42 +0000 (18:16 +0100)]
Changed filename from machinename to slug
Because `wp scaffold post-type jm-foo` scaffolds a file name jm_foo.php bacause the machinename hyphens get replaced by underscores.
Same behaviour as the plugin scaffold.
Hyphens should separate words.
Brandon Lavigne [Wed, 6 Feb 2013 02:06:18 +0000 (18:06 -0800)]
removed spaces in the synopsis
Brandon Lavigne [Wed, 6 Feb 2013 00:45:44 +0000 (16:45 -0800)]
added default timeout and generic theme description from author and theme name.
Brandon Lavigne [Tue, 5 Feb 2013 22:17:35 +0000 (14:17 -0800)]
added man-src page for scaffold _s, tidied up formatting.
Brandon Lavigne [Tue, 5 Feb 2013 20:06:43 +0000 (12:06 -0800)]
changed shell_exec to properly use wp_remote_post, unzip, and unlink the temp file
Brandon Lavigne [Tue, 5 Feb 2013 03:40:41 +0000 (19:40 -0800)]
Instead of using bash unzip, using WP_CLI native theme install, with optional activate
Cristi Burcă [Sun, 3 Feb 2013 20:40:36 +0000 (12:40 -0800)]
Merge pull request #284 from wp-cli/user-list-csv
Output a list of users as CSV or JSON with a new CSV helper utility
scribu [Sun, 3 Feb 2013 20:37:16 +0000 (22:37 +0200)]
Reverse parameter order in output_csv() utility
... so that $headers can actually be optional.
Also fix coding standards violations.
scribu [Sun, 3 Feb 2013 20:31:50 +0000 (22:31 +0200)]
add some examples for user list and regenerate manpage