siwinski pushed to php-google-apiclient (master). "Updated to 1.1.4 (BZ #1222260) (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri May 22 22:20:33 UTC 2015


From 48233d7e0f02103e5693e9e090804e213167cacb Mon Sep 17 00:00:00 2001
From: Shawn Iwinski <siwinski at redhat.com>
Date: Fri, 22 May 2015 18:19:07 -0400
Subject: Updated to 1.1.4 (BZ #1222260)

- Added spec license header
- Removed autoload patch
- Added option to build without tests

diff --git a/.gitignore b/.gitignore
index f43d003..087fc90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 /php-google-apiclient-1.0.3-2b3b475e3ee52e92fc7b649138ef4f9da3d4f9b9.tar.gz
 /php-google-apiclient-1.0.6-a41a9dc0662e36420030eaab802dbb1f85459479.tar.gz
 /php-google-apiclient-1.1.2-9c35bbbbaf04a5236d763560dab1e2f6e672a724.tar.gz
+/php-google-apiclient-1.1.4-2adb5ba90612858d4add0342eee6b8b9aaca398d.tar.gz
diff --git a/c6949531d2399f81a5e15caf256f156dd68e00e9.patch b/c6949531d2399f81a5e15caf256f156dd68e00e9.patch
deleted file mode 100644
index 485abd3..0000000
--- a/c6949531d2399f81a5e15caf256f156dd68e00e9.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c6949531d2399f81a5e15caf256f156dd68e00e9 Mon Sep 17 00:00:00 2001
-From: Silvano Luciani <silvano.luciani at gmail.com>
-Date: Fri, 31 Jan 2014 13:29:14 -0800
-Subject: [PATCH] Explicitly set '&' as separator value for http_build_query
-
----
- src/Google/Auth/OAuth2.php | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Google/Auth/OAuth2.php b/src/Google/Auth/OAuth2.php
-index e66f34c..6cf7c1a 100644
---- a/src/Google/Auth/OAuth2.php
-+++ b/src/Google/Auth/OAuth2.php
-@@ -161,7 +161,7 @@ public function createAuthUrl($scope)
-       $params['state'] = $this->state;
-     }
- 
--    return self::OAUTH2_AUTH_URL . "?" . http_build_query($params);
-+    return self::OAUTH2_AUTH_URL . "?" . http_build_query($params, '', '&');
-   }
- 
-   /**
--- 
-1.8.5.1
-
diff --git a/php-google-apiclient-1.1.2-move_autoloader.patch b/php-google-apiclient-1.1.2-move_autoloader.patch
deleted file mode 100644
index 35bc716..0000000
--- a/php-google-apiclient-1.1.2-move_autoloader.patch
+++ /dev/null
@@ -1,639 +0,0 @@
-diff --git a/examples/appengineauth.php b/examples/appengineauth.php
-index 4300c70..7b147e9 100644
---- a/examples/appengineauth.php
-+++ b/examples/appengineauth.php
-@@ -21,7 +21,7 @@ include_once "templates/base.php";
-   Make an API request authenticated via the 
-   AppIdentity service on AppEngine.
-  ************************************************/
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- echo pageHeader("AppIdentity Account Access");
- 
-diff --git a/examples/batch.php b/examples/batch.php
-index 3a51ab9..5183e58 100644
---- a/examples/batch.php
-+++ b/examples/batch.php
-@@ -22,7 +22,7 @@ echo pageHeader("Batching Queries");
-   books API again as an example, but this time we
-   will batch up two queries into a single call.
-  ************************************************/
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- /************************************************
-   We create the client and set the simple API
-diff --git a/examples/fileupload.php b/examples/fileupload.php
-index 0940e1c..6a20390 100644
---- a/examples/fileupload.php
-+++ b/examples/fileupload.php
-@@ -17,7 +17,7 @@
- include_once "templates/base.php";
- session_start();
- 
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- /************************************************
-   We'll setup an empty 20MB file to upload.
-diff --git a/examples/idtoken.php b/examples/idtoken.php
-index 963f35b..e3991e9 100644
---- a/examples/idtoken.php
-+++ b/examples/idtoken.php
-@@ -17,7 +17,7 @@
- include_once "templates/base.php";
- session_start();
- 
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- /************************************************
-   ATTENTION: Fill in these values! Make sure
-diff --git a/examples/multi-api.php b/examples/multi-api.php
-index 3780287..86f682c 100644
---- a/examples/multi-api.php
-+++ b/examples/multi-api.php
-@@ -17,7 +17,7 @@
- include_once "templates/base.php";
- session_start();
- 
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- /************************************************
-   ATTENTION: Fill in these values! Make sure
-diff --git a/examples/service-account.php b/examples/service-account.php
-index 4cc0840..45dc75c 100644
---- a/examples/service-account.php
-+++ b/examples/service-account.php
-@@ -21,7 +21,7 @@ include_once "templates/base.php";
-   Make an API request authenticated with a service
-   account.
-  ************************************************/
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- /************************************************
-   ATTENTION: Fill in these values! You can get
-diff --git a/examples/simple-query.php b/examples/simple-query.php
-index e22790b..b3fd128 100644
---- a/examples/simple-query.php
-+++ b/examples/simple-query.php
-@@ -25,7 +25,7 @@ echo pageHeader("Simple API Access");
-   should use our quota, which is higher than the
-   anonymous quota (which is limited per IP).
-  ************************************************/
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- /************************************************
-   We create the client and set the simple API
-diff --git a/examples/simplefileupload.php b/examples/simplefileupload.php
-index 1d8fbda..40f14f2 100644
---- a/examples/simplefileupload.php
-+++ b/examples/simplefileupload.php
-@@ -17,7 +17,7 @@
- include_once "templates/base.php";
- session_start();
- 
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- /************************************************
-   We'll setup an empty 1MB file to upload.
-diff --git a/examples/user-example.php b/examples/user-example.php
-index 4370b08..9cfd3d2 100644
---- a/examples/user-example.php
-+++ b/examples/user-example.php
-@@ -17,7 +17,7 @@
- include_once "templates/base.php";
- session_start();
- 
--require_once realpath(dirname(__FILE__) . '/../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../src/Google/autoload.php');
- 
- /************************************************
-   ATTENTION: Fill in these values! Make sure
-diff --git a/src/Google/Auth/Abstract.php b/src/Google/Auth/Abstract.php
-index c1e36dc..d099937 100644
---- a/src/Google/Auth/Abstract.php
-+++ b/src/Google/Auth/Abstract.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Abstract class for the Authentication in the API client
-diff --git a/src/Google/Auth/AppIdentity.php b/src/Google/Auth/AppIdentity.php
-index ff96a9d..c40b37d 100644
---- a/src/Google/Auth/AppIdentity.php
-+++ b/src/Google/Auth/AppIdentity.php
-@@ -22,7 +22,7 @@
-  */
- use google\appengine\api\app_identity\AppIdentityService;
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Authentication via the Google App Engine App Identity service.
-diff --git a/src/Google/Auth/AssertionCredentials.php b/src/Google/Auth/AssertionCredentials.php
-index 2b92c57..97ef4e0 100644
---- a/src/Google/Auth/AssertionCredentials.php
-+++ b/src/Google/Auth/AssertionCredentials.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Credentials object used for OAuth 2.0 Signed JWT assertion grants.
-diff --git a/src/Google/Auth/Exception.php b/src/Google/Auth/Exception.php
-index 81c795a..be43955 100644
---- a/src/Google/Auth/Exception.php
-+++ b/src/Google/Auth/Exception.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- class Google_Auth_Exception extends Google_Exception
- {
-diff --git a/src/Google/Auth/LoginTicket.php b/src/Google/Auth/LoginTicket.php
-index b29abdf..6415533 100644
---- a/src/Google/Auth/LoginTicket.php
-+++ b/src/Google/Auth/LoginTicket.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Class to hold information about an authenticated login.
-diff --git a/src/Google/Auth/OAuth2.php b/src/Google/Auth/OAuth2.php
-index 58e86e5..0c72a64 100644
---- a/src/Google/Auth/OAuth2.php
-+++ b/src/Google/Auth/OAuth2.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Authentication class that deals with the OAuth 2 web-server authentication flow
-diff --git a/src/Google/Auth/Simple.php b/src/Google/Auth/Simple.php
-index 3c85ae3..5514cf5 100644
---- a/src/Google/Auth/Simple.php
-+++ b/src/Google/Auth/Simple.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Simple API access implementation. Can either be used to make requests
-diff --git a/src/Google/Cache/Apc.php b/src/Google/Cache/Apc.php
-index 7c9a075..72eeb10 100644
---- a/src/Google/Cache/Apc.php
-+++ b/src/Google/Cache/Apc.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * A persistent storage class based on the APC cache, which is not
-diff --git a/src/Google/Cache/Exception.php b/src/Google/Cache/Exception.php
-index a1d2d7a..9a73a82 100644
---- a/src/Google/Cache/Exception.php
-+++ b/src/Google/Cache/Exception.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- class Google_Cache_Exception extends Google_Exception
- {
-diff --git a/src/Google/Cache/File.php b/src/Google/Cache/File.php
-index e4c99ad..4ad53bf 100644
---- a/src/Google/Cache/File.php
-+++ b/src/Google/Cache/File.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /*
-  * This class implements a basic on disk storage. While that does
-diff --git a/src/Google/Cache/Memcache.php b/src/Google/Cache/Memcache.php
-index c9fb4bc..2afce67 100644
---- a/src/Google/Cache/Memcache.php
-+++ b/src/Google/Cache/Memcache.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * A persistent storage class based on the memcache, which is not
-diff --git a/src/Google/Cache/Null.php b/src/Google/Cache/Null.php
-index 0cd24c5..56c6edb 100644
---- a/src/Google/Cache/Null.php
-+++ b/src/Google/Cache/Null.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * A blank storage class, for cases where caching is not
-diff --git a/src/Google/Client.php b/src/Google/Client.php
-index 1de6c59..98794b2 100644
---- a/src/Google/Client.php
-+++ b/src/Google/Client.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/autoload.php');
- 
- /**
-  * The Google API Client
-diff --git a/src/Google/Collection.php b/src/Google/Collection.php
-index dbb2855..eebe56b 100644
---- a/src/Google/Collection.php
-+++ b/src/Google/Collection.php
-@@ -1,6 +1,6 @@
- <?php
- 
--require_once realpath(dirname(__FILE__) . '/../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/autoload.php');
- 
- /**
-  * Extension to the regular Google_Model that automatically
-diff --git a/src/Google/Http/Batch.php b/src/Google/Http/Batch.php
-index 543ac57..a78c38d 100644
---- a/src/Google/Http/Batch.php
-+++ b/src/Google/Http/Batch.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * @author Chirag Shah <chirags at google.com>
-diff --git a/src/Google/Http/CacheParser.php b/src/Google/Http/CacheParser.php
-index 298317c..2fea46f 100644
---- a/src/Google/Http/CacheParser.php
-+++ b/src/Google/Http/CacheParser.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Implement the caching directives specified in rfc2616. This
-diff --git a/src/Google/Http/MediaFileUpload.php b/src/Google/Http/MediaFileUpload.php
-index 87f3762..7d6d5f1 100644
---- a/src/Google/Http/MediaFileUpload.php
-+++ b/src/Google/Http/MediaFileUpload.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * @author Chirag Shah <chirags at google.com>
-diff --git a/src/Google/Http/REST.php b/src/Google/Http/REST.php
-index 6ac9f07..3adfede 100644
---- a/src/Google/Http/REST.php
-+++ b/src/Google/Http/REST.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * This class implements the RESTful transport of apiServiceRequest()'s
-diff --git a/src/Google/Http/Request.php b/src/Google/Http/Request.php
-index 9811c14..1c302a7 100644
---- a/src/Google/Http/Request.php
-+++ b/src/Google/Http/Request.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * HTTP Request to be executed by IO classes. Upon execution, the
-diff --git a/src/Google/IO/Abstract.php b/src/Google/IO/Abstract.php
-index fc8edbe..cb8e619 100644
---- a/src/Google/IO/Abstract.php
-+++ b/src/Google/IO/Abstract.php
-@@ -19,7 +19,7 @@
-  * Abstract IO base class
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- abstract class Google_IO_Abstract
- {
-diff --git a/src/Google/IO/Curl.php b/src/Google/IO/Curl.php
-index 8bd6738..8bf1213 100644
---- a/src/Google/IO/Curl.php
-+++ b/src/Google/IO/Curl.php
-@@ -21,7 +21,7 @@
-  * @author Stuart Langley <slangley at google.com>
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- class Google_IO_Curl extends Google_IO_Abstract
- {
-diff --git a/src/Google/IO/Exception.php b/src/Google/IO/Exception.php
-index 98e9d25..cb0b6ec 100644
---- a/src/Google/IO/Exception.php
-+++ b/src/Google/IO/Exception.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- class Google_IO_Exception extends Google_Exception
- {
-diff --git a/src/Google/IO/Stream.php b/src/Google/IO/Stream.php
-index 35f9d90..5345544 100644
---- a/src/Google/IO/Stream.php
-+++ b/src/Google/IO/Stream.php
-@@ -21,7 +21,7 @@
-  * @author Stuart Langley <slangley at google.com>
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- class Google_IO_Stream extends Google_IO_Abstract
- {
-diff --git a/src/Google/Logger/Abstract.php b/src/Google/Logger/Abstract.php
-index 571918c..9d07e58 100644
---- a/src/Google/Logger/Abstract.php
-+++ b/src/Google/Logger/Abstract.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Abstract logging class based on the PSR-3 standard.
-diff --git a/src/Google/Logger/Exception.php b/src/Google/Logger/Exception.php
-index 7c828e6..f1a7927 100644
---- a/src/Google/Logger/Exception.php
-+++ b/src/Google/Logger/Exception.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- class Google_Logger_Exception extends Google_Exception
- {
-diff --git a/src/Google/Logger/File.php b/src/Google/Logger/File.php
-index f337471..a9efa4d 100644
---- a/src/Google/Logger/File.php
-+++ b/src/Google/Logger/File.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * File logging class based on the PSR-3 standard.
-diff --git a/src/Google/Logger/Null.php b/src/Google/Logger/Null.php
-index 9c5f64a..0feb24f 100644
---- a/src/Google/Logger/Null.php
-+++ b/src/Google/Logger/Null.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Null logger based on the PSR-3 standard.
-diff --git a/src/Google/Logger/Psr.php b/src/Google/Logger/Psr.php
-index d577244..da565ca 100644
---- a/src/Google/Logger/Psr.php
-+++ b/src/Google/Logger/Psr.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Psr logging class based on the PSR-3 standard.
-diff --git a/src/Google/Service/Exception.php b/src/Google/Service/Exception.php
-index 65c1fcc..502229c 100644
---- a/src/Google/Service/Exception.php
-+++ b/src/Google/Service/Exception.php
-@@ -1,6 +1,6 @@
- <?php
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- class Google_Service_Exception extends Google_Exception
- {
-diff --git a/src/Google/Service/Resource.php b/src/Google/Service/Resource.php
-index 29bc06e..3d64942 100644
---- a/src/Google/Service/Resource.php
-+++ b/src/Google/Service/Resource.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Implements the actual methods/resources of the discovered Google API using magic function
-diff --git a/src/Google/Signer/P12.php b/src/Google/Signer/P12.php
-index 92ccbc8..ae0e047 100644
---- a/src/Google/Signer/P12.php
-+++ b/src/Google/Signer/P12.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Signs data.
-diff --git a/src/Google/Verifier/Pem.php b/src/Google/Verifier/Pem.php
-index 563553b..f217c92 100644
---- a/src/Google/Verifier/Pem.php
-+++ b/src/Google/Verifier/Pem.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
-  
--require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
-+require_once realpath(dirname(__FILE__) . '/../autoload.php');
- 
- /**
-  * Verifies signatures using PEM encoded certificates.
-diff --git a/tests/OAuthHelper.php b/tests/OAuthHelper.php
-index e83e3e5..1e36a4f 100644
---- a/tests/OAuthHelper.php
-+++ b/tests/OAuthHelper.php
-@@ -14,7 +14,7 @@
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
--require_once dirname(__FILE__) . '/../autoload.php';
-+require_once dirname(__FILE__) . '/../src/Google/autoload.php';
- 
- $client = new Google_Client();
- $client->setScopes(
-diff --git a/tests/bootstrap.php b/tests/bootstrap.php
-index e1783a0..327b974 100644
---- a/tests/bootstrap.php
-+++ b/tests/bootstrap.php
-@@ -15,7 +15,7 @@
-  * limitations under the License.
-  */
- 
--require_once dirname(__FILE__) . '/../autoload.php';
-+require_once dirname(__FILE__) . '/../src/Google/autoload.php';
- require_once dirname(__FILE__) . '/BaseTest.php';
- 
- date_default_timezone_set('UTC');
-diff --git a/README.md b/README.md
-index 7508aeb..752dad9 100644
---- a/README.md
-+++ b/README.md
-@@ -26,7 +26,7 @@ See the examples/ directory for examples of the key client features.
- ```PHP
- <?php
- 
--  require_once 'google-api-php-client/autoload.php'; // or wherever autoload.php is located
-+  require_once 'google-api-php-client/src/Google/autoload.php'; // or wherever autoload.php is located
-   
-   $client = new Google_Client();
-   $client->setApplicationName("Client_Library_Examples");
-diff --git a/autoload.php b/autoload.php
-index 3815c52..25af272 100644
---- a/autoload.php
-+++ b/autoload.php
-@@ -15,19 +15,12 @@
-  * limitations under the License.
-  */
- 
--function google_api_php_client_autoload($className) {
--  $classPath = explode('_', $className);
--  if ($classPath[0] != 'Google') {
--    return;
--  }
--  if (count($classPath) > 3) {
--    // Maximum class file path depth in this project is 3.
--    $classPath = array_slice($classPath, 0, 3);
--  }
--  $filePath = dirname(__FILE__) . '/src/' . implode('/', $classPath) . '.php';
--  if (file_exists($filePath)) {
--    require_once($filePath);
--  }
-+// PHP 5.2 compatibility: E_USER_DEPRECATED was added in 5.3
-+if (!defined('E_USER_DEPRECATED')) {
-+  define('E_USER_DEPRECATED', E_USER_WARNING);
- }
- 
--spl_autoload_register('google_api_php_client_autoload');
-+$error = "google-api-php-client's autoloader was moved to src/Google/autoload.php in 1.1.3. This ";
-+$error .= "redirect will be removed in 1.2. Please adjust your code to use the new location.";
-+trigger_error($error, E_USER_DEPRECATED);
-+require_once 'src/Google/autoload.php';
-diff --git a/src/Google/autoload.php b/src/Google/autoload.php
-new file mode 100644
-index 0000000..debdd27
---- /dev/null
-+++ b/src/Google/autoload.php
-@@ -0,0 +1,32 @@
-+<?php
-+/*
-+ * Copyright 2014 Google Inc.
-+ *
-+ * Licensed under the Apache License, Version 2.0 (the "License");
-+ * you may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ *     http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing, software
-+ * distributed under the License is distributed on an "AS IS" BASIS,
-+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+ * See the License for the specific language governing permissions and
-+ * limitations under the License.
-+ */
-+
-+function google_api_php_client_autoload($className) {
-+  $classPath = explode('_', $className);
-+  if ($classPath[0] != 'Google') {
-+    return;
-+  }
-+  // Drop 'Google', and maximum class file path depth in this project is 3.
-+  $classPath = array_slice($classPath, 1, 2);
-+
-+  $filePath = dirname(__FILE__) . '/' . implode('/', $classPath) . '.php';
-+  if (file_exists($filePath)) {
-+    require_once($filePath);
-+  }
-+}
-+
-+spl_autoload_register('google_api_php_client_autoload');
diff --git a/php-google-apiclient.spec b/php-google-apiclient.spec
index b102c61..42ef6d2 100644
--- a/php-google-apiclient.spec
+++ b/php-google-apiclient.spec
@@ -1,14 +1,34 @@
-%global github_owner   google
-%global github_name    google-api-php-client
-%global github_version 1.1.2
-%global github_commit  9c35bbbbaf04a5236d763560dab1e2f6e672a724
+#
+# RPM spec file for php-google-apiclient
+#
+# Copyright (c) 2014-2015 Shawn Iwinski <shawn.iwinski at gmail.com>
+#                         Adam Williamson <awilliam at redhat.com>
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
+# Please preserve changelog entries
+#
+
+%global github_owner     google
+%global github_name      google-api-php-client
+%global github_version   1.1.4
+%global github_commit    2adb5ba90612858d4add0342eee6b8b9aaca398d
+
+%global composer_vendor  google
+%global composer_project apiclient
 
 # "php": ">=5.2.1"
-%global php_min_ver    5.2.1
+%global php_min_ver 5.2.1
 
-Name:          php-google-apiclient
+# Build using "--without tests" to disable tests
+%global with_tests  %{?_without_tests:0}%{!?_without_tests:1}
+
+%{!?phpdir:  %global phpdir  %{_datadir}/php}
+
+Name:          php-%{composer_vendor}-%{composer_project}
 Version:       %{github_version}
-Release:       2%{?dist}
+Release:       1%{?dist}
 Summary:       Client library for Google APIs
 
 Group:         Development/Libraries
@@ -16,32 +36,36 @@ License:       ASL 2.0
 URL:           https://developers.google.com/api-client-library/php/
 Source0:       https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
 
-# Submitted upstream: https://github.com/google/google-api-php-client/pull/437
-# Relocate the autoloader added in 1.1, or else we can't sensibly package it
-# Rediffed against 1.1.2 (files have been moved/added upstream since)
-Patch0:        php-google-apiclient-1.1.2-move_autoloader.patch
-
 BuildArch:     noarch
-# For tests
+# Tests
+%if %{with_tests}
+## composer.json
 BuildRequires: php(language) >= %{php_min_ver}
 BuildRequires: %{_bindir}/phpunit
-# For tests: phpcompatinfo (computed from 1.0.3-beta)
+## phpcompatinfo (computed from version 1.1.4)
+BuildRequires: php-curl
 BuildRequires: php-date
 BuildRequires: php-json
 BuildRequires: php-openssl
+BuildRequires: php-pcre
 BuildRequires: php-reflection
 BuildRequires: php-spl
+%endif
 
-Requires:      php(language) >= %{php_min_ver}
 Requires:      ca-certificates
-# phpcompatinfo (computed from 1.0.3-beta)
+# composer.json
+Requires:      php(language) >= %{php_min_ver}
+# phpcompatinfo (computed from version 1.1.4)
+Requires:      php-curl
 Requires:      php-date
 Requires:      php-json
 Requires:      php-openssl
+Requires:      php-pcre
 Requires:      php-reflection
 Requires:      php-spl
 
-Provides:      php-composer(google/apiclient) = %{version}
+# Composer
+Provides:      php-composer(%{composer_vendor}/%{composer_project}) = %{version}
 
 %description
 Google APIs Client Library for PHP provides access to many Google APIs.
@@ -53,7 +77,7 @@ Optional:
 * php-pecl-memcache
 * php-pecl-memcached
 
-Examples available in the %{name}-examples package.
+Examples are available in the %{name}-examples package.
 
 
 %package examples
@@ -67,16 +91,15 @@ Requires: %{name} = %{version}-%{release}
 
 %prep
 %setup -qn %{github_name}-%{github_commit}
-%patch0 -p1
 
-# Replace bundled CA cert trust list with our systemwide one. This location
-# should work for EL6/7 and all supported Fedoras.
+: Unbundle CA cert
 rm -f src/Google/IO/cacerts.pem
 sed "s#dirname(__FILE__)\s*.\s*'/cacerts.pem'#'%{_sysconfdir}/pki/tls/certs/ca-bundle.crt'#" \
-    -i src/Google/IO/Stream.php src/Google/IO/Curl.php
+    -i src/Google/IO/{Stream,Curl}.php
 
-# Update examples' include path
-sed -i 's#../src#%{_datadir}/php#' examples/*.php
+: Update examples autoload require
+sed "s#.*require.*autoload.*#require_once '%{phpdir}/Google/autoload.php';#" \
+    -i examples/*.php
 
 
 %build
@@ -84,34 +107,45 @@ sed -i 's#../src#%{_datadir}/php#' examples/*.php
 
 
 %install
-mkdir -p %{buildroot}%{_datadir}/php
-cp -rp src/* %{buildroot}%{_datadir}/php/
+mkdir -p %{buildroot}%{phpdir}
+cp -rp src/* %{buildroot}%{phpdir}/
 
 
 %check
-# Skip tests requiring network access
-sed -e 's/function testBatchRequest/function SKIP_testBatchRequest/' \
-    -e 's/function testInvalidBatchRequest/function SKIP_testInvalidBatchRequest/' \
-    -i tests/general/ApiBatchRequestTest.php
+%if %{with_tests}
+: Skip tests requiring network access
+rm -f tests/general/ApiBatchRequestTest.php
 
-%{_bindir}/phpunit .
+: Run tests
+%{_bindir}/phpunit
 
-# Ensure unbundled CA cert is referenced
+: Ensure unbundled CA cert is referenced
 grep '%{_sysconfdir}/pki/tls/certs/ca-bundle.crt' --quiet \
-    %{buildroot}%{_datadir}/php/Google/IO/{Curl,Stream}.php
+    %{buildroot}%{phpdir}/Google/IO/{Curl,Stream}.php
+%else
+: Tests skipped
+%endif
 
 
-%files
 %{!?_licensedir:%global license %%doc}
+
+%files
 %license LICENSE
-%doc *.md composer.json
-%{_datadir}/php/Google
+%doc *.md
+%doc composer.json
+%{phpdir}/Google
 
 %files examples
 %doc examples/*
 
 
 %changelog
+* Fri May 22 2015 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.1.4-1
+- Updated to 1.1.4 (BZ #1222260)
+- Added spec license header
+- Removed autoload patch
+- Added option to build without tests
+
 * Fri Jan 02 2015 Adam Williamson <awilliam at redhat.com> - 1.1.2-2
 - update autoloader relocation patch to match latest upstream submission
 
@@ -120,7 +154,7 @@ grep '%{_sysconfdir}/pki/tls/certs/ca-bundle.crt' --quiet \
 - relocate autoloader to make it work with systemwide installation
 
 * Sat Dec 20 2014 Adam Williamson <awilliam at redhat.com> - 1.0.6-0.3.beta
-- use new %license directory
+- use new %%license directory
 - add Packagist/Composer provide
 
 * Fri Nov 07 2014 Adam Williamson <awilliam at redhat.com> - 1.0.6-0.2.beta
@@ -132,9 +166,9 @@ grep '%{_sysconfdir}/pki/tls/certs/ca-bundle.crt' --quiet \
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.3-0.3.beta
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
-* Wed Feb 19 2014 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.3-0.2.beta
+* Wed Feb 19 2014 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.0.3-0.2.beta
 - Backported commit c6949531d2399f81a5e15caf256f156dd68e00e9 for OwnCloud
 - Sub-packaged examples
 
-* Sat Feb 08 2014 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.3-0.1.beta
+* Sat Feb 08 2014 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.0.3-0.1.beta
 - Initial package
diff --git a/sources b/sources
index 8956798..7f2541e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-663de24d429633573e03cbc96959e4a9  php-google-apiclient-1.1.2-9c35bbbbaf04a5236d763560dab1e2f6e672a724.tar.gz
+e7744bb6727af8cddaf1a2401d34680f  php-google-apiclient-1.1.4-2adb5ba90612858d4add0342eee6b8b9aaca398d.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/php-google-apiclient.git/commit/?h=master&id=48233d7e0f02103e5693e9e090804e213167cacb


More information about the scm-commits mailing list