Hello community,

here is the log from the commit of package php5-pear-phpunit-Text_Template for 
openSUSE:Factory checked in at 2013-08-18 22:39:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/php5-pear-phpunit-Text_Template (Old)
 and      /work/SRC/openSUSE:Factory/.php5-pear-phpunit-Text_Template.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "php5-pear-phpunit-Text_Template"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/php5-pear-phpunit-Text_Template/php5-pear-phpunit-Text_Template.changes
  2012-02-29 14:10:41.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.php5-pear-phpunit-Text_Template.new/php5-pear-phpunit-Text_Template.changes
     2013-08-18 22:39:16.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Aug  4 21:23:25 UTC 2013 - [email protected]
+
+- Updated to version 1.1.4
+ - Improved error message in case `renderTo()` cannot write to 
+   the target file  
+
+-------------------------------------------------------------------

Old:
----
  Text_Template-1.1.1.tgz

New:
----
  Text_Template-1.1.4.tgz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ php5-pear-phpunit-Text_Template.spec ++++++
--- /var/tmp/diff_new_pack.f1tPdN/_old  2013-08-18 22:39:16.000000000 +0200
+++ /var/tmp/diff_new_pack.f1tPdN/_new  2013-08-18 22:39:16.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package php5-pear-phpunit-Text_Template
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,15 +16,14 @@
 #
 
 
-
 Name:           php5-pear-phpunit-Text_Template
 %define pear_name  Text_Template
 %define pear_sname text_template
 Summary:        Simple template engine
-Version:        1.1.1
-Release:        1
 License:        BSD-3-Clause
 Group:          Development/Libraries/PHP
+Version:        1.1.4
+Release:        0
 Source0:        http://pear.phpunit.de/get/%{pear_name}-%{version}.tgz
 Url:            http://pear.phpunit.de/
 Requires:       php5-pear-channel-phpunit
@@ -36,13 +35,14 @@
 BuildArch:      noarch
 
 # Fix for renaming (package convention)
-Provides:       php5-pear-%{pear_sname} = %{version}
-Provides:       php-pear-%{pear_sname} = %{version}
-Provides:       php-pear-%{pear_name} pear-%{pear_name}
+Provides:       pear-%{pear_name}
 Provides:       pear-%{pear_sname} = %{version}
-Obsoletes:      php5-pear-%{pear_sname} < %{version}
-Obsoletes:      php-pear-%{pear_sname} < %{version}
+Provides:       php-pear-%{pear_name}
+Provides:       php-pear-%{pear_sname} = %{version}
+Provides:       php5-pear-%{pear_sname} = %{version}
 Obsoletes:      pear-%{pear_sname} < %{version}
+Obsoletes:      php-pear-%{pear_sname} < %{version}
+Obsoletes:      php5-pear-%{pear_sname} < %{version}
 
 %description
 This is a simple template engine which is used in phpunit.

++++++ Text_Template-1.1.1.tgz -> Text_Template-1.1.4.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.1/ChangeLog.markdown 
new/Text_Template-1.1.1/ChangeLog.markdown
--- old/Text_Template-1.1.1/ChangeLog.markdown  2011-11-22 14:00:08.000000000 
+0100
+++ new/Text_Template-1.1.1/ChangeLog.markdown  1970-01-01 01:00:00.000000000 
+0100
@@ -1,9 +0,0 @@
-Text_Template 1.1
-=================
-
-This is the list of changes for the Text_Template 1.1 release series.
-
-Text_Template 1.1.1
--------------------
-
-* No changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.1/LICENSE 
new/Text_Template-1.1.1/LICENSE
--- old/Text_Template-1.1.1/LICENSE     2011-11-22 14:00:08.000000000 +0100
+++ new/Text_Template-1.1.1/LICENSE     1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-Text_Template
-
-Copyright (c) 2009-2011, Sebastian Bergmann <[email protected]>.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in
-   the documentation and/or other materials provided with the
-   distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
-   contributors may be used to endorse or promote products derived
-   from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.1/README.markdown 
new/Text_Template-1.1.1/README.markdown
--- old/Text_Template-1.1.1/README.markdown     2011-11-22 14:00:08.000000000 
+0100
+++ new/Text_Template-1.1.1/README.markdown     1970-01-01 01:00:00.000000000 
+0100
@@ -1,23 +0,0 @@
-Text_Template
-=============
-
-Installation
-------------
-
-Text_Template should be installed using the [PEAR 
Installer](http://pear.php.net/). This installer is the backbone of PEAR, which 
provides a distribution system for PHP packages, and is shipped with every 
release of PHP since version 4.3.0.
-
-The PEAR channel (`pear.phpunit.de`) that is used to distribute Text_Template 
needs to be registered with the local PEAR environment:
-
-    sb@ubuntu ~ % pear channel-discover pear.phpunit.de
-    Adding Channel "pear.phpunit.de" succeeded
-    Discovery of channel "pear.phpunit.de" succeeded
-
-This has to be done only once. Now the PEAR Installer can be used to install 
packages from the PHPUnit channel:
-
-    sb@vmware ~ % pear install phpunit/Text_Template
-    downloading Text_Template-1.0.0.tgz ...
-    Starting to download Text_Template-1.0.0.tgz (2,493 bytes)
-    ....done: 2,493 bytes
-    install ok: channel://pear.phpunit.de/Text_Template-1.0.0
-
-After the installation you can find the Text_Template source files inside your 
local PEAR directory; the path is usually `/usr/lib/php/Text`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.1/Text/Template/Autoload.php 
new/Text_Template-1.1.1/Text/Template/Autoload.php
--- old/Text_Template-1.1.1/Text/Template/Autoload.php  2011-11-22 
14:00:08.000000000 +0100
+++ new/Text_Template-1.1.1/Text/Template/Autoload.php  1970-01-01 
01:00:00.000000000 +0100
@@ -1,75 +0,0 @@
-<?php
-/**
- * Text_Template
- *
- * Copyright (c) 2009-2010, Sebastian Bergmann <[email protected]>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *   * Neither the name of Sebastian Bergmann nor the names of his
- *     contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @category   Text
- * @package    Template
- * @author     Sebastian Bergmann <[email protected]>
- * @copyright  2009-2010 Sebastian Bergmann <[email protected]>
- * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
- * @link       http://github.com/sebastianbergmann/php-text-template
- * @since      File available since Release 1.1.0
- */
-
-function text_template_autoload($class = NULL) {
-    static $classes = NULL;
-    static $path = NULL;
-
-    if ($classes === NULL) {
-        $classes = array(
-          'text_template' => '/Template.php'
-        );
-
-        $path = dirname(dirname(__FILE__));
-    }
-
-    if ($class === NULL) {
-        $result = array(__FILE__);
-
-        foreach ($classes as $file) {
-            $result[] = $path . $file;
-        }
-
-        return $result;
-    }
-
-    $cn = strtolower($class);
-
-    if (isset($classes[$cn])) {
-        require $path . $classes[$cn];
-    }
-}
-
-spl_autoload_register('text_template_autoload');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.1/Text/Template.php 
new/Text_Template-1.1.1/Text/Template.php
--- old/Text_Template-1.1.1/Text/Template.php   2011-11-22 14:00:08.000000000 
+0100
+++ new/Text_Template-1.1.1/Text/Template.php   1970-01-01 01:00:00.000000000 
+0100
@@ -1,153 +0,0 @@
-<?php
-/**
- * Text_Template
- *
- * Copyright (c) 2009-2011, Sebastian Bergmann <[email protected]>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *
- *   * Neither the name of Sebastian Bergmann nor the names of his
- *     contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * @category   Text
- * @package    Template
- * @author     Sebastian Bergmann <[email protected]>
- * @copyright  2009-2011 Sebastian Bergmann <[email protected]>
- * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
- * @link       http://github.com/sebastianbergmann/php-text-template
- * @since      File available since Release 1.0.0
- */
-
-/**
- * A simple template engine.
- *
- * @category   Text
- * @package    Template
- * @author     Sebastian Bergmann <[email protected]>
- * @copyright  2009-2011 Sebastian Bergmann <[email protected]>
- * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
- * @version    Release: 1.1.1
- * @link       http://github.com/sebastianbergmann/php-text-template
- * @since      Class available since Release 1.0.0
- */
-class Text_Template
-{
-    /**
-     * @var string
-     */
-    protected $template = '';
-
-    /**
-     * @var array
-     */
-    protected $values = array();
-
-    /**
-     * Constructor.
-     *
-     * @param  string $file
-     * @throws InvalidArgumentException
-     */
-    public function __construct($file = '')
-    {
-        $this->setFile($file);
-    }
-
-    /**
-     * Sets the template file.
-     *
-     * @param  string $file
-     * @throws InvalidArgumentException
-     */
-    public function setFile($file)
-    {
-        $distFile = $file . '.dist';
-
-        if (file_exists($file)) {
-            $this->template = file_get_contents($file);
-        }
-
-        else if (file_exists($distFile)) {
-            $this->template = file_get_contents($distFile);
-        }
-
-        else {
-            throw new InvalidArgumentException(
-              'Template file could not be loaded.'
-            );
-        }
-    }
-
-    /**
-     * Sets one or more template variables.
-     *
-     * @param  array   $values
-     * @param  boolean $merge
-     */
-    public function setVar(array $values, $merge = TRUE)
-    {
-        if (!$merge || empty($this->values)) {
-            $this->values = $values;
-        } else {
-            $this->values = array_merge($this->values, $values);
-        }
-    }
-
-    /**
-     * Renders the template and returns the result.
-     *
-     * @return string
-     */
-    public function render()
-    {
-        $keys = array();
-
-        foreach ($this->values as $key => $value) {
-            $keys[] = '{' . $key . '}';
-        }
-
-        return str_replace($keys, $this->values, $this->template);
-    }
-
-    /**
-     * Renders the template and writes the result to a file.
-     *
-     * @param string $target
-     */
-    public function renderTo($target)
-    {
-        $fp = @fopen($target, 'wt');
-
-        if ($fp) {
-            fwrite($fp, $this->render());
-            fclose($fp);
-        } else {
-            throw new RuntimeException('Could not write to ' . $target . '.');
-        }
-    }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.4/ChangeLog.markdown 
new/Text_Template-1.1.4/ChangeLog.markdown
--- old/Text_Template-1.1.4/ChangeLog.markdown  1970-01-01 01:00:00.000000000 
+0100
+++ new/Text_Template-1.1.4/ChangeLog.markdown  2012-10-31 19:15:30.000000000 
+0100
@@ -0,0 +1,24 @@
+Text_Template 1.1
+=================
+
+This is the list of changes for the Text_Template 1.1 release series.
+
+Text_Template 1.1.4
+-------------------
+
+* Improved error message in case `renderTo()` cannot write to the target file.
+
+Text_Template 1.1.3
+-------------------
+
+* No changes.
+
+Text_Template 1.1.2
+-------------------
+
+* No changes.
+
+Text_Template 1.1.1
+-------------------
+
+* No changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.4/LICENSE 
new/Text_Template-1.1.4/LICENSE
--- old/Text_Template-1.1.4/LICENSE     1970-01-01 01:00:00.000000000 +0100
+++ new/Text_Template-1.1.4/LICENSE     2012-10-31 19:15:30.000000000 +0100
@@ -0,0 +1,33 @@
+Text_Template
+
+Copyright (c) 2009-2012, Sebastian Bergmann <[email protected]>.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+ * Neither the name of Sebastian Bergmann nor the names of his
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.4/README.markdown 
new/Text_Template-1.1.4/README.markdown
--- old/Text_Template-1.1.4/README.markdown     1970-01-01 01:00:00.000000000 
+0100
+++ new/Text_Template-1.1.4/README.markdown     2012-10-31 19:15:30.000000000 
+0100
@@ -0,0 +1,23 @@
+Text_Template
+=============
+
+Installation
+------------
+
+Text_Template should be installed using the [PEAR 
Installer](http://pear.php.net/). This installer is the backbone of PEAR, which 
provides a distribution system for PHP packages, and is shipped with every 
release of PHP since version 4.3.0.
+
+The PEAR channel (`pear.phpunit.de`) that is used to distribute Text_Template 
needs to be registered with the local PEAR environment:
+
+    sb@ubuntu ~ % pear channel-discover pear.phpunit.de
+    Adding Channel "pear.phpunit.de" succeeded
+    Discovery of channel "pear.phpunit.de" succeeded
+
+This has to be done only once. Now the PEAR Installer can be used to install 
packages from the PHPUnit channel:
+
+    sb@vmware ~ % pear install phpunit/Text_Template
+    downloading Text_Template-1.0.0.tgz ...
+    Starting to download Text_Template-1.0.0.tgz (2,493 bytes)
+    ....done: 2,493 bytes
+    install ok: channel://pear.phpunit.de/Text_Template-1.0.0
+
+After the installation you can find the Text_Template source files inside your 
local PEAR directory; the path is usually `/usr/lib/php/Text`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.4/Text/Template/Autoload.php 
new/Text_Template-1.1.4/Text/Template/Autoload.php
--- old/Text_Template-1.1.4/Text/Template/Autoload.php  1970-01-01 
01:00:00.000000000 +0100
+++ new/Text_Template-1.1.4/Text/Template/Autoload.php  2012-10-31 
19:15:30.000000000 +0100
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Text_Template
+ *
+ * Copyright (c) 2009-2010, Sebastian Bergmann <[email protected]>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Text
+ * @package    Template
+ * @author     Sebastian Bergmann <[email protected]>
+ * @copyright  2009-2010 Sebastian Bergmann <[email protected]>
+ * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 
3-Clause License
+ * @link       http://github.com/sebastianbergmann/php-text-template
+ * @since      File available since Release 1.1.0
+ */
+
+spl_autoload_register(
+  function ($class) {
+      static $classes = NULL;
+      static $path = NULL;
+
+      if ($classes === NULL) {
+          $classes = array(
+            'text_template' => '/Template.php'
+          );
+
+          $path = dirname(dirname(__FILE__));
+      }
+
+      $cn = strtolower($class);
+
+      if (isset($classes[$cn])) {
+          require $path . $classes[$cn];
+      }
+  }
+);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Text_Template-1.1.4/Text/Template.php 
new/Text_Template-1.1.4/Text/Template.php
--- old/Text_Template-1.1.4/Text/Template.php   1970-01-01 01:00:00.000000000 
+0100
+++ new/Text_Template-1.1.4/Text/Template.php   2012-10-31 19:15:30.000000000 
+0100
@@ -0,0 +1,164 @@
+<?php
+/**
+ * Text_Template
+ *
+ * Copyright (c) 2009-2012, Sebastian Bergmann <[email protected]>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   * Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in
+ *     the documentation and/or other materials provided with the
+ *     distribution.
+ *
+ *   * Neither the name of Sebastian Bergmann nor the names of his
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Text
+ * @package    Template
+ * @author     Sebastian Bergmann <[email protected]>
+ * @copyright  2009-2012 Sebastian Bergmann <[email protected]>
+ * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 
3-Clause License
+ * @link       http://github.com/sebastianbergmann/php-text-template
+ * @since      File available since Release 1.0.0
+ */
+
+/**
+ * A simple template engine.
+ *
+ * @category   Text
+ * @package    Template
+ * @author     Sebastian Bergmann <[email protected]>
+ * @copyright  2009-2012 Sebastian Bergmann <[email protected]>
+ * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 
3-Clause License
+ * @version    Release: 1.1.4
+ * @link       http://github.com/sebastianbergmann/php-text-template
+ * @since      Class available since Release 1.0.0
+ */
+class Text_Template
+{
+    /**
+     * @var string
+     */
+    protected $template = '';
+
+    /**
+     * @var array
+     */
+    protected $values = array();
+
+    /**
+     * Constructor.
+     *
+     * @param  string $file
+     * @throws InvalidArgumentException
+     */
+    public function __construct($file = '')
+    {
+        $this->setFile($file);
+    }
+
+    /**
+     * Sets the template file.
+     *
+     * @param  string $file
+     * @throws InvalidArgumentException
+     */
+    public function setFile($file)
+    {
+        $distFile = $file . '.dist';
+
+        if (file_exists($file)) {
+            $this->template = file_get_contents($file);
+        }
+
+        else if (file_exists($distFile)) {
+            $this->template = file_get_contents($distFile);
+        }
+
+        else {
+            throw new InvalidArgumentException(
+              'Template file could not be loaded.'
+            );
+        }
+    }
+
+    /**
+     * Sets one or more template variables.
+     *
+     * @param  array   $values
+     * @param  boolean $merge
+     */
+    public function setVar(array $values, $merge = TRUE)
+    {
+        if (!$merge || empty($this->values)) {
+            $this->values = $values;
+        } else {
+            $this->values = array_merge($this->values, $values);
+        }
+    }
+
+    /**
+     * Renders the template and returns the result.
+     *
+     * @return string
+     */
+    public function render()
+    {
+        $keys = array();
+
+        foreach ($this->values as $key => $value) {
+            $keys[] = '{' . $key . '}';
+        }
+
+        return str_replace($keys, $this->values, $this->template);
+    }
+
+    /**
+     * Renders the template and writes the result to a file.
+     *
+     * @param string $target
+     */
+    public function renderTo($target)
+    {
+        $fp = @fopen($target, 'wt');
+
+        if ($fp) {
+            fwrite($fp, $this->render());
+            fclose($fp);
+        } else {
+            $error = error_get_last();
+
+            throw new RuntimeException(
+              sprintf(
+                'Could not write to %s: %s',
+                $target,
+                substr(
+                  $error['message'],
+                  strpos($error['message'], ':') + 2
+                )
+              )
+            );
+        }
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package.sig new/package.sig
--- old/package.sig     2011-11-22 14:00:25.000000000 +0100
+++ new/package.sig     2012-10-31 19:15:35.000000000 +0100
@@ -1,7 +1,7 @@
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.11 (GNU/Linux)
+Version: GnuPG v1.4.12 (GNU/Linux)
 
-iEYEABECAAYFAk7LnOkACgkQaGfFFLhbXWkLmgCbBd8sMCM9B3AReA+C4N/IJL3z
-JOcAn3vkGZA1o/200i3DM6P1nM5Vo+vE
-=CYsz
+iEYEABECAAYFAlCRascACgkQaGfFFLhbXWlQCACghbpDujlMpwkGkNkcfel+tiRw
+WUkAnjYrROXCdwC9ni+zaSoFPF0ccIFe
+=EGTL
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package.xml new/package.xml
--- old/package.xml     2011-11-22 14:00:09.000000000 +0100
+++ new/package.xml     2012-10-31 19:15:30.000000000 +0100
@@ -10,37 +10,37 @@
   <email>[email protected]</email>
   <active>yes</active>
  </lead>
- <date>2011-11-22</date>
- <time>13:00:08</time>
+ <date>2012-10-31</date>
+ <time>18:15:30</time>
  <version>
-  <release>1.1.1</release>
+  <release>1.1.4</release>
   <api>1.1.0</api>
  </version>
  <stability>
   <release>stable</release>
   <api>stable</api>
  </stability>
- <license>BSD License</license>
+ <license>The BSD 3-Clause License</license>
  <notes>
 http://github.com/sebastianbergmann/php-text-template
  </notes>
  <contents>
   <dir name="/">
-   <file baseinstalldir="/" md5sum="2c7d566eb901074864ea92c436d729b3" 
name="Text/Template/Autoload.php" role="php">
+   <file baseinstalldir="/" md5sum="6da5bf6db3f685737de8e554552a5956" 
name="Text/Template/Autoload.php" role="php">
     <tasks:replace from="@package_version@" to="version" type="package-info" />
    </file>
-   <file baseinstalldir="/" md5sum="aea0d8e6d5ee9cfabc3441471ed08d91" 
name="Text/Template.php" role="php">
+   <file baseinstalldir="/" md5sum="f30ad1537dd599c0e89d51f29341a437" 
name="Text/Template.php" role="php">
     <tasks:replace from="@package_version@" to="version" type="package-info" />
    </file>
-   <file baseinstalldir="/" md5sum="e3976e367d3ebb37530c5e1cd43a67e1" 
name="ChangeLog.markdown" role="doc" />
-   <file baseinstalldir="/" md5sum="adae9e141011fb398db7af14223cb1d7" 
name="LICENSE" role="doc" />
+   <file baseinstalldir="/" md5sum="30429fcbbd44b2c7dee2aa5637ac39c0" 
name="ChangeLog.markdown" role="doc" />
+   <file baseinstalldir="/" md5sum="84b6e7543a08a02226b45f451d392cb1" 
name="LICENSE" role="doc" />
    <file baseinstalldir="/" md5sum="0fe5865860d9d76ffb01a4fb31daf518" 
name="README.markdown" role="doc" />
   </dir>
  </contents>
  <dependencies>
   <required>
    <php>
-    <min>5.2.7</min>
+    <min>5.3.3</min>
    </php>
    <pearinstaller>
     <min>1.9.4</min>

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to