diff -Nru php-horde-service-urlshortener-2.0.2/debian/changelog php-horde-service-urlshortener-2.0.3/debian/changelog --- php-horde-service-urlshortener-2.0.2/debian/changelog 2016-06-08 18:13:21.000000000 +0000 +++ php-horde-service-urlshortener-2.0.3/debian/changelog 2017-09-27 21:00:22.000000000 +0000 @@ -1,3 +1,9 @@ +php-horde-service-urlshortener (2.0.3-1) unstable; urgency=medium + + * New upstream version 2.0.3 + + -- Mathieu Parent Wed, 27 Sep 2017 23:00:22 +0200 + php-horde-service-urlshortener (2.0.2-5) unstable; urgency=medium * Update Standards-Version to 3.9.8, no change diff -Nru php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/Base.php php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/Base.php --- php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/Base.php 2015-01-09 11:33:32.000000000 +0000 +++ php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/Base.php 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ - - * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 - * @category Horde - * @package Service_UrlShortener - */ - -/** - * Horde_Service_UrlShortener Base class - * - * @author Michael J Rubinsky - * @category Horde - * @package Service_UrlShortener - */ - abstract class Horde_Service_UrlShortener_Base - { - /** - * @var array - */ - protected $_params; - - /** - * @var Horde_Http_Client - */ - protected $_http; - - /** - * Constructor - * - * @param Horde_Http_Client $http [description] - * @param array $params = array() [description] - * - * @return Horde_UrlShorten - */ - public function __construct(Horde_Http_Client $http, $params = array()) - { - $this->_http = $http; - $this->_params = $params; - } - - abstract public function shorten($url); - } \ No newline at end of file diff -Nru php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/Exception.php php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/Exception.php --- php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/Exception.php 2015-01-09 11:33:32.000000000 +0000 +++ php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/Exception.php 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - * @category Horde - * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 - * @package Service_UrlShortener - */ -class Horde_Service_UrlShortener_Exception extends Horde_Exception_Wrapped -{ -} diff -Nru php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/TinyUrl.php php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/TinyUrl.php --- php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/TinyUrl.php 2015-01-09 11:33:32.000000000 +0000 +++ php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.2/lib/Horde/Service/UrlShortener/TinyUrl.php 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 - * @category Horde - * @package Service_UrlShortener - */ - -/** - * UrlShortener class for TinyUrl. - * - * @author Michael J Rubinsky - * @category Horde - * @package Service_UrlShortener - */ -class Horde_Service_UrlShortener_TinyUrl extends Horde_Service_UrlShortener_Base -{ - const API_URL = 'http://tinyurl.com/api-create.php'; - - /** - * - * @param string $url The URL to shorten - * - * @return string The shortened URL - * @throws Horde_UrlShorten_Exception - */ - public function shorten($url) - { - $u = new Horde_Url(self::API_URL); - $u = $u->setRaw(true)->add('url', $url); - try { - $response = $this->_http->get($u); - } catch (Horde_Http_Exception $e) { - throw new Horde_Service_UrlShortener_Exception($e); - } - - return $response->getBody(); - } - -} \ No newline at end of file diff -Nru php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/Base.php php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/Base.php --- php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/Base.php 1970-01-01 00:00:00.000000000 +0000 +++ php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/Base.php 2017-09-19 11:41:24.000000000 +0000 @@ -0,0 +1,50 @@ + + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @category Horde + * @package Service_UrlShortener + */ + +/** + * Horde_Service_UrlShortener Base class + * + * @author Michael J Rubinsky + * @category Horde + * @package Service_UrlShortener + */ + abstract class Horde_Service_UrlShortener_Base + { + /** + * @var array + */ + protected $_params; + + /** + * @var Horde_Http_Client + */ + protected $_http; + + /** + * Constructor + * + * @param Horde_Http_Client $http [description] + * @param array $params = array() [description] + * + * @return Horde_UrlShorten + */ + public function __construct(Horde_Http_Client $http, $params = array()) + { + $this->_http = $http; + $this->_params = $params; + } + + abstract public function shorten($url); + } \ No newline at end of file diff -Nru php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/Exception.php php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/Exception.php --- php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/Exception.php 1970-01-01 00:00:00.000000000 +0000 +++ php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/Exception.php 2017-09-19 11:41:24.000000000 +0000 @@ -0,0 +1,17 @@ + + * @category Horde + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @package Service_UrlShortener + */ +class Horde_Service_UrlShortener_Exception extends Horde_Exception_Wrapped +{ +} diff -Nru php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/TinyUrl.php php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/TinyUrl.php --- php-horde-service-urlshortener-2.0.2/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/TinyUrl.php 1970-01-01 00:00:00.000000000 +0000 +++ php-horde-service-urlshortener-2.0.3/Horde_Service_UrlShortener-2.0.3/lib/Horde/Service/UrlShortener/TinyUrl.php 2017-09-19 11:41:24.000000000 +0000 @@ -0,0 +1,48 @@ + + * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 + * @category Horde + * @package Service_UrlShortener + */ + +/** + * UrlShortener class for TinyUrl. + * + * @author Michael J Rubinsky + * @category Horde + * @package Service_UrlShortener + */ +class Horde_Service_UrlShortener_TinyUrl extends Horde_Service_UrlShortener_Base +{ + const API_URL = 'http://tinyurl.com/api-create.php'; + + /** + * + * @param string $url The URL to shorten + * + * @return string The shortened URL + * @throws Horde_UrlShorten_Exception + */ + public function shorten($url) + { + $u = new Horde_Url(self::API_URL); + $u = $u->setRaw(true)->add('url', $url); + try { + $response = $this->_http->get($u); + } catch (Horde_Http_Exception $e) { + throw new Horde_Service_UrlShortener_Exception($e); + } + + return $response->getBody(); + } + +} \ No newline at end of file diff -Nru php-horde-service-urlshortener-2.0.2/package.xml php-horde-service-urlshortener-2.0.3/package.xml --- php-horde-service-urlshortener-2.0.2/package.xml 2015-01-09 11:33:32.000000000 +0000 +++ php-horde-service-urlshortener-2.0.3/package.xml 2017-09-19 11:41:25.000000000 +0000 @@ -1,5 +1,5 @@ - + Horde_Service_UrlShortener pear.horde.org Horde_Service_UrlShortener Class @@ -10,10 +10,10 @@ mrubinsk@horde.org yes - 2015-01-09 - + 2017-09-19 + - 2.0.2 + 2.0.3 1.0.0 @@ -22,21 +22,21 @@ LGPL-2.1 -* [jan] Add Composer definition. +* [jan] Mark PHP 7 as supported. - - - + + + 5.3.0 - 6.0.0alpha1 - 6.0.0alpha1 + 8.0.0alpha1 + 8.0.0alpha1 1.7.0 @@ -192,5 +192,20 @@ * [jan] Add Composer definition. + + + 2.0.3 + 1.0.0 + + + stable + stable + + 2017-09-19 + LGPL-2.1 + +* [jan] Mark PHP 7 as supported. + +