Skip to content

Commit 8186c9e

Browse files
author
Chris Park
committed
Merge branch 'develop' for Release 1.1
2 parents 128580a + 1a04f5d commit 8186c9e

File tree

64 files changed

+1133
-4836
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1133
-4836
lines changed

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
language: php
2-
# Handle git submodules yourself
3-
git:
4-
submodules: false
5-
# Use sed to replace the SSH URL with the public URL, then initialize submodules
62
before_install:
73
php:
84
- 5.5
95
- 5.6
6+
- 7.0
107
before_script:
118
- composer self-update
129
- composer install --prefer-source --no-interaction --dev
13-
script: phpunit --bootstrap ./vendor/autoload.php ./tests/rosette/api/ApiTest.php
10+
script:
11+
- bin/phpspec run --config=phpspec.yml --bootstrap=./vendor/autoload.php --no-interaction --format=pretty
1412

1513
notifications:
1614
slack:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ See the [wiki](https://github.com/rosette-api/php/wiki) for more information.
99
Installation
1010
------------
1111

12-
`composer require "rosette/api: ~1.0.*"`
12+
`composer require "rosette/api: ~1.1.*"`
1313

1414
Basic Usage
1515
-----------

composer.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rosette/api",
3-
"version": "1.0.3",
3+
"version": "1.1.0",
44
"description": "Rosette API PHP client SDK",
55
"license": "Apache",
66
"keywords": [
@@ -15,17 +15,15 @@
1515
"homepage": "https://developer.rosette.com"
1616
}
1717
],
18-
"require": {
19-
"php": ">=5.5"
20-
},
2118
"require-dev": {
22-
"phpunit/phpunit": ">=4.6",
2319
"fabpot/php-cs-fixer": ">=1.9",
24-
"kherge/box": "~2.0",
25-
"symfony/finder": "~2.7",
26-
"phpdocumentor/phpdocumentor": "~2.8"
20+
"phpdocumentor/phpdocumentor": "~2.8",
21+
"phpspec/phpspec": "~2.5"
22+
},
23+
"config": {
24+
"bin-dir": "bin"
2725
},
2826
"autoload": {
29-
"psr-4": {"rosette\\api\\": "./source/rosette/api"}
27+
"psr-4": {"rosette\\": "./source/rosette"}
3028
}
3129
}

docker/Dockerfile

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
1-
FROM php:5.5-cli
1+
FROM phusion/baseimage
22
MAINTAINER Fiona Hasanaj
33
ENV TZ=America/New_York
44

55
# install necessary software
6-
RUN apt-get -y update && apt-get install -y vim && apt-get install -y git && apt-get install -y libxslt1-dev
6+
7+
RUN apt-get -y update && apt-get install -y \
8+
git \
9+
language-pack-en-base \
10+
libxslt1-dev \
11+
python-software-properties \
12+
vim \
13+
wget
14+
15+
RUN LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php5-5.6
16+
RUN apt-get -y update && apt-get install -y \
17+
php5-dev \
18+
php5-cli \
19+
php5-curl \
20+
php5-xsl \
21+
libapache2-mod-php5
22+
23+
24+
RUN echo "memory_limit=-1" >> /etc/php5/cli/php.ini && \
25+
echo "date.timezone=America/New_York" >> /etc/php5/cli/php.ini
26+
27+
RUN wget -O /usr/local/bin/composer https://getcomposer.org/composer.phar && \
28+
chmod +x /usr/local/bin/composer
729

830
# copy over the necessary files
31+
RUN mkdir /php-dev && mkdir /php-dev/tests
932
COPY composer.json /php-dev/composer.json
1033
WORKDIR /php-dev
1134

12-
# install mbstring
13-
RUN docker-php-ext-install mbstring
14-
15-
#Add xsl in PHP containers image
16-
RUN docker-php-ext-install xsl
17-
18-
# install composer.phar
19-
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
20-
RUN composer install
35+
RUN composer install
2136

2237
# copy over the necessary files
2338
COPY run_php.sh /php-dev/run_php.sh
@@ -27,4 +42,4 @@ RUN chmod 755 /php-dev/run_php.sh
2742
VOLUME ["/source"]
2843

2944
# allow interactive bash inside docker container
30-
CMD ./run_php.sh $API_KEY $FILENAME $ALT_URL $GIT_USERNAME $VERSION
45+
CMD ./run_php.sh $API_KEY $FILENAME $ALT_URL $GIT_USERNAME $VERSION

docker/Dockerfile-php7

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM phusion/baseimage
2+
MAINTAINER Fiona Hasanaj
3+
ENV TZ=America/New_York
4+
5+
# install necessary software
6+
7+
RUN apt-get -y update && apt-get install -y \
8+
git \
9+
language-pack-en-base \
10+
libxslt1-dev \
11+
python-software-properties \
12+
vim \
13+
wget
14+
15+
RUN LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
16+
RUN apt-get -y update && apt-get install -y \
17+
php7.0-dev \
18+
php7.0-cli \
19+
php7.0-curl \
20+
php7.0-xsl \
21+
libapache2-mod-php7.0
22+
23+
24+
RUN echo "memory_limit=-1" >> /etc/php/7.0/cli/php.ini && \
25+
echo "date.timezone=America/New_York" >> /etc/php/7.0/cli/php.ini
26+
27+
RUN wget -O /usr/local/bin/composer https://getcomposer.org/composer.phar && \
28+
chmod +x /usr/local/bin/composer
29+
30+
# copy over the necessary files
31+
RUN mkdir /php-dev && mkdir /php-dev/tests
32+
COPY composer.json /php-dev/composer.json
33+
WORKDIR /php-dev
34+
35+
RUN composer install
36+
37+
# copy over the necessary files
38+
COPY run_php.sh /php-dev/run_php.sh
39+
RUN chmod 755 /php-dev/run_php.sh
40+
41+
# specify docker volume
42+
VOLUME ["/source"]
43+
44+
# allow interactive bash inside docker container
45+
CMD ./run_php.sh $API_KEY $FILENAME $ALT_URL $GIT_USERNAME $VERSION

docker/composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rosette/api",
3-
"version": "0.8.0",
3+
"version": "1.0.0",
44
"description": "Rosette API PHP client SDK",
55
"license": "Apache",
66
"keywords": [
@@ -16,11 +16,14 @@
1616
}
1717
],
1818
"require-dev": {
19-
"phpunit/phpunit": ">=4.6",
19+
"phpspec/phpspec": "~2.5",
2020
"fabpot/php-cs-fixer": ">=1.9",
2121
"phpdocumentor/phpdocumentor": "~2.8"
2222
},
23+
"config": {
24+
"bin-dir": "bin"
25+
},
2326
"autoload": {
2427
"psr-4": {"rosette\\": "/source/source/rosette"}
2528
}
26-
}
29+
}

docker/run_php.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ fi
120120

121121

122122
#Run unit tests
123-
cd /php-dev && ./vendor/bin/phpunit -v --bootstrap ./vendor/autoload.php ./tests/rosette/api/ApiTest.php
123+
cd /php-dev && ./bin/phpspec run
124124

125125
#Run php-cs-fixer
126-
./vendor/bin/php-cs-fixer fix . --dry-run --diff --level=psr2
126+
./bin/php-cs-fixer fix . --dry-run --diff --level=psr2
127127

128128
#Generate gh-pages and push them to git account (if git username is provided)
129129
if [ ! -z ${GIT_USERNAME} ] && [ ! -z ${VERSION} ]; then

examples/entities_linked.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
$params = new DocumentParameters();
1919
$content = $entities_linked_text_data;
2020
$params->set('content', $content);
21+
$params->set('genre', 'social-media');
2122

2223
try {
2324
$result = $api->entities($params, true);

mock-data/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

mock-data/request/eng-doc-categories.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)