Skip to content

Commit 2f1b803

Browse files
committed
merged master and resolved conflicts
2 parents 97e0d26 + c2e4758 commit 2f1b803

16 files changed

+604
-37
lines changed

.coveralls.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#.coveralls.yml
2+
3+
src_dir: lib/
4+
5+
# single file
6+
coverage_clover: test/output/clover.xml
7+
8+
9+
json_path: test/output/coveralls-upload.json

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.settings
44
.buildpath
55
test/output/
6+
examples/example-config.json

.travis.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
language: php
22
php:
3-
- '5.5'
4-
- '5.6'
3+
- '5.5'
4+
- '5.6'
55
install:
6-
- composer install
7-
script: phpunit --bootstrap test/unit/bootstrap.php ./test/unit
6+
- composer install
7+
before_script:
8+
- curl -s http://getcomposer.org/installer | php
9+
- php composer.phar install --dev --no-interaction
10+
script:
11+
- mkdir -p test/output/report
12+
- composer test
13+
after_script:
14+
- php vendor/bin/coveralls
815
notifications:
916
slack:
1017
secure: mw6HF2KR0YwYcIaYvV6qjuWC+XSIP8SQOe13VwmGf3b783hMcZDZTUS9N4bIfpwYi74A9qmzKdc425OSu45nceAf7hzFusCY5rYMoLQK/ksJ7sd+ay7tWhPRuomG1w8idTyXtzce23zOfBtOCHQakbavH2Uz6mh5lJYPFlMKW4c=

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ php-sparkpost is maintained by Message Systems.
44

55
* Jordan Nornhold <jordan.norhold@messagesystems.com>
66
* Rich Leland <rich.leland@messagesystems.com>, @richleland
7+
* Matthew April <matthew.japril@gmail.com>

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![Travis CI](https://travis-ci.org/SparkPost/php-sparkpost.svg?branch=master)](https://travis-ci.org/SparkPost/php-sparkpost)
2+
[![Coverage Status](https://coveralls.io/repos/SparkPost/php-sparkpost/badge.svg?branch=master&service=github)](https://coveralls.io/github/SparkPost/php-sparkpost?branch=master)
23

34
# SparkPost PHP SDK
45
The official PHP binding for your favorite SparkPost APIs!
@@ -20,6 +21,7 @@ composer require sparkpost/php-sparkpost
2021
After installing, you need to require Composer's autoloader:
2122
```
2223
require 'vendor/autoload.php';
24+
use SparkPost\SparkPost;
2325
```
2426

2527
## Setting up a Request Adapter
@@ -50,6 +52,7 @@ $httpAdapter = new Guzzle6HttpAdapter(new Client());
5052
$sparky = new SparkPost($httpAdapter, ['key'=>'YOUR API KEY']);
5153
5254
try {
55+
// Build your email and send it!
5356
$results = $sparky->transmission->send([
5457
'from'=>'From Envelope <from@sparkpostbox.com>',
5558
'html'=>'<html><body><h1>Congratulations, {{name}}!</h1><p>You just sent your very first mailing!</p></body></html>',
@@ -120,9 +123,10 @@ try {
120123
Run `composer install` inside the directory to install dependecies and development tools.
121124

122125
### Testing
123-
Once all the dependencies are installed, you can execute the unit tests using `vendor/bin/phpunit --bootstrap test/unit/bootstrap.php ./test/unit`.
124-
125-
If you're interested in code coverage, you can add the `--coverage` flag for phpunit like so: ```phpunit --coverage-html test/output/report --bootstrap test/unit/bootstrap.php ./test/unit```
126+
Once all the dependencies are installed, you can execute the unit tests using:
127+
```
128+
composer test
129+
```
126130

127131
### Contributing
128132
1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.

composer.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@
44
"license": "Apache 2.0",
55
"version": "0.2.0",
66
"authors": [
7-
{
8-
"name": "Message Systems, Inc."
9-
}
7+
{
8+
"name": "Message Systems, Inc."
9+
}
1010
],
1111
"minimum-stability": "stable",
12+
"scripts": {
13+
"post-install-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
14+
"post-update-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
15+
"test": "phpunit ./test/unit/"
16+
},
1217
"require": {
1318
"php": ">=5.5.0",
1419
"egeloen/http-adapter": "*"
1520
},
1621
"require-dev": {
17-
"phpunit/phpunit": "4.3.*",
18-
"guzzlehttp/guzzle": "6.*",
19-
"mockery/mockery": "^0.9.4"
22+
"phpunit/phpunit": "4.3.*",
23+
"guzzlehttp/guzzle": "6.*",
24+
"mockery/mockery": "^0.9.4",
25+
"satooshi/php-coveralls": "dev-master"
2026
},
2127
"autoload": {
2228
"psr-4": {

0 commit comments

Comments
 (0)