Skip to content

Commit

Permalink
#21: Added apigen package documentation generator, added gulp task fo…
Browse files Browse the repository at this point in the history
…r generating documentation
  • Loading branch information
Inaki Anduaga committed Jan 27, 2015
1 parent e3eb1cd commit 6199c6f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ vendor
#Coverage report
coverage

#Package Docs
docs

#build related
gulp
node_modules
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ eloquent-external-storage

[![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Code Climate][code-climate-image]][code-climate-url] [![Dependency Status][dependency-status-image]][dependency-status-url]

> Adds external storage to an eloquent model.
> Adds external storage capabilities to an eloquent model.
## Features

- Save/retrieve model-related content to an external storage using `setContent()`, `getContent()` methods on the eloquent model.
Now you can move all that binary data out of the database without having to move a finger.
- Storage supports different drivers, currently `file` and `Amazon AWS S3` are implemented
- Different models can have different storage methods, configurations
- Different models can implement different storage drivers, separate configurations
- Storage drivers can be updated on the fly.

## Installation
Expand Down Expand Up @@ -113,10 +117,19 @@ Both options have the ability to generate a code coverage report in different fo

### Testing AWS S3 Driver

- Valid AWS S3 credentials need to be provided via `tests/.env` file, see `tests/.env.example` as an example.
- Travis CI integration is performed by passing encrypted credentials in travis.yml (valid only for inakianduaga/eloquent-external-storage repo).
- **Locally:** Valid AWS S3 credentials need to be provided via `tests/.env` file, see `tests/.env.example` as an example.
- **CI**: Travis CI integration is performed by passing encrypted credentials in travis.yml (valid only for inakianduaga/eloquent-external-storage repo).
- [Amazon S3 testing in Travis CI](http://milesj.me/blog/read/amazon-s3-testing-travis-ci)

### Tests Coverage report

- `gulp test --generateCoverage=coverageHtml` to generate html code coverage report (under `./coverage` folder)

## Documentation generation

- The package code documentation can be generated by running `gulp docs`, which generates the docs in the `./docs` folder


[travis-url]: https://travis-ci.org/inakianduaga/eloquent-external-storage
[travis-image]: https://travis-ci.org/inakianduaga/eloquent-external-storage.svg?branch=master

Expand Down
Binary file added apigen.phar
Binary file not shown.
3 changes: 3 additions & 0 deletions src/Drivers/AbstractDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Illuminate\Config\Repository as ConfigService;
use Carbon\Carbon;

/**
* Common baseline for all drivers
*/
abstract class AbstractDriver implements DriverInterface {

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/AwsS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function setConfigKey($key)
/**
* {@inheritDoc}
*
* http://stackoverflow.com/questions/13686316/grabbing-contents-of-object-from-s3-via-php-sdk-2
* @link http://stackoverflow.com/questions/13686316/grabbing-contents-of-object-from-s3-via-php-sdk-2
*/
public function fetch($path) {

Expand All @@ -68,7 +68,7 @@ public function fetch($path) {
/**
* {@inheritDoc}
*
* http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpPHP.html
* @link http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadObjSingleOpPHP.html
*/
public function store($content)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Services/ExtensionGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function guess($string)
}

/**
* http://stackoverflow.com/questions/5144583/getting-filename-or-deleting-file-using-file-handle
* @link http://stackoverflow.com/questions/5144583/getting-filename-or-deleting-file-using-file-handle
*
* @param $handler
*
Expand Down

0 comments on commit 6199c6f

Please sign in to comment.