diff --git a/README.md b/README.md index b02bf84..6217ddb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# CNAM-CLI v2.0.0 +# CNAM-CLI v2.0.1 [![Source](https://img.shields.io/badge/source-cedwardsmedia/cnam--cli-blue.svg?style=flat-square "Source")](https://www.github.com/cedwardsmedia/cnam-cli) -![Version](https://img.shields.io/badge/version-2.0.0-brightgreen.svg?style=flat-square) +![Version](https://img.shields.io/badge/version-2.0.1-brightgreen.svg?style=flat-square) [![License](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat-square "License")](./LICENSE) [![Gratipay](https://img.shields.io/gratipay/cedwardsmedia.svg?style=flat-square "License")](https://gratipay.com/~cedwardsmedia/) @@ -9,14 +9,11 @@ _CNAM-CLI_ is a command-line client for [EveryoneAPI](https://www.everyoneapi.co ## Installation -1. Clone the repo. -2. Run `php composer.phar install` -3. Ensure cnam.php is executable by running `chmod +x /path/to/cnam.php`. -4. Run `cnam setup` to set your EveryoneAPI credentials +1. Download and unpack the [latest release](https://github.com/cedwardsmedia/cnam-cli/releases). +2. Run `install.sh` as root or use `sudo` +3. Run `cnam setup` to set your EveryoneAPI credentials -To perform a lookup of a phone number: `php /path/to/cnam.php [phonenumber] [--name]` - -**Note:** for easier usage, you may wish to create a symlink to cnam.php. To do this, simply execute `sudo ln -s /path/to/cnam.php /usr/local/cnam`. Now, you can execute cnam by simply running `cnam [phone number]` without including the path to cnam.php. +To perform a lookup of a phone number: `cnam [phonenumber] [--data-point]` ### Data Point Flags @@ -37,10 +34,7 @@ Providing one or more data point flags will cause CNAM to return ONLY the select - Use the `--linetype` flag to query for the *linetype* data point. ## Manual Page -__CNAM-CLI__ comes with a UNIX man page located in `./share/man/man1`. You can view the man page using the `man` command or any graphical man page viewer. - -## Web-based client -The web-based client has been split off into a [separate project](https://github.com/cedwardsmedia/webcnam). +__CNAM-CLI__ comes with a UNIX man page `cnam`. You can view the man page using the `man` command or any graphical man page viewer. ## Contributing @@ -61,3 +55,4 @@ _CNAM-CLI_ is licensed under the **MIT License**. See LICENSE for more. --- **Disclaimer**: _CNAM-CLI_ is not endorsed by, sponsored by, or otherwise associated with [OpenCNAM](http://www.opencnam.com), [EveryoneAPI](http://www.everyoneapi.com), or [Telo USA, Inc](http://www.telo.com). + diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..b849a18 --- /dev/null +++ b/install.sh @@ -0,0 +1,10 @@ +/usr/bin/php src/composer.phar self-update +/usr/bin/php src/composer.phar install -d src +echo "Installing CNAM" +mkdir /usr/local/share/cnam-cli/ +cp -R . /usr/local/share/cnam-cli/ +chmod +x /usr/local/share/cnam-cli/cnam.php +ln -s /usr/local/share/cnam-cli/cnam.php /usr/local/bin/cnam +cp share/man/man1/cnam.1 /usr/share/man/man1/cnam.1 +echo "Installation Complete" +echo "Run 'cnam setup' to set your EveryoneAPI credentials" diff --git a/src/cnam.php b/src/cnam.php index 674b156..e93bb1a 100755 --- a/src/cnam.php +++ b/src/cnam.php @@ -7,7 +7,7 @@ // Define our constants define('APPNAME', 'CNAM'); -define('VERSION', '2.0.0'); +define('VERSION', '2.0.1'); define('APIVersion', '1'); define('DEVGITHUB', 'https://www.github.com/cedwardsmedia/cnam'); define('DEVELOPER', 'Corey Edwards'); diff --git a/src/composer.lock b/src/composer.lock index 5a74175..8b659b4 100644 --- a/src/composer.lock +++ b/src/composer.lock @@ -4,21 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "436edd98ebb06f16e30eaa42698c640a", "content-hash": "4eda78d15c71e095283fb7c821234e99", "packages": [ { "name": "cedwardsmedia/everyonephp", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/cedwardsmedia/everyonephp.git", - "reference": "5015abd789f5f9f4408f5c0d2f4b922386870e1c" + "reference": "f043bbec5bc40a1d99733fc57bc61e346ec4a4d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cedwardsmedia/everyonephp/zipball/5015abd789f5f9f4408f5c0d2f4b922386870e1c", - "reference": "5015abd789f5f9f4408f5c0d2f4b922386870e1c", + "url": "https://api.github.com/repos/cedwardsmedia/everyonephp/zipball/f043bbec5bc40a1d99733fc57bc61e346ec4a4d0", + "reference": "f043bbec5bc40a1d99733fc57bc61e346ec4a4d0", "shasum": "" }, "require": { @@ -33,7 +32,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { @@ -46,7 +45,7 @@ "name": "Brian Seymour", "email": "imbrianseymour@gmail.com", "homepage": "https://bri.io", - "role": "Debugger" + "role": "Developer" } ], "description": "Simple Class for querying EveryoneAPI", @@ -56,36 +55,36 @@ "phone lookup", "phone number" ], - "time": "2015-12-28 08:52:21" + "time": "2017-05-23T06:56:54+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.1.1", + "version": "6.2.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "c6851d6e48f63b69357cbfa55bca116448140e0c" + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/c6851d6e48f63b69357cbfa55bca116448140e0c", - "reference": "c6851d6e48f63b69357cbfa55bca116448140e0c", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006", + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006", "shasum": "" }, "require": { - "guzzlehttp/promises": "~1.0", - "guzzlehttp/psr7": "~1.1", - "php": ">=5.5.0" + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "6.2-dev" } }, "autoload": { @@ -118,32 +117,32 @@ "rest", "web service" ], - "time": "2015-11-23 00:47:50" + "time": "2017-02-28T22:50:30+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.0.3", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b1e1c0d55f8083c71eda2c28c12a228d708294ea" + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b1e1c0d55f8083c71eda2c28c12a228d708294ea", - "reference": "b1e1c0d55f8083c71eda2c28c12a228d708294ea", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", "shasum": "" }, "require": { "php": ">=5.5.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -169,20 +168,20 @@ "keywords": [ "promise" ], - "time": "2015-10-15 22:28:00" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.2.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982" + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/4d0bdbe1206df7440219ce14c972aa57cc5e4982", - "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", "shasum": "" }, "require": { @@ -198,7 +197,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -218,29 +217,36 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "PSR-7 message implementation", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", "message", + "request", + "response", "stream", - "uri" + "uri", + "url" ], - "time": "2015-11-03 01:34:55" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "psr/http-message", - "version": "1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { @@ -268,6 +274,7 @@ } ], "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", @@ -276,7 +283,7 @@ "request", "response" ], - "time": "2015-05-04 20:22:00" + "time": "2016-08-06T14:39:51+00:00" } ], "packages-dev": [], diff --git a/src/composer.phar b/src/composer.phar index 3c67d59..e44722e 100755 Binary files a/src/composer.phar and b/src/composer.phar differ diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 0000000..9c65446 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,5 @@ +echo "Removing CNAM" +rm -rf /usr/local/share/cnam-cli/ +rm /usr/local/bin/cnam +rm /usr/share/man/man1/cnam.1 +echo "CNAM uninstalled."