Commit 8b57e3f0 authored by Yohan's avatar Yohan

Renaming party day 3: call me ideascube, now!

parent 5114589d
[run]
omit =
ideastube/*/tests/*
ideastube/tests/*
ideastube/wsgi.py
ideastube/management/commands/dummydata.py
ideastube/conf/*
ideascube/*/tests/*
ideascube/tests/*
ideascube/wsgi.py
ideascube/management/commands/dummydata.py
ideascube/conf/*
......@@ -2,14 +2,14 @@
*.sqlite
docs/_build/*
storage/
debian/ideastube/*
debian/ideascube/*
debian/files
debian/ideastube.debhelper.log
debian/ideastube.postinst.debhelper
debian/ideastube.postrm.debhelper
debian/ideastube.prerm.debhelper
debian/ideastube.substvars
debian/ideastube.triggers
debian/ideascube.debhelper.log
debian/ideascube.postinst.debhelper
debian/ideascube.postrm.debhelper
debian/ideascube.prerm.debhelper
debian/ideascube.substvars
debian/ideascube.triggers
.cache
*.bk
*.egg-info
......
......@@ -11,7 +11,7 @@ after_success:
notifications:
irc:
channels:
- "irc.freenode.net#ideastube"
- "irc.freenode.net#ideascube"
on_success: change
on_failure: always
email: false
[main]
host = https://www.transifex.com
[ideastube.backend]
file_filter = ideastube/locale/<lang>/LC_MESSAGES/django.po
source_file = ideastube/locale/en/LC_MESSAGES/django.po
[ideascube.backend]
file_filter = ideascube/locale/<lang>/LC_MESSAGES/django.po
source_file = ideascube/locale/en/LC_MESSAGES/django.po
source_lang = en
type = PO
[ideastube.frontend]
file_filter = ideastube/locale/<lang>/LC_MESSAGES/djangojs.po
source_file = ideastube/locale/en/LC_MESSAGES/djangojs.po
[ideascube.frontend]
file_filter = ideascube/locale/<lang>/LC_MESSAGES/djangojs.po
source_file = ideascube/locale/en/LC_MESSAGES/djangojs.po
source_lang = en
type = PO
# Authors and contributors
ideastube is owned and maintained by
ideascube is owned and maintained by
[Bibliothèques Sans Frontières](http://www.bibliosansfrontieres.org/), and
published under the terms of MIT license (see
[LICENSE.md](https://github.com/ideastube/ideastube/blob/master/LICENSE.md)).
[LICENSE.md](https://github.com/ideascube/ideascube/blob/master/LICENSE.md)).
See also contributors on [Github repository](https://github.com/ideastube/ideastube/graphs/contributors).
See also contributors on [Github repository](https://github.com/ideascube/ideascube/graphs/contributors).
# Contributing to ideastube
# Contributing to ideascube
See [contributing](http://ideastube.readthedocs.org/en/latest/contributing/).
See [contributing](http://ideascube.readthedocs.org/en/latest/contributing/).
recursive-include */static *
recursive-include */templates *
recursive-include ideastube/*/static *
recursive-include ideastube/*/templates *
recursive-include ideastube/locale *
recursive-include ideascube/*/static *
recursive-include ideascube/*/templates *
recursive-include ideascube/locale *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
......@@ -16,10 +16,10 @@ pull_translations:
compile_translations:
python manage.py compilemessages
clean:
-mv builds/ideastube_* builds/old
-mv builds/ideascube_* builds/old
build:
mkdir -p builds && dpkg-buildpackage -us -uc -Ibuilds && mv ../ideastube_* builds/
mkdir -p builds && dpkg-buildpackage -us -uc -Ibuilds && mv ../ideascube_* builds/
install:
sudo dpkg -i builds/*.deb
uninstall:
sudo dpkg -r ideastube
sudo dpkg -r ideascube
[![Requirements Status](https://requires.io/github/ideastube/ideastube/requirements.svg?branch=master)](https://requires.io/github/ideastube/ideastube/requirements/?branch=master) [![Build Status](https://travis-ci.org/ideastube/ideastube.svg?branch=master)](https://travis-ci.org/ideastube/ideastube) [![Documentation Status](http://readthedocs.org/projects/ideastube/badge/?version=latest)](http://ideastube.readthedocs.org/en/latest/?badge=latest) [![Coverage Status](https://coveralls.io/repos/ideastube/ideastube/badge.svg?branch=master&service=github)](https://coveralls.io/github/ideastube/ideastube?branch=master)
[![Requirements Status](https://requires.io/github/ideascube/ideascube/requirements.svg?branch=master)](https://requires.io/github/ideascube/ideascube/requirements/?branch=master) [![Build Status](https://travis-ci.org/ideascube/ideascube.svg?branch=master)](https://travis-ci.org/ideascube/ideascube) [![Documentation Status](http://readthedocs.org/projects/ideascube/badge/?version=latest)](http://ideascube.readthedocs.org/en/latest/?badge=latest) [![Coverage Status](https://coveralls.io/repos/ideascube/ideascube/badge.svg?branch=master&service=github)](https://coveralls.io/github/ideascube/ideascube?branch=master)
# ideastube
# ideascube
This Django repository is the main application of the Ideas Box server.
More about the Ideas Box concept: http://www.ideas-box.org/
More details about the server in the [overview](https://github.com/ideastube/ideastube/wiki/Server-Overview).
More details about the server in the [overview](https://github.com/ideascube/ideascube/wiki/Server-Overview).
[ideastube is free software, published under the terms of MIT license](https://github.com/ideastube/ideastube/LICENSE.md).
[ideascube is free software, published under the terms of MIT license](https://github.com/ideascube/ideascube/LICENSE.md).
## How can I give a hand?
Welcome! There are many ways you can help. See details in
[contributor guide](http://ideastube.readthedocs.org/en/latest/contributing/).
[contributor guide](http://ideascube.readthedocs.org/en/latest/contributing/).
## Resources and contacts
* Homepage: http://www.ideas-box.org/
* IRC chat: `#ideastube` on `irc.freenode.net`. If you are not familiar with
* IRC chat: `#ideascube` on `irc.freenode.net`. If you are not familiar with
[IRC](https://en.wikipedia.org/wiki/Internet_Relay_Chat), you can try
this simple [online chat application](https://kiwiirc.com/client/irc.freenode.net/?nick=new-user|?#ideastube).
* Contributor guide: http://ideastube.readthedocs.org/en/latest/contributing/
* Code repository: https://github.com/ideastube/ideastube
this simple [online chat application](https://kiwiirc.com/client/irc.freenode.net/?nick=new-user|?#ideascube).
* Contributor guide: http://ideascube.readthedocs.org/en/latest/contributing/
* Code repository: https://github.com/ideascube/ideascube
* Issues, questions and feature requests:
https://github.com/ideastube/ideastube/issues
* Continuous integration: https://travis-ci.org/ideastube/ideastube
* Documentation: http://ideastube.readthedocs.org/
* Translation: https://www.transifex.com/ideastube/ideastube/
https://github.com/ideascube/ideascube/issues
* Continuous integration: https://travis-ci.org/ideascube/ideascube
* Documentation: http://ideascube.readthedocs.org/
* Translation: https://www.transifex.com/ideascube/ideascube/
......@@ -3,7 +3,7 @@ import django_webtest
from django.core.urlresolvers import reverse
from ideastube.tests.factories import UserFactory
from ideascube.tests.factories import UserFactory
@pytest.fixture()
......
#!/bin/bash
NAME=ideastube
NAME=ideascube
DJANGO_SETTINGS_MODULE="$NAME.settings"
DEBUG=
STORAGE_ROOT="/var/$NAME"
......
ideastube (0.4.0-1) unstable; urgency=low
ideascube (0.4.0-1) unstable; urgency=low
* Initial release.
......
Source: ideastube
Source: ideascube
Section: python
Priority: extra
Maintainer: Yohan Boniface <hi@yohanboniface.me>
Build-Depends: debhelper (>= 9), python, dh-virtualenv (>= 0.6)
Standards-Version: 3.9.5
Package: ideastube
Package: ideascube
Architecture: any
Pre-Depends: dpkg (>= 1.16.1), python2.7-minimal | python2.6-minimal, ${misc:Pre-Depends}
Depends: ${python:Depends}, ${misc:Depends}
Description: Ideastube media server
Description: Ideascube media server
/var/ideastube/main
/var/ideascube/main
#! /bin/sh
### BEGIN INIT INFO
# Provides: ideastube
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start ideastube gurnicorn server
# Description: ideastube gurnicorn server daemon
### END INIT INFO
# Author: Yohan Boniface <hi@yohanboniface.me>
# Do NOT "set -e"
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Ideastube server"
NAME="ideastube"
DAEMON=/usr/share/python/ideastube/bin/gunicorn
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
IDEASTUBE_ID="" # You can overwrite id on /etc/defaults/ideastube.
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions
DAEMON_ARGS="ideastube.wsgi:application -b $HOST:$PORT -w 4 -t 600 -p $PIDFILE -D --name $NAME"
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
IDEASTUBE_ID=$IDEASTUBE_ID start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1
IDEASTUBE_ID=$IDEASTUBE_ID start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --quiet --stop --pidfile $PIDFILE
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return $RETVAL
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
reload)
log_daemon_msg "Reloading $DESC" "$NAME"
do_reload
log_end_msg $?
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:
debian/nginx/ideastube /etc/nginx/sites-available
debian/uwsgi/ideastube.ini /etc/uwsgi/apps-available
debian/uwsgi/uwsgi_params /var/ideastube
debian/bin/ideastube /usr/bin
debian/nginx/ideascube /etc/nginx/sites-available
debian/uwsgi/ideascube.ini /etc/uwsgi/apps-available
debian/uwsgi/uwsgi_params /var/ideascube
debian/bin/ideascube /usr/bin
# the upstream component nginx needs to connect to
upstream ideastube {
server unix:///tmp/ideastube.sock;
upstream ideascube {
server unix:///tmp/ideascube.sock;
}
# configuration of the server
......@@ -19,18 +19,18 @@ server {
# Django media
location /media/ {
alias /var/ideastube/main/media/;
alias /var/ideascube/main/media/;
expires 30d;
}
location /static/ {
alias /var/ideastube/static/;
alias /var/ideascube/static/;
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass ideastube;
include /var/ideastube/uwsgi_params;
uwsgi_pass ideascube;
include /var/ideascube/uwsgi_params;
}
}
#!/bin/bash
NAME=ideastube
NAME=ideascube
case "$1" in
configure)
# Create elasticsearch group if not existing
......@@ -24,9 +24,9 @@ case "$1" in
chown $NAME:$NAME /var/$NAME
chown $NAME:$NAME /var/$NAME/main
echo "Running migration"
sudo -u $NAME /usr/bin/ideastube migrate --noinput -v 1
sudo -u $NAME /usr/bin/ideascube migrate --noinput -v 1
echo "Running collectstatic"
sudo -u $NAME /usr/bin/ideastube collectstatic --noinput -v 1
sudo -u $NAME /usr/bin/ideascube collectstatic --noinput -v 1
# Nginx
echo "Linking Nginx VHost"
ln -fs /etc/nginx/sites-available/$NAME /etc/nginx/sites-enabled/$NAME
......
......@@ -7,7 +7,7 @@ case "$1" in
*)
# on removal we should clean project directory
if [ -d /var/lib/$DPKG_MAINTSCRIPT_PACKAGE ]; then
echo "Removing ideastube project directory"
echo "Removing ideascube project directory"
rm -rf /var/lib/$DPKG_MAINTSCRIPT_PACKAGE
fi
;;
......
[uwsgi]
uid = ideastube
gid = ideastube
uid = ideascube
gid = ideascube
# Django-related settings
# the base directory (full path)
chdir = /usr/share/python/ideastube/local/lib/python2.7/site-packages/ideastube/
chdir = /usr/share/python/ideascube/local/lib/python2.7/site-packages/ideascube/
# Django's wsgi file
module = ideastube.wsgi
module = ideascube.wsgi
# the virtualenv (full path)
home = /usr/share/python/ideastube/
home = /usr/share/python/ideascube/
# Load defaults content as env value.
# See http://uwsgi-docs.readthedocs.org/en/latest/ConfigLogic.html
# and http://uwsgi-docs.readthedocs.org/en/latest/ParsingOrder.html
if-file = /etc/default/ideastube
if-file = /etc/default/ideascube
env = @(%(_))
endif =
......@@ -22,10 +22,10 @@ master = true
# maximum number of worker processes
processes = 4
# the socket (use the full path to be safe
socket = /tmp/ideastube.sock
socket = /tmp/ideascube.sock
# ... with appropriate permissions - may be needed
chmod-socket = 666
# stats = /tmp/ideastube.stats.sock
# stats = /tmp/ideascube.stats.sock
# clear environment on exit
vacuum = true
plugins = python
......@@ -6,20 +6,20 @@ The first way of customizing the project installation is to provide a local
settings file.
This can be done in three ways:
- add a file `hostname`.py in `ideastube/conf` (for example, `ideabox/conf/azraq.py`
- add a file `hostname`.py in `ideascube/conf` (for example, `ideabox/conf/azraq.py`
if the `hostname` is `azraq`)
- set an environment variable `IDEASTUBE_ID` and add a file with this id in `ideastube/conf`
- set an environment variable `IDEASCUBE_ID` and add a file with this id in `ideascube/conf`
- define `DJANGO_SETTINGS_MODULE` environment variable
Good reading:
- Django documentation about [settings](https://docs.djangoproject.com/en/1.8/ref/settings/)
- examples of local [settings](https://github.com/ideas-box/ideastube/tree/master/ideastube/conf)
- examples of local [settings](https://github.com/ideas-box/ideascube/tree/master/ideascube/conf)
### Main settings
Among all Django and custom settings, here are the one you may want to customize.
#### IDEASTUBE_NAME = *string*
#### IDEASCUBE_NAME = *string*
The displayed server name in the header.
......
# Contributing to ideastube
# Contributing to ideascube
Do you like to make the ideastube project better? Welcome! This document
Do you like to make the ideascube project better? Welcome! This document
will try to provide guidelines about what and how you can help.
......@@ -9,33 +9,33 @@ will try to provide guidelines about what and how you can help.
If you have any question, problem or idea, feel free to get in touch with
project's maintainers:
* Chat using #ideastube channel on Freenode. If you are not familiar with
* Chat using #ideascube channel on Freenode. If you are not familiar with
[IRC](https://en.wikipedia.org/wiki/Internet_Relay_Chat), you can try
this simple [online chat application](https://kiwiirc.com/client/irc.freenode.net/?nick=new-user|?#ideastube):
this simple [online chat application](https://kiwiirc.com/client/irc.freenode.net/?nick=new-user|?#ideascube):
just click "Start" then chat!
* Ask questions, report issues or propose ideas as
[tickets](https://github.com/ideastue/ideastube/issues).
[tickets](https://github.com/ideastue/ideascube/issues).
Here are online resources you may find useful to contribute to the project:
* Homepage: http://www.ideas-box.org/
* Code repository: https://github.com/ideastube/ideastube
* Code repository: https://github.com/ideascube/ideascube
* Issues, questions and feature requests:
https://github.com/ideastube/ideastube/issues
* Continuous integration: https://travis-ci.org/ideastube/ideastube
* Documentation: https://github.com/ideastube/ideastube/blob/master/docs/index.md
https://github.com/ideascube/ideascube/issues
* Continuous integration: https://travis-ci.org/ideascube/ideascube
* Documentation: https://github.com/ideascube/ideascube/blob/master/docs/index.md
## How can I give a hand?
* Join the brainstorming: report or comment issues; edit wiki; join IRC chan
* Review [pull requests](https://github.com/ideastube/ideastube/pulls)
* Take an [issue](https://github.com/ideastube/ideastube/issues) and code :)
* Review [pull requests](https://github.com/ideascube/ideascube/pulls)
* Take an [issue](https://github.com/ideascube/ideascube/issues) and code :)
* What about a sprint?
## Install ideastube for development
## Install ideascube for development
### Setup system
......@@ -52,17 +52,17 @@ On a Debian-based system, you may use:
### Download the souce code
Get project's source code from
[project's code repository](https://github.com/ideastube/ideastube)
[project's code repository](https://github.com/ideascube/ideascube)
(you may use your own fork):
git clone git@github.com:ideastube/ideastube.git
cd ideastube/
git clone git@github.com:ideascube/ideascube.git
cd ideascube/