Skip to content

Commit

Permalink
Docs basic update.
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Aug 10, 2015
1 parent c4e8167 commit 95475b7
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 64 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,28 +19,28 @@ 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.

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.

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
Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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/)
5 changes: 5 additions & 0 deletions tests/TestBundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
23 changes: 0 additions & 23 deletions tests/TestBundle/Controller/PushController.php

This file was deleted.

6 changes: 3 additions & 3 deletions tests/TestBundle/Resources/config/routing.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
18 changes: 9 additions & 9 deletions tests/TestBundle/Resources/views/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,36 @@
</h1>
<p>
<a href="https://travis-ci.org/authbucket/push-php"><img src="https://travis-ci.org/authbucket/push-php.svg?branch=master" alt="Build Status" /></a>
<a href="https://coveralls.io/r/authbucket/push-php?branch=master"><img src="https://img.shields.io/coveralls/authbucket/push-php.svg" alt="Coverage Status" /></a>
<a href='https://coveralls.io/github/authbucket/push-php?branch=master'><img src='https://coveralls.io/repos/authbucket/push-php/badge.svg?branch=master&service=github' alt='Coverage Status' /></a>
<a href="https://www.versioneye.com/php/authbucket:push-php/dev-master"><img src="https://www.versioneye.com/php/authbucket:push-php/dev-master/badge.svg" alt="Dependency Status" /></a>
<a href="https://packagist.org/packages/authbucket/push-php"><img src="https://poser.pugx.org/authbucket/push-php/v/stable.svg" alt="Latest Stable Version" /></a>
<a href="https://packagist.org/packages/authbucket/push-php"><img src="https://poser.pugx.org/authbucket/push-php/downloads.svg" alt="Total Downloads" /></a>
<a href="https://packagist.org/packages/authbucket/push-php"><img src="https://poser.pugx.org/authbucket/push-php/license.svg" alt="License" /></a>
</p>
<p class="lead">The primary goal of <a href="http://push-php.authbucket.com/">AuthBucket\Push</a> is to develop a library for sending out push notifications to mobile devices; secondary goal would be develop corresponding wrapper <a href="http://symfony.com">Symfony2 Bundle</a> and <a href="https://www.drupal.org">Drupal module</a>.</p>
<p>This library bundle with a <a href="http://silex.sensiolabs.org/">Silex</a> based <a href="https://github.com/authbucket/push-php/blob/master/src/AuthBucket/Push/Provider/AuthBucketPushServiceProvider.php">AuthBucketPushServiceProvider</a> for unit test and demo purpose. Installation and usage can refer as below.</p>
<p>This library bundle with a <a href="http://silex.sensiolabs.org/">Silex</a> based <a href="https://github.com/authbucket/push-php/blob/master/src/Provider/AuthBucketPushServiceProvider.php">AuthBucketPushServiceProvider</a> for unit test and demo purpose. Installation and usage can refer as below.</p>

<h2 id="demo" class="page-header">Demo</h2>
<p class="lead">The demo is based on <a href="http://silex.sensiolabs.org/">Silex</a> and <a href="https://github.com/authbucket/push-php/blob/master/src/AuthBucket/Push/Provider/AuthBucketPushServiceProvider.php">AuthBucketPushServiceProvider</a>. Read though <a href="http://push-php.authbucket.com/demo">Demo</a> for more information.</p>
<p class="lead">The demo is based on <a href="http://silex.sensiolabs.org/">Silex</a> and <a href="https://github.com/authbucket/push-php/blob/master/src/Provider/AuthBucketPushServiceProvider.php">AuthBucketPushServiceProvider</a>. Read though <a href="http://push-php.authbucket.com/demo">Demo</a> for more information.</p>
<p>You may also run the demo locally. Open a console and execute the following command to install the latest version in the <code>push-php</code> directory:</p>
<pre><code class="bash">$ composer create-project authbucket/push-php push-php "~0.0"</code></pre>
<pre><code class="bash">$ composer create-project authbucket/push-php authbucket/push-php "~1.0"</code></pre>
<p>Then use the PHP built-in web server to run the demo application:</p>
<pre><code class="bash">$ cd push-php
$ php app/console server:run</code></pre>
<pre><code class="bash">$ cd authbucket/push-php
$ app/console server:run</code></pre>
<p>If you get the error <code>There are no commands defined in the &quot;server&quot; namespace.</code>, 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 <a href="http://silex.sensiolabs.org/doc/web_servers.html">Configuring a web server</a> article.</p>
<p>Open your browser and access the <a href="http://127.0.0.1:8000">http://127.0.0.1:8000</a> URL to see the Welcome page of demo application.</p>
<p>Also access <a href="http://127.0.0.1:8000/admin/refresh_database">http://127.0.0.1:8000/admin/refresh_database</a> to initialize the bundled SQLite database with user account <code>admin</code>:<code>secrete</code>.</p>

<h2 id="documentation" class="page-header">Documentation</h2>
<p class="lead">Push's documentation is built with <a href="https://github.com/fabpot/Sami">Sami</a> and publicly hosted on <a href="http://authbucket.github.io/push-php">GitHub Pages</a>.</p>
<p>To built the documents locally, execute the following command:</p>
<pre><code class="bash">$ vendor/bin/sami.php update .sami.php</code></pre>
<pre><code class="bash">$ composer sami</code></pre>
<p>Open <code>build/sami/index.html</code> with your browser for the documents.</p>

<h2 id="tests" class="page-header">Tests</h2>
<p class="lead">This project is coverage with <a href="http://phpunit.de/">PHPUnit</a> test cases; CI result can be found from <a href="https://travis-ci.org/authbucket/push-php">Travis CI</a>; code coverage report can be found from <a href="https://coveralls.io/r/authbucket/push-php">Coveralls</a>.</p>
<p>To run the test suite locally, execute the following command:</p>
<pre><code class="bash">$ vendor/bin/phpunit</code></pre>
<pre><code class="bash">$ composer phpunit</code></pre>
<p>Open <code>build/logs/html</code> with your browser for the coverage report.</p>

<h2 id="references" class="page-header">References</h2>
Expand All @@ -57,7 +57,7 @@ $ php app/console server:run</code></pre>
<h2 id="license" class="page-header">License</h2>
<ul>
<li>Code released under <a href="https://github.com/authbucket/push-php/blob/master/LICENSE">MIT</a></li>
<li>Docs released under <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a></li>
<li>Docs released under <a href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tests/TestBundle/Resources/views/page_bottom.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<li><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://push-php.authbucket.com/" data-via="authbucket">Tweet</a></li>
</ul>
<p>Design and built with all the love in the world by <a href="http://twitter.com/hswong3i">@hswong3i</a>.</p>
<p>Code released under <a href="https://github.com/authbucket/push-php/blob/master/LICENSE">MIT</a>. Docs released under <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0</a>.</p>
<p>Code released under <a href="https://github.com/authbucket/push-php/blob/master/LICENSE">MIT</a>. Docs released under <a href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.</p>
<ul class="list-inline">
<li><a href="https://github.com/authbucket/push-php">GitHub</a></li>
<li>·</li>
Expand Down
2 changes: 1 addition & 1 deletion tests/TestBundle/Resources/views/page_top.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="{{ path('getting-started') }}">Getting Started</a></li>
<li><a href="{{ path('demo') }}">Demo</a></li>
<li><a href="{{ path('push') }}">Push Server</a></li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
Expand Down
16 changes: 8 additions & 8 deletions tests/TestBundle/Resources/views/scripts.html.twig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- highlight.js -->
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/bash.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/http.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/json.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/php.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/languages/bash.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/languages/http.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/languages/json.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/languages/php.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<!-- holder.js -->
<script src="//cdnjs.cloudflare.com/ajax/libs/holder/2.4.1/holder.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/holder/2.8.0/holder.min.js"></script>
10 changes: 5 additions & 5 deletions tests/TestBundle/Resources/views/styles.html.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Bootstrap -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!-- highlight.js -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/default.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/default.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/github.min.css">
<!-- font-awesome -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<!-- Custom styles for this template -->
<link href="/css/style.css" rel="stylesheet">
4 changes: 0 additions & 4 deletions tests/TestBundle/TestBundleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ public function register(Application $app)
$app['authbucket_push.tests.oauth2_controller'] = $app->share(function () {
return new OAuth2Controller();
});

$app['authbucket_push.tests.push_controller'] = $app->share(function () {
return new PushController();
});
}

public function boot(Application $app)
Expand Down
Binary file modified web/favicon.ico
Binary file not shown.

0 comments on commit 95475b7

Please sign in to comment.