Permalink
Browse files

Updating version for UA string. Fixing test that was not mocked corre…

…ctly. Updating build process.
  • Loading branch information...
1 parent 5a7d436 commit 95bd5309ad9e42dc6bdfbe868a1f91a574e31921 @mtdowling mtdowling committed Jun 27, 2012
Showing with 94 additions and 52 deletions.
  1. +3 −0 .gitignore
  2. +6 −1 CHANGELOG.md
  3. +1 −1 README.md
  4. +78 −48 build.xml
  5. +4 −0 phpunit.xml.dist
  6. +1 −1 src/Guzzle/Common/Version.php
  7. +1 −1 tests/Guzzle/Tests/Service/Command/CommandTest.php
View
@@ -14,3 +14,6 @@ composer.phar
composer.lock
composer-test.lock
vendor/
+
+# Ignore build files
+build/
View
@@ -1,7 +1,12 @@
CHANGELOG
=========
-* 2.7.0 (06-10-2012)
+* 2.7.1 (06-26-2012)
+
+ * Minor patch to update version number in UA string
+ * Updating build process
+
+* 2.7.0 (06-25-2012)
* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes.
* BC: Removed magic setX methods from commands
View
@@ -30,7 +30,7 @@ The recommended way to install Guzzle is through [Composer](http://getcomposer.o
}
}
- Consider tightening your dependencies to a known version when deploying mission critical applications (e.g. ``2.0.*``).
+ Consider tightening your dependencies to a known version when deploying mission critical applications (e.g. ``2.7.*``).
2. Download and install Composer:
View
126 build.xml
@@ -1,63 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="guzzle" default="package">
- <target name="test-init" description="Initialize test dependencies">
- <echo message="Updating composer" />
- <available file="composer.phar" property="composer_exists" value="Yes" />
- <if>
- <equals arg1="${composer_exists}" arg2="Yes" />
- <then></then>
- <else>
- <echo message="Installing composer" />
- <exec command="curl -s http://getcomposer.org/installer | php" passthru="true" />
- </else>
- </if>
- <exec command="php composer.phar install --dev" passthru="true" />
- <copy file="phpunit.xml.dist" tofile="phpunit.xml" overwrite="false" />
+ <property name="dir.output" value="${project.basedir}/build/artifacts" />
+
+ <target name="tag">
+ <echo>Not yet implemented</echo>
</target>
- <target name="phar" description="Deprecated phing method name">
- <phingCall target="package" />
+ <target name="test" description="Run unit tests" depends="test-init">
+ <exec passthru="true" command="phpunit" />
</target>
- <target name="package" description="Create a phar with an autoloader">
- <phingcall target="test-init" />
+ <target name="test-init" depends="install-dependencies" description="Initialize test dependencies">
+ <copy file="phpunit.xml.dist" tofile="phpunit.xml" overwrite="false" />
+ </target>
+
+ <target name="install-dependencies">
<if>
- <equals arg1="${min}" arg2="true" />
+ <available file="composer.phar" />
<then>
- <pharpackage
- destfile="./guzzle-min.phar"
- basedir="."
- stub="phar-stub-min.php"
- signature="md5">
- <fileset dir=".">
- <include name="src/**/*.php" />
- </fileset>
- <metadata>
- <element name="author" value="Michael Dowling" />
- </metadata>
- </pharpackage>
- <exec command="php -d guzzle_phar=guzzle-min.phar `which phpunit`" passthru="true" />
+ <echo>Composer is installed</echo>
</then>
<else>
- <pharpackage
- destfile="./guzzle.phar"
- basedir="."
- stub="phar-stub.php"
- signature="md5">
- <fileset dir=".">
- <include name="src/**/*.php" />
- <include name="vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php" />
- <include name="vendor/symfony/event-dispatcher/**/*.php" />
- <include name="vendor/doctrine/common/lib/Doctrine/Common/Cache/*.php" />
- <include name="vendor/monolog/monolog/src/**/*.php" />
- </fileset>
- <metadata>
- <element name="author" value="Michael Dowling" />
- </metadata>
- </pharpackage>
- <exec command="php -d guzzle_phar=guzzle.phar `which phpunit`" passthru="true" />
+ <echo message="Installing composer" />
+ <exec command="curl -s http://getcomposer.org/installer | php" passthru="true" />
+ <exec command="php composer.phar install --dev" passthru="true" />
</else>
</if>
</target>
+
+ <target name="clean-dependencies">
+ <delete dir="${project.basedir}/vendor"/>
+ <delete file="composer.lock" />
+ </target>
+
+ <target name="update-dependencies">
+ <exec command="php composer.phar update --dev" passthru="true" />
+ </target>
+
+ <target name="clean">
+ <delete dir="${dir.output}"/>
+ </target>
+
+ <target name="prepare" depends="clean,test-init">
+ <mkdir dir="${dir.output}"/>
+ <mkdir dir="${dir.output}/logs" />
+ </target>
+
+ <target name="coverage" depends="prepare">
+ <exec passthru="true" command="phpunit --coverage-html=${dir.output}/coverage --coverage-clover=${dir.output}/logs/clover.xml" />
+ </target>
+
+ <target name="view-coverage">
+ <exec passthru="true" command="open ${dir.output}/coverage/index.html" />
+ </target>
+
+ <target name="package" depends="test-init" description="Create a phar with an autoloader">
+ <pharpackage
+ destfile="${dir.output}/guzzle.phar"
+ basedir="."
+ stub="phar-stub.php"
+ signature="md5">
+ <fileset dir=".">
+ <include name="src/**/*.php" />
+ <include name="vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php" />
+ <include name="vendor/symfony/event-dispatcher/**/*.php" />
+ <include name="vendor/doctrine/common/lib/Doctrine/Common/Cache/*.php" />
+ <include name="vendor/monolog/monolog/src/**/*.php" />
+ </fileset>
+ <metadata>
+ <element name="author" value="Michael Dowling" />
+ </metadata>
+ </pharpackage>
+ <exec command="php -d guzzle_phar=${dir.output}/guzzle.phar `which phpunit`" passthru="true" />
+ </target>
+
+ <target name="package-min" depends="test-init" description="Create a minimal phar">
+ <pharpackage
+ destfile="${dir.output}/guzzle-min.phar"
+ basedir="."
+ stub="phar-stub-min.php"
+ signature="md5">
+ <fileset dir=".">
+ <include name="src/**/*.php" />
+ </fileset>
+ <metadata>
+ <element name="author" value="Michael Dowling" />
+ </metadata>
+ </pharpackage>
+ <exec command="php -d guzzle_phar=${dir.output}/guzzle-min.phar `which phpunit`" passthru="true" />
+ </target>
</project>
View
@@ -15,6 +15,10 @@
</testsuite>
</testsuites>
+ <logging>
+ <log type="junit" target="build/artifacts/logs/junit.xml" logIncompleteSkipped="false" />
+ </logging>
+
<filter>
<whitelist>
<directory suffix=".php">./src/Guzzle</directory>
@@ -7,5 +7,5 @@
*/
class Version
{
- const VERSION = '2.6.2';
+ const VERSION = '2.7.1';
}
@@ -313,7 +313,7 @@ public function testHasOnCompleteMethod()
), $this->getApiCommand());
$command->setClient($client);
- $command->prepare()->setResponse(new Response(200));
+ $command->prepare()->setResponse(new Response(200), true);
$command->execute();
$this->assertEquals(1, $called);
}

0 comments on commit 95bd530

Please sign in to comment.