Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
thbourlove committed Aug 6, 2014
0 parents commit 76f5dc7
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vendor/
tags
cscope.out
build/
composer.lock
8 changes: 8 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tools:
external_code_coverage: true
php_pdepend: true
php_cpd: true
php_analyzer: true
php_sim: true
php_code_sniffer: true
php_changetracking: true
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6

before_script:
- composer self-update
- composer install --no-interaction --prefer-source --dev

script:
- vendor/bin/phpunit --coverage-clover=coverage.clover

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ctags:
ctags -R --fields=+aimS --languages=php --php-kinds=cidf --exclude=tests

cscope:
find . -name '*.php' > ./cscope.files
cscope -b
rm cscope.files

test:
vendor/bin/phpunit --coverage-text

build:
composer install
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Laravel-Guzzle
[![Stable Status](https://poser.pugx.org/eleme/laravel-guzzle/v/stable.png)](https://packagist.org/packages/eleme/laravel-guzzle)

laravel guzzle service provider

## Install With Composer:

```json
"require": {
"eleme/laravel-guzzle": "~0.1"
}
```
26 changes: 26 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "eleme/laravel-guzzle",
"description": "laravel guzzle service provider",
"keywords": ["laravel", "guzzle", "http"],
"license": "MIT",
"authors": [
{
"name": "Hongbo Tang",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "~4.0",
"guzzlehttp/guzzle": "~4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"autoload": {
"psr-4": {
"Eleme\\Laravel\\": "src/",
"Eleme\\Laravel\\Tests\\": "tests/"
}
}
}
27 changes: 27 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="Silex Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
</phpunit>
12 changes: 12 additions & 0 deletions src/Facades/Guzzle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
namespace Eleme\Laravel\Facades;

use Illuminate\Support\Facades\Facade;

class Guzzle extends Facade
{
protected static function getFacadeAccessor()
{
return 'guzzle';
}
}
15 changes: 15 additions & 0 deletions src/Providers/Guzzle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
namespace Eleme\Laravel\Providers;

use Illuminate\Support\ServiceProvider;
use GuzzleHttp\Client;

class Guzzle extends ServiceProvider
{
public function register()
{
$this->app->bind('guzzle', function () {
return new Client;
});
}
}
Empty file added tests/.gitkeep
Empty file.

0 comments on commit 76f5dc7

Please sign in to comment.