{"action":"created","issue":{"url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3127","repository_url":"https://api.github.com/repos/wp-cli/wp-cli","labels_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3127/labels{/name}","comments_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3127/comments","events_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3127/events","html_url":"https://github.com/wp-cli/wp-cli/pull/3127","id":164501238,"number":3127,"title":"Support 'trunk' and 'nightly' version arguments for wp core download.","user":{"login":"stephenharris","id":3255034,"avatar_url":"https://avatars.githubusercontent.com/u/3255034?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenharris","html_url":"https://github.com/stephenharris","followers_url":"https://api.github.com/users/stephenharris/followers","following_url":"https://api.github.com/users/stephenharris/following{/other_user}","gists_url":"https://api.github.com/users/stephenharris/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenharris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenharris/subscriptions","organizations_url":"https://api.github.com/users/stephenharris/orgs","repos_url":"https://api.github.com/users/stephenharris/repos","events_url":"https://api.github.com/users/stephenharris/events{/privacy}","received_events_url":"https://api.github.com/users/stephenharris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-08T10:18:32Z","updated_at":"2016-07-08T10:29:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wp-cli/wp-cli/pulls/3127","html_url":"https://github.com/wp-cli/wp-cli/pull/3127","diff_url":"https://github.com/wp-cli/wp-cli/pull/3127.diff","patch_url":"https://github.com/wp-cli/wp-cli/pull/3127.patch"},"body":"Relates to #3113 \r\n\r\n- Modifies Core_Command::get_download_url() to interpret 'trunk' and 'nightly' versions\r\n- Core_Command::get_download_url() now conforms to WordPress coding standards\r\n- Adds support for downloading and extracting .zip files as nightly builds are own available in zip format.\r\n- wp core download --version=trunk is only supported if ZipArchive is present."},"comment":{"url":"https://api.github.com/repos/wp-cli/wp-cli/issues/comments/231327909","html_url":"https://github.com/wp-cli/wp-cli/pull/3127#issuecomment-231327909","issue_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/3127","id":231327909,"user":{"login":"stephenharris","id":3255034,"avatar_url":"https://avatars.githubusercontent.com/u/3255034?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenharris","html_url":"https://github.com/stephenharris","followers_url":"https://api.github.com/users/stephenharris/followers","following_url":"https://api.github.com/users/stephenharris/following{/other_user}","gists_url":"https://api.github.com/users/stephenharris/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenharris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenharris/subscriptions","organizations_url":"https://api.github.com/users/stephenharris/orgs","repos_url":"https://api.github.com/users/stephenharris/repos","events_url":"https://api.github.com/users/stephenharris/events{/privacy}","received_events_url":"https://api.github.com/users/stephenharris/received_events","type":"User","site_admin":false},"created_at":"2016-07-08T10:29:55Z","updated_at":"2016-07-08T10:29:55Z","body":"I'll follow up with some Behat tests.\r\n\r\n[Documentation](http://php.net/manual/en/class.phardata.php) tells me `PharData` supports `zip` files too. But it just produced garbled file contents (filenames and directory structure was intact). I haven't explored the potential of using command line tools as is currently used if available for extracting `tar` files.\r\n\r\nmd5 checksums are not available for trunk downloads so I just display a warning. You get a similar error when trying to overwrite an existing download.\r\n\r\nOne future change, which would be nice but isn't within the scope of this issue would be to move the logic for determining which tool to use (`tar`,`PharData`,`ZipArchive` etc) to a factory class which gives us back a instance of class fulfilling a common interface - so the command doesn't know (or care) what tool is being used to extract and move the download.\r\n\r\nThat would allow additional tools to be added easily, and would tidy the logic of extracting to a directory, and then moving the contents of the wordpress directory to the desired location out of the command class."}}
{"actor":{"display_login":"stephenharris"}}