From a779bbea88261c24b2fe58ed8c8d3bcc5b067097 Mon Sep 17 00:00:00 2001 From: Fredrik Liljegren Date: Tue, 28 Oct 2014 10:04:48 +0100 Subject: [PATCH] Updating README. --- Makefile | 21 +++++++++++++++++---- README.md | 37 +++++++++++++++++++++++++++++-------- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 781c2ed..ab8f103 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,21 @@ -install: - composer.phar install +install: composer.phar + ./composer.phar install update: - composer.phar update + ./composer.phar update -test: +test: vendor/bin/phpunit build ./vendor/bin/phpunit --strict + +composer.phar: + curl -s http://getcomposer.org/installer | php + +vendor/bin/phpunit: install + +build: + mkdir build + +clean: + rm composer.phar + rm -r vendor + rm -r build diff --git a/README.md b/README.md index 560c8a8..59e04d5 100644 --- a/README.md +++ b/README.md @@ -18,16 +18,18 @@ of Connections and check them periodically for new data, send something to them process handling one connection. But, I have no use for that right now. (Actually, I would suggest a language with better asynchronous handling than PHP for that.) -Install -------- -```bash -# Install composer -curl -s http://getcomposer.org/installer | php +Installing +---------- -# Generate vendor/autload.php -php composer.phar install --no-dev +Preferred way to install is with [Composer](https://getcomposer.org/). -``` +Just add + + "require": { + "textalk/websocket": "1.0.*" + } + +in your projects composer.json. Client usage: ------------- @@ -41,3 +43,22 @@ $client->send("Hello WebSocket.org!"); echo $client->receive(); // Will output 'Hello WebSocket.org!' ``` + +Developer install +----------------- + +Development depends on php, php-curl and php-xdebug. + +```bash +# Will get composer, install dependencies and run tests +make test +``` + +Changelog +--------- + +1.0.0 + + * Release as production ready. + * Adding option to set/override headers. + * Supporting basic authentication from user:pass in URL.