Skip to content

Commit

Permalink
Merge pull request #29 from akeneo/bump-versions
Browse files Browse the repository at this point in the history
Bump versions
  • Loading branch information
nidup committed Mar 24, 2016
2 parents eb55684 + ff6cef6 commit bc1b583
Show file tree
Hide file tree
Showing 32 changed files with 78 additions and 83 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ language: php
sudo: false

php:
- "5.3"
- "5.4"
- "5.5"
- "5.6"
- '7.0'
- "hhvm"

matrix:
allow_failures:
- php: "7.0"

before_install:
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then
phpenv config-rm xdebug.ini;
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Wrap following API methods :
Requirements
------------

* PHP >= 5.3.3
* PHP >= 5.5
* Guzzle https://github.com/guzzle/guzzle

Optional, for dev purpose, PHP Spec https://github.com/phpspec/phpspec
Expand All @@ -58,7 +58,7 @@ Then, to instanciate the client and use available API methods :
<?php
require 'vendor/autoload.php';

use Crowdin\Client;
use Akeneo\Crowdin\Client;

$project = 'akeneo';
$key = 'my-api-key';
Expand Down
15 changes: 10 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@
"license": "MIT",
"authors": [
{
"name": "Akeneo",
"homepage": "http://akeneo.com"
"name": "Nicolas Dupont <[email protected]>",
"homepage": "http://www.akeneo.com"
},
{
"name": "Julien Janvier <[email protected]>"
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.5",
"guzzle/guzzle": ">=3.7"
},
"require-dev": {
"phpspec/phpspec": "2.0.*@dev"
"phpspec/phpspec": "2.5.*"
},
"config": {
"bin-dir": "bin"
},
"autoload": {
"psr-0": { "Crowdin\\": "lib/" }
"psr-4": {
"Akeneo\\Crowdin\\": "src/Akeneo/Crowdin/"
}
},
"extra": {
"branch-alias": {
Expand Down
4 changes: 0 additions & 4 deletions phpspec.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -20,7 +20,7 @@ function let(Client $client, HttpClient $http)

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_should_not_add_with_no_directory(HttpClient $http, Request $request, Response $response)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -20,7 +20,7 @@ function let(Client $client, HttpClient $http)

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_should_not_allow_not_existing_file()
Expand All @@ -30,7 +30,7 @@ function it_should_not_allow_not_existing_file()

function it_has_files()
{
$this->addTranslation(__DIR__ . '/../../fixtures/messages.en.yml', 'crowdin/path/file.csv');
$this->addTranslation(__DIR__ . '/../../../fixtures/messages.en.yml', 'crowdin/path/file.csv');
$this->getTranslations()->shouldHaveCount(1);
}

Expand All @@ -46,14 +46,14 @@ function it_should_not_add_with_no_file(HttpClient $http, Request $request, Resp

function it_adds_a_file(HttpClient $http, Request $request, Response $response)
{
$this->addTranslation(__DIR__ . '/../../fixtures/messages.en.yml', 'path/to/crowdin.yml');
$this->addTranslation(__DIR__ . '/../../../fixtures/messages.en.yml', 'path/to/crowdin.yml');
$content = '<?xml version="1.0" encoding="ISO-8859-1"?><success></success>';
$response->getBody(true)->willReturn($content);
$request->send()->willReturn($response);
$http->post(
'project/sylius/add-file?key=1234',
array(),
array('files[path/to/crowdin.yml]' => '@' . __DIR__ . '/../../fixtures/messages.en.yml')
array('files[path/to/crowdin.yml]' => '@' . __DIR__ . '/../../../fixtures/messages.en.yml')
)->willReturn($request);

$this->execute()->shouldBe($content);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -20,7 +20,7 @@ function let(Client $client, HttpClient $http)

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_should_not_delete_with_no_directory(HttpClient $http, Request $request, Response $response)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -20,7 +20,7 @@ function let(Client $client, HttpClient $http)

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_should_not_delete_with_no_file(HttpClient $http, Request $request, Response $response)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -21,7 +21,7 @@ function let(Client $client, HttpClient $http)

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_has_a_package_with_all_languages()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -21,7 +21,7 @@ function let(Client $client, HttpClient $http)

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_builds_last_translations(HttpClient $http, Request $request, Response $response)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -24,7 +24,7 @@ function let(Client $client, HttpClient $http, Request $request, Response $respo

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_gets_project_info()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -24,7 +24,7 @@ function let(Client $client, HttpClient $http, Request $request, Response $respo

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_gets_project_translations_status()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -22,7 +22,7 @@ function let(Client $client, HttpClient $http, Request $request, Response $respo

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_gets_supported_languages()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -21,7 +21,7 @@ function let(Client $client, HttpClient $http)

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_should_not_allow_not_existing_file()
Expand All @@ -31,7 +31,7 @@ function it_should_not_allow_not_existing_file()

function it_has_files()
{
$this->addTranslation(__DIR__ . '/../../fixtures/messages.en.yml', 'crowdin/path/file.csv');
$this->addTranslation(__DIR__ . '/../../../fixtures/messages.en.yml', 'crowdin/path/file.csv');
$this->getTranslations()->shouldHaveCount(1);
}

Expand All @@ -46,14 +46,14 @@ function it_should_not_allow_update_with_no_file(HttpClient $http, Request $requ

function it_updates_some_translation_files(HttpClient $http, Request $request, Response $response)
{
$this->addTranslation(__DIR__ . '/../../fixtures/messages.en.yml', 'crowdin/path/file.yml');
$this->addTranslation(__DIR__ . '/../../../fixtures/messages.en.yml', 'crowdin/path/file.yml');
$content = '<xml></xml>';
$response->getBody(true)->willReturn($content);
$request->send()->willReturn($response);
$http->post(
'project/akeneo/update-file?key=1234',
array(),
array("files[crowdin/path/file.yml]" => '@'.__DIR__ . '/../../fixtures/messages.en.yml')
array("files[crowdin/path/file.yml]" => '@'.__DIR__ . '/../../../fixtures/messages.en.yml')
)->willReturn($request);
$this->execute()->shouldBe($content);
}
Expand All @@ -63,11 +63,11 @@ function it_sends_additionnal_parameters(HttpClient $http, Request $request, Res
$request->send()->willReturn($response);

$http->post(Argument::any(), Argument::any(), array(
"files[crowdin/path/file.yml]" => '@'.__DIR__ . '/../../fixtures/messages.en.yml',
"files[crowdin/path/file.yml]" => '@'.__DIR__ . '/../../../fixtures/messages.en.yml',
'foo' => 'bar',
))->shouldBeCalled()->willReturn($request);

$this->addTranslation(__DIR__ . '/../../fixtures/messages.en.yml', 'crowdin/path/file.yml');
$this->addTranslation(__DIR__ . '/../../../fixtures/messages.en.yml', 'crowdin/path/file.yml');
$this->setParameters(array('foo' => 'bar'));
$this->execute();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Crowdin\Api;
namespace spec\Akeneo\Crowdin\Api;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Crowdin\Client;
use Akeneo\Crowdin\Client;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Message\Response;
use Guzzle\Http\Message\Request;
Expand All @@ -21,7 +21,7 @@ function let(Client $client, HttpClient $http)

function it_should_be_an_api()
{
$this->shouldBeAnInstanceOf('Crowdin\Api\AbstractApi');
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
}

function it_should_not_allow_not_existing_translation()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace spec\Crowdin;
namespace spec\Akeneo\Crowdin;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand Down Expand Up @@ -29,7 +29,7 @@ function it_has_a_http_client()

function it_allow_defined_api_method()
{
$this->api('download')->shouldReturnAnInstanceOf('Crowdin\Api\Download');
$this->api('download')->shouldReturnAnInstanceOf('Akeneo\Crowdin\Api\Download');
}

function it_should_not_allow_undefined_api_method()
Expand Down
Loading

0 comments on commit bc1b583

Please sign in to comment.