Merge branch 'bug/654608-rename-f1-to-share' into develop
This commit is contained in:
Коммит
edffbfe1b6
64
README.md
64
README.md
|
@ -1,50 +1,52 @@
|
|||
# f1
|
||||
# ShareServer
|
||||
|
||||
A link sharing service that consists of a Firefox extension and a web service.
|
||||
A web service that supports Firefox's 'Share' feature.
|
||||
|
||||
The firefox extension creates an area to show the share UI served from the web service.
|
||||
Firefox exposes the share UI as a preference panel.
|
||||
|
||||
The web service handles the OAuth work and sending of messages to different share servers.
|
||||
The web service handles the OAuth work and sending of messages to different
|
||||
share servers.
|
||||
|
||||
Some directory explanations:
|
||||
|
||||
* **extensions**: holds the Firefox extension source.
|
||||
* **web**: holds the UI for the web service.
|
||||
* **grinder**: a load testing tool.
|
||||
* **tools**: deployment tools.
|
||||
* The rest of the files support the web service.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
### Get the f1 repository:
|
||||
### Get the server-share repository:
|
||||
|
||||
git clone https://github.com/mozilla/f1.git
|
||||
cd f1
|
||||
git clone https://github.com/mozilla/server-share.git
|
||||
cd server-share
|
||||
|
||||
### Setup dependencies:
|
||||
|
||||
make build
|
||||
|
||||
If you are on OS X and you get errors or it does not work, see the OS X troubleshooting
|
||||
section below.
|
||||
If you are on OS X and you get errors or it does not work, see the OS X
|
||||
troubleshooting section below.
|
||||
|
||||
### Start the virtualenv
|
||||
|
||||
source bin/activate
|
||||
|
||||
### Running f1
|
||||
### Running ShareServer
|
||||
|
||||
Run the web server. 'reload' is useful for development, the webserver restarts on file changes, otherwise you can leave it off
|
||||
Run the web server. 'reload' is useful for development, the webserver restarts
|
||||
on file changes, otherwise you can leave it off.
|
||||
|
||||
paster serve --reload development.ini
|
||||
|
||||
Then visit: [http://127.0.0.1:5000/](http://127.0.0.1:5000/) for an index of api examples
|
||||
Then visit: [http://127.0.0.1:5000/](http://127.0.0.1:5000/) for an index of
|
||||
api examples
|
||||
|
||||
## Troubleshooting OS X installs
|
||||
|
||||
If the **make build** command produced errors or results in not being able to start
|
||||
up the server, use the following steps. It is suggested you re-clone F1 before
|
||||
doing the following steps, so that it starts out with a clean environment.
|
||||
If the **make build** command produced errors or results in not being able to
|
||||
start up the server, use the following steps. It is suggested you re-clone
|
||||
server-share before doing the following steps, so that it starts out with a
|
||||
clean environment.
|
||||
|
||||
1. Make sure XCode 3 is installed.
|
||||
|
||||
|
@ -59,19 +61,24 @@ doing the following steps, so that it starts out with a clean environment.
|
|||
cd /usr/local/bin
|
||||
sudo ln -s /opt/python/bin/virtualenv-2.6 virtualenv
|
||||
|
||||
3. Now edit your .profile to make sure that if you have MacPorts installed, its PATH and MANPATH variables
|
||||
are last in the list for those environment variables.
|
||||
3. Now edit your .profile to make sure that if you have MacPorts installed, its
|
||||
PATH and MANPATH variables are last in the list for those environment
|
||||
variables.
|
||||
|
||||
I also removed export PYTHONPATH=/Users/aaa/hg/raindrop/server/python:$PYTHONPATH
|
||||
and removed /Library/Frameworks/Python.framework/Versions/Current/bin from the $PATH variable.
|
||||
I also removed export
|
||||
PYTHONPATH=/Users/aaa/hg/raindrop/server/python:$PYTHONPATH and removed
|
||||
/Library/Frameworks/Python.framework/Versions/Current/bin from the $PATH
|
||||
variable.
|
||||
|
||||
4. Build C libraries via Homebrew:
|
||||
|
||||
Homebrew installs into /usr/local by default, and it is best if you chown the files in there to you:
|
||||
Homebrew installs into /usr/local by default, and it is best if you chown the
|
||||
files in there to you:
|
||||
|
||||
sudo chown -R $USER /usr/local
|
||||
|
||||
If installed things before in these directories, remove these directories: /usr/local/include and /usr/local/lib
|
||||
If installed things before in these directories, remove these directories:
|
||||
/usr/local/include and /usr/local/lib
|
||||
|
||||
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
|
||||
brew install memcached libmemcached
|
||||
|
@ -80,16 +87,19 @@ Then try the **make build** command above and continue from there.
|
|||
|
||||
## Setting up a valid Google domain for OpenID+OAuth
|
||||
|
||||
You have to have access to a valid domain that google can get to and where you can install an html file.
|
||||
You have to have access to a valid domain that google can get to and where you
|
||||
can install an html file.
|
||||
|
||||
Visit: [https://www.google.com/accounts/ManageDomains](https://www.google.com/accounts/ManageDomains)
|
||||
|
||||
Add your domain, follow the rest of their instructions.
|
||||
|
||||
To test: Once that is done, you can bypass normal access to your domain by adding to your /etc/hosts file:
|
||||
To test: Once that is done, you can bypass normal access to your domain by
|
||||
adding to your /etc/hosts file:
|
||||
|
||||
127.0.0.1 your.host.com
|
||||
|
||||
Update development.ini and add your key/secret for the google configuration, restart paster.
|
||||
Update development.ini and add your key/secret for the google configuration,
|
||||
restart paster.
|
||||
|
||||
Then in the web browser, hit f1 with http://your.host.com.
|
||||
Then in the web browser, hit ShareServer with http://your.host.com.
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
s is without staging right now...
|
||||
|
||||
If you can "ssh linkdrop@rd-admin-01.mozillamessaging.com" then these instructions will work for you. If not, contact gozer and don't bother with this until you can ssh into the box.
|
||||
|
||||
|
||||
-Initial setup on local machine:
|
||||
|
||||
> git clone git@github.com:mozilla/f1.git
|
||||
> cd f1
|
||||
> git remote add production linkdrop@rd-admin-01.mozillamessaging.com:f1-prod
|
||||
> git branch prod
|
||||
|
||||
-Switch to a branch
|
||||
|
||||
> git checkout prod
|
||||
|
||||
-Merge from master branch on production to the current branch:
|
||||
|
||||
> git pull production master
|
||||
|
||||
-Push from our prod branch to the master branch on production:
|
||||
|
||||
> git push production prod:master
|
||||
|
||||
-Merge from master branch on github (f1) into our current branch:
|
||||
|
||||
> git pull origin master
|
||||
|
||||
|
||||
What I've been doing when I want to push to production:
|
||||
|
||||
git checkout prod
|
||||
git pull production master
|
||||
git pull origin master
|
||||
git push production prod:master
|
||||
git checkout master
|
||||
|
||||
That can all be simplified later via git config file (and there may be a better way to do it anyway). When you push to production, you will see a lot of output. I'd pipe that to a file and then examine the file for any errors. That output is basically a sync to the live servers as a git hook in the push. As I understand from gozer, there is also a cron job that checks every few minutes in case the update from push fails.
|
||||
|
||||
I'm not certain about git branches yet, so be sure you do NOT push to origin from the prod branch.
|
||||
|
||||
Shane
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# linkdrop - Pylons development environment configuration
|
||||
# ShareServer - debug environment configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -116,7 +116,7 @@ use = egg:Paste#static
|
|||
document_root = %(here)s/web
|
||||
|
||||
[app:api]
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
full_stack = true
|
||||
static_files = true
|
||||
session_middleware = false
|
||||
|
@ -141,7 +141,7 @@ set debug = false
|
|||
filter-with = dbgp
|
||||
|
||||
[filter:dbgp]
|
||||
use = egg:linkdrop#dbgp
|
||||
use = egg:ShareServer#dbgp
|
||||
# character key for use with dbgp proxy
|
||||
#idekey=username
|
||||
# machine client debugger (e.g. Komodo IDE) or proxy runs on
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# linkdrop - Pylons development environment configuration
|
||||
# ShareServer - development environment configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -95,11 +95,11 @@ use = egg:Paste#urlmap
|
|||
/api = api
|
||||
|
||||
[app:home]
|
||||
use = egg:linkdrop#static
|
||||
use = egg:ShareServer#static
|
||||
document_root = %(here)s/deps/client-share-web
|
||||
|
||||
[app:api]
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
full_stack = true
|
||||
static_files = false
|
||||
# if we've configured beaker as a filter-app then don't enable it
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
linkdrop
|
||||
++++++++
|
||||
ShareServer
|
||||
+++++++++++
|
||||
|
||||
This is the main index page of your documentation. It should be written in
|
||||
`reStructuredText format <http://docutils.sourceforge.net/rst.html>`_.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# linkdrop - Pylons testing environment configuration
|
||||
# ShareServer - testing environment configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -60,7 +60,7 @@ beaker.session.secret = somesecret
|
|||
beaker.session.type = memory
|
||||
|
||||
[filter-app:csrf]
|
||||
use = egg:linkdrop#csrf
|
||||
use = egg:ShareServer#csrf
|
||||
# allow access to account api's for oauth, which will not have csrf token
|
||||
# be sure to use the FULL path
|
||||
csrf.unprotected_path = /api/account
|
||||
|
@ -78,7 +78,7 @@ document_root = %(here)s/web
|
|||
[app:api]
|
||||
#use: config:api.ini
|
||||
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
full_stack = true
|
||||
static_files = true
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# linkdrop - Pylons development environment configuration
|
||||
# ShareServer - gunicorn / gevent environment configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -85,7 +85,7 @@ beaker.session.data_dir = %(here)s/data/sessions
|
|||
beaker.session.lock_dir = %(here)s/data/sessions/lock
|
||||
|
||||
[filter-app:csrf]
|
||||
use = egg:linkdrop#csrf
|
||||
use = egg:ShareServer#csrf
|
||||
# allow access to account api's for oauth, which will not have csrf token
|
||||
# be sure to use the FULL path
|
||||
csrf.unprotected_path = /api/account
|
||||
|
@ -97,11 +97,11 @@ use = egg:Paste#urlmap
|
|||
/api = api
|
||||
|
||||
[app:home]
|
||||
use = egg:linkdrop#static
|
||||
use = egg:ShareServer#static
|
||||
document_root = %(here)s/web
|
||||
|
||||
[app:api]
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
full_stack = true
|
||||
static_files = false
|
||||
# if we've configured beaker as a filter-app then don't enable it
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import logging
|
||||
|
||||
log = logging.getLogger('share')
|
||||
log = logging.getLogger('shareserver')
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
|
||||
#
|
||||
# linkdrop - Pylons configuration
|
||||
# shareserver - app configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -100,7 +100,7 @@ beaker.session.data_dir = %(here)s/data/sessions
|
|||
beaker.session.lock_dir = %(here)s/data/sessions/lock
|
||||
|
||||
[filter-app:csrf]
|
||||
use = egg:linkdrop#csrf
|
||||
use = egg:ShareServer#csrf
|
||||
# allow access to account api's for oauth, which will not have csrf token
|
||||
# be sure to use the FULL path
|
||||
csrf.unprotected_path = /api/account
|
||||
|
@ -116,7 +116,7 @@ use = egg:Paste#static
|
|||
document_root = %(here)s/web
|
||||
|
||||
[app:api]
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
full_stack = true
|
||||
static_files = true
|
||||
session_middleware = false
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<a target="_blank" href="http://f1.mozillamessaging.com/"
|
||||
style="color: #00A0FF;
|
||||
font-size: 16px; ">
|
||||
F1 by Mozilla Messaging
|
||||
Firefox Share by Mozilla Messaging
|
||||
</a>
|
||||
</div>
|
||||
<!--link-->
|
||||
|
@ -55,7 +55,7 @@
|
|||
<div class="footer"
|
||||
style="font-size: 12px;
|
||||
color: #444;">
|
||||
shared via <a target="_blank" style="color:#006AAA;font-weight:bold;text-decoration:none;" title="Share links with the people that matter to you" href="http://f1.mozillamessaging.com/">Mozilla F1</a> for Firefox — <span style="color:#666;">share links with the people that matter to you</span>
|
||||
shared via <a target="_blank" style="color:#006AAA;font-weight:bold;text-decoration:none;" title="Share links with the people that matter to you" href="http://f1.mozillamessaging.com/">Firefox Share</a> — <span style="color:#666;">share links with the people that matter to you</span>
|
||||
</div>
|
||||
<!--footer-->
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<div class="footer" style="font-size:12px;color:#444;">
|
||||
shared via <a target="_blank" style="color:#006AAA;font-weight:bold;text-decoration:none;" title="Share links with the people that matter to you" href="http://f1.mozillamessaging.com/">Mozilla F1</a> for Firefox — <span style="color:#666;">"share links with the people that matter to you"</span>
|
||||
shared via <a target="_blank" style="color:#006AAA;font-weight:bold;text-decoration:none;" title="Share links with the people that matter to you" href="http://f1.mozillamessaging.com/">Firefox Share</a> — <span style="color:#666;">"share links with the people that matter to you"</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -11,5 +11,5 @@ ${c.longurl}
|
|||
${c.description}
|
||||
|
||||
--
|
||||
shared via Mozilla F1 for Firefox -- http://f1.mozillamessaging.com/
|
||||
shared via Firefox Share -- http://f1.mozillamessaging.com/
|
||||
:: share links with the people that matter to you ::
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# linkdrop - Pylons configuration
|
||||
# ShareServer - production configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -68,7 +68,7 @@ use = egg:Paste#urlmap
|
|||
# This should be removed and the web pages directly served by nginx
|
||||
#
|
||||
[app:home]
|
||||
use = egg:linkdrop#static
|
||||
use = egg:ShareServer#static
|
||||
document_root = /var/www/f1
|
||||
|
||||
[filter:proxy-prefix]
|
||||
|
@ -76,7 +76,7 @@ use = egg:PasteDeploy#prefix
|
|||
prefix = /api
|
||||
|
||||
[app:api]
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
filter-with = proxy-prefix
|
||||
full_stack = true
|
||||
static_files = false
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# linkdrop - Pylons development environment configuration
|
||||
# ShareServer - profiling environment configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -116,7 +116,7 @@ use = egg:Paste#static
|
|||
document_root = %(here)s/web
|
||||
|
||||
[app:api]
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
full_stack = true
|
||||
static_files = true
|
||||
session_middleware = false
|
||||
|
|
2
setup.py
2
setup.py
|
@ -31,7 +31,7 @@ except ImportError:
|
|||
VERSION = '0.3.7'
|
||||
|
||||
setup(
|
||||
name='linkdrop',
|
||||
name='ShareServer',
|
||||
version=VERSION,
|
||||
description=('F1 is a browser extension that allows you to share links '
|
||||
'in a fast and fun way.'),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# linkdrop - Pylons configuration
|
||||
# ShareServer - staging configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -58,7 +58,7 @@ beaker.session.data_dir = %(here)s/data/sessions
|
|||
beaker.session.lock_dir = %(here)s/data/sessions/lock
|
||||
|
||||
[filter-app:csrf]
|
||||
use = egg:linkdrop#csrf
|
||||
use = egg:ShareServer#csrf
|
||||
# allow access to account api's for oauth, which will not have csrf token
|
||||
# be sure to use the FULL path
|
||||
csrf.unprotected_path = /account
|
||||
|
@ -74,7 +74,7 @@ use = egg:Paste#static
|
|||
document_root = %(here)s/web
|
||||
|
||||
[app:api]
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
full_stack = true
|
||||
static_files = false
|
||||
session_middleware = false
|
||||
|
|
4
test.ini
4
test.ini
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
|
||||
#
|
||||
# linkdrop - Pylons testing environment configuration
|
||||
# ShareServer - testing environment configuration
|
||||
#
|
||||
# The %(here)s variable will be replaced with the parent directory of this file
|
||||
#
|
||||
|
@ -88,7 +88,7 @@ port = 5000
|
|||
[app:main]
|
||||
#use: config:api.ini
|
||||
|
||||
use = egg:linkdrop
|
||||
use = egg:ShareServer
|
||||
full_stack = false
|
||||
static_files = false
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче