Skip to content

Commit

Permalink
Merge pull request #6 from skyzyx/master
Browse files Browse the repository at this point in the history
Support for Composer/Packagist
  • Loading branch information
rmccue committed Feb 8, 2012
2 parents 2cb4252 + 6deedb7 commit 45e66c7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
26 changes: 23 additions & 3 deletions README.md
Expand Up @@ -51,15 +51,35 @@ Features
Installation
------------

If you want to include it with your project, either [grab it as a zip](https://github.com/rmccue/Requests/zipball/master) or grab it as a tarball:
### Install with Composer
If you're using [Composer](https://github.com/composer/composer) to manage dependencies, you can add Requests with it.

{
"require": {
"rmccue/requests": ">=1.0"
}
}

### Install source from GitHub
To install the source code:

git clone git://github.com/rmccue/Requests.git

And include it in your scripts:

require_once '/path/to/Requests/library/Requests.php';

### Install source from zip/tarball
Alternatively, you can fetch a [tarball](https://github.com/rmccue/Requests/tarball/master) or [zipball](https://github.com/rmccue/Requests/zipball/master):

$ curl https://github.com/rmccue/Requests/tarball/master | tar xzv
(or)
$ wget https://github.com/rmccue/Requests/tarball/master -O - | tar xzv

Or clone it via Git:
### Using a Class Loader
If you're using a class loader (e.g., [Symfony Class Loader](https://github.com/symfony/ClassLoader)) for [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)-style class loading:

$ git clone https://github.com/rmccue/Requests.git
$loader->registerNamespace('Requests', 'path/to/vendor/Requests/library');


Documentation
Expand Down
17 changes: 17 additions & 0 deletions composer.json
@@ -0,0 +1,17 @@
{
"name": "rmccue/requests",
"description": "A HTTP library written in PHP, for human beings.",
"homepage": "http://github.com/rmccue/Requests",
"license": "ISC",
"keywords": ["http", "idna", "iri", "ipv6", "curl", "sockets", "fsockopen"],
"authors": [
{
"name": "Ryan McCue",
"homepage": "http://ryanmccue.info"
}
],
"require": {
"php": ">=5.2"
},
"type": "library"
}

0 comments on commit 45e66c7

Please sign in to comment.