OSDN Git Service

wvm/wvm.git
11 years agoimplement '@when' docblock tag
scribu [Mon, 17 Jun 2013 01:21:58 +0000 (04:21 +0300)]
implement '@when' docblock tag

Works on both commands and subcommands.

11 years agomove setting $_SERVER['DOCUMENT_ROOT'] to set_wp_root() method
scribu [Mon, 17 Jun 2013 01:37:53 +0000 (04:37 +0300)]
move setting $_SERVER['DOCUMENT_ROOT'] to set_wp_root() method

It was first defined in 390e7dbbabee7398527c3a1552e849f5c87053aa and
then sort of drifted away from where paths are handled.

11 years agomove command instance creation to a separate class
scribu [Mon, 17 Jun 2013 00:17:02 +0000 (03:17 +0300)]
move command instance creation to a separate class

Keep the disabled_commands logic inside the WP_CLI class; show an
explicit error, instead of pretending the command doesn't exist.

11 years agoMerge pull request #471 from wp-cli/psr-3
Cristi Burcă [Sun, 16 Jun 2013 17:36:35 +0000 (10:36 -0700)]
Merge pull request #471 from wp-cli/psr-3

Switch from WP_CLI::line() to WP_CLI::log() where appropriate

11 years agoremove redundant arg check in Theme_Command::parse_name()
scribu [Sun, 16 Jun 2013 17:28:29 +0000 (20:28 +0300)]
remove redundant arg check in Theme_Command::parse_name()

it's already handled by the synopsis parser

11 years agoconvert from WP_CLI::line() to WP_CLI::log() where appropriate
scribu [Sun, 16 Jun 2013 17:22:00 +0000 (20:22 +0300)]
convert from WP_CLI::line() to WP_CLI::log() where appropriate

11 years agointroduce WP_CLI::log()
scribu [Sun, 16 Jun 2013 16:54:42 +0000 (19:54 +0300)]
introduce WP_CLI::log()

WP_CLI::line() is for spitting something to STDOUT.

WP_CLI::log() is for sending a message to the logger, which could do
various things with it.

closes #465

11 years agohelp: move duplicated function_exists() check to __invoke()
scribu [Sat, 15 Jun 2013 15:50:14 +0000 (18:50 +0300)]
help: move duplicated function_exists() check to __invoke()

11 years agorename _hook() to _action()
scribu [Sat, 15 Jun 2013 15:26:09 +0000 (18:26 +0300)]
rename _hook() to _action()

11 years agobehat: try running the install-network command again
scribu [Sun, 9 Jun 2013 15:36:15 +0000 (18:36 +0300)]
behat: try running the install-network command again

11 years agoA basic test for converting an install to multisite.
Daniel Bachhuber [Sat, 8 Jun 2013 22:19:13 +0000 (15:19 -0700)]
A basic test for converting an install to multisite.

11 years agoMerge pull request #523 from wp-cli/blog-site-network
Cristi Burcă [Sat, 15 Jun 2013 11:31:13 +0000 (04:31 -0700)]
Merge pull request #523 from wp-cli/blog-site-network

Rename `blog` to `site` and `site-meta` to `network`

11 years agosite create: alias --site_id= to --network_id=
scribu [Sat, 15 Jun 2013 11:24:06 +0000 (14:24 +0300)]
site create: alias --site_id= to --network_id=

11 years agosite create: rename --site_id= to --network_id=
scribu [Sat, 15 Jun 2013 11:11:43 +0000 (14:11 +0300)]
site create: rename --site_id= to --network_id=

11 years agobehat: fix help --gen test
scribu [Sat, 15 Jun 2013 10:47:15 +0000 (13:47 +0300)]
behat: fix help --gen test

11 years agoalias `wp blog` to `wp site`
scribu [Sat, 15 Jun 2013 10:28:49 +0000 (13:28 +0300)]
alias `wp blog` to `wp site`

11 years agorename `wp blog` to `wp site`
scribu [Sat, 15 Jun 2013 10:11:14 +0000 (13:11 +0300)]
rename `wp blog` to `wp site`

11 years agorename `wp site-meta` to `wp network-meta`
scribu [Sat, 15 Jun 2013 10:02:50 +0000 (13:02 +0300)]
rename `wp site-meta` to `wp network-meta`

11 years agoMerge pull request #507 from wp-cli/hooks
Cristi Burcă [Sat, 15 Jun 2013 09:56:20 +0000 (02:56 -0700)]
Merge pull request #507 from wp-cli/hooks

Implement a hook system and implement site-meta command.

closes #498

11 years agoadd man page for site-meta
scribu [Sat, 15 Jun 2013 09:52:41 +0000 (12:52 +0300)]
add man page for site-meta

[ci skip]

11 years agointroduce 'before_invoke:{cmd}' hook and use it for site-meta command
scribu [Fri, 31 May 2013 14:35:38 +0000 (17:35 +0300)]
introduce 'before_invoke:{cmd}' hook and use it for site-meta command

11 years agoadd site meta commands
Tomasz Ratajczak [Fri, 7 Jun 2013 14:26:54 +0000 (16:26 +0200)]
add site meta commands

11 years agoMerge changes from 0.10.1 into master
scribu [Sat, 15 Jun 2013 08:49:38 +0000 (11:49 +0300)]
Merge changes from 0.10.1 into master

11 years agoset version to 0.10.1 v0.10.1
scribu [Sat, 15 Jun 2013 08:46:01 +0000 (11:46 +0300)]
set version to 0.10.1

11 years agoadd URL redirect warning (for 0.10.1 branch)
scribu [Fri, 14 Jun 2013 18:55:02 +0000 (21:55 +0300)]
add URL redirect warning (for 0.10.1 branch)

see #521

11 years agoMerge pull request #521 from wp-cli/redirect-warning
Cristi Burcă [Fri, 14 Jun 2013 19:38:53 +0000 (12:38 -0700)]
Merge pull request #521 from wp-cli/redirect-warning

Add warning when a URL redirection is attempted

11 years agoadd URL redirect warning
scribu [Fri, 14 Jun 2013 18:55:02 +0000 (21:55 +0300)]
add URL redirect warning

11 years agoMerge pull request #517 from wp-cli/colorization
Cristi Burcă [Thu, 13 Jun 2013 03:39:01 +0000 (20:39 -0700)]
Merge pull request #517 from wp-cli/colorization

Keep color handling out of WP_CLI::line()

11 years agobehat: partially delete quiet run test
scribu [Thu, 13 Jun 2013 03:30:37 +0000 (06:30 +0300)]
behat: partially delete quiet run test

output from WP_CLI::line() is no longer suppressed, since we can't be
sure it's not the essential output (think `wp core version`)

11 years agomove line() method from loggers back to the WP_CLI class
scribu [Thu, 13 Jun 2013 03:13:35 +0000 (06:13 +0300)]
move line() method from loggers back to the WP_CLI class

11 years agouse WP_CLI::colorize() in CommandWithUpgrade
scribu [Thu, 13 Jun 2013 03:03:02 +0000 (06:03 +0300)]
use WP_CLI::colorize() in CommandWithUpgrade

11 years agorefresh `core version` output
scribu [Thu, 13 Jun 2013 02:50:08 +0000 (05:50 +0300)]
refresh `core version` output

* remove manifest version (absent from recent WP releases)
* remove redundant stability label for core versions
* use Mustache template and replace tabs with spaces

11 years agouse Mustache templates to display plugin/theme details
scribu [Thu, 13 Jun 2013 02:30:44 +0000 (05:30 +0300)]
use Mustache templates to display plugin/theme details

11 years agointroduce WP_CLI::colorize() utility
scribu [Thu, 13 Jun 2013 02:22:55 +0000 (05:22 +0300)]
introduce WP_CLI::colorize() utility

11 years agoupdate Composer dependencies
scribu [Wed, 12 Jun 2013 16:41:48 +0000 (19:41 +0300)]
update Composer dependencies

make version requirements less strict

11 years agoMerge pull request #468 from wp-cli/eager-require
Cristi Burcă [Wed, 12 Jun 2013 16:23:36 +0000 (09:23 -0700)]
Merge pull request #468 from wp-cli/eager-require

load path from --require before WP is loaded

11 years agobehat: test that --require works without a WP install
scribu [Sun, 9 Jun 2013 14:09:26 +0000 (17:09 +0300)]
behat: test that --require works without a WP install

11 years agoattempt to load built-in command early
scribu [Sun, 9 Jun 2013 13:44:51 +0000 (16:44 +0300)]
attempt to load built-in command early

11 years agoload path from --require before WP is loaded
scribu [Thu, 23 May 2013 11:25:45 +0000 (14:25 +0300)]
load path from --require before WP is loaded

11 years agoMerge pull request #514 from wp-cli/multiple-require
Cristi Burcă [Wed, 12 Jun 2013 15:50:54 +0000 (08:50 -0700)]
Merge pull request #514 from wp-cli/multiple-require

Allow passing --require multiple times

11 years agomention that --require can be used more than once
scribu [Wed, 12 Jun 2013 15:41:55 +0000 (18:41 +0300)]
mention that --require can be used more than once

11 years agofix boolean flag handling
scribu [Wed, 12 Jun 2013 15:09:28 +0000 (18:09 +0300)]
fix boolean flag handling

11 years agosupport passing --require multiple times
scribu [Wed, 12 Jun 2013 03:39:01 +0000 (06:39 +0300)]
support passing --require multiple times

11 years agobehat: add -run- to temporary directory names
scribu [Wed, 12 Jun 2013 03:51:18 +0000 (06:51 +0300)]
behat: add -run- to temporary directory names

this makes it easy to delete them, without deleting
wp-cli-test-download-cache

11 years agomerge split_special() into parse_args()
scribu [Wed, 12 Jun 2013 02:50:43 +0000 (05:50 +0300)]
merge split_special() into parse_args()

this gives us two clear variables to work with: $runtime_config and $local_config

11 years agomove parse_args() to Configurator and set WP path only if it's not explicitly set
scribu [Wed, 12 Jun 2013 02:32:37 +0000 (05:32 +0300)]
move parse_args() to Configurator and set WP path only if it's not explicitly set

11 years agorename is_absolute_path() to is_path_absolute()
scribu [Wed, 12 Jun 2013 02:26:32 +0000 (05:26 +0300)]
rename is_absolute_path() to is_path_absolute()

it emphasises the assumption that the parameter is a path and not some
random string

11 years agomove all config logic to a new class
scribu [Wed, 12 Jun 2013 01:12:11 +0000 (04:12 +0300)]
move all config logic to a new class

11 years agoMerge pull request #513 from wp-cli/travis-template
Cristi Burcă [Tue, 11 Jun 2013 13:10:19 +0000 (06:10 -0700)]
Merge pull request #513 from wp-cli/travis-template

scaffold plugin-tests: create install-wp-tests.sh script

11 years agoscaffold plugin-tests: create install-wp-tests.sh script
scribu [Tue, 11 Jun 2013 12:59:31 +0000 (15:59 +0300)]
scaffold plugin-tests: create install-wp-tests.sh script

This makes it easier to run unit tests locally.

11 years agoremove executable bit from mustache templates
scribu [Tue, 11 Jun 2013 12:49:38 +0000 (15:49 +0300)]
remove executable bit from mustache templates

11 years agobump version to 0.10.1-alpha
scribu [Mon, 10 Jun 2013 17:10:55 +0000 (20:10 +0300)]
bump version to 0.10.1-alpha

11 years agodon't alter API response if the returned version happens to be the one we want
scribu [Mon, 10 Jun 2013 16:59:41 +0000 (19:59 +0300)]
don't alter API response if the returned version happens to be the one we want

see #511

11 years agomention `wp --info` in README
scribu [Mon, 10 Jun 2013 16:08:59 +0000 (19:08 +0300)]
mention `wp --info` in README

11 years agopost get: update man page
scribu [Mon, 10 Jun 2013 12:28:15 +0000 (15:28 +0300)]
post get: update man page

fixes #509

11 years agopass docparser directly to CompositeCommand constructor
scribu [Mon, 10 Jun 2013 00:15:47 +0000 (03:15 +0300)]
pass docparser directly to CompositeCommand constructor

11 years agomake the Subcommand constructor accept a callback
scribu [Sun, 9 Jun 2013 23:50:01 +0000 (02:50 +0300)]
make the Subcommand constructor accept a callback

the idea is to have fewer parameters, with a clearer purpose

11 years agoextract create_subcommand() method
scribu [Sun, 9 Jun 2013 23:30:38 +0000 (02:30 +0300)]
extract create_subcommand() method

11 years agoMerge pull request #508 from wp-cli/dispatcher-refactor
Cristi Burcă [Sun, 9 Jun 2013 21:56:19 +0000 (14:56 -0700)]
Merge pull request #508 from wp-cli/dispatcher-refactor

Refactor dispather classes

11 years agomove find_command() utility to Help_Command class
scribu [Sun, 9 Jun 2013 21:35:48 +0000 (00:35 +0300)]
move find_command() utility to Help_Command class

it's not used anywhere else, nor should it be

11 years agoget rid of pre_invoke() method
scribu [Sun, 9 Jun 2013 21:30:10 +0000 (00:30 +0300)]
get rid of pre_invoke() method

11 years agomake Subcommand inherit from CompositeCommand
scribu [Sun, 9 Jun 2013 20:38:12 +0000 (23:38 +0300)]
make Subcommand inherit from CompositeCommand

11 years agoSimplify dispatch class hierarchy:
scribu [Sun, 9 Jun 2013 19:52:56 +0000 (22:52 +0300)]
Simplify dispatch class hierarchy:

* merge AbstractCommandContainer into CompositeCommand
* make RootCommand inherit from CompositeCommand
* get rid of redundant Command and CommandContainer interfaces

11 years agoconvert get_full_synopsis() method to a standalone function
scribu [Sun, 9 Jun 2013 19:48:13 +0000 (22:48 +0300)]
convert get_full_synopsis() method to a standalone function

11 years agoeverything is documentable, so get rid of the Documentable interface
scribu [Sun, 9 Jun 2013 19:23:00 +0000 (22:23 +0300)]
everything is documentable, so get rid of the Documentable interface

11 years agoget rid of AtomicCommand interface
scribu [Sun, 9 Jun 2013 19:19:19 +0000 (22:19 +0300)]
get rid of AtomicCommand interface

11 years agobranding: the project name is 'WP-CLI', not 'wp-cli'
scribu [Sun, 9 Jun 2013 18:41:20 +0000 (21:41 +0300)]
branding: the project name is 'WP-CLI', not 'wp-cli'

It's an abbreviation for 'WordPress Command-Line Interface'

11 years agomove 'sql' aliasing to Runner
scribu [Sun, 9 Jun 2013 13:40:22 +0000 (16:40 +0300)]
move 'sql' aliasing to Runner

11 years agoblog: don't hide multisite-only subcommands; just throw an error
scribu [Sun, 9 Jun 2013 12:23:53 +0000 (15:23 +0300)]
blog: don't hide multisite-only subcommands; just throw an error

This is good for `wp help --gen`, which doesn't have a WP install.

It's also good for users, since they have a clear indication of why the
subcommand doesn't work.

11 years agocontributing: remove confusing ./utils/dev-build step
scribu [Sun, 9 Jun 2013 12:37:23 +0000 (15:37 +0300)]
contributing: remove confusing ./utils/dev-build step

11 years agoMerge branch 'dev'
scribu [Sun, 9 Jun 2013 12:02:24 +0000 (15:02 +0300)]
Merge branch 'dev'

11 years agobump version to 0.11.0-alpha
scribu [Sun, 9 Jun 2013 12:02:15 +0000 (15:02 +0300)]
bump version to 0.11.0-alpha

11 years agolink to contributor guide from readme
scribu [Sun, 9 Jun 2013 10:57:54 +0000 (13:57 +0300)]
link to contributor guide from readme

11 years agoMerge branch 'master' into dev
scribu [Sat, 8 Jun 2013 23:57:42 +0000 (02:57 +0300)]
Merge branch 'master' into dev

11 years agosearch-replace: rename --multisite flag to --network v0.10.0
scribu [Sat, 8 Jun 2013 22:33:58 +0000 (01:33 +0300)]
search-replace: rename --multisite flag to --network

it's more consistent with other commands

fixes #504; see #501

11 years agomailmap: add new contributors from 0.10 release
scribu [Sat, 8 Jun 2013 21:51:09 +0000 (00:51 +0300)]
mailmap: add new contributors from 0.10 release

11 years agocontrib-list: validate github URLs
scribu [Sat, 8 Jun 2013 21:36:50 +0000 (00:36 +0300)]
contrib-list: validate github URLs

11 years agobump version to 0.10.0
scribu [Sat, 8 Jun 2013 21:06:59 +0000 (00:06 +0300)]
bump version to 0.10.0

11 years agoMerge pull request #501 from wp-cli/multisite-search-replace
Cristi Burcă [Sat, 8 Jun 2013 14:08:29 +0000 (07:08 -0700)]
Merge pull request #501 from wp-cli/multisite-search-replace

Land `wp search-replace --multisite`

11 years agosearch-replace: update man page
scribu [Sat, 8 Jun 2013 14:01:01 +0000 (17:01 +0300)]
search-replace: update man page

11 years agosearch-replace: move primary key check
scribu [Sat, 8 Jun 2013 13:49:38 +0000 (16:49 +0300)]
search-replace: move primary key check

11 years agoMerge branch 'master' into dev
scribu [Sat, 8 Jun 2013 13:46:57 +0000 (16:46 +0300)]
Merge branch 'master' into dev

11 years agosearch-replace: use a single SHOW TABLES query to get list of multisite tables
scribu [Sat, 8 Jun 2013 13:36:18 +0000 (16:36 +0300)]
search-replace: use a single SHOW TABLES query to get list of multisite tables

Besides simplicity, it avoids warnings for non-existant tables.

For example, the Posts 2 Posts plugin creates 2 custom, per-blog tables.
But it might not be activated on all blogs.

11 years agosearch-replace: fix warning from using wpdb->prepare() with only 1 parameter
scribu [Sat, 8 Jun 2013 13:22:21 +0000 (16:22 +0300)]
search-replace: fix warning from using wpdb->prepare() with only 1 parameter

11 years agosearch-replace: extract get_table_list() method
scribu [Sat, 8 Jun 2013 13:17:32 +0000 (16:17 +0300)]
search-replace: extract get_table_list() method

11 years agosearch-replace: blacklist user_pass column later
scribu [Sat, 8 Jun 2013 13:09:37 +0000 (16:09 +0300)]
search-replace: blacklist user_pass column later

11 years agosearch-replace: whitespace fixes
scribu [Sat, 8 Jun 2013 13:08:10 +0000 (16:08 +0300)]
search-replace: whitespace fixes

11 years agosearch-replace function modified to perform a search and replace through multisite...
daithi-coombes [Sat, 8 Jun 2013 12:54:39 +0000 (13:54 +0100)]
search-replace function modified to perform a search and replace through multisite specific tables

11 years agobump version to 0.10.0-RC
scribu [Sat, 8 Jun 2013 09:55:22 +0000 (12:55 +0300)]
bump version to 0.10.0-RC

11 years agoMerge pull request #496 from wp-cli/no-home
Cristi Burcă [Fri, 7 Jun 2013 16:38:18 +0000 (09:38 -0700)]
Merge pull request #496 from wp-cli/no-home

Remove `wp home` command

11 years agoremove `wp home` command
scribu [Fri, 7 Jun 2013 14:37:08 +0000 (17:37 +0300)]
remove `wp home` command

11 years agoMerge pull request #494 from Future500/master
Cristi Burcă [Thu, 6 Jun 2013 14:31:36 +0000 (07:31 -0700)]
Merge pull request #494 from Future500/master

Allow capital letters in <value> tokens in @synopsis

11 years agoAllow capital letters in <value> tokens in @synopsis
Ramon de la Fuente [Thu, 6 Jun 2013 14:16:21 +0000 (16:16 +0200)]
Allow capital letters in <value> tokens in @synopsis

Values in @synopsis tags are not matched if they contain capital letters.
This allows for capital letters i.e. --name=<myPropertyValue>
fixes #493

11 years agoMerge pull request #492 from om4james/updateall
Cristi Burcă [Wed, 5 Jun 2013 13:52:35 +0000 (06:52 -0700)]
Merge pull request #492 from om4james/updateall

Only use maintenance mode if a plugin or theme needs updating

11 years agoUse empty() check instead of count()
James Collins [Wed, 5 Jun 2013 13:41:29 +0000 (23:41 +1000)]
Use empty() check instead of count()

Requested in https://github.com/wp-cli/wp-cli/pull/492#discussion_r4545088.

11 years agoChange ternary operator to simple if statement
James Collins [Wed, 5 Jun 2013 12:59:11 +0000 (22:59 +1000)]
Change ternary operator to simple if statement

11 years agoOnly use maintenance mode if a plugin or theme needs updating
James Collins [Wed, 5 Jun 2013 12:42:10 +0000 (22:42 +1000)]
Only use maintenance mode if a plugin or theme needs updating

When updating plugins (wp plugin update-all) or themes (wp theme update-all) on a WordPress multisite installation, maintenance activated and deactivated even if there are no updates to install.

The Plugin_Upgrader::bulk_upgrade() and Theme_Upgrader::bulk_upgrade() WordPress functions currently don't check that the array passed to it isn't empty, causing maintenance mode to be enabled even if no updates are required.

This bug doesn't affect non multisite installs, because for non multisite installs the code in Plugin_Upgrader::bulk_upgrade() and Theme_Upgrader::bulk_upgrade() only uses maintenance mode if the plugin/theme being updated is activated.

Fixes #491

11 years agobump version to 0.10.0-beta2
scribu [Wed, 5 Jun 2013 01:14:58 +0000 (04:14 +0300)]
bump version to 0.10.0-beta2

[ci skip]

11 years agocomposer: update mustache to 2.3.x; update composer.lock
scribu [Wed, 5 Jun 2013 01:04:07 +0000 (04:04 +0300)]
composer: update mustache to 2.3.x; update composer.lock

11 years agoMerge branch 'master' into dev
scribu [Tue, 4 Jun 2013 23:10:55 +0000 (02:10 +0300)]
Merge branch 'master' into dev