Skip to content

Commit 1dee859

Browse files
committed
Merge pull request #4 from codebendercc/travis
Fixing whatever make Travis buils fail
2 parents e810ab6 + 3317e50 commit 1dee859

File tree

6 files changed

+36
-18
lines changed

6 files changed

+36
-18
lines changed

.travis.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ php:
99

1010
env:
1111
global:
12-
- secure: "ghxjxZnqzsr2dnyAMMv7OK1hgJJaUmkM7dYZst5FxdmUQweXy9DYxyhLl4ewQs0H7vNt7oyIGjWbKlzS02aeOeD5FeA/3CRbDbw3r1iboWm9vzXiNpeLAoBNhJ8pFKv+r2EWikdSeU5FWDb8t4O58VQFzIXXuY+xZPlbzIGNPUE="
13-
- secure: "LDq5UcA6AA0OJtt4Z97Kig/AGcg/b3STF+d6DAMoI2FfPGSIItc4oHTM4chhG9KK2ybGHkCKTBCWOwBJAW3YciMygiNG9QsI7y6v11ptLxPVf0YO2lercCaHq8C5xCXbEpqt84JkSawjTXAqFOHTnrQufzqbve5eDXZpnS2giXM="
12+
# eratosthenes library management system url (encrypted)
13+
- secure: "ZYn4o229W7hq1uzj/Tii9h/a3iJlr9Li4TBaTNFXm6JY2H49lA57L1DIFUaTleTUx2Ibs2+kUrV3NFQ9Mo/ThO67gV5Q1XEMjxgFzAKt4AuWJ5TNbHxs3GBTjYc+129QCKSd0WdzrRDqEC2nZ9GjI+j7lS39DrjAMGg4wEp9b0U="
14+
# codebender compiler url (encrypted)
15+
- secure: "XRsqGDqdu5uhdj2lF4SZ6qv6Y0PdcRPcvE13XvVGnIYRZaITelP3eJNSvLPO+Q5k4mBmKCz8t+ws/OVRRwSAXYaKe0Z8ZXgEcNyo1nEwGekC35mTuG1FFfB/pbuBp5/OWjw6bgz2tEHhKuFIbHytpT9zJQYy+D07rzOYeUsZjOY="
1416

1517
before_script:
1618
- sudo chmod +x scripts/install.sh
1719
- scripts/install.sh
1820
- cd /opt/codebender/builder/Symfony
1921
- sudo chmod -R 777 app/cache app/logs
2022
- echo 'error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
23+
- cd /opt/codebender/builder
24+
- sudo chmod +x scripts/apache_install.sh
25+
- scripts/apache_install.sh
26+
- cd /opt/codebender/builder/Symfony
2127

2228
script:
2329
- mkdir -p build/logs
@@ -28,9 +34,6 @@ script:
2834
after_script:
2935
- php composer.phar install --dev
3036
- php bin/coveralls -v
31-
- cd /opt/codebender/builder
32-
- sudo chmod +x scripts/apache_install.sh
33-
- scripts/apache_install.sh
3437

3538
notifications:
3639
irc: "chat.freenode.net#codebender.cc"

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
lib-compiler-service
1+
[![Build Status](https://travis-ci.org/codebendercc/builder.svg?branch=master)](https://travis-ci.org/codebendercc/builder)
2+
[![Coverage Status](https://coveralls.io/repos/codebendercc/builder/badge.svg)](https://coveralls.io/r/codebendercc/builder)
3+
4+
codebender's builder
25
====================
36

47
A service that handles library fetching and compilation requests.

Symfony/app/phpunit.xml.dist

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
bootstrap="bootstrap.php.cache"
99
>
1010
<testsuites>
11-
<testsuite name="Project Test Suite">
12-
<directory>../src/*/*Bundle/Tests</directory>
13-
<directory>../src/*/Bundle/*Bundle/Tests</directory>
11+
<testsuite name="Unit Test Suite">
12+
<directory suffix="UnitTest.php">../src/*/*Bundle/Tests</directory>
13+
<directory suffix="UnitTest.php">../src/*/Bundle/*Bundle/Tests</directory>
14+
</testsuite>
15+
16+
<testsuite name="Functional Test Suite">
17+
<directory suffix="FunctionalTest.php">../src/*/*Bundle/Tests</directory>
18+
<directory suffix="FunctionalTest.php">../src/*/Bundle/*Bundle/Tests</directory>
1419
</testsuite>
1520
</testsuites>
1621

Symfony/src/Codebender/BuilderBundle/Controller/DefaultController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public function handleRequestAction($authKey, $version)
7474
*
7575
* @param $contents
7676
* @return Response
77+
*
78+
* @SuppressWarnings(PHPMD.LongVariable)
7779
*/
7880
protected function compile($contents)
7981
{

Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerFunctionalTest.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,22 @@ public function testStatusAction() {
2424
public function testHandleRequestGet() {
2525
$client = static::createClient();
2626

27-
/*
28-
* Using the same auth key and version like the ones in the dist parameter file
29-
*/
30-
$client->request('GET', '/authKey/v1');
27+
$authorizationKey = $client->getContainer()->getParameter('auth_key');
28+
$apiVersion = $client->getContainer()->getParameter('version');
29+
$client->request('GET', "/{$authorizationKey}/{$apiVersion}/");
3130

3231
$this->assertEquals($client->getResponse()->getStatusCode(), 405);
3332
}
3433

3534
public function testHandleRequestCompile() {
3635
$client = static::createClient();
3736

37+
$authorizationKey = $client->getContainer()->getParameter('auth_key');
38+
$apiVersion = $client->getContainer()->getParameter('version');
3839
$client
3940
->request(
4041
'POST',
41-
'authenticationekey/version',
42+
"/{$authorizationKey}/{$apiVersion}/",
4243
$parameters = array(),
4344
$files = array(),
4445
$server = array(),
@@ -54,10 +55,12 @@ public function testHandleRequestCompile() {
5455
public function testHandleRequestLibraryFetching() {
5556
$client = static::createClient();
5657

58+
$authorizationKey = $client->getContainer()->getParameter('auth_key');
59+
$apiVersion = $client->getContainer()->getParameter('version');
5760
$client
5861
->request(
5962
'POST',
60-
'authenticationekey/version',
63+
"/{$authorizationKey}/{$apiVersion}/",
6164
$parameters = array(),
6265
$files = array(),
6366
$server = array(),
@@ -74,10 +77,12 @@ public function testHandleRequestLibraryFetching() {
7477
public function testHandleRequestLibraryKeywords() {
7578
$client = static::createClient();
7679

80+
$authorizationKey = $client->getContainer()->getParameter('auth_key');
81+
$apiVersion = $client->getContainer()->getParameter('version');
7782
$client
7883
->request(
7984
'POST',
80-
'authenticationekey/version',
85+
"/{$authorizationKey}/{$apiVersion}/",
8186
$parameters = array(),
8287
$files = array(),
8388
$server = array(),

scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ PACKAGENAME=builder
66

77
if [[ "$OSTYPE" == "linux-gnu" ]]; then
88
echo "Configuring environment for Linux"
9+
# Make sure we have up-to-date stuff
10+
sudo apt-get update
911
if [[ ! $TRAVIS ]]; then
1012
# Ubuntu Server (on AWS?) lacks UTF-8 for some reason. Give it that
1113
sudo locale-gen en_US.UTF-8
12-
# Make sure we have up-to-date stuff
13-
sudo apt-get update
1414
sudo apt-get install -y php5-intl
1515
fi
1616
# Install dependencies

0 commit comments

Comments
 (0)