From 95475b77552bd0d3f222ad0b415c4a39c6cce9c3 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Mon, 10 Aug 2015 21:44:56 +0800 Subject: [PATCH] Docs basic update. --- README.md | 20 +++++++-------- .../Controller/DefaultController.php | 5 ++++ .../TestBundle/Controller/PushController.php | 23 ------------------ tests/TestBundle/Resources/config/routing.php | 6 ++--- .../{push => getting-started}/index.html.twig | 0 .../Resources/views/index.html.twig | 18 +++++++------- .../Resources/views/page_bottom.html.twig | 2 +- .../Resources/views/page_top.html.twig | 2 +- .../Resources/views/scripts.html.twig | 16 ++++++------ .../Resources/views/styles.html.twig | 10 ++++---- .../TestBundle/TestBundleServiceProvider.php | 4 --- web/favicon.ico | Bin 766 -> 6518 bytes 12 files changed, 42 insertions(+), 64 deletions(-) delete mode 100644 tests/TestBundle/Controller/PushController.php rename tests/TestBundle/Resources/views/{push => getting-started}/index.html.twig (100%) diff --git a/README.md b/README.md index bd88ae3..c727d30 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ AuthBucket\\Push [![Build Status](https://travis-ci.org/authbucket/push-php.svg?branch=master)](https://travis-ci.org/authbucket/push-php) [![Coverage -Status](https://img.shields.io/coveralls/authbucket/push-php.svg)](https://coveralls.io/r/authbucket/push-php?branch=master) +Status](https://coveralls.io/repos/authbucket/push-php/badge.svg?branch=master&service=github)](https://coveralls.io/github/authbucket/push-php?branch=master) [![Dependency Status](https://www.versioneye.com/php/authbucket:push-php/dev-master/badge.svg)](https://www.versioneye.com/php/authbucket:push-php/dev-master) [![Latest Stable @@ -19,7 +19,7 @@ devices; secondary goal would be develop corresponding wrapper [Symfony2 Bundle](http://symfony.com) and [Drupal module](https://www.drupal.org). This library bundle with a [Silex](http://silex.sensiolabs.org/) based -[AuthBucketPushServiceProvider](https://github.com/authbucket/push-php/blob/master/src/AuthBucket/Push/Provider/AuthBucketPushServiceProvider.php) +[AuthBucketPushServiceProvider](https://github.com/authbucket/push-php/blob/master/src/Provider/AuthBucketPushServiceProvider.php) for unit test and demo purpose. Installation and usage can refer as below. @@ -27,7 +27,7 @@ Demo ---- The demo is based on [Silex](http://silex.sensiolabs.org/) and -[AuthBucketPushServiceProvider](https://github.com/authbucket/push-php/blob/master/src/AuthBucket/Push/Provider/AuthBucketPushServiceProvider.php). +[AuthBucketPushServiceProvider](https://github.com/authbucket/push-php/blob/master/src/Provider/AuthBucketPushServiceProvider.php). Read though [Demo](http://push-php.authbucket.com/demo) for more information. @@ -35,12 +35,12 @@ You may also run the demo locally. Open a console and execute the following command to install the latest version in the `push-php` directory: - $ composer create-project authbucket/push-php push-php "~0.0" + $ composer create-project authbucket/push-php authbucket/push-php "~1.0" Then use the PHP built-in web server to run the demo application: - $ cd push-php - $ php app/console server:run + $ cd authbucket/push-php + $ app/console server:run If you get the error `There are no commands defined in the "server" namespace.`, then you are @@ -65,7 +65,7 @@ Pages](http://authbucket.github.io/push-php). To built the documents locally, execute the following command: - $ vendor/bin/sami.php update .sami.php + $ composer sami Open `build/sami/index.html` with your browser for the documents. @@ -79,7 +79,7 @@ be found from [Coveralls](https://coveralls.io/r/authbucket/push-php). To run the test suite locally, execute the following command: - $ vendor/bin/phpunit + $ composer phpunit Open `build/logs/html` with your browser for the coverage report. @@ -98,5 +98,5 @@ License - Code released under [MIT](https://github.com/authbucket/push-php/blob/master/LICENSE) -- Docs released under [CC BY-NC-SA - 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/) +- Docs released under [CC BY + 4.0](http://creativecommons.org/licenses/by/4.0/) diff --git a/tests/TestBundle/Controller/DefaultController.php b/tests/TestBundle/Controller/DefaultController.php index c8bd3bf..0260d5b 100644 --- a/tests/TestBundle/Controller/DefaultController.php +++ b/tests/TestBundle/Controller/DefaultController.php @@ -25,6 +25,11 @@ public function indexAction(Request $request, Application $app) { return $app['twig']->render('index.html.twig'); } + + public function gettingStartedIndexAction(Request $request, Application $app) + { + return $app['twig']->render('getting-started/index.html.twig'); + } public function adminRefreshDatabaseAction(Request $request, Application $app) { diff --git a/tests/TestBundle/Controller/PushController.php b/tests/TestBundle/Controller/PushController.php deleted file mode 100644 index ec4422e..0000000 --- a/tests/TestBundle/Controller/PushController.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace AuthBucket\Push\Tests\TestBundle\Controller; - -use Silex\Application; -use Symfony\Component\HttpFoundation\Request; - -class PushController -{ - public function indexAction(Request $request, Application $app) - { - return $app['twig']->render('push/index.html.twig'); - } -} diff --git a/tests/TestBundle/Resources/config/routing.php b/tests/TestBundle/Resources/config/routing.php index a8af8ac..3f26d0e 100644 --- a/tests/TestBundle/Resources/config/routing.php +++ b/tests/TestBundle/Resources/config/routing.php @@ -15,12 +15,12 @@ $app->get('/admin/refresh_database', 'authbucket_push.tests.default_controller:adminRefreshDatabaseAction') ->bind('admin_refresh_database'); +$app->get('/getting-started', 'authbucket_push.tests.default_controller:gettingStartedIndexAction') + ->bind('getting-started'); + $app->get('/demo', 'authbucket_push.tests.demo_controller:indexAction') ->bind('demo'); -$app->get('/push', 'authbucket_push.tests.push_controller:indexAction') - ->bind('push'); - $app->match('/dummy/v1.0/oauth2/debug', 'authbucket_push.tests.oauth2_controller:debugAction') ->bind('dummy_oauth2_debug') ->method('GET|POST'); diff --git a/tests/TestBundle/Resources/views/push/index.html.twig b/tests/TestBundle/Resources/views/getting-started/index.html.twig similarity index 100% rename from tests/TestBundle/Resources/views/push/index.html.twig rename to tests/TestBundle/Resources/views/getting-started/index.html.twig diff --git a/tests/TestBundle/Resources/views/index.html.twig b/tests/TestBundle/Resources/views/index.html.twig index 32cea44..414f2ae 100644 --- a/tests/TestBundle/Resources/views/index.html.twig +++ b/tests/TestBundle/Resources/views/index.html.twig @@ -12,22 +12,22 @@

Build Status - Coverage Status + Coverage Status Dependency Status Latest Stable Version Total Downloads License

The primary goal of AuthBucket\Push is to develop a library for sending out push notifications to mobile devices; secondary goal would be develop corresponding wrapper Symfony2 Bundle and Drupal module.

-

This library bundle with a Silex based AuthBucketPushServiceProvider for unit test and demo purpose. Installation and usage can refer as below.

+

This library bundle with a Silex based AuthBucketPushServiceProvider for unit test and demo purpose. Installation and usage can refer as below.

-

The demo is based on Silex and AuthBucketPushServiceProvider. Read though Demo for more information.

+

The demo is based on Silex and AuthBucketPushServiceProvider. Read though Demo for more information.

You may also run the demo locally. Open a console and execute the following command to install the latest version in the push-php directory:

-
$ composer create-project authbucket/push-php push-php "~0.0"
+
$ composer create-project authbucket/push-php authbucket/push-php "~1.0"

Then use the PHP built-in web server to run the demo application:

-
$ cd push-php
-$ php app/console server:run
+
$ cd authbucket/push-php
+$ app/console server:run

If you get the error There are no commands defined in the "server" namespace., then you are probably using PHP 5.3. That's ok! But the built-in web server is only available for PHP 5.4.0 or higher. If you have an older version of PHP or if you prefer a traditional web server such as Apache or Nginx, read the Configuring a web server article.

Open your browser and access the http://127.0.0.1:8000 URL to see the Welcome page of demo application.

Also access http://127.0.0.1:8000/admin/refresh_database to initialize the bundled SQLite database with user account admin:secrete.

@@ -35,13 +35,13 @@ $ php app/console server:run

Push's documentation is built with Sami and publicly hosted on GitHub Pages.

To built the documents locally, execute the following command:

-
$ vendor/bin/sami.php update .sami.php
+
$ composer sami

Open build/sami/index.html with your browser for the documents.

This project is coverage with PHPUnit test cases; CI result can be found from Travis CI; code coverage report can be found from Coveralls.

To run the test suite locally, execute the following command:

-
$ vendor/bin/phpunit
+
$ composer phpunit

Open build/logs/html with your browser for the coverage report.

@@ -57,7 +57,7 @@ $ php app/console server:run diff --git a/tests/TestBundle/Resources/views/page_bottom.html.twig b/tests/TestBundle/Resources/views/page_bottom.html.twig index 6816c31..be32b2f 100644 --- a/tests/TestBundle/Resources/views/page_bottom.html.twig +++ b/tests/TestBundle/Resources/views/page_bottom.html.twig @@ -7,7 +7,7 @@
  • Design and built with all the love in the world by @hswong3i.

    -

    Code released under MIT. Docs released under CC BY-NC-SA 3.0.

    +

    Code released under MIT. Docs released under CC BY 4.0.