Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to documentation and ponyd installation
Improved and finished several features: * devtools installation is done inside the virtualenv now * better symlink error handling * made pony listen on localhost by default * Updated documentation
- Loading branch information
1 parent
63ffc12
commit 4290b66
Showing
5 changed files
with
105 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,99 @@ | ||
|
||
PonyGateway: PonyDebugger Gateway Server | ||
======================================== | ||
PonyGateway: PonyDebugger Gateway Server (``ponyd``) | ||
==================================================== | ||
|
||
This directory contains the gateway server that serves Chrome Developer Tools. | ||
|
||
PonyGateway is licensed under the Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html). | ||
PonyGateway is licensed under the Apache Licence, Version 2.0 | ||
(http://www.apache.org/licenses/LICENSE-2.0.html). | ||
|
||
Installing | ||
---------- | ||
|
||
- To install the latest stable version: | ||
There are two ways to install both are pretty simple and can be run in userland. | ||
The end result is the same. | ||
|
||
Quick userland install | ||
`````````````````````` | ||
|
||
:: | ||
|
||
curl -sk https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py | \ | ||
python - --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger | ||
|
||
This will install ``ponyd`` script to ``~/Library/PonyDebugger/bin/ponyd`` and | ||
attempt to symlink ``/usr/local/bin/ponyd`` to it. | ||
|
||
This installer uses a `virtualenv | ||
<http://www.virtualenv.org/en/latest/index.html>`_ bootstrap script to install | ||
PonyDebugger and all its dependencies in an isolated python environment in | ||
``~/Library/PonyDebugger``. | ||
|
||
Since this uses virtualenv, you can also download the script and customize the | ||
installation options:: | ||
|
||
curl -O https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py | ||
python bootstrap-ponyd.py --help | ||
|
||
Upgrading your installation can be done with the following commands:: | ||
|
||
# activate your virtualenv | ||
source ~/Library/PonyDebugger/bin/activate | ||
# update the ponyd source | ||
pip install -U -e git+https://github.com/square/PonyDebugger.git#egg=ponydebugger | ||
# updates chrome dev tools source | ||
ponyd update-devtools | ||
|
||
.. Note:: This process will be simplified in the future | ||
|
||
|
||
Development installation | ||
```````````````````````` | ||
|
||
If you already have PonyDebugger git repo checked out you can can set up a | ||
virtualenv manually and have your ponyd installation point to your existing | ||
checkout. For demonstration we assume ``$VENV`` is set to your intended install | ||
path and ``$PONYDEBUGGER_PATH`` is set to your PonyDebugger git checkout:: | ||
|
||
# if you don't already have virtualenv installed | ||
sudo easy_install virtualenv | ||
|
||
virtualenv "$VENV" | ||
source "$VENV/bin/activate" | ||
pip install -e "$PONYDEBUGGER_PATH" | ||
|
||
# to ensure your shell knows ponyd exists | ||
hash -r | ||
|
||
To run this ponyd you can either activate your environment by ``source | ||
"$VENV/bin/activate"`` and ``ponyd`` will be added to your path. You can also | ||
just call it directly via ``$VENV/bin/ponyd`` without activating first. | ||
|
||
``sudo pip install ponygateway`` | ||
|
||
Or omit sudo if installing in a virtual environment. | ||
Starting Debugging Server | ||
------------------------- | ||
|
||
**Note**: If you want to download the latest version, you will have to clone the repository and run ``sudo python setup.py install`` in the ``ponygateway`` directory. | ||
Once installed, running PonyDebugger's server is easy:: | ||
|
||
- Install a supported version of Chrome Developer Tools with ``ponydownloader``. | ||
ponyd serve | ||
|
||
This will install a supported version of Chrome Developer Tools into ``~/.devtools`` by default. To specify a custom directory: | ||
By default, ponyd listens on port 9000 and only on your localhost for security | ||
reasons. | ||
|
||
``ponydownloader /path/to/devtools`` | ||
To make the server accessible by another device or computer you must have ponyd | ||
listen on ``0.0.0.0`` which is done by:: | ||
|
||
- To run the Gateway server, run ``ponygateway``. By default, this will run the | ||
gateway on ``localhost:9000``. | ||
|
||
To specify a custom devtools directory: | ||
ponyd serve -i 0.0.0.0 | ||
|
||
``ponygateway -d /path/to/devtools`` | ||
The listen and other ports can be customized as well. Run ``ponyd serve | ||
--help`` for more information. | ||
|
||
For more details, run ``ponygateway -h`` | ||
|
||
Known Issues / Improvements | ||
--------------------------- | ||
|
||
- Relaunching the client application requires you to navigate back to the main page. | ||
- Chrome Developer Tools shows some unnecessary tabs (such as Elements). ``ponydownloader`` could possibly be | ||
updated to patch the incoming chrome developer tools to hide these unused tabs. | ||
- Relaunching the client application requires you to navigate back to the main | ||
page. | ||
- Chrome Developer Tools shows some unnecessary tabs (such as Elements). | ||
``ponyd update-devtools`` could possibly be updated to patch the incoming | ||
chrome developer tools to hide these unused tabs. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
import os | ||
import sys | ||
|
||
DEFAULT_DEVTOOLS_PATH = os.path.expanduser('~/.devtools') | ||
|
||
DEFAULT_DEVTOOLS_PATH = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), '..', 'src', 'devtools')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters