jkudish/WordPress-GitHub-Plugin-Updater — pull request #40 by bainternet (2013-01-29 16:37:06+00:00)
Title: Allow Slimmer config array

this Pull request allows a slimmer $config array, by building the api_url, raw_url and zip_url URLs in the constructor since the are usually the same.

So instead of this:

```php
$config = array(
'slug' => plugin_basename(__FILE__), // this is the slug of your plugin
'proper_folder_name' => 'plugin-name', // this is the name of the folder your plugin lives in
'api_url' => 'https://api.github.com/repos/username/repository-name', // the github API url of your github repo
'raw_url' => 'https://raw.github.com/username/repository-name/master', // the github raw url of your github repo
'github_url' => 'https://github.com/username/repository-name', // the github url of your github repo
'zip_url' => 'https://github.com/username/repository-name/zipball/master', // the zip url of the github repo
'sslverify' => true // wether WP should check the validity of the SSL cert when getting an update, see https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/issues/2 and https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/issues/4 for details
'requires' => '3.0', // which version of WordPress does your plugin require?
'tested' => '3.3', // which version of WordPress is your plugin tested up to?
'readme' => 'README.md', // which file to use as the readme for the version number
'access_token' => '', // Access private repositories by authorizing under Appearance > Github Updates when this example plugin is installed
);
```

```php
$config = array(
'slug' => plugin_basename(__FILE__), // this is the slug of your plugin
'proper_folder_name' => 'plugin-name', // this is the name of the folder your plugin lives in
'github_url' => 'https://github.com/username/repository-name', // the github url of your github repo
'requires' => '3.0', // which version of WordPress does your plugin require?
'tested' => '3.3', // which version of WordPress is your plugin tested up to?
'readme' => 'README.md', // which file to use as the readme for the version number
);
```

Most of this was already possible but just not for these parameters, so i turned them into optional parameters to keep backwards capability and allow customization.
Also i added a new parameter `branch` which defaults to master but it's nice to have the ability to change that so the zip file downloaded is of another branch.