Skip to content

Commit

Permalink
Merge branch 'master' into nag_4_2
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Oct 31, 2013
2 parents bc595fa + 2ad5afe commit 0aa6b23
Show file tree
Hide file tree
Showing 29 changed files with 151 additions and 58 deletions.
30 changes: 28 additions & 2 deletions components/lib/Components/Runner/Release.php
Expand Up @@ -41,6 +41,13 @@ class Components_Runner_Release
*/
private $_output;

/**
* The QC tasks handler.
*
* @param Component_Release_Qc
*/
private $_qc;

/**
* The release tasks handler.
*
Expand All @@ -55,25 +62,44 @@ class Components_Runner_Release
* job.
* @param Component_Output $output The output handler.
* @param Component_Release_Tasks $release The tasks handler.
* @param Component_Qc_Tasks $qc QC tasks handler.
*/
public function __construct(
Components_Config $config,
Components_Output $output,
Components_Release_Tasks $release
Components_Release_Tasks $release,
Components_Qc_Tasks $qc
) {
$this->_config = $config;
$this->_output = $output;
$this->_release = $release;
$this->_qc = $qc;
}

public function run()
{
$component = $this->_config->getComponent();
$options = $this->_config->getOptions();

$sequence = array();

$pre_commit = false;

/* Require package unit tests to pass locally before committing. */
$unit = $this->_qc->getTask('unit', $component);
if (!$unit->validate($options)) {
$this->_output->info(
'Running ' . $unit->getName() . ' on ' . $component->getName() . "\n"
);

if ($unit->run($options)) {
$this->_output->warn('Aborting due to unit test errors.');
return;
}

$this->_output->ok('No problems found in unit test.');
}

if ($this->_doTask('timestamp')) {
$sequence[] = 'Timestamp';
$pre_commit = true;
Expand Down Expand Up @@ -144,7 +170,7 @@ public function run()
if (!empty($sequence)) {
$this->_release->run(
$sequence,
$this->_config->getComponent(),
$component,
$options
);
} else {
Expand Down
2 changes: 2 additions & 0 deletions components/package.xml
Expand Up @@ -22,6 +22,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Run unit tests before releasing a package.
* [mms] Composer file is now generated/updated before releasing.
* [mms] Add PHP Composer generator.
* [mms] Added PHPDCD QC test.
Expand Down Expand Up @@ -869,6 +870,7 @@
<date>2013-02-13</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Run unit tests before releasing a package.
* [mms] Composer file is now generated/updated before releasing.
* [mms] Add PHP Composer generator.
* [mms] Added PHPDCD QC test.
Expand Down
5 changes: 3 additions & 2 deletions framework/Core/lib/Horde/ErrorHandler.php
Expand Up @@ -28,7 +28,7 @@ static public function fatal($error)
switch (get_class($error)) {
case 'Horde_Exception_AuthenticationFailure':
if ($registry->isAuthenticated(array('app' => $error->application, 'notransparent' => true)) &&
$registry->clearAuthApp($error->application)) {
!$registry->clearAuthApp($error->application)) {
break;
}

Expand All @@ -50,6 +50,7 @@ static public function fatal($error)
switch ($error->getCode()) {
case Horde_Auth::REASON_MESSAGE:
$params['msg'] = $error->getMessage();
$params['reason'] = $error->getCode();
break;
}

Expand All @@ -59,7 +60,7 @@ static public function fatal($error)
* issues on the login page since we would otherwise need
* to do session token checking (which might not be
* available, so logout won't happen, etc...) */
if (isset($params['app'])) {
if (array_key_exists($params, 'app')) {
$registry->clearAuth();
}

Expand Down
2 changes: 1 addition & 1 deletion framework/Core/lib/Horde/PageOutput.php
Expand Up @@ -213,7 +213,7 @@ public function includeScriptFiles()
$all_scripts[] = strval($val->url);
}

if ($this->ajax || $this->growler) {
if (($this->ajax || $this->growler) && $all_scripts) {
$jsvars['HordeCore.jsfiles'] = $all_scripts;
}

Expand Down
5 changes: 3 additions & 2 deletions framework/Imap_Client/composer.json
Expand Up @@ -11,8 +11,8 @@
"role": "lead"
}
],
"version": "2.15.6",
"time": "2013-10-11",
"version": "2.16.0",
"time": "2013-10-30",
"repositories": [
{
"type": "pear",
Expand All @@ -24,6 +24,7 @@
"pear-pear.horde.org/Horde_Exception": ">=2.0.0@stable,<=3.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Mail": ">=2.0.0@stable,<=3.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Mime": ">=2.0.0@stable,<=3.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Socket_Client": ">=1.1.0@stable,<=2.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Stream": ">=1.0.0@stable,<=2.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Secret": ">=2.0.0@stable,<=3.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Stream_Filter": ">=2.0.0@stable,<=3.0.0alpha1@stable",
Expand Down
6 changes: 6 additions & 0 deletions framework/Imap_Client/doc/Horde/Imap/Client/UPGRADING
Expand Up @@ -14,6 +14,12 @@ This lists the API changes between releases of the package.
Upgrading to 2.16.0
===================

- Horde_Imap_Client_Base

- Constructor

Added 'tlsv1' option for the 'secure' configuration parameter.

- Horde_Imap_Client_Password_Xoauth2

Added class to abstract production of the necessary token for XOAUTH2 SASL
Expand Down
8 changes: 6 additions & 2 deletions framework/Imap_Client/lib/Horde/Imap/Client/Base.php
Expand Up @@ -251,8 +251,12 @@ abstract class Horde_Imap_Client_Base implements Serializable
* <li>'ssl' (Auto-detect SSL version)</li>
* <li>'sslv2' (Force SSL version 3)</li>
* <li>'sslv3' (Force SSL version 2)</li>
* <li>'tls' (TLS)</li>
* <li>true (TLS if available/necessary) [since 2.15.0]</li>
* <li>'tls' (TLS; started via protocol-level negotation over
* unencrypted channel; RECOMMENDED way of initiating secure
* connection)
* <li>'tlsv1' (TLS direct version 1.x connection to server) [@since
* 2.16.0]</li>
* <li>true (TLS if available/necessary) [@since 2.15.0]</li>
* </ul>
* DEFAULT: false</li>
* </li>
Expand Down
2 changes: 1 addition & 1 deletion framework/Imap_Client/lib/Horde/Imap/Client/Socket.php
Expand Up @@ -565,7 +565,7 @@ protected function _connect()
Horde_Imap_Client_Translation::t("Error connecting to mail server."),
Horde_Imap_Client_Exception::SERVER_CONNECT
);
$e2->details($e->details);
$e2->details = $e->details;
throw $e2;
}

Expand Down
Expand Up @@ -284,7 +284,7 @@ protected function _connect()
Horde_Imap_Client_Translation::t("Error connecting to mail server."),
Horde_Imap_Client_Exception::SERVER_CONNECT
);
$e2->details($e->details);
$e2->details = $e->details;
throw $e2;
}

Expand Down
27 changes: 19 additions & 8 deletions framework/Imap_Client/package.xml
Expand Up @@ -10,9 +10,9 @@
<email>slusarz@horde.org</email>
<active>yes</active>
</lead>
<date>2013-10-25</date>
<date>2013-10-30</date>
<version>
<release>2.16.0</release>
<release>2.16.1</release>
<api>2.16.0</api>
</version>
<stability>
Expand All @@ -21,10 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Use SHA-1 instead of MD5 for internal hashing.
* [mms] Correctly handle untagged BAD IMAP responses.
* [mms] Added Horde_Imap_Client_Password_Xoauth2 class.
* [mms] Fix harmless PHP undefined error when using with an IMAP server that supports XOAUTH2.
*
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -293,7 +290,7 @@
<package>
<name>Horde_Socket_Client</name>
<channel>pear.horde.org</channel>
<min>1.0.0</min>
<min>1.1.0</min>
<max>2.0.0alpha1</max>
<exclude>2.0.0alpha1</exclude>
</package>
Expand Down Expand Up @@ -2053,14 +2050,28 @@
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-10-25</date>
<date>2013-10-30</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Added direct TLS v1.x connection option when connecting to remote server.
* [mms] Use SHA-1 instead of MD5 for internal hashing.
* [mms] Correctly handle untagged BAD IMAP responses.
* [mms] Added Horde_Imap_Client_Password_Xoauth2 class.
* [mms] Fix harmless PHP undefined error when using with an IMAP server that supports XOAUTH2.
</notes>
</release>
<release>
<version>
<release>2.16.1</release>
<api>2.16.0</api></version>
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-10-30</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
</notes>
</release>
</changelog>
</package>
Expand Up @@ -25,7 +25,6 @@
*/
class Horde_Imap_Client_Xoauth2Test extends PHPUnit_Framework_TestCase
{

public function testTokenGeneration()
{
// Example from https://developers.google.com/gmail/xoauth2_protocol
Expand Down
2 changes: 1 addition & 1 deletion framework/Pack/lib/Horde/Pack.php
Expand Up @@ -142,7 +142,7 @@ public function unpack($data)
{
if ($data && is_string($data)) {
$mask = unpack('C*', $data[0]);
$mask = $mask[0];
$mask = reset($mask);
$data = substr($data, 1);

if ($mask & self::COMPRESS_MASK) {
Expand Down
6 changes: 3 additions & 3 deletions framework/Smtp/composer.json
Expand Up @@ -11,8 +11,8 @@
"role": "lead"
}
],
"version": "1.2.6",
"time": "2013-10-22",
"version": "1.3.0",
"time": "2013-10-30",
"repositories": [
{
"type": "pear",
Expand All @@ -23,7 +23,7 @@
"php": ">=5.3.0",
"pear-pear.horde.org/Horde_Exception": ">=2.0.0@stable,<=3.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Mail": ">=2.0.0@stable,<=3.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Socket_Client": ">=1.0.0@stable,<=2.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Socket_Client": ">=1.1.0@stable,<=2.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Support": ">=2.0.0@stable,<=3.0.0alpha1@stable"
},
"suggest": {
Expand Down
6 changes: 6 additions & 0 deletions framework/Smtp/doc/Horde/Smtp/UPGRADING
Expand Up @@ -14,6 +14,12 @@ This lists the API changes between releases of the package.
Upgrading to 1.3.0
==================

- Horde_Imap_Client_Base

- Constructor

Added 'tlsv1' option for the 'secure' configuration parameter.

- Horde_Smtp_Password_Xoauth2

Added class to abstract production of the necessary token for XOAUTH2 SASL
Expand Down
10 changes: 7 additions & 3 deletions framework/Smtp/lib/Horde/Smtp.php
Expand Up @@ -106,13 +106,17 @@ class Horde_Smtp implements Serializable
* </li>
* <li>
* secure: (string) Use SSL or TLS to connect.
* DEFAULT: true (use TLS, if available)
* DEFAULT: true (use 'tls' option, if available)
* <ul>
* <li>false (No encryption)</li>
* <li>'ssl' (Auto-detect SSL version)</li>
* <li>'sslv2' (Force SSL version 3)</li>
* <li>'sslv3' (Force SSL version 2)</li>
* <li>'tls' (TLS)</li>
* <li>'tls' (TLS; started via protocol-level negotation over
* unencrypted channel; RECOMMENDED way of initiating secure
* connection)
* <li>'tlsv1' (TLS direct version 1.x connection to server) [@since
* 1.3.0]</li>
* <li>true (Use TLS, if available) [@since 1.2.0]</li>
* </ul>
* </li>
Expand Down Expand Up @@ -346,7 +350,7 @@ public function login()
Horde_Smtp_Translation::t("Error connecting to SMTP server."),
Horde_Smtp_Exception::SERVER_CONNECT
);
$e2->details($e->details);
$e2->details = $e->details;
throw $e2;
}

Expand Down
24 changes: 19 additions & 5 deletions framework/Smtp/package.xml
Expand Up @@ -10,9 +10,9 @@
<email>slusarz@horde.org</email>
<active>yes</active>
</lead>
<date>2013-10-25</date>
<date>2013-10-30</date>
<version>
<release>1.3.0</release>
<release>1.3.1</release>
<api>1.3.0</api>
</version>
<stability>
Expand All @@ -21,7 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Added Horde_Smtp_Password_Xoauth2 class.
*
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -96,7 +96,7 @@
<package>
<name>Horde_Socket_Client</name>
<channel>pear.horde.org</channel>
<min>1.0.0</min>
<min>1.1.0</min>
<max>2.0.0alpha1</max>
<exclude>2.0.0alpha1</exclude>
</package>
Expand Down Expand Up @@ -287,11 +287,25 @@
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-10-25</date>
<date>2013-10-30</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Added direct TLS v1.x connection option when connecting to remote server.
* [mms] Added Horde_Smtp_Password_Xoauth2 class.
</notes>
</release>
<release>
<version>
<release>1.3.1</release>
<api>1.3.0</api></version>
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-10-30</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
</notes>
</release>
</changelog>
</package>
4 changes: 2 additions & 2 deletions framework/Socket_Client/composer.json
Expand Up @@ -11,8 +11,8 @@
"role": "lead"
}
],
"version": "1.0.0",
"time": "2013-10-19",
"version": "1.1.0",
"time": "2013-10-30",
"repositories": [
{
"type": "pear",
Expand Down

0 comments on commit 0aa6b23

Please sign in to comment.