Skip to content

Commit 76f5dc7

Browse files
committed
first commit
0 parents  commit 76f5dc7

File tree

10 files changed

+136
-0
lines changed

10 files changed

+136
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
vendor/
2+
tags
3+
cscope.out
4+
build/
5+
composer.lock

.scrutinizer.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
tools:
2+
external_code_coverage: true
3+
php_pdepend: true
4+
php_cpd: true
5+
php_analyzer: true
6+
php_sim: true
7+
php_code_sniffer: true
8+
php_changetracking: true

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
- 5.6
8+
9+
before_script:
10+
- composer self-update
11+
- composer install --no-interaction --prefer-source --dev
12+
13+
script:
14+
- vendor/bin/phpunit --coverage-clover=coverage.clover
15+
16+
after_script:
17+
- wget https://scrutinizer-ci.com/ocular.phar
18+
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ctags:
2+
ctags -R --fields=+aimS --languages=php --php-kinds=cidf --exclude=tests
3+
4+
cscope:
5+
find . -name '*.php' > ./cscope.files
6+
cscope -b
7+
rm cscope.files
8+
9+
test:
10+
vendor/bin/phpunit --coverage-text
11+
12+
build:
13+
composer install

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Laravel-Guzzle
2+
[![Stable Status](https://poser.pugx.org/eleme/laravel-guzzle/v/stable.png)](https://packagist.org/packages/eleme/laravel-guzzle)
3+
4+
laravel guzzle service provider
5+
6+
## Install With Composer:
7+
8+
```json
9+
"require": {
10+
"eleme/laravel-guzzle": "~0.1"
11+
}
12+
```

composer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "eleme/laravel-guzzle",
3+
"description": "laravel guzzle service provider",
4+
"keywords": ["laravel", "guzzle", "http"],
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Hongbo Tang",
9+
"email": "[email protected]"
10+
}
11+
],
12+
"require": {
13+
"php": ">=5.4.0",
14+
"illuminate/support": "~4.0",
15+
"guzzlehttp/guzzle": "~4.0"
16+
},
17+
"require-dev": {
18+
"phpunit/phpunit": "~4.0"
19+
},
20+
"autoload": {
21+
"psr-4": {
22+
"Eleme\\Laravel\\": "src/",
23+
"Eleme\\Laravel\\Tests\\": "tests/"
24+
}
25+
}
26+
}

phpunit.xml.dist

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
bootstrap="vendor/autoload.php"
13+
>
14+
<testsuites>
15+
<testsuite name="Silex Test Suite">
16+
<directory>tests</directory>
17+
</testsuite>
18+
</testsuites>
19+
<filter>
20+
<whitelist processUncoveredFilesFromWhitelist="true">
21+
<directory suffix=".php">src</directory>
22+
</whitelist>
23+
</filter>
24+
<logging>
25+
<log type="coverage-clover" target="build/logs/clover.xml"/>
26+
</logging>
27+
</phpunit>

src/Facades/Guzzle.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
namespace Eleme\Laravel\Facades;
3+
4+
use Illuminate\Support\Facades\Facade;
5+
6+
class Guzzle extends Facade
7+
{
8+
protected static function getFacadeAccessor()
9+
{
10+
return 'guzzle';
11+
}
12+
}

src/Providers/Guzzle.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
namespace Eleme\Laravel\Providers;
3+
4+
use Illuminate\Support\ServiceProvider;
5+
use GuzzleHttp\Client;
6+
7+
class Guzzle extends ServiceProvider
8+
{
9+
public function register()
10+
{
11+
$this->app->bind('guzzle', function () {
12+
return new Client;
13+
});
14+
}
15+
}

tests/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)