Skip to content

Commit

Permalink
Made small changes to docs, added module version number, and prepped …
Browse files Browse the repository at this point in the history
…for tag.
  • Loading branch information
jeremeamia committed Dec 13, 2013
1 parent 777acdc commit e0bf9e8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

## 1.2.0

* Added the ability to create protocol-relative URLs with the S3 and CloudFront link view helpers
* Added TravisCI configuration
* Added PHPUnit as a development dependency

## 1.1.0

* Added ZF2 session save handler for Amazon DynamoDB
Expand Down
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@ community on this module and recognize your expertise. We welcome the submission

## What you should keep in mind

1. The SDK is released under the [Apache license][license]. Any code you submit will be released under that license. For
substantial contributions, we may ask you to sign a [Contributor License Agreement (CLA)][cla].
1. The AWS SDK for PHP and the AWS SDK ZF2 Module are released under the [Apache license][license]. Any code you submit
will be released under that license. For substantial contributions, we may ask you to sign a [Contributor
License Agreement (CLA)][cla].
2. We follow the [PSR-0][], [PSR-1][], and [PSR-2][] recommendations from the [PHP Framework Interop Group][php-fig].
Please submit code that follows these standards. The [PHP CS Fixer][cs-fixer] tool can be helpful for formatting your
code.
3. We maintain a high percentage of code coverage in our unit tests. If you make changes to the code, please add or
update unit tests as appropriate.
4. If your pull request does not conform to the PSR standards, include adequate tests, or pass the TravisCI build, we
4. If your pull request fails to conform to the PSR standards, include adequate tests, or pass the TravisCI build, we
may ask you to update your pull request before we accept it. We also reserve the right to deny any pull requests that
do not align with our standards or goals.
5. If you would like to implement support for a significant feature, please talk to us beforehand to avoid any
unnecessary or duplicate effort.

## Running the unit tests

The AWS SDK for PHP is unit tested using PHPUnit. You can run the unit tests of the SDK after copying
phpunit.xml.dist to phpunit.xml:
The AWS SDK ZF2 Module uses unit tests built for PHPUnit. You can run the unit tests of the SDK after copying
`phpunit.xml.dist` to `phpunit.xml`:

cp phpunit.xml.dist phpunit.xml

Next, you need to install the dependencies of the SDK using Composer:
Next, you need to install the dependencies of the module (including the AWS SDK for PHP) using Composer:

composer.phar install

Expand Down
2 changes: 2 additions & 0 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
class Module implements ConfigProviderInterface
{
const VERSION = '1.2.0';

/**
* {@inheritdoc}
*/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ Starting from version 1.0.2, the AWS SDK ZF2 Module now provides two view helper
Amazon CloudFront resources.

> **Note:** Both of the view helpers generate URLs with an HTTPS scheme by default. This is ideal for security, but
please keep in mind that Amazon CloudFront charges more for HTTPS requests. You can turn SSL off by calling the
`setUseSsl` method on both helpers.
please keep in mind that Amazon CloudFront charges more for HTTPS requests. You can use a different scheme (e.g., HTTP)
by calling the `setScheme` method on either helper.

#### S3Link View Helper

Expand Down
3 changes: 2 additions & 1 deletion src/Aws/Factory/AwsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use Aws\Common\Aws;
use Aws\Common\Client\UserAgentListener;
use Aws\Module;
use Guzzle\Common\Event;
use Guzzle\Service\Client;
use Zend\ServiceManager\FactoryInterface;
Expand Down Expand Up @@ -58,7 +59,7 @@ public function onCreateClient(Event $event)
$clientConfig = $event['client']->getConfig();
$commandParams = $clientConfig->get(Client::COMMAND_PARAMS) ?: array();
$clientConfig->set(Client::COMMAND_PARAMS, array_merge_recursive($commandParams, array(
UserAgentListener::OPTION => 'ZF2/' . Version::VERSION,
UserAgentListener::OPTION => 'ZF2/' . Version::VERSION . ' ZFMOD/' . Module::VERSION,
)));
}
}
2 changes: 1 addition & 1 deletion tests/Aws/Tests/Factory/AwsFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public function testCanAddZf2ToUserAgent()
$clientParams = $client->getConfig()->get(Client::COMMAND_PARAMS);

$this->assertArrayHasKey(UserAgentListener::OPTION, $clientParams);
$this->assertStringStartsWith('ZF2', $clientParams[UserAgentListener::OPTION]);
$this->assertRegExp('/ZF2\/.+ZFMOD\/.+/', $clientParams[UserAgentListener::OPTION]);
}
}

0 comments on commit e0bf9e8

Please sign in to comment.