pschwisow / phergie-irc-plugin-react-url-shorten
Phergie plugin to provide URL shortening services for Url plugin (and others)
3.0.2
2017-05-03 21:27 UTC
Requires
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phake/phake: 2.0.0-beta2
- phpunit/phpunit: 4.1.*
README
Phergie plugin to provide URL shortening services for Url plugin (and others).
Install
The recommended method of installation is through composer.
{ "require": { "pschwisow/phergie-irc-plugin-react-url-shorten": "^2" } }
See Phergie documentation for more information on installing and enabling plugins.
Configuration
return [ 'plugins' => [ // dependencies new \Phergie\Plugin\Dns\Plugin, // Handles DNS lookups for the HTTP plugin new \Phergie\Plugin\Http\Plugin, // Handles the HTTP requests for this plugin new \Phergie\Irc\Plugin\React\Url\Plugin([ 'handler' => new \Phergie\Irc\Plugin\React\Url\DefaultUrlHandler('[%url-short%] %composed-title%') ]), // Emits url.shorten.* events // configuration new \PSchwisow\Phergie\Plugin\UrlShorten\Plugin([ // All configuration is optional // Specify the classname of the shortener adapter 'service' => 'Gscio', // FQCN or relative to PSchwisow\Phergie\Plugin\UrlShorten\Adapter // Override adapter's minimum length to attempt to shorten 'minimumLength' => 15, // Add to list of hosts to skip shortening (presumably because they are already shortened) 'skipHosts' => ['abc.com', 'xyz.net'] // Disable the default list of hosts to skip shortening 'disableDefaultSkipHosts' => true ]) ] ];
Tests
To run the unit test suite:
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit
License
Released under the BSD License. See LICENSE
.