From 7b03cbb62abbac5024de11f1e20ccb863327af6d Mon Sep 17 00:00:00 2001 From: Ryan Parman Date: Tue, 7 Feb 2012 13:44:08 -0800 Subject: [PATCH 1/2] Added a composer.json definition and updated the README. --- README.md | 25 ++++++++++++++++++++++--- composer.json | 17 +++++++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 composer.json diff --git a/README.md b/README.md index 37a044b46..c40972836 100755 --- a/README.md +++ b/README.md @@ -51,15 +51,34 @@ 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'; + +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) class loading: - $ git clone https://github.com/rmccue/Requests.git + $loader->registerNamespace('Requests', 'path/to/vendor/Requests/library'); Documentation diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..fd0df26fe --- /dev/null +++ b/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" +} From 6deedb70458bfab630277afc6837d548360a064d Mon Sep 17 00:00:00 2001 From: Ryan Parman Date: Tue, 7 Feb 2012 13:49:39 -0800 Subject: [PATCH 2/2] Updated the README. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c40972836..a3c780d33 100755 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ If you're using [Composer](https://github.com/composer/composer) to manage depen { "require": { - "rmccue/Requests": ">=1.0" + "rmccue/requests": ">=1.0" } } @@ -69,6 +69,7 @@ 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 @@ -76,7 +77,7 @@ Alternatively, you can fetch a [tarball](https://github.com/rmccue/Requests/tarb $ wget https://github.com/rmccue/Requests/tarball/master -O - | tar xzv ### 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) class loading: +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: $loader->registerNamespace('Requests', 'path/to/vendor/Requests/library');