diff --git a/.gitignore b/.gitignore index 85d58d0476..da278eafdd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,9 +11,9 @@ .DS_Store event_queues.pickle stats/ -zephyr/fixtures/available-migrations -zephyr/fixtures/migration-status -zephyr/fixtures/test_data1.json +zerver/fixtures/available-migrations +zerver/fixtures/migration-status +zerver/fixtures/test_data1.json .kdev4 humbug.kdev4 memcached_prefix diff --git a/humbug/backends.py b/humbug/backends.py index 751b0bad72..8f62e86c3a 100644 --- a/humbug/backends.py +++ b/humbug/backends.py @@ -1,4 +1,4 @@ -from zephyr.models import UserProfile, get_user_profile_by_id, \ +from zerver.models import UserProfile, get_user_profile_by_id, \ get_user_profile_by_email from openid.consumer.consumer import SUCCESS diff --git a/humbug/settings.py b/humbug/settings.py index 596911e877..707a86df82 100644 --- a/humbug/settings.py +++ b/humbug/settings.py @@ -4,7 +4,7 @@ import platform import time import re -from zephyr.openid import openid_failure_handler +from zerver.openid import openid_failure_handler SERVER_GENERATION = int(time.time()) @@ -144,9 +144,9 @@ TEMPLATE_LOADERS = ( MIDDLEWARE_CLASSES = ( # Our logging middleware should be the first middleware item. - 'zephyr.middleware.LogRequests', - 'zephyr.middleware.JsonErrorHandler', - 'zephyr.middleware.RateLimitMiddleware', + 'zerver.middleware.LogRequests', + 'zerver.middleware.JsonErrorHandler', + 'zerver.middleware.RateLimitMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', @@ -158,9 +158,9 @@ AUTHENTICATION_BACKENDS = ('humbug.backends.EmailAuthBackend', 'guardian.backends.ObjectPermissionBackend') ANONYMOUS_USER_ID = None -AUTH_USER_MODEL = "zephyr.UserProfile" +AUTH_USER_MODEL = "zerver.UserProfile" -TEST_RUNNER = 'zephyr.tests.Runner' +TEST_RUNNER = 'zerver.tests.Runner' ROOT_URLCONF = 'humbug.urls' @@ -179,7 +179,7 @@ INSTALLED_APPS = ( 'confirmation', 'guardian', 'pipeline', - 'zephyr', + 'zerver', ) LOCAL_STATSD = (False) @@ -236,9 +236,9 @@ if DEBUG: else: STATIC_ROOT = 'static/' else: - STATICFILES_STORAGE = 'zephyr.storage.HumbugStorage' + STATICFILES_STORAGE = 'zerver.storage.HumbugStorage' STATICFILES_FINDERS = ( - 'zephyr.finders.HumbugFinder', + 'zerver.finders.HumbugFinder', ) if DEPLOYED: STATIC_ROOT = '/home/humbug/prod-static' @@ -246,7 +246,7 @@ else: STATIC_ROOT = 'prod-static/serve' STATICFILES_DIRS = ['static/'] -STATIC_HEADER_FILE = 'zephyr/static_header.txt' +STATIC_HEADER_FILE = 'zerver/static_header.txt' # To use minified files in dev, set PIPELINE = True. For the full # cache-busting behavior, you must also set DEBUG = False. @@ -473,25 +473,25 @@ LOGGING = { }, 'filters': { 'HumbugLimiter': { - '()': 'zephyr.lib.logging_util.HumbugLimiter', + '()': 'zerver.lib.logging_util.HumbugLimiter', }, 'EmailLimiter': { - '()': 'zephyr.lib.logging_util.EmailLimiter', + '()': 'zerver.lib.logging_util.EmailLimiter', }, 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse', }, 'nop': { - '()': 'zephyr.lib.logging_util.ReturnTrue', + '()': 'zerver.lib.logging_util.ReturnTrue', }, 'require_really_deployed': { - '()': 'zephyr.lib.logging_util.RequireReallyDeployed', + '()': 'zerver.lib.logging_util.RequireReallyDeployed', }, }, 'handlers': { 'humbug_admins': { 'level': 'ERROR', - 'class': 'zephyr.handlers.AdminHumbugHandler', + 'class': 'zerver.handlers.AdminHumbugHandler', # For testing the handler delete the next line 'filters': ['HumbugLimiter', 'require_debug_false', 'require_really_deployed'], 'formatter': 'default' @@ -516,7 +516,7 @@ LOGGING = { # to replace the list of filters for mail_admins with 'nop'. 'mail_admins': { 'level': 'ERROR', - 'class': 'zephyr.handlers.HumbugAdminEmailHandler', + 'class': 'zerver.handlers.HumbugAdminEmailHandler', # For testing the handler replace the filters list with just 'nop' 'filters': ['EmailLimiter', 'require_debug_false', 'require_really_deployed'], }, @@ -547,8 +547,8 @@ LOGGING = { } TEMPLATE_CONTEXT_PROCESSORS = ( - 'zephyr.context_processors.add_settings', - 'zephyr.context_processors.add_metrics', + 'zerver.context_processors.add_settings', + 'zerver.context_processors.add_metrics', ) ACCOUNT_ACTIVATION_DAYS=7 @@ -600,7 +600,7 @@ if not DEPLOYED: if DEPLOYED: # Filter out user data - DEFAULT_EXCEPTION_REPORTER_FILTER = 'zephyr.filters.HumbugExceptionReporterFilter' + DEFAULT_EXCEPTION_REPORTER_FILTER = 'zerver.filters.HumbugExceptionReporterFilter' # We want all temporary uploaded files to be stored on disk. diff --git a/humbug/urls.py b/humbug/urls.py index 20aae41153..47d38f8447 100644 --- a/humbug/urls.py +++ b/humbug/urls.py @@ -2,7 +2,7 @@ from django.conf import settings from django.conf.urls import patterns, url, include from django.views.generic import TemplateView, RedirectView import os.path -import zephyr.forms +import zerver.forms # NB: There are several other pieces of code which route requests by URL: # @@ -14,79 +14,79 @@ import zephyr.forms # - Likewise for the local dev server in tools/run-dev.py. urlpatterns = patterns('', - url(r'^$', 'zephyr.views.home'), + url(r'^$', 'zerver.views.home'), url(r'^accounts/login/openid/$', 'django_openid_auth.views.login_begin', name='openid-login'), - url(r'^accounts/login/openid/done/$', 'zephyr.views.process_openid_login', name='openid-complete'), + url(r'^accounts/login/openid/done/$', 'zerver.views.process_openid_login', name='openid-complete'), url(r'^accounts/login/openid/done/$', 'django_openid_auth.views.login_complete', name='openid-complete'), # We have two entries for accounts/login to allow reverses on the Django # view we're wrapping to continue to function. - url(r'^accounts/login/', 'zephyr.views.login_page', {'template_name': 'zephyr/login.html'}), - url(r'^accounts/login/', 'django.contrib.auth.views.login', {'template_name': 'zephyr/login.html'}), - url(r'^accounts/logout/', 'zephyr.views.logout_then_login'), + url(r'^accounts/login/', 'zerver.views.login_page', {'template_name': 'zerver/login.html'}), + url(r'^accounts/login/', 'django.contrib.auth.views.login', {'template_name': 'zerver/login.html'}), + url(r'^accounts/logout/', 'zerver.views.logout_then_login'), url(r'^accounts/password/reset/$', 'django.contrib.auth.views.password_reset', {'post_reset_redirect' : '/accounts/password/reset/done/', - 'template_name': 'zephyr/reset.html', + 'template_name': 'zerver/reset.html', 'email_template_name': 'registration/password_reset_email.txt', }), url(r'^accounts/password/reset/done/$', 'django.contrib.auth.views.password_reset_done', - {'template_name': 'zephyr/reset_emailed.html'}), + {'template_name': 'zerver/reset_emailed.html'}), url(r'^accounts/password/reset/(?P[0-9A-Za-z]+)-(?P.+)/$', 'django.contrib.auth.views.password_reset_confirm', - {'post_reset_redirect' : '/accounts/password/done/', 'template_name': 'zephyr/reset_confirm.html', - 'set_password_form' : zephyr.forms.LoggingSetPasswordForm}), + {'post_reset_redirect' : '/accounts/password/done/', 'template_name': 'zerver/reset_confirm.html', + 'set_password_form' : zerver.forms.LoggingSetPasswordForm}), url(r'^accounts/password/done/$', 'django.contrib.auth.views.password_reset_complete', - {'template_name': 'zephyr/reset_done.html'}), + {'template_name': 'zerver/reset_done.html'}), - url(r'^activity$', 'zephyr.views.get_activity'), + url(r'^activity$', 'zerver.views.get_activity'), # Registration views, require a confirmation ID. - url(r'^accounts/home/', 'zephyr.views.accounts_home'), + url(r'^accounts/home/', 'zerver.views.accounts_home'), url(r'^accounts/send_confirm/(?P[\S]+)?', - TemplateView.as_view(template_name='zephyr/accounts_send_confirm.html'), name='send_confirm'), - url(r'^accounts/register/', 'zephyr.views.accounts_register'), + TemplateView.as_view(template_name='zerver/accounts_send_confirm.html'), name='send_confirm'), + url(r'^accounts/register/', 'zerver.views.accounts_register'), url(r'^accounts/do_confirm/(?P[\w]+)', 'confirmation.views.confirm'), - url(r'^invite/$', 'zephyr.views.initial_invite_page', name='initial-invite-users'), + url(r'^invite/$', 'zerver.views.initial_invite_page', name='initial-invite-users'), # Portico-styled page used to provide email confirmation of terms acceptance. - url(r'^accounts/accept_terms/$', 'zephyr.views.accounts_accept_terms'), + url(r'^accounts/accept_terms/$', 'zerver.views.accounts_accept_terms'), # Terms of service and privacy policy - url(r'^terms/$', TemplateView.as_view(template_name='zephyr/terms.html')), - url(r'^privacy/$', TemplateView.as_view(template_name='zephyr/privacy.html')), + url(r'^terms/$', TemplateView.as_view(template_name='zerver/terms.html')), + url(r'^privacy/$', TemplateView.as_view(template_name='zerver/privacy.html')), # "About Humbug" information - url(r'^what-is-humbug/$', TemplateView.as_view(template_name='zephyr/what-is-humbug.html')), - url(r'^new-user/$', TemplateView.as_view(template_name='zephyr/new-user.html')), - url(r'^features/$', TemplateView.as_view(template_name='zephyr/features.html')), + url(r'^what-is-humbug/$', TemplateView.as_view(template_name='zerver/what-is-humbug.html')), + url(r'^new-user/$', TemplateView.as_view(template_name='zerver/new-user.html')), + url(r'^features/$', TemplateView.as_view(template_name='zerver/features.html')), # Landing page, signup form, and nice register URL - url(r'^hello/$', TemplateView.as_view(template_name='zephyr/hello.html'), + url(r'^hello/$', TemplateView.as_view(template_name='zerver/hello.html'), name='landing-page'), - url(r'^signup/$', TemplateView.as_view(template_name='zephyr/signup.html'), + url(r'^signup/$', TemplateView.as_view(template_name='zerver/signup.html'), name='signup'), - url(r'^signup/sign-me-up$', 'zephyr.views.beta_signup_submission', name='beta-signup-submission'), - url(r'^register/$', 'zephyr.views.accounts_home', name='register'), - url(r'^login/$', 'zephyr.views.login_page', {'template_name': 'zephyr/login.html'}), + url(r'^signup/sign-me-up$', 'zerver.views.beta_signup_submission', name='beta-signup-submission'), + url(r'^register/$', 'zerver.views.accounts_home', name='register'), + url(r'^login/$', 'zerver.views.login_page', {'template_name': 'zerver/login.html'}), # A registration page that passes through the domain, for totally open realms. - url(r'^register/(?P\S+)/$', 'zephyr.views.accounts_home_with_domain'), + url(r'^register/(?P\S+)/$', 'zerver.views.accounts_home_with_domain'), # API and integrations documentation - url(r'^api/$', TemplateView.as_view(template_name='zephyr/api.html')), - url(r'^api/endpoints/$', 'zephyr.views.api_endpoint_docs'), - url(r'^integrations/$', TemplateView.as_view(template_name='zephyr/integrations.html')), - url(r'^zephyr/$', TemplateView.as_view(template_name='zephyr/zephyr.html')), - url(r'^apps$', TemplateView.as_view(template_name='zephyr/apps.html')), + url(r'^api/$', TemplateView.as_view(template_name='zerver/api.html')), + url(r'^api/endpoints/$', 'zerver.views.api_endpoint_docs'), + url(r'^integrations/$', TemplateView.as_view(template_name='zerver/integrations.html')), + url(r'^zerver/$', TemplateView.as_view(template_name='zerver/zerver.html')), + url(r'^apps$', TemplateView.as_view(template_name='zerver/apps.html')), # Job postings - url(r'^jobs/$', TemplateView.as_view(template_name='zephyr/jobs/index.html')), - url(r'^jobs/lead-designer/$', TemplateView.as_view(template_name='zephyr/jobs/lead-designer.html')), + url(r'^jobs/$', TemplateView.as_view(template_name='zerver/jobs/index.html')), + url(r'^jobs/lead-designer/$', TemplateView.as_view(template_name='zerver/jobs/lead-designer.html')), url(r'^robots\.txt$', RedirectView.as_view(url='/static/robots.txt')), ) -urlpatterns += patterns('zephyr.views', +urlpatterns += patterns('zerver.views', # These are json format views used by the web client. They require a logged in browser. url(r'^json/update_pointer$', 'json_update_pointer'), url(r'^json/get_old_messages$', 'json_get_old_messages'), @@ -143,7 +143,7 @@ urlpatterns += patterns('zephyr.views', url(r'^api/v1/external/newrelic$', 'api_newrelic_webhook'), ) -v1_api_and_json_patterns = patterns('zephyr.views', +v1_api_and_json_patterns = patterns('zerver.views', # JSON format views used by the redesigned API, accept basic auth username:password. # GET returns messages, possibly filtered, POST sends a message url(r'^messages$', 'rest_dispatch', @@ -189,7 +189,7 @@ v1_api_and_json_patterns = patterns('zephyr.views', ) -urlpatterns += patterns('zephyr.tornadoviews', +urlpatterns += patterns('zerver.tornadoviews', # Tornado views url(r'^api/v1/get_messages$', 'api_get_messages'), url(r'^json/get_updates$', 'json_get_updates'), diff --git a/servers/puppet/modules/humbug/files/nagios_plugins/check_user_zephyr_mirror_liveness b/servers/puppet/modules/humbug/files/nagios_plugins/check_user_zephyr_mirror_liveness index 56100b3cff..517d873994 100755 --- a/servers/puppet/modules/humbug/files/nagios_plugins/check_user_zephyr_mirror_liveness +++ b/servers/puppet/modules/humbug/files/nagios_plugins/check_user_zephyr_mirror_liveness @@ -13,9 +13,9 @@ import sys os.environ['DJANGO_SETTINGS_MODULE'] = "humbug.settings" sys.path.append('/home/humbug/humbug-deployments/current') -sys.path.append('/home/humbug/humbug-deployments/current/zephyr') +sys.path.append('/home/humbug/humbug-deployments/current/zerver') -from zephyr.models import UserActivity +from zerver.models import UserActivity states = { "OK": 0, diff --git a/templates/404.html b/templates/404.html index 44da6a268b..9f673b847e 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% block for_you %} got a bit lost there. {% endblock %} diff --git a/templates/500.html b/templates/500.html index bdb80ba89f..d4286006cd 100644 --- a/templates/500.html +++ b/templates/500.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% block for_you %} isn't feeling too good. {% endblock %} diff --git a/templates/confirmation/confirm.html b/templates/confirmation/confirm.html index ecd5a5711e..3a86714ae7 100644 --- a/templates/confirmation/confirm.html +++ b/templates/confirmation/confirm.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% block portico_content %} diff --git a/templates/confirmation/confirm_mituser.html b/templates/confirmation/confirm_mituser.html index 9db5d1516d..a1e946a710 100644 --- a/templates/confirmation/confirm_mituser.html +++ b/templates/confirmation/confirm_mituser.html @@ -1,4 +1,4 @@ -{% extends "zephyr/base.html" %} +{% extends "zerver/base.html" %} {% block content %} diff --git a/templates/confirmation/confirm_preregistrationuser.html b/templates/confirmation/confirm_preregistrationuser.html index 67bb92428d..c40a0225bb 100644 --- a/templates/confirmation/confirm_preregistrationuser.html +++ b/templates/confirmation/confirm_preregistrationuser.html @@ -1,4 +1,4 @@ -{% extends "zephyr/base.html" %} +{% extends "zerver/base.html" %} {% block content %} diff --git a/templates/openid_error.html b/templates/openid_error.html index 88afb8253c..8ee44c8e36 100644 --- a/templates/openid_error.html +++ b/templates/openid_error.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% block for_you %} isn't feeling too good. {% endblock %} diff --git a/templates/zephyr/accounts_accept_terms.html b/templates/zerver/accounts_accept_terms.html similarity index 96% rename from templates/zephyr/accounts_accept_terms.html rename to templates/zerver/accounts_accept_terms.html index aaecd7b811..685d9d1074 100644 --- a/templates/zephyr/accounts_accept_terms.html +++ b/templates/zerver/accounts_accept_terms.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico_signup.html" %} +{% extends "zerver/portico_signup.html" %} {% comment %} Allow the user to accept the terms, creating an email record of that fact. @@ -15,7 +15,7 @@ Allow the user to accept the terms, creating an email record of that fact.

Accept the Zulip terms of service

-
+ {% csrf_token %}
diff --git a/templates/zephyr/accounts_home.html b/templates/zerver/accounts_home.html similarity index 97% rename from templates/zephyr/accounts_home.html rename to templates/zerver/accounts_home.html index 10f12eff53..7ddd749058 100644 --- a/templates/zephyr/accounts_home.html +++ b/templates/zerver/accounts_home.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico_signup.html" %} +{% extends "zerver/portico_signup.html" %} {# Home page for not logged-in users. #} diff --git a/templates/zephyr/accounts_send_confirm.html b/templates/zerver/accounts_send_confirm.html similarity index 95% rename from templates/zephyr/accounts_send_confirm.html rename to templates/zerver/accounts_send_confirm.html index 3a9bc2d1ae..5a59008bc9 100644 --- a/templates/zephyr/accounts_send_confirm.html +++ b/templates/zerver/accounts_send_confirm.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico_signup.html" %} +{% extends "zerver/portico_signup.html" %} {# Displayed after a user attempts to sign up. #} diff --git a/templates/zephyr/activity.html b/templates/zerver/activity.html similarity index 98% rename from templates/zephyr/activity.html rename to templates/zerver/activity.html index c4e202aec9..9e5a4f30ea 100644 --- a/templates/zephyr/activity.html +++ b/templates/zerver/activity.html @@ -1,4 +1,4 @@ -{% extends "zephyr/base.html" %} +{% extends "zerver/base.html" %} {% load compressed %} {% load minified_js %} diff --git a/templates/zephyr/api.html b/templates/zerver/api.html similarity index 99% rename from templates/zephyr/api.html rename to templates/zerver/api.html index ec0a193555..e625aae80d 100644 --- a/templates/zephyr/api.html +++ b/templates/zerver/api.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# API information page #} diff --git a/templates/zephyr/api_content.json b/templates/zerver/api_content.json similarity index 100% rename from templates/zephyr/api_content.json rename to templates/zerver/api_content.json diff --git a/templates/zephyr/api_endpoints.html b/templates/zerver/api_endpoints.html similarity index 98% rename from templates/zephyr/api_endpoints.html rename to templates/zerver/api_endpoints.html index 78920fc0be..3830bc5c68 100644 --- a/templates/zephyr/api_endpoints.html +++ b/templates/zerver/api_endpoints.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# API information page #} diff --git a/templates/zephyr/apps.html b/templates/zerver/apps.html similarity index 99% rename from templates/zephyr/apps.html rename to templates/zerver/apps.html index 9013f0a7d5..cb0fe93653 100644 --- a/templates/zephyr/apps.html +++ b/templates/zerver/apps.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# API information page #} diff --git a/templates/zephyr/bankruptcy.html b/templates/zerver/bankruptcy.html similarity index 100% rename from templates/zephyr/bankruptcy.html rename to templates/zerver/bankruptcy.html diff --git a/templates/zephyr/base.html b/templates/zerver/base.html similarity index 100% rename from templates/zephyr/base.html rename to templates/zerver/base.html diff --git a/templates/zephyr/compose.html b/templates/zerver/compose.html similarity index 100% rename from templates/zephyr/compose.html rename to templates/zerver/compose.html diff --git a/templates/zephyr/debug.html b/templates/zerver/debug.html similarity index 100% rename from templates/zephyr/debug.html rename to templates/zerver/debug.html diff --git a/templates/zephyr/features.html b/templates/zerver/features.html similarity index 99% rename from templates/zephyr/features.html rename to templates/zerver/features.html index 3d70914388..58758a5ee1 100644 --- a/templates/zephyr/features.html +++ b/templates/zerver/features.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% block portico_content %} diff --git a/templates/zephyr/hello.html b/templates/zerver/hello.html similarity index 99% rename from templates/zephyr/hello.html rename to templates/zerver/hello.html index 9cf3348891..3e8d7e2e5d 100644 --- a/templates/zephyr/hello.html +++ b/templates/zerver/hello.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% block inner_content %}
diff --git a/templates/zephyr/home.html b/templates/zerver/home.html similarity index 99% rename from templates/zephyr/home.html rename to templates/zerver/home.html index a899696e0f..89919df659 100644 --- a/templates/zephyr/home.html +++ b/templates/zerver/home.html @@ -100,7 +100,7 @@
-{% include "zephyr/compose.html" %} +{% include "zerver/compose.html" %}
diff --git a/templates/zephyr/index.html b/templates/zerver/index.html similarity index 71% rename from templates/zephyr/index.html rename to templates/zerver/index.html index 20e938814c..c16bc5b400 100644 --- a/templates/zephyr/index.html +++ b/templates/zerver/index.html @@ -1,4 +1,4 @@ -{% extends "zephyr/base.html" %} +{% extends "zerver/base.html" %} {# The app itself. #} {# Includes some other templates as tabs. #} @@ -39,39 +39,39 @@ var page_params = {{ page_params }};
- {% include "zephyr/navbar.html" %} + {% include "zerver/navbar.html" %}
- {% include "zephyr/left-sidebar.html" %} + {% include "zerver/left-sidebar.html" %}
- {% include "zephyr/home.html" %} + {% include "zerver/home.html" %}
- {% include "zephyr/subscriptions.html" %} + {% include "zerver/subscriptions.html" %}
- {% include "zephyr/settings.html" %} + {% include "zerver/settings.html" %}
{% if show_debug %}
- {% include "zephyr/debug.html" %} + {% include "zerver/debug.html" %}
{% endif %}
- {% include "zephyr/right-sidebar.html" %} + {% include "zerver/right-sidebar.html" %}
- {% include "zephyr/keyboard_shortcuts.html" %} - {% include "zephyr/markdown_help.html" %} - {% include "zephyr/invite_user.html" %} - {% include "zephyr/bankruptcy.html" %} - {% include "zephyr/logout.html" %} - {% include "zephyr/tutorial_finale.html" %} + {% include "zerver/keyboard_shortcuts.html" %} + {% include "zerver/markdown_help.html" %} + {% include "zerver/invite_user.html" %} + {% include "zerver/bankruptcy.html" %} + {% include "zerver/logout.html" %} + {% include "zerver/tutorial_finale.html" %}
{% endblock %} diff --git a/templates/zephyr/initial_invite_page.html b/templates/zerver/initial_invite_page.html similarity index 97% rename from templates/zephyr/initial_invite_page.html rename to templates/zerver/initial_invite_page.html index b988f0ea2a..dadcd90107 100644 --- a/templates/zephyr/initial_invite_page.html +++ b/templates/zerver/initial_invite_page.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% load minified_js %} diff --git a/templates/zephyr/integrations.html b/templates/zerver/integrations.html similarity index 99% rename from templates/zephyr/integrations.html rename to templates/zerver/integrations.html index 7c4f4e9c85..9fb4177049 100644 --- a/templates/zephyr/integrations.html +++ b/templates/zerver/integrations.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# API information page #} diff --git a/templates/zephyr/invite_user.html b/templates/zerver/invite_user.html similarity index 100% rename from templates/zephyr/invite_user.html rename to templates/zerver/invite_user.html diff --git a/templates/zephyr/jobs/index.html b/templates/zerver/jobs/index.html similarity index 96% rename from templates/zephyr/jobs/index.html rename to templates/zerver/jobs/index.html index e563ea38c2..e4f5a4b88e 100644 --- a/templates/zephyr/jobs/index.html +++ b/templates/zerver/jobs/index.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% block portico_content %}
diff --git a/templates/zephyr/jobs/lead-designer.html b/templates/zerver/jobs/lead-designer.html similarity index 98% rename from templates/zephyr/jobs/lead-designer.html rename to templates/zerver/jobs/lead-designer.html index 3ddc180d72..964d2881d7 100644 --- a/templates/zephyr/jobs/lead-designer.html +++ b/templates/zerver/jobs/lead-designer.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% block portico_content %}
diff --git a/templates/zephyr/keyboard_shortcuts.html b/templates/zerver/keyboard_shortcuts.html similarity index 100% rename from templates/zephyr/keyboard_shortcuts.html rename to templates/zerver/keyboard_shortcuts.html diff --git a/templates/zephyr/left-sidebar.html b/templates/zerver/left-sidebar.html similarity index 100% rename from templates/zephyr/left-sidebar.html rename to templates/zerver/left-sidebar.html diff --git a/templates/zephyr/login.html b/templates/zerver/login.html similarity index 98% rename from templates/zephyr/login.html rename to templates/zerver/login.html index eab8c901a4..01da20ca5d 100644 --- a/templates/zephyr/login.html +++ b/templates/zerver/login.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# Login page. #} diff --git a/templates/zephyr/logout.html b/templates/zerver/logout.html similarity index 100% rename from templates/zephyr/logout.html rename to templates/zerver/logout.html diff --git a/templates/zephyr/markdown_help.html b/templates/zerver/markdown_help.html similarity index 100% rename from templates/zephyr/markdown_help.html rename to templates/zerver/markdown_help.html diff --git a/templates/zephyr/missed_message_email.txt b/templates/zerver/missed_message_email.txt similarity index 100% rename from templates/zephyr/missed_message_email.txt rename to templates/zerver/missed_message_email.txt diff --git a/templates/zephyr/missed_message_email_html.txt b/templates/zerver/missed_message_email_html.txt similarity index 100% rename from templates/zephyr/missed_message_email_html.txt rename to templates/zerver/missed_message_email_html.txt diff --git a/templates/zephyr/navbar.html b/templates/zerver/navbar.html similarity index 100% rename from templates/zephyr/navbar.html rename to templates/zerver/navbar.html diff --git a/templates/zephyr/new-user.html b/templates/zerver/new-user.html similarity index 98% rename from templates/zephyr/new-user.html rename to templates/zerver/new-user.html index 0b7f20ebec..a0985f9b71 100644 --- a/templates/zephyr/new-user.html +++ b/templates/zerver/new-user.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# New user tutorial standin. #} diff --git a/templates/zephyr/portico.html b/templates/zerver/portico.html similarity index 98% rename from templates/zephyr/portico.html rename to templates/zerver/portico.html index e66c241ca2..5050a776e9 100644 --- a/templates/zephyr/portico.html +++ b/templates/zerver/portico.html @@ -1,4 +1,4 @@ -{% extends "zephyr/base.html" %} +{% extends "zerver/base.html" %} {% load compressed %} diff --git a/templates/zephyr/portico_signup.html b/templates/zerver/portico_signup.html similarity index 80% rename from templates/zephyr/portico_signup.html rename to templates/zerver/portico_signup.html index bed5e8af65..8f609c84b3 100644 --- a/templates/zephyr/portico_signup.html +++ b/templates/zerver/portico_signup.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% load minified_js %} diff --git a/templates/zephyr/privacy.html b/templates/zerver/privacy.html similarity index 99% rename from templates/zephyr/privacy.html rename to templates/zerver/privacy.html index 98ed541802..b8a36c8e2c 100644 --- a/templates/zephyr/privacy.html +++ b/templates/zerver/privacy.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# Privacy policy. #} diff --git a/templates/zephyr/register.html b/templates/zerver/register.html similarity index 97% rename from templates/zephyr/register.html rename to templates/zerver/register.html index eedf3a30f4..792ad15398 100644 --- a/templates/zephyr/register.html +++ b/templates/zerver/register.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico_signup.html" %} +{% extends "zerver/portico_signup.html" %} {% comment %} Gather other user information, after having confirmed @@ -23,7 +23,7 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser

Tell us a bit about yourself.

- + {% csrf_token %}
diff --git a/templates/zephyr/reset.html b/templates/zerver/reset.html similarity index 96% rename from templates/zephyr/reset.html rename to templates/zerver/reset.html index 1cb6528229..0da229433a 100644 --- a/templates/zephyr/reset.html +++ b/templates/zerver/reset.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico_signup.html" %} +{% extends "zerver/portico_signup.html" %} {% block portico_content %} diff --git a/templates/zephyr/reset_confirm.html b/templates/zerver/reset_confirm.html similarity index 98% rename from templates/zephyr/reset_confirm.html rename to templates/zerver/reset_confirm.html index 098ea2f217..4d9ac1e215 100644 --- a/templates/zephyr/reset_confirm.html +++ b/templates/zerver/reset_confirm.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico_signup.html" %} +{% extends "zerver/portico_signup.html" %} {% block customhead %} {{ block.super }} diff --git a/templates/zephyr/reset_done.html b/templates/zerver/reset_done.html similarity index 82% rename from templates/zephyr/reset_done.html rename to templates/zerver/reset_done.html index 1baa95dc51..150c70af0d 100644 --- a/templates/zephyr/reset_done.html +++ b/templates/zerver/reset_done.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico_signup.html" %} +{% extends "zerver/portico_signup.html" %} {% block portico_content %} diff --git a/templates/zephyr/reset_emailed.html b/templates/zerver/reset_emailed.html similarity index 71% rename from templates/zephyr/reset_emailed.html rename to templates/zerver/reset_emailed.html index 67d21a1fcf..9c3281c8cb 100644 --- a/templates/zephyr/reset_emailed.html +++ b/templates/zerver/reset_emailed.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico_signup.html" %} +{% extends "zerver/portico_signup.html" %} {% block portico_content %} diff --git a/templates/zephyr/right-sidebar.html b/templates/zerver/right-sidebar.html similarity index 100% rename from templates/zephyr/right-sidebar.html rename to templates/zerver/right-sidebar.html diff --git a/templates/zephyr/settings.html b/templates/zerver/settings.html similarity index 100% rename from templates/zephyr/settings.html rename to templates/zerver/settings.html diff --git a/templates/zephyr/signup.html b/templates/zerver/signup.html similarity index 98% rename from templates/zephyr/signup.html rename to templates/zerver/signup.html index 1d6cb6534b..11e281b4be 100644 --- a/templates/zephyr/signup.html +++ b/templates/zerver/signup.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {% load compressed %} {% load minified_js %} diff --git a/templates/zephyr/stream_creation_prompt.html b/templates/zerver/stream_creation_prompt.html similarity index 100% rename from templates/zephyr/stream_creation_prompt.html rename to templates/zerver/stream_creation_prompt.html diff --git a/templates/zephyr/subscriptions.html b/templates/zerver/subscriptions.html similarity index 88% rename from templates/zephyr/subscriptions.html rename to templates/zerver/subscriptions.html index 8cdd6576ff..59df864705 100644 --- a/templates/zephyr/subscriptions.html +++ b/templates/zerver/subscriptions.html @@ -12,4 +12,4 @@
-{% include "zephyr/stream_creation_prompt.html" %} +{% include "zerver/stream_creation_prompt.html" %} diff --git a/templates/zephyr/terms.html b/templates/zerver/terms.html similarity index 99% rename from templates/zephyr/terms.html rename to templates/zerver/terms.html index 4a0f41d2cf..0fbf05a9b0 100644 --- a/templates/zephyr/terms.html +++ b/templates/zerver/terms.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# Terms of service. #} diff --git a/templates/zephyr/tos_accept_body.txt b/templates/zerver/tos_accept_body.txt similarity index 100% rename from templates/zephyr/tos_accept_body.txt rename to templates/zerver/tos_accept_body.txt diff --git a/templates/zephyr/tutorial_finale.html b/templates/zerver/tutorial_finale.html similarity index 100% rename from templates/zephyr/tutorial_finale.html rename to templates/zerver/tutorial_finale.html diff --git a/templates/zephyr/what-is-humbug.html b/templates/zerver/what-is-humbug.html similarity index 98% rename from templates/zephyr/what-is-humbug.html rename to templates/zerver/what-is-humbug.html index 5169287bb2..1624263213 100644 --- a/templates/zephyr/what-is-humbug.html +++ b/templates/zerver/what-is-humbug.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# A brief "What is Humbug?" explanation page #} diff --git a/templates/zephyr/zephyr.html b/templates/zerver/zephyr.html similarity index 99% rename from templates/zephyr/zephyr.html rename to templates/zerver/zephyr.html index 968c776d3e..3b127b9888 100644 --- a/templates/zephyr/zephyr.html +++ b/templates/zerver/zephyr.html @@ -1,4 +1,4 @@ -{% extends "zephyr/portico.html" %} +{% extends "zerver/portico.html" %} {# Zephyr Mirroring information page #} diff --git a/tools/check-all b/tools/check-all index 4556c38138..af3686e25c 100755 --- a/tools/check-all +++ b/tools/check-all @@ -24,8 +24,8 @@ os.chdir(path.join(path.dirname(__file__), '..')) exclude_trees = """ static/third confirmation -zephyr/tests/frontend/casperjs -zephyr/migrations +zerver/tests/frontend/casperjs +zerver/migrations node_modules """.split() diff --git a/tools/do-destroy-rebuild-test-database b/tools/do-destroy-rebuild-test-database index 0524c8a500..a8a3e3cceb 100755 --- a/tools/do-destroy-rebuild-test-database +++ b/tools/do-destroy-rebuild-test-database @@ -1,5 +1,5 @@ #!/bin/sh -xe # This is a really simple wrapper script, pretty much for documenting clarity -`dirname $0`/../zephyr/tests/generate-fixtures --force +`dirname $0`/../zerver/tests/generate-fixtures --force diff --git a/tools/generate-activity-metrics.py b/tools/generate-activity-metrics.py index c1824fb9e0..c0d844dfdf 100755 --- a/tools/generate-activity-metrics.py +++ b/tools/generate-activity-metrics.py @@ -8,8 +8,8 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) import optparse from datetime import timedelta, datetime -from zephyr.lib.timestamp import datetime_to_timestamp -from zephyr.lib.utils import statsd_key +from zerver.lib.timestamp import datetime_to_timestamp +from zerver.lib.utils import statsd_key import requests # Workaround to support the Python-requests 1.0 transition of .json diff --git a/tools/jslint/check-all.js b/tools/jslint/check-all.js index 680cae299c..1e176abed1 100644 --- a/tools/jslint/check-all.js +++ b/tools/jslint/check-all.js @@ -118,7 +118,7 @@ process.argv.forEach(function (filepath) { options.browser = false; options.node = true; - if (filepath.indexOf('zephyr/tests/frontend/') !== -1) { + if (filepath.indexOf('zerver/tests/frontend/') !== -1) { // Include '$' and browser globals because we use them inside // casper.evaluate options.predef = ['casper', '$', 'document', 'window']; diff --git a/tools/print-all/print-all b/tools/print-all/print-all index 1d7c391caa..2963832421 100755 --- a/tools/print-all/print-all +++ b/tools/print-all/print-all @@ -33,7 +33,7 @@ certs """.split() exclude_files = """ -zephyr/management/commands/test_messages.txt +zerver/management/commands/test_messages.txt tools/usability_testing/humbug_usability_test_data servers/puppet/files/wiki/static/img/logo.png tools/jslint/jslint.js diff --git a/tools/review b/tools/review index a153f884f5..5a67fc84ae 100755 --- a/tools/review +++ b/tools/review @@ -323,9 +323,9 @@ def run_test_script(repo, tmp_path): # Copy over relevant files to $tmp_dir/humbug_test.git working_dir = os.getcwd() clone = clone_to_tmp(repo, tmp_path) - for filename in ['zephyr/fixtures/available-migrations', - 'zephyr/fixtures/migration-status', - 'zephyr/fixtures/messages.json', + for filename in ['zerver/fixtures/available-migrations', + 'zerver/fixtures/migration-status', + 'zerver/fixtures/messages.json', 'event_queues.pickle']: if os.path.isfile(filename): copyfile(filename, clone.working_tree_dir + "/" + filename) diff --git a/tools/test-all b/tools/test-all index f4ec103211..a6418fd6a4 100755 --- a/tools/test-all +++ b/tools/test-all @@ -19,6 +19,6 @@ run 'clean repo' ./tools/clean-repo run 'lint checkers' ./tools/check-all run 'js unit tests' ./tools/test-js-with-node run 'server tests' ./tools/test-backend -run 'web client tests' ./zephyr/tests/frontend/run +run 'web client tests' ./zerver/tests/frontend/run printf '\n\e[32mAll OK!\e[0m\n' diff --git a/tools/test-backend b/tools/test-backend index 1bbf111e2d..9265eb9c96 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -1,16 +1,16 @@ #!/bin/bash -e -target='zephyr' +target='zerver' case "$1" in - zephyr*) + zerver*) target="$1" shift ;; esac cd "$(dirname "$0")"/.. -./zephyr/tests/generate-fixtures +./zerver/tests/generate-fixtures # "-u" uses unbuffered IO, which is important when wrapping it in # something like subprocess (as tools/review does) /usr/bin/env python -u ./manage.py test "$target" --settings=humbug.test_settings "$@" diff --git a/tools/test-js-with-node b/tools/test-js-with-node index 106624e92b..00d94e8aa7 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -1,6 +1,6 @@ #!/bin/bash -e -cd "$(dirname "$0")"/../zephyr/tests/frontend/node +cd "$(dirname "$0")"/../zerver/tests/frontend/node STATIC_DIR=`python -c 'import os;print os.path.realpath("../../../../static")'` diff --git a/zephyr/__init__.py b/zerver/__init__.py similarity index 100% rename from zephyr/__init__.py rename to zerver/__init__.py diff --git a/zephyr/context_processors.py b/zerver/context_processors.py similarity index 100% rename from zephyr/context_processors.py rename to zerver/context_processors.py diff --git a/zephyr/decorator.py b/zerver/decorator.py similarity index 96% rename from zephyr/decorator.py rename to zerver/decorator.py index 8416be5ae0..e557a03952 100644 --- a/zephyr/decorator.py +++ b/zerver/decorator.py @@ -4,17 +4,17 @@ from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from django.http import QueryDict from django.http.multipartparser import MultiPartParser -from zephyr.models import UserProfile, get_client, get_user_profile_by_email -from zephyr.lib.response import json_error, json_unauthorized +from zerver.models import UserProfile, get_client, get_user_profile_by_email +from zerver.lib.response import json_error, json_unauthorized from django.utils.timezone import now from django.conf import settings import ujson from StringIO import StringIO -from zephyr.lib.queue import queue_json_publish -from zephyr.lib.timestamp import datetime_to_timestamp -from zephyr.lib.utils import statsd -from zephyr.exceptions import RateLimited -from zephyr.lib.rate_limiter import incr_ratelimit, is_ratelimited, \ +from zerver.lib.queue import queue_json_publish +from zerver.lib.timestamp import datetime_to_timestamp +from zerver.lib.utils import statsd +from zerver.exceptions import RateLimited +from zerver.lib.rate_limiter import incr_ratelimit, is_ratelimited, \ api_calls_left from functools import wraps import base64 @@ -49,7 +49,7 @@ def update_user_activity(request, user_profile): 'time': datetime_to_timestamp(now()), 'client': request.client.name} # TODO: It's possible that this should call process_user_activity - # from zephyr.lib.actions for maximal consistency. + # from zerver.lib.actions for maximal consistency. queue_json_publish("user_activity", event, lambda event: None) # I like the all-lowercase name better @@ -425,13 +425,13 @@ def profiled(func): """ This decorator should obviously be used only in a dev environment. It works best when surrounding a function that you expect to be - called once. One strategy is to write a test case in zephyr/tests.py + called once. One strategy is to write a test case in zerver/tests.py and wrap the test case with the profiled decorator. You can run a single test case like this: - # edit zephyr/tests.py and place @profiled above the test case below - ./tools/test-backend zephyr.RateLimitTests.test_ratelimit_decrease + # edit zerver/tests.py and place @profiled above the test case below + ./tools/test-backend zerver.RateLimitTests.test_ratelimit_decrease Then view the results like this: diff --git a/zephyr/exceptions.py b/zerver/exceptions.py similarity index 100% rename from zephyr/exceptions.py rename to zerver/exceptions.py diff --git a/zephyr/filters.py b/zerver/filters.py similarity index 100% rename from zephyr/filters.py rename to zerver/filters.py diff --git a/zephyr/finders.py b/zerver/finders.py similarity index 100% rename from zephyr/finders.py rename to zerver/finders.py diff --git a/zephyr/fixtures/.gitignore b/zerver/fixtures/.gitignore similarity index 100% rename from zephyr/fixtures/.gitignore rename to zerver/fixtures/.gitignore diff --git a/zephyr/fixtures/beanstalk/beanstalk_git_multiple.json b/zerver/fixtures/beanstalk/beanstalk_git_multiple.json similarity index 100% rename from zephyr/fixtures/beanstalk/beanstalk_git_multiple.json rename to zerver/fixtures/beanstalk/beanstalk_git_multiple.json diff --git a/zephyr/fixtures/beanstalk/beanstalk_git_singlecommit.json b/zerver/fixtures/beanstalk/beanstalk_git_singlecommit.json similarity index 100% rename from zephyr/fixtures/beanstalk/beanstalk_git_singlecommit.json rename to zerver/fixtures/beanstalk/beanstalk_git_singlecommit.json diff --git a/zephyr/fixtures/beanstalk/beanstalk_svn_addremove.json b/zerver/fixtures/beanstalk/beanstalk_svn_addremove.json similarity index 100% rename from zephyr/fixtures/beanstalk/beanstalk_svn_addremove.json rename to zerver/fixtures/beanstalk/beanstalk_svn_addremove.json diff --git a/zephyr/fixtures/beanstalk/beanstalk_svn_changefile.json b/zerver/fixtures/beanstalk/beanstalk_svn_changefile.json similarity index 100% rename from zephyr/fixtures/beanstalk/beanstalk_svn_changefile.json rename to zerver/fixtures/beanstalk/beanstalk_svn_changefile.json diff --git a/zephyr/fixtures/github/github_sample.json b/zerver/fixtures/github/github_sample.json similarity index 100% rename from zephyr/fixtures/github/github_sample.json rename to zerver/fixtures/github/github_sample.json diff --git a/zephyr/fixtures/jira/jira_commented.json b/zerver/fixtures/jira/jira_commented.json similarity index 100% rename from zephyr/fixtures/jira/jira_commented.json rename to zerver/fixtures/jira/jira_commented.json diff --git a/zephyr/fixtures/jira/jira_created.json b/zerver/fixtures/jira/jira_created.json similarity index 100% rename from zephyr/fixtures/jira/jira_created.json rename to zerver/fixtures/jira/jira_created.json diff --git a/zephyr/fixtures/jira/jira_deleted.json b/zerver/fixtures/jira/jira_deleted.json similarity index 100% rename from zephyr/fixtures/jira/jira_deleted.json rename to zerver/fixtures/jira/jira_deleted.json diff --git a/zephyr/fixtures/jira/jira_postfunction_hook.json b/zerver/fixtures/jira/jira_postfunction_hook.json similarity index 100% rename from zephyr/fixtures/jira/jira_postfunction_hook.json rename to zerver/fixtures/jira/jira_postfunction_hook.json diff --git a/zephyr/fixtures/jira/jira_postfunction_resolved.json b/zerver/fixtures/jira/jira_postfunction_resolved.json similarity index 100% rename from zephyr/fixtures/jira/jira_postfunction_resolved.json rename to zerver/fixtures/jira/jira_postfunction_resolved.json diff --git a/zephyr/fixtures/jira/jira_postfunction_started.json b/zerver/fixtures/jira/jira_postfunction_started.json similarity index 100% rename from zephyr/fixtures/jira/jira_postfunction_started.json rename to zerver/fixtures/jira/jira_postfunction_started.json diff --git a/zephyr/fixtures/jira/jira_reassigned.json b/zerver/fixtures/jira/jira_reassigned.json similarity index 100% rename from zephyr/fixtures/jira/jira_reassigned.json rename to zerver/fixtures/jira/jira_reassigned.json diff --git a/zephyr/fixtures/jira/jira_reopened.json b/zerver/fixtures/jira/jira_reopened.json similarity index 100% rename from zephyr/fixtures/jira/jira_reopened.json rename to zerver/fixtures/jira/jira_reopened.json diff --git a/zephyr/fixtures/jira/jira_resolved.json b/zerver/fixtures/jira/jira_resolved.json similarity index 100% rename from zephyr/fixtures/jira/jira_resolved.json rename to zerver/fixtures/jira/jira_resolved.json diff --git a/zephyr/fixtures/jira/jira_unknown.json b/zerver/fixtures/jira/jira_unknown.json similarity index 100% rename from zephyr/fixtures/jira/jira_unknown.json rename to zerver/fixtures/jira/jira_unknown.json diff --git a/zephyr/fixtures/newrelic/newrelic_alert.txt b/zerver/fixtures/newrelic/newrelic_alert.txt similarity index 100% rename from zephyr/fixtures/newrelic/newrelic_alert.txt rename to zerver/fixtures/newrelic/newrelic_alert.txt diff --git a/zephyr/fixtures/newrelic/newrelic_deployment.txt b/zerver/fixtures/newrelic/newrelic_deployment.txt similarity index 100% rename from zephyr/fixtures/newrelic/newrelic_deployment.txt rename to zerver/fixtures/newrelic/newrelic_deployment.txt diff --git a/zephyr/fixtures/pivotal/pivotal_accepted.xml b/zerver/fixtures/pivotal/pivotal_accepted.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_accepted.xml rename to zerver/fixtures/pivotal/pivotal_accepted.xml diff --git a/zephyr/fixtures/pivotal/pivotal_commented.xml b/zerver/fixtures/pivotal/pivotal_commented.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_commented.xml rename to zerver/fixtures/pivotal/pivotal_commented.xml diff --git a/zephyr/fixtures/pivotal/pivotal_created.xml b/zerver/fixtures/pivotal/pivotal_created.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_created.xml rename to zerver/fixtures/pivotal/pivotal_created.xml diff --git a/zephyr/fixtures/pivotal/pivotal_created_estimate.xml b/zerver/fixtures/pivotal/pivotal_created_estimate.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_created_estimate.xml rename to zerver/fixtures/pivotal/pivotal_created_estimate.xml diff --git a/zephyr/fixtures/pivotal/pivotal_delivered.xml b/zerver/fixtures/pivotal/pivotal_delivered.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_delivered.xml rename to zerver/fixtures/pivotal/pivotal_delivered.xml diff --git a/zephyr/fixtures/pivotal/pivotal_finished.xml b/zerver/fixtures/pivotal/pivotal_finished.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_finished.xml rename to zerver/fixtures/pivotal/pivotal_finished.xml diff --git a/zephyr/fixtures/pivotal/pivotal_moved.xml b/zerver/fixtures/pivotal/pivotal_moved.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_moved.xml rename to zerver/fixtures/pivotal/pivotal_moved.xml diff --git a/zephyr/fixtures/pivotal/pivotal_rejected.xml b/zerver/fixtures/pivotal/pivotal_rejected.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_rejected.xml rename to zerver/fixtures/pivotal/pivotal_rejected.xml diff --git a/zephyr/fixtures/pivotal/pivotal_started.xml b/zerver/fixtures/pivotal/pivotal_started.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_started.xml rename to zerver/fixtures/pivotal/pivotal_started.xml diff --git a/zephyr/fixtures/pivotal/pivotal_type_changed.xml b/zerver/fixtures/pivotal/pivotal_type_changed.xml similarity index 100% rename from zephyr/fixtures/pivotal/pivotal_type_changed.xml rename to zerver/fixtures/pivotal/pivotal_type_changed.xml diff --git a/zephyr/forms.py b/zerver/forms.py similarity index 94% rename from zephyr/forms.py rename to zerver/forms.py index f9bc238886..2bb45a6bd1 100644 --- a/zephyr/forms.py +++ b/zerver/forms.py @@ -6,8 +6,8 @@ from django.utils.safestring import mark_safe from django.contrib.auth.forms import SetPasswordForm from humbug import settings -from zephyr.models import Realm, get_user_profile_by_email, UserProfile -from zephyr.lib.actions import do_change_password +from zerver.models import Realm, get_user_profile_by_email, UserProfile +from zerver.lib.actions import do_change_password def is_inactive(value): try: diff --git a/zephyr/handlers.py b/zerver/handlers.py similarity index 97% rename from zephyr/handlers.py rename to zerver/handlers.py index 24575649c7..79398d2f42 100644 --- a/zephyr/handlers.py +++ b/zerver/handlers.py @@ -43,7 +43,7 @@ class AdminHumbugHandler(logging.Handler): def emit(self, record): # We have to defer imports to avoid circular imports in settings.py. - from zephyr.lib.actions import internal_send_message + from zerver.lib.actions import internal_send_message try: @@ -78,7 +78,7 @@ class AdminHumbugHandler(logging.Handler): """ Escape CR and LF characters, and limit length to MAX_SUBJECT_LENGTH. """ - from zephyr.models import MAX_SUBJECT_LENGTH + from zerver.models import MAX_SUBJECT_LENGTH formatted_subject = subject.replace('\n', '\\n').replace('\r', '\\r') return formatted_subject[:MAX_SUBJECT_LENGTH] diff --git a/zephyr/lib/__init__.py b/zerver/lib/__init__.py similarity index 100% rename from zephyr/lib/__init__.py rename to zerver/lib/__init__.py diff --git a/zephyr/lib/actions.py b/zerver/lib/actions.py similarity index 98% rename from zephyr/lib/actions.py rename to zerver/lib/actions.py index 834585a9f6..4524fbda8f 100644 --- a/zephyr/lib/actions.py +++ b/zerver/lib/actions.py @@ -3,8 +3,8 @@ from __future__ import absolute_import from django.conf import settings from django.core import validators from django.contrib.sessions.models import Session -from zephyr.lib.context_managers import lockfile -from zephyr.models import Realm, Stream, UserProfile, UserActivity, \ +from zerver.lib.context_managers import lockfile +from zerver.models import Realm, Stream, UserProfile, UserActivity, \ Subscription, Recipient, Message, UserMessage, valid_stream_name, \ DefaultStream, UserPresence, Referral, MAX_SUBJECT_LENGTH, \ MAX_MESSAGE_LENGTH, get_client, get_stream, get_recipient, get_huddle, \ @@ -23,24 +23,24 @@ from confirmation.models import Confirmation session_engine = import_module(settings.SESSION_ENGINE) -from zephyr.lib.initial_password import initial_password -from zephyr.lib.timestamp import timestamp_to_datetime, datetime_to_timestamp -from zephyr.lib.cache_helpers import cache_save_message -from zephyr.lib.queue import queue_json_publish +from zerver.lib.initial_password import initial_password +from zerver.lib.timestamp import timestamp_to_datetime, datetime_to_timestamp +from zerver.lib.cache_helpers import cache_save_message +from zerver.lib.queue import queue_json_publish from django.utils import timezone -from zephyr.lib.create_user import create_user -from zephyr.lib import bugdown -from zephyr.lib.cache import cache_with_key, \ +from zerver.lib.create_user import create_user +from zerver.lib import bugdown +from zerver.lib.cache import cache_with_key, \ user_profile_by_email_cache_key, status_dict_cache_key, cache_set_many -from zephyr.decorator import get_user_profile_by_email, json_to_list, JsonableError, \ +from zerver.decorator import get_user_profile_by_email, json_to_list, JsonableError, \ statsd_increment -from zephyr.lib.event_queue import request_event_queue, get_user_events -from zephyr.lib.utils import log_statsd_event, statsd -from zephyr.lib.html_diff import highlight_html_differences +from zerver.lib.event_queue import request_event_queue, get_user_events +from zerver.lib.utils import log_statsd_event, statsd +from zerver.lib.html_diff import highlight_html_differences import confirmation.settings -from zephyr import tornado_callbacks +from zerver import tornado_callbacks import subprocess import ujson @@ -1316,8 +1316,8 @@ def do_send_missedmessage_email(user_profile, missed_messages): subject = "Missed Zulip%s from %s" % ('s' if len(senders) > 1 else '', sender_str) from_email = "%s (via Zulip) " % (sender_str) - text_content = loader.render_to_string('zephyr/missed_message_email.txt', template_payload) - html_content = loader.render_to_string('zephyr/missed_message_email_html.txt', template_payload) + text_content = loader.render_to_string('zerver/missed_message_email.txt', template_payload) + html_content = loader.render_to_string('zerver/missed_message_email_html.txt', template_payload) msg = EmailMultiAlternatives(subject, text_content, from_email, [user_profile.email], headers = headers) diff --git a/zephyr/lib/avatar.py b/zerver/lib/avatar.py similarity index 96% rename from zephyr/lib/avatar.py rename to zerver/lib/avatar.py index b47f6c38e5..0a570f3ce2 100644 --- a/zephyr/lib/avatar.py +++ b/zerver/lib/avatar.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from django.conf import settings import hashlib -from zephyr.lib.utils import make_safe_digest +from zerver.lib.utils import make_safe_digest def gravatar_hash(email): """Compute the Gravatar hash for an email address.""" diff --git a/zephyr/lib/bugdown/__init__.py b/zerver/lib/bugdown/__init__.py similarity index 98% rename from zephyr/lib/bugdown/__init__.py rename to zerver/lib/bugdown/__init__.py index 8f43ac33c1..eaff93a407 100644 --- a/zephyr/lib/bugdown/__init__.py +++ b/zerver/lib/bugdown/__init__.py @@ -16,12 +16,12 @@ from hashlib import sha1 from django.core import mail from django.conf import settings -from zephyr.lib.avatar import gravatar_hash -from zephyr.lib.bugdown import codehilite, fenced_code -from zephyr.lib.bugdown.fenced_code import FENCE_RE -from zephyr.lib.timeout import timeout, TimeoutExpired -from zephyr.lib.cache import cache_with_key, cache_get_many, cache_set_many -import zephyr.lib.mention as mention +from zerver.lib.avatar import gravatar_hash +from zerver.lib.bugdown import codehilite, fenced_code +from zerver.lib.bugdown.fenced_code import FENCE_RE +from zerver.lib.timeout import timeout, TimeoutExpired +from zerver.lib.cache import cache_with_key, cache_get_many, cache_set_many +import zerver.lib.mention as mention if settings.USING_EMBEDLY: @@ -698,7 +698,7 @@ def do_convert(md, realm_domain=None, message=None): # https://trac.humbughq.com/ticket/345 return timeout(5, _md_engine.convert, md) except: - from zephyr.lib.actions import internal_send_message + from zerver.lib.actions import internal_send_message cleaned = _sanitize_for_log(md) diff --git a/zephyr/lib/bugdown/codehilite.py b/zerver/lib/bugdown/codehilite.py similarity index 100% rename from zephyr/lib/bugdown/codehilite.py rename to zerver/lib/bugdown/codehilite.py diff --git a/zephyr/lib/bugdown/fenced_code.py b/zerver/lib/bugdown/fenced_code.py similarity index 98% rename from zephyr/lib/bugdown/fenced_code.py rename to zerver/lib/bugdown/fenced_code.py index b07a7aa9a8..4d24c7444c 100644 --- a/zephyr/lib/bugdown/fenced_code.py +++ b/zerver/lib/bugdown/fenced_code.py @@ -65,7 +65,7 @@ Dependencies: import re import markdown -from zephyr.lib.bugdown.codehilite import CodeHilite, CodeHiliteExtension +from zerver.lib.bugdown.codehilite import CodeHilite, CodeHiliteExtension # Global vars FENCE_RE = re.compile(r'(?P^(?:~{3,}))[ ]*(\{?\.?(?P[a-zA-Z0-9_+-]*)\}?)$', re.MULTILINE|re.DOTALL) diff --git a/zephyr/lib/bugdown/testing_mocks.py b/zerver/lib/bugdown/testing_mocks.py similarity index 100% rename from zephyr/lib/bugdown/testing_mocks.py rename to zerver/lib/bugdown/testing_mocks.py diff --git a/zephyr/lib/bugdown/tlds-alpha-by-domain.txt b/zerver/lib/bugdown/tlds-alpha-by-domain.txt similarity index 100% rename from zephyr/lib/bugdown/tlds-alpha-by-domain.txt rename to zerver/lib/bugdown/tlds-alpha-by-domain.txt diff --git a/zephyr/lib/bulk_create.py b/zerver/lib/bulk_create.py similarity index 96% rename from zephyr/lib/bulk_create.py rename to zerver/lib/bulk_create.py index b3f2f53fc3..96939f117b 100644 --- a/zephyr/lib/bulk_create.py +++ b/zerver/lib/bulk_create.py @@ -1,9 +1,9 @@ from __future__ import absolute_import -from zephyr.lib.initial_password import initial_password -from zephyr.models import Realm, Stream, UserProfile, Huddle, \ +from zerver.lib.initial_password import initial_password +from zerver.models import Realm, Stream, UserProfile, Huddle, \ Subscription, Recipient, Client, get_huddle_hash, email_to_domain -from zephyr.lib.create_user import create_user_profile +from zerver.lib.create_user import create_user_profile def bulk_create_realms(realm_list): existing_realms = set(r.domain for r in Realm.objects.select_related().all()) diff --git a/zephyr/lib/cache.py b/zerver/lib/cache.py similarity index 98% rename from zephyr/lib/cache.py rename to zerver/lib/cache.py index 93b1e501c6..3f988ca941 100644 --- a/zephyr/lib/cache.py +++ b/zerver/lib/cache.py @@ -6,7 +6,7 @@ from django.core.cache import cache as djcache from django.core.cache import get_cache from django.conf import settings -from zephyr.lib.utils import statsd, statsd_key, make_safe_digest +from zerver.lib.utils import statsd, statsd_key, make_safe_digest import time import base64 import random @@ -211,7 +211,7 @@ def message_cache_key(message_id): return "message:%d" % (message_id,) def user_profile_by_email_cache_key(email): - # See the comment in zephyr/lib/avatar.py:gravatar_hash for why we + # See the comment in zerver/lib/avatar.py:gravatar_hash for why we # are proactively encoding email addresses even though they will # with high likelihood be ASCII-only for the foreseeable future. return 'user_profile_by_email:%s' % (make_safe_digest(email),) diff --git a/zephyr/lib/cache_helpers.py b/zerver/lib/cache_helpers.py similarity index 95% rename from zephyr/lib/cache_helpers.py rename to zerver/lib/cache_helpers.py index c609c3d16b..31a8ed083a 100644 --- a/zephyr/lib/cache_helpers.py +++ b/zerver/lib/cache_helpers.py @@ -1,13 +1,13 @@ from __future__ import absolute_import # This file needs to be different from cache.py because cache.py -# cannot import anything from zephyr.models or we'd have an import +# cannot import anything from zerver.models or we'd have an import # loop from django.conf import settings -from zephyr.models import Message, UserProfile, Stream, get_stream_cache_key, \ +from zerver.models import Message, UserProfile, Stream, get_stream_cache_key, \ Recipient, get_recipient_cache_key, Client, get_client_cache_key, \ Huddle, huddle_hash_cache_key -from zephyr.lib.cache import cache_with_key, cache_set, message_cache_key, \ +from zerver.lib.cache import cache_with_key, cache_set, message_cache_key, \ user_profile_by_email_cache_key, user_profile_by_id_cache_key, \ get_memcached_time, get_memcached_requests, cache_set_many from django.utils.importlib import import_module diff --git a/zephyr/lib/context_managers.py b/zerver/lib/context_managers.py similarity index 100% rename from zephyr/lib/context_managers.py rename to zerver/lib/context_managers.py diff --git a/zephyr/lib/create_user.py b/zerver/lib/create_user.py similarity index 97% rename from zephyr/lib/create_user.py rename to zerver/lib/create_user.py index 735bf980d9..1b218e00b6 100644 --- a/zephyr/lib/create_user.py +++ b/zerver/lib/create_user.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from django.contrib.auth.models import UserManager from django.utils import timezone -from zephyr.models import UserProfile, Recipient, Subscription +from zerver.models import UserProfile, Recipient, Subscription import base64 import ujson import os diff --git a/zephyr/lib/debug.py b/zerver/lib/debug.py similarity index 100% rename from zephyr/lib/debug.py rename to zerver/lib/debug.py diff --git a/zephyr/lib/event_queue.py b/zerver/lib/event_queue.py similarity index 98% rename from zephyr/lib/event_queue.py rename to zerver/lib/event_queue.py index 8606cd7af6..5b1d6188da 100644 --- a/zephyr/lib/event_queue.py +++ b/zerver/lib/event_queue.py @@ -14,9 +14,9 @@ import sys import signal import tornado import random -from zephyr.lib.utils import statsd -from zephyr.middleware import async_request_restart -from zephyr.models import get_client +from zerver.lib.utils import statsd +from zerver.middleware import async_request_restart +from zerver.models import get_client # The idle timeout used to be a week, but we found that in that # situation, queues from dead browser sessions would grow quite large diff --git a/zephyr/lib/html_diff.py b/zerver/lib/html_diff.py similarity index 98% rename from zephyr/lib/html_diff.py rename to zerver/lib/html_diff.py index a7c73dfe38..ce4ebe6264 100644 --- a/zephyr/lib/html_diff.py +++ b/zerver/lib/html_diff.py @@ -101,7 +101,7 @@ def highlight_html_differences(s1, s2): idx += 1 if not verify_html(retval): - from zephyr.lib.actions import internal_send_message + from zerver.lib.actions import internal_send_message # We probably want more information here logging.getLogger('').error('HTML diff produced mal-formed HTML') diff --git a/zephyr/lib/initial_password.py b/zerver/lib/initial_password.py similarity index 100% rename from zephyr/lib/initial_password.py rename to zerver/lib/initial_password.py diff --git a/zephyr/lib/logging_util.py b/zerver/lib/logging_util.py similarity index 100% rename from zephyr/lib/logging_util.py rename to zerver/lib/logging_util.py diff --git a/zephyr/lib/mention.py b/zerver/lib/mention.py similarity index 87% rename from zephyr/lib/mention.py rename to zerver/lib/mention.py index 2f5f9d8dbb..e42c8ca57c 100644 --- a/zephyr/lib/mention.py +++ b/zerver/lib/mention.py @@ -1,7 +1,7 @@ import re from django.db.models import F, Q -import zephyr.models +import zerver.models # Match multi-word string between @** ** or match any one-word # sequences after @ @@ -14,7 +14,7 @@ def find_user_for_mention(mention, realm): return (True, None) try: - user = zephyr.models.UserProfile.objects.filter( + user = zerver.models.UserProfile.objects.filter( Q(full_name__iexact=mention) | Q(short_name__iexact=mention), is_active=True, realm=realm).order_by("id")[0] diff --git a/zephyr/lib/parallel.py b/zerver/lib/parallel.py similarity index 100% rename from zephyr/lib/parallel.py rename to zerver/lib/parallel.py diff --git a/zephyr/lib/query.py b/zerver/lib/query.py similarity index 100% rename from zephyr/lib/query.py rename to zerver/lib/query.py diff --git a/zephyr/lib/queue.py b/zerver/lib/queue.py similarity index 99% rename from zephyr/lib/queue.py rename to zerver/lib/queue.py index fb7021db6f..2506b66798 100644 --- a/zephyr/lib/queue.py +++ b/zerver/lib/queue.py @@ -10,7 +10,7 @@ import threading import atexit from collections import defaultdict -from zephyr.lib.utils import statsd +from zerver.lib.utils import statsd # This simple queuing library doesn't expose much of the power of # rabbitmq/pika's queuing system; its purpose is to just provide an diff --git a/zephyr/lib/rate_limiter.py b/zerver/lib/rate_limiter.py similarity index 100% rename from zephyr/lib/rate_limiter.py rename to zerver/lib/rate_limiter.py diff --git a/zephyr/lib/response.py b/zerver/lib/response.py similarity index 100% rename from zephyr/lib/response.py rename to zerver/lib/response.py diff --git a/zephyr/lib/timeout.py b/zerver/lib/timeout.py similarity index 100% rename from zephyr/lib/timeout.py rename to zerver/lib/timeout.py diff --git a/zephyr/lib/timestamp.py b/zerver/lib/timestamp.py similarity index 100% rename from zephyr/lib/timestamp.py rename to zerver/lib/timestamp.py diff --git a/zephyr/lib/tornado_ioloop_logging.py b/zerver/lib/tornado_ioloop_logging.py similarity index 100% rename from zephyr/lib/tornado_ioloop_logging.py rename to zerver/lib/tornado_ioloop_logging.py diff --git a/zephyr/lib/unminify.py b/zerver/lib/unminify.py similarity index 100% rename from zephyr/lib/unminify.py rename to zerver/lib/unminify.py diff --git a/zephyr/lib/upload.py b/zerver/lib/upload.py similarity index 98% rename from zephyr/lib/upload.py rename to zerver/lib/upload.py index c9636e5154..8c8ce0d36a 100644 --- a/zephyr/lib/upload.py +++ b/zerver/lib/upload.py @@ -3,7 +3,7 @@ from __future__ import absolute_import from django.conf import settings from django.template.defaultfilters import slugify -from zephyr.lib.avatar import user_avatar_hash +from zerver.lib.avatar import user_avatar_hash from boto.s3.key import Key from boto.s3.connection import S3Connection diff --git a/zephyr/lib/utils.py b/zerver/lib/utils.py similarity index 100% rename from zephyr/lib/utils.py rename to zerver/lib/utils.py diff --git a/zephyr/management/__init__.py b/zerver/management/__init__.py similarity index 100% rename from zephyr/management/__init__.py rename to zerver/management/__init__.py diff --git a/zephyr/management/commands/__init__.py b/zerver/management/commands/__init__.py similarity index 100% rename from zephyr/management/commands/__init__.py rename to zerver/management/commands/__init__.py diff --git a/zephyr/management/commands/activate_mit.py b/zerver/management/commands/activate_mit.py similarity index 94% rename from zephyr/management/commands/activate_mit.py rename to zerver/management/commands/activate_mit.py index c184d36a5f..f8c77babab 100644 --- a/zephyr/management/commands/activate_mit.py +++ b/zerver/management/commands/activate_mit.py @@ -3,7 +3,7 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand from confirmation.models import Confirmation -from zephyr.models import UserProfile, MitUser, get_user_profile_by_email +from zerver.models import UserProfile, MitUser, get_user_profile_by_email class Command(BaseCommand): option_list = BaseCommand.option_list + ( diff --git a/zephyr/management/commands/active_user_stats.py b/zerver/management/commands/active_user_stats.py similarity index 96% rename from zephyr/management/commands/active_user_stats.py rename to zerver/management/commands/active_user_stats.py index 6b321c6d6b..4145b38e5f 100644 --- a/zephyr/management/commands/active_user_stats.py +++ b/zerver/management/commands/active_user_stats.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.models import UserPresence, UserActivity -from zephyr.lib.utils import statsd, statsd_key +from zerver.models import UserPresence, UserActivity +from zerver.lib.utils import statsd, statsd_key from datetime import datetime, timedelta from collections import defaultdict diff --git a/zephyr/management/commands/add_users_to_streams.py b/zerver/management/commands/add_users_to_streams.py similarity index 94% rename from zephyr/management/commands/add_users_to_streams.py rename to zerver/management/commands/add_users_to_streams.py index 8c43b9a828..39cb745da7 100644 --- a/zephyr/management/commands/add_users_to_streams.py +++ b/zerver/management/commands/add_users_to_streams.py @@ -4,8 +4,8 @@ from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.lib.actions import create_stream_if_needed, do_add_subscription -from zephyr.models import Realm, UserProfile, get_user_profile_by_email +from zerver.lib.actions import create_stream_if_needed, do_add_subscription +from zerver.models import Realm, UserProfile, get_user_profile_by_email class Command(BaseCommand): help = """Add some or all users in a realm to a set of streams.""" diff --git a/zephyr/management/commands/analyze_mit.py b/zerver/management/commands/analyze_mit.py similarity index 97% rename from zephyr/management/commands/analyze_mit.py rename to zerver/management/commands/analyze_mit.py index 8c6339486a..588fc6a7ce 100644 --- a/zephyr/management/commands/analyze_mit.py +++ b/zerver/management/commands/analyze_mit.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.models import Recipient, Message -from zephyr.lib.timestamp import timestamp_to_datetime +from zerver.models import Recipient, Message +from zerver.lib.timestamp import timestamp_to_datetime import datetime import time import logging diff --git a/zephyr/management/commands/bankrupt_users.py b/zerver/management/commands/bankrupt_users.py similarity index 91% rename from zephyr/management/commands/bankrupt_users.py rename to zerver/management/commands/bankrupt_users.py index 36679e41f7..d1be39b1ff 100644 --- a/zephyr/management/commands/bankrupt_users.py +++ b/zerver/management/commands/bankrupt_users.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.lib.actions import update_message_flags -from zephyr.models import UserProfile, Message, get_user_profile_by_email +from zerver.lib.actions import update_message_flags +from zerver.models import UserProfile, Message, get_user_profile_by_email class Command(BaseCommand): help = """Bankrupt one or many users. diff --git a/zephyr/management/commands/bulk_change_user_name.py b/zerver/management/commands/bulk_change_user_name.py similarity index 90% rename from zephyr/management/commands/bulk_change_user_name.py rename to zerver/management/commands/bulk_change_user_name.py index 9f0c51ad37..07b42989c5 100644 --- a/zephyr/management/commands/bulk_change_user_name.py +++ b/zerver/management/commands/bulk_change_user_name.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.lib.actions import do_change_full_name -from zephyr.models import UserProfile, get_user_profile_by_email +from zerver.lib.actions import do_change_full_name +from zerver.models import UserProfile, get_user_profile_by_email class Command(BaseCommand): help = """Change the names for many users. diff --git a/zephyr/management/commands/change_user_email.py b/zerver/management/commands/change_user_email.py similarity index 85% rename from zephyr/management/commands/change_user_email.py rename to zerver/management/commands/change_user_email.py index 79172a34f3..681612c079 100644 --- a/zephyr/management/commands/change_user_email.py +++ b/zerver/management/commands/change_user_email.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.lib.actions import do_change_user_email -from zephyr.models import UserProfile, get_user_profile_by_email +from zerver.lib.actions import do_change_user_email +from zerver.models import UserProfile, get_user_profile_by_email class Command(BaseCommand): help = """Change the email address for a user. diff --git a/zephyr/management/commands/check_redis.py b/zerver/management/commands/check_redis.py similarity index 95% rename from zephyr/management/commands/check_redis.py rename to zerver/management/commands/check_redis.py index b42d7d70f7..d48c0b205b 100644 --- a/zephyr/management/commands/check_redis.py +++ b/zerver/management/commands/check_redis.py @@ -1,7 +1,7 @@ from __future__ import absolute_import -from zephyr.models import get_user_profile_by_id -from zephyr.lib.rate_limiter import client, max_api_calls, max_api_window +from zerver.models import get_user_profile_by_id +from zerver.lib.rate_limiter import client, max_api_calls, max_api_window from django.core.management.base import BaseCommand from django.conf import settings diff --git a/zephyr/management/commands/clear_db.py b/zerver/management/commands/clear_db.py similarity index 88% rename from zephyr/management/commands/clear_db.py rename to zerver/management/commands/clear_db.py index a44d00386a..ca7da5a3f3 100644 --- a/zephyr/management/commands/clear_db.py +++ b/zerver/management/commands/clear_db.py @@ -1,7 +1,7 @@ from __future__ import absolute_import from django.core.management.base import NoArgsCommand -from zephyr.models import clear_database +from zerver.models import clear_database class Command(NoArgsCommand): help = "Clear only tables we change: messages, accounts + sessions" diff --git a/zephyr/management/commands/colorize_streams.py b/zerver/management/commands/colorize_streams.py similarity index 97% rename from zephyr/management/commands/colorize_streams.py rename to zerver/management/commands/colorize_streams.py index 9766cad66f..0446a1d95f 100644 --- a/zephyr/management/commands/colorize_streams.py +++ b/zerver/management/commands/colorize_streams.py @@ -4,7 +4,7 @@ from optparse import make_option from django.core.management.base import BaseCommand from django.db.models import Count, Q -from zephyr.models import Realm, Stream, UserProfile, Subscription, \ +from zerver.models import Realm, Stream, UserProfile, Subscription, \ Message, Recipient class Command(BaseCommand): diff --git a/zephyr/management/commands/copy_colors.py b/zerver/management/commands/copy_colors.py similarity index 92% rename from zephyr/management/commands/copy_colors.py rename to zerver/management/commands/copy_colors.py index 40c94bda17..9143fcef53 100644 --- a/zephyr/management/commands/copy_colors.py +++ b/zerver/management/commands/copy_colors.py @@ -1,7 +1,7 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.models import StreamColor +from zerver.models import StreamColor class Command(BaseCommand): help = """Copies all colors from the StreamColor table to the Subscription table.""" diff --git a/zephyr/management/commands/create_realm.py b/zerver/management/commands/create_realm.py similarity index 95% rename from zephyr/management/commands/create_realm.py rename to zerver/management/commands/create_realm.py index adac19206a..96038613d5 100644 --- a/zephyr/management/commands/create_realm.py +++ b/zerver/management/commands/create_realm.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.lib.actions import do_create_realm +from zerver.lib.actions import do_create_realm class Command(BaseCommand): help = """Create a realm for the specified domain. diff --git a/zephyr/management/commands/create_user.py b/zerver/management/commands/create_user.py similarity index 92% rename from zephyr/management/commands/create_user.py rename to zerver/management/commands/create_user.py index 8d8d751a39..72f97f9b8a 100644 --- a/zephyr/management/commands/create_user.py +++ b/zerver/management/commands/create_user.py @@ -8,10 +8,10 @@ from django.core.exceptions import ValidationError from django.db.utils import IntegrityError from django.core import validators -from zephyr.models import Realm, email_to_username -from zephyr.lib.actions import do_create_user -from zephyr.views import notify_new_user -from zephyr.lib.initial_password import initial_password +from zerver.models import Realm, email_to_username +from zerver.lib.actions import do_create_user +from zerver.views import notify_new_user +from zerver.lib.initial_password import initial_password class Command(BaseCommand): help = """Create the specified user with a default initial password. diff --git a/zephyr/management/commands/deactivate_user.py b/zerver/management/commands/deactivate_user.py similarity index 92% rename from zephyr/management/commands/deactivate_user.py rename to zerver/management/commands/deactivate_user.py index 7c9a0de3cf..8f23ca5cb2 100644 --- a/zephyr/management/commands/deactivate_user.py +++ b/zerver/management/commands/deactivate_user.py @@ -4,8 +4,8 @@ from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.lib.actions import do_deactivate, user_sessions -from zephyr.models import get_user_profile_by_email, UserProfile +from zerver.lib.actions import do_deactivate, user_sessions +from zerver.models import get_user_profile_by_email, UserProfile class Command(BaseCommand): help = "Deactivate a user, including forcibly logging them out." diff --git a/zephyr/management/commands/delete_tutorial_streams.py b/zerver/management/commands/delete_tutorial_streams.py similarity index 97% rename from zephyr/management/commands/delete_tutorial_streams.py rename to zerver/management/commands/delete_tutorial_streams.py index 612328cb32..d141097922 100644 --- a/zephyr/management/commands/delete_tutorial_streams.py +++ b/zerver/management/commands/delete_tutorial_streams.py @@ -1,7 +1,7 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.models import Subscription, Recipient, Message, Stream, \ +from zerver.models import Subscription, Recipient, Message, Stream, \ get_user_profile_by_email from django.db.models import Q diff --git a/zephyr/management/commands/dump_passwords.py b/zerver/management/commands/dump_passwords.py similarity index 90% rename from zephyr/management/commands/dump_passwords.py rename to zerver/management/commands/dump_passwords.py index d9abeff1b3..c5748e7dbf 100644 --- a/zephyr/management/commands/dump_passwords.py +++ b/zerver/management/commands/dump_passwords.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.models import UserProfile, get_user_profile_by_email -from zephyr.lib.actions import do_change_password +from zerver.models import UserProfile, get_user_profile_by_email +from zerver.lib.actions import do_change_password import ujson def dump(): diff --git a/zephyr/management/commands/dump_pointers.py b/zerver/management/commands/dump_pointers.py similarity index 92% rename from zephyr/management/commands/dump_pointers.py rename to zerver/management/commands/dump_pointers.py index eddc73a990..265970e99e 100755 --- a/zephyr/management/commands/dump_pointers.py +++ b/zerver/management/commands/dump_pointers.py @@ -2,9 +2,9 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.models import UserProfile, Message, UserMessage, \ +from zerver.models import UserProfile, Message, UserMessage, \ get_user_profile_by_email -from zephyr.lib.timestamp import datetime_to_timestamp, timestamp_to_datetime +from zerver.lib.timestamp import datetime_to_timestamp, timestamp_to_datetime import ujson def dump(): diff --git a/zephyr/management/commands/dump_useractivity.py b/zerver/management/commands/dump_useractivity.py similarity index 93% rename from zephyr/management/commands/dump_useractivity.py rename to zerver/management/commands/dump_useractivity.py index 0b3626a799..fee7004532 100644 --- a/zephyr/management/commands/dump_useractivity.py +++ b/zerver/management/commands/dump_useractivity.py @@ -2,9 +2,9 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.models import UserActivity, get_client, get_user_profile_by_email +from zerver.models import UserActivity, get_client, get_user_profile_by_email import ujson -from zephyr.lib.timestamp import datetime_to_timestamp, timestamp_to_datetime +from zerver.lib.timestamp import datetime_to_timestamp, timestamp_to_datetime def dump(): pointers = [] diff --git a/zephyr/management/commands/explain_js_error.py b/zerver/management/commands/explain_js_error.py similarity index 97% rename from zephyr/management/commands/explain_js_error.py rename to zerver/management/commands/explain_js_error.py index 6829ba8c85..2e214e6fef 100644 --- a/zephyr/management/commands/explain_js_error.py +++ b/zerver/management/commands/explain_js_error.py @@ -6,7 +6,7 @@ import select from django.core.management.base import BaseCommand, CommandError -from zephyr.lib.unminify import SourceMap +from zerver.lib.unminify import SourceMap # Wait for the user to paste text, then time out quickly and # return it. Disable echo so that we can re-echo the same diff --git a/zephyr/management/commands/expunge_db.py b/zerver/management/commands/expunge_db.py similarity index 76% rename from zephyr/management/commands/expunge_db.py rename to zerver/management/commands/expunge_db.py index 911d98eca4..e083f02f46 100644 --- a/zephyr/management/commands/expunge_db.py +++ b/zerver/management/commands/expunge_db.py @@ -1,8 +1,8 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.retention_policy import get_UserMessages_to_expunge -from zephyr.models import Message +from zerver.retention_policy import get_UserMessages_to_expunge +from zerver.models import Message class Command(BaseCommand): help = ('Expunge old UserMessages and Messages from the database, ' diff --git a/zephyr/management/commands/expunge_logs.py b/zerver/management/commands/expunge_logs.py similarity index 96% rename from zephyr/management/commands/expunge_logs.py rename to zerver/management/commands/expunge_logs.py index b40f78ed19..0fde4bb845 100644 --- a/zephyr/management/commands/expunge_logs.py +++ b/zerver/management/commands/expunge_logs.py @@ -9,7 +9,7 @@ import ujson from os import path from django.core.management.base import BaseCommand -from zephyr.retention_policy import should_expunge_from_log +from zerver.retention_policy import should_expunge_from_log now = datetime.datetime.now() diff --git a/zephyr/management/commands/fill_memcached_caches.py b/zerver/management/commands/fill_memcached_caches.py similarity index 89% rename from zephyr/management/commands/fill_memcached_caches.py rename to zerver/management/commands/fill_memcached_caches.py index 6695b8d98a..30ab98389e 100644 --- a/zephyr/management/commands/fill_memcached_caches.py +++ b/zerver/management/commands/fill_memcached_caches.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.lib.cache_helpers import fill_memcached_cache, cache_fillers +from zerver.lib.cache_helpers import fill_memcached_cache, cache_fillers class Command(BaseCommand): option_list = BaseCommand.option_list + ( diff --git a/zephyr/management/commands/generate_invite_links.py b/zerver/management/commands/generate_invite_links.py similarity index 93% rename from zephyr/management/commands/generate_invite_links.py rename to zerver/management/commands/generate_invite_links.py index 0cee20bfbc..bd4ddbdf46 100644 --- a/zephyr/management/commands/generate_invite_links.py +++ b/zerver/management/commands/generate_invite_links.py @@ -2,7 +2,7 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand from confirmation.models import Confirmation -from zephyr.models import UserProfile, PreregistrationUser, \ +from zerver.models import UserProfile, PreregistrationUser, \ get_user_profile_by_email class Command(BaseCommand): diff --git a/zephyr/management/commands/grant_invites.py b/zerver/management/commands/grant_invites.py similarity index 88% rename from zephyr/management/commands/grant_invites.py rename to zerver/management/commands/grant_invites.py index d16426674d..766af05d42 100644 --- a/zephyr/management/commands/grant_invites.py +++ b/zerver/management/commands/grant_invites.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.lib.actions import send_referral_event -from zephyr.models import get_user_profile_by_email +from zerver.lib.actions import send_referral_event +from zerver.models import get_user_profile_by_email class Command(BaseCommand): help = """Grants a user invites and resets the number of invites they've used. diff --git a/zephyr/management/commands/gravatar_to_user_avatar.py b/zerver/management/commands/gravatar_to_user_avatar.py similarity index 90% rename from zephyr/management/commands/gravatar_to_user_avatar.py rename to zerver/management/commands/gravatar_to_user_avatar.py index 417f3d9537..a298e80c19 100644 --- a/zephyr/management/commands/gravatar_to_user_avatar.py +++ b/zerver/management/commands/gravatar_to_user_avatar.py @@ -2,9 +2,9 @@ from __future__ import absolute_import import sys import requests -from zephyr.models import get_user_profile_by_email, UserProfile -from zephyr.lib.avatar import gravatar_hash, user_avatar_hash -from zephyr.lib.upload import upload_avatar_image +from zerver.models import get_user_profile_by_email, UserProfile +from zerver.lib.avatar import gravatar_hash, user_avatar_hash +from zerver.lib.upload import upload_avatar_image from django.core.management.base import BaseCommand, CommandError from django.core.files.uploadedfile import SimpleUploadedFile diff --git a/zephyr/management/commands/knight.py b/zerver/management/commands/knight.py similarity index 98% rename from zephyr/management/commands/knight.py rename to zerver/management/commands/knight.py index d6e8ff6626..1cb48435c5 100644 --- a/zephyr/management/commands/knight.py +++ b/zerver/management/commands/knight.py @@ -10,7 +10,7 @@ from django.core import validators from guardian.shortcuts import assign_perm, remove_perm -from zephyr.models import Realm, UserProfile +from zerver.models import Realm, UserProfile class Command(BaseCommand): help = """Give an existing user administrative permissions over their (own) Realm. diff --git a/zephyr/management/commands/logout_all_users.py b/zerver/management/commands/logout_all_users.py similarity index 88% rename from zephyr/management/commands/logout_all_users.py rename to zerver/management/commands/logout_all_users.py index 2a0c6d734e..f0161a7c94 100755 --- a/zephyr/management/commands/logout_all_users.py +++ b/zerver/management/commands/logout_all_users.py @@ -4,9 +4,9 @@ from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.lib.actions import delete_all_user_sessions, \ +from zerver.lib.actions import delete_all_user_sessions, \ delete_realm_user_sessions -from zephyr.models import Realm +from zerver.models import Realm class Command(BaseCommand): help = "Log out all users." diff --git a/zephyr/management/commands/populate_db.py b/zerver/management/commands/populate_db.py similarity index 98% rename from zephyr/management/commands/populate_db.py rename to zerver/management/commands/populate_db.py index 5e04438d41..8527bfadb7 100644 --- a/zephyr/management/commands/populate_db.py +++ b/zerver/management/commands/populate_db.py @@ -4,21 +4,21 @@ from django.core.management.base import BaseCommand from django.utils.timezone import now from django.contrib.sites.models import Site -from zephyr.models import Message, UserProfile, Stream, Recipient, Client, \ +from zerver.models import Message, UserProfile, Stream, Recipient, Client, \ Subscription, Huddle, get_huddle, Realm, UserMessage, \ get_huddle_hash, clear_database, get_client, get_user_profile_by_id, \ email_to_domain, email_to_username -from zephyr.lib.actions import do_send_message, set_default_streams, \ +from zerver.lib.actions import do_send_message, set_default_streams, \ do_activate_user, do_deactivate, do_change_password -from zephyr.lib.parallel import run_parallel +from zerver.lib.parallel import run_parallel from django.db import transaction, connection from django.conf import settings -from zephyr.lib.bulk_create import bulk_create_realms, \ +from zerver.lib.bulk_create import bulk_create_realms, \ bulk_create_streams, bulk_create_users, bulk_create_huddles, \ bulk_create_clients -from zephyr.lib.timestamp import timestamp_to_datetime -from zephyr.models import MAX_MESSAGE_LENGTH -from zephyr.models import DefaultStream, get_stream +from zerver.lib.timestamp import timestamp_to_datetime +from zerver.models import MAX_MESSAGE_LENGTH +from zerver.models import DefaultStream, get_stream import ujson import datetime @@ -174,7 +174,7 @@ class Command(BaseCommand): if options["delete"]: # Create the "website" and "API" clients; if we don't, the - # default values in zephyr/decorators.py will not work + # default values in zerver/decorators.py will not work # with the Django test suite. get_client("website") get_client("API") @@ -701,7 +701,7 @@ def send_messages(data): # Close the database connection, so that we get a new one that # isn't shared with the other threads connection.close() - texts = file("zephyr/management/commands/test_messages.txt", "r").readlines() + texts = file("zerver/management/commands/test_messages.txt", "r").readlines() offset = random.randint(0, len(texts)) recipient_streams = [klass.id for klass in diff --git a/zephyr/management/commands/print_initial_password.py b/zerver/management/commands/print_initial_password.py similarity index 84% rename from zephyr/management/commands/print_initial_password.py rename to zerver/management/commands/print_initial_password.py index 9908ffa976..95924b3e3c 100644 --- a/zephyr/management/commands/print_initial_password.py +++ b/zerver/management/commands/print_initial_password.py @@ -1,8 +1,8 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.lib.initial_password import initial_password -from zephyr.models import get_user_profile_by_email +from zerver.lib.initial_password import initial_password +from zerver.models import get_user_profile_by_email class Command(BaseCommand): help = "Print the initial password and API key for accounts as created by populate_db" diff --git a/zephyr/management/commands/process_signups.py b/zerver/management/commands/process_signups.py similarity index 93% rename from zephyr/management/commands/process_signups.py rename to zerver/management/commands/process_signups.py index 289c0f0102..17c5a8699b 100644 --- a/zephyr/management/commands/process_signups.py +++ b/zerver/management/commands/process_signups.py @@ -4,7 +4,7 @@ from postmonkey import PostMonkey from django.core.management.base import BaseCommand from django.conf import settings -from zephyr.lib.queue import SimpleQueueClient +from zerver.lib.queue import SimpleQueueClient class Command(BaseCommand): pm = PostMonkey(settings.MAILCHIMP_API_KEY, timeout=10) diff --git a/zephyr/management/commands/process_user_activity.py b/zerver/management/commands/process_user_activity.py similarity index 94% rename from zephyr/management/commands/process_user_activity.py rename to zerver/management/commands/process_user_activity.py index f67e44409a..63acc817e4 100644 --- a/zephyr/management/commands/process_user_activity.py +++ b/zerver/management/commands/process_user_activity.py @@ -2,9 +2,9 @@ from __future__ import absolute_import from django.conf import settings from django.core.management.base import BaseCommand -from zephyr.lib.actions import process_user_activity_event, \ +from zerver.lib.actions import process_user_activity_event, \ process_user_presence_event -from zephyr.lib.queue import SimpleQueueClient +from zerver.lib.queue import SimpleQueueClient import sys import signal import os diff --git a/zephyr/management/commands/profile_request.py b/zerver/management/commands/profile_request.py similarity index 90% rename from zephyr/management/commands/profile_request.py rename to zerver/management/commands/profile_request.py index d45346e09b..10cc27d04a 100644 --- a/zephyr/management/commands/profile_request.py +++ b/zerver/management/commands/profile_request.py @@ -2,11 +2,11 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.models import get_user_profile_by_email, UserMessage -from zephyr.views import get_old_messages_backend +from zerver.models import get_user_profile_by_email, UserMessage +from zerver.views import get_old_messages_backend import cProfile import logging -from zephyr.middleware import LogRequests +from zerver.middleware import LogRequests request_logger = LogRequests() diff --git a/zephyr/management/commands/rate_limit.py b/zerver/management/commands/rate_limit.py similarity index 95% rename from zephyr/management/commands/rate_limit.py rename to zerver/management/commands/rate_limit.py index d8972533a0..7651eb3703 100644 --- a/zephyr/management/commands/rate_limit.py +++ b/zerver/management/commands/rate_limit.py @@ -1,7 +1,7 @@ from __future__ import absolute_import -from zephyr.models import UserProfile, get_user_profile_by_email -from zephyr.lib.rate_limiter import block_user, unblock_user +from zerver.models import UserProfile, get_user_profile_by_email +from zerver.lib.rate_limiter import block_user, unblock_user from django.core.management.base import BaseCommand from optparse import make_option diff --git a/zephyr/management/commands/realm_stats.py b/zerver/management/commands/realm_stats.py similarity index 99% rename from zephyr/management/commands/realm_stats.py rename to zerver/management/commands/realm_stats.py index ec09e06206..792a163701 100644 --- a/zephyr/management/commands/realm_stats.py +++ b/zerver/management/commands/realm_stats.py @@ -5,7 +5,7 @@ import pytz from django.core.management.base import BaseCommand from django.db.models import Count -from zephyr.models import UserProfile, Realm, Stream, Message, Recipient, UserActivity, \ +from zerver.models import UserProfile, Realm, Stream, Message, Recipient, UserActivity, \ Subscription, UserMessage MOBILE_CLIENT_LIST = ["Android", "iPhone"] diff --git a/zephyr/management/commands/remove_users_from_stream.py b/zerver/management/commands/remove_users_from_stream.py similarity index 94% rename from zephyr/management/commands/remove_users_from_stream.py rename to zerver/management/commands/remove_users_from_stream.py index 425e3c4006..e8c88004cc 100644 --- a/zephyr/management/commands/remove_users_from_stream.py +++ b/zerver/management/commands/remove_users_from_stream.py @@ -4,8 +4,8 @@ from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.lib.actions import do_remove_subscription -from zephyr.models import Realm, UserProfile, get_stream, \ +from zerver.lib.actions import do_remove_subscription +from zerver.models import Realm, UserProfile, get_stream, \ get_user_profile_by_email class Command(BaseCommand): diff --git a/zephyr/management/commands/render_old_messages.py b/zerver/management/commands/render_old_messages.py similarity index 87% rename from zephyr/management/commands/render_old_messages.py rename to zerver/management/commands/render_old_messages.py index 489f81934e..9d29217342 100644 --- a/zephyr/management/commands/render_old_messages.py +++ b/zerver/management/commands/render_old_messages.py @@ -2,8 +2,8 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.lib.actions import update_message_flags -from zephyr.models import UserProfile, Message, get_user_profile_by_email +from zerver.lib.actions import update_message_flags +from zerver.models import UserProfile, Message, get_user_profile_by_email import datetime import time diff --git a/zephyr/management/commands/reset_colors.py b/zerver/management/commands/reset_colors.py similarity index 92% rename from zephyr/management/commands/reset_colors.py rename to zerver/management/commands/reset_colors.py index 12a8521b22..af8482fc9f 100644 --- a/zephyr/management/commands/reset_colors.py +++ b/zerver/management/commands/reset_colors.py @@ -1,7 +1,7 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.models import Subscription, Recipient, get_user_profile_by_email +from zerver.models import Subscription, Recipient, get_user_profile_by_email class Command(BaseCommand): help = """Reset all colors for a person to the default grey""" diff --git a/zephyr/management/commands/runtornado.py b/zerver/management/commands/runtornado.py similarity index 96% rename from zephyr/management/commands/runtornado.py rename to zerver/management/commands/runtornado.py index 3d468022b7..8a626254a0 100644 --- a/zephyr/management/commands/runtornado.py +++ b/zerver/management/commands/runtornado.py @@ -2,12 +2,12 @@ from __future__ import absolute_import from django.conf import settings settings.RUNNING_INSIDE_TORNADO = True -# We must call zephyr.lib.tornado_ioloop_logging.instrument_tornado_ioloop +# We must call zerver.lib.tornado_ioloop_logging.instrument_tornado_ioloop # before we import anything else from our project in order for our # Tornado load logging to work; otherwise we might accidentally import -# zephyr.lib.queue (which will instantiate the Tornado ioloop) before +# zerver.lib.queue (which will instantiate the Tornado ioloop) before # this. -from zephyr.lib.tornado_ioloop_logging import instrument_tornado_ioloop +from zerver.lib.tornado_ioloop_logging import instrument_tornado_ioloop instrument_tornado_ioloop() from django.core.management.base import BaseCommand, CommandError @@ -17,15 +17,15 @@ import sys import tornado.web import logging from tornado import ioloop -from zephyr.lib.debug import interactive_debug_listen -from zephyr.lib.response import json_response -from zephyr import tornado_callbacks -from zephyr.lib.event_queue import setup_event_queue, add_client_gc_hook -from zephyr.lib.queue import setup_tornado_rabbitmq -from zephyr.middleware import async_request_stop +from zerver.lib.debug import interactive_debug_listen +from zerver.lib.response import json_response +from zerver import tornado_callbacks +from zerver.lib.event_queue import setup_event_queue, add_client_gc_hook +from zerver.lib.queue import setup_tornado_rabbitmq +from zerver.middleware import async_request_stop if settings.USING_RABBITMQ: - from zephyr.lib.queue import queue_client + from zerver.lib.queue import queue_client class Command(BaseCommand): option_list = BaseCommand.option_list + ( diff --git a/zephyr/management/commands/send_confirmation_emails.py b/zerver/management/commands/send_confirmation_emails.py similarity index 79% rename from zephyr/management/commands/send_confirmation_emails.py rename to zerver/management/commands/send_confirmation_emails.py index f0ca0ee88a..a75322ec09 100644 --- a/zephyr/management/commands/send_confirmation_emails.py +++ b/zerver/management/commands/send_confirmation_emails.py @@ -2,9 +2,9 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.models import get_user_profile_by_email, get_prereg_user_by_email -from zephyr.lib.queue import SimpleQueueClient -from zephyr.lib.actions import do_send_confirmation_email +from zerver.models import get_user_profile_by_email, get_prereg_user_by_email +from zerver.lib.queue import SimpleQueueClient +from zerver.lib.actions import do_send_confirmation_email class Command(BaseCommand): """ diff --git a/zephyr/management/commands/send_missedmessage_reminders.py b/zerver/management/commands/send_missedmessage_reminders.py similarity index 89% rename from zephyr/management/commands/send_missedmessage_reminders.py rename to zerver/management/commands/send_missedmessage_reminders.py index f996598049..f71576ec6c 100644 --- a/zephyr/management/commands/send_missedmessage_reminders.py +++ b/zerver/management/commands/send_missedmessage_reminders.py @@ -6,8 +6,8 @@ from collections import defaultdict from django.core.management.base import BaseCommand -from zephyr.lib.queue import SimpleQueueClient -from zephyr.lib.actions import handle_missedmessage_emails +from zerver.lib.queue import SimpleQueueClient +from zerver.lib.actions import handle_missedmessage_emails class Command(BaseCommand): def handle(self, *args, **options): diff --git a/zephyr/management/commands/send_stats.py b/zerver/management/commands/send_stats.py similarity index 100% rename from zephyr/management/commands/send_stats.py rename to zerver/management/commands/send_stats.py diff --git a/zephyr/management/commands/set_default_streams.py b/zerver/management/commands/set_default_streams.py similarity index 94% rename from zephyr/management/commands/set_default_streams.py rename to zerver/management/commands/set_default_streams.py index 3bc7756535..39cc69ad67 100644 --- a/zephyr/management/commands/set_default_streams.py +++ b/zerver/management/commands/set_default_streams.py @@ -1,7 +1,7 @@ from django.core.management.base import BaseCommand -from zephyr.models import Realm -from zephyr.lib.actions import set_default_streams, log_event +from zerver.models import Realm +from zerver.lib.actions import set_default_streams, log_event from optparse import make_option import sys diff --git a/zephyr/management/commands/set_message_flags.py b/zerver/management/commands/set_message_flags.py similarity index 96% rename from zephyr/management/commands/set_message_flags.py rename to zerver/management/commands/set_message_flags.py index c8e6984e63..927cf147f8 100644 --- a/zephyr/management/commands/set_message_flags.py +++ b/zerver/management/commands/set_message_flags.py @@ -6,8 +6,8 @@ import sys from django.core.management.base import BaseCommand -from zephyr.lib import utils -from zephyr.models import UserMessage, get_user_profile_by_email +from zerver.lib import utils +from zerver.models import UserMessage, get_user_profile_by_email from django.db import transaction, models diff --git a/zephyr/management/commands/set_unread_to_pointer.py b/zerver/management/commands/set_unread_to_pointer.py similarity index 97% rename from zephyr/management/commands/set_unread_to_pointer.py rename to zerver/management/commands/set_unread_to_pointer.py index a43c1290a1..0b7a012978 100644 --- a/zephyr/management/commands/set_unread_to_pointer.py +++ b/zerver/management/commands/set_unread_to_pointer.py @@ -5,8 +5,8 @@ import logging from django.core.management.base import BaseCommand -from zephyr.lib import utils -from zephyr.models import UserMessage, UserProfile, \ +from zerver.lib import utils +from zerver.models import UserMessage, UserProfile, \ get_user_profile_by_email from django.db import transaction, models diff --git a/zephyr/management/commands/stream_stats.py b/zerver/management/commands/stream_stats.py similarity index 95% rename from zephyr/management/commands/stream_stats.py rename to zerver/management/commands/stream_stats.py index 16d8d5bae7..2e92ed19eb 100644 --- a/zephyr/management/commands/stream_stats.py +++ b/zerver/management/commands/stream_stats.py @@ -1,6 +1,6 @@ from django.core.management.base import BaseCommand from django.db.models import Q -from zephyr.models import Realm, Stream, Message, Subscription, Recipient +from zerver.models import Realm, Stream, Message, Subscription, Recipient class Command(BaseCommand): help = "Generate statistics on the streams for a realm." diff --git a/zephyr/management/commands/sync_api_key.py b/zerver/management/commands/sync_api_key.py similarity index 93% rename from zephyr/management/commands/sync_api_key.py rename to zerver/management/commands/sync_api_key.py index 06c1944f4e..c2469f3e29 100644 --- a/zephyr/management/commands/sync_api_key.py +++ b/zerver/management/commands/sync_api_key.py @@ -1,7 +1,7 @@ from __future__ import absolute_import from django.core.management.base import BaseCommand -from zephyr.models import get_user_profile_by_email +from zerver.models import get_user_profile_by_email import os from ConfigParser import SafeConfigParser diff --git a/zephyr/management/commands/test_messages.txt b/zerver/management/commands/test_messages.txt similarity index 100% rename from zephyr/management/commands/test_messages.txt rename to zerver/management/commands/test_messages.txt diff --git a/zephyr/management/commands/update_mit_fullnames.py b/zerver/management/commands/update_mit_fullnames.py similarity index 92% rename from zephyr/management/commands/update_mit_fullnames.py rename to zerver/management/commands/update_mit_fullnames.py index b1b01a2b95..fd8eb742ee 100644 --- a/zephyr/management/commands/update_mit_fullnames.py +++ b/zerver/management/commands/update_mit_fullnames.py @@ -3,8 +3,8 @@ from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand -from zephyr.models import UserProfile -from zephyr.lib.actions import compute_mit_user_fullname +from zerver.models import UserProfile +from zerver.lib.actions import compute_mit_user_fullname # Helper to be used with manage.py shell to fix bad names on prod. def update_mit_fullnames(change=False): diff --git a/zephyr/management/commands/update_permissions.py b/zerver/management/commands/update_permissions.py similarity index 100% rename from zephyr/management/commands/update_permissions.py rename to zerver/management/commands/update_permissions.py diff --git a/zephyr/management/commands/user_stats.py b/zerver/management/commands/user_stats.py similarity index 95% rename from zephyr/management/commands/user_stats.py rename to zerver/management/commands/user_stats.py index bfc73b7a44..50117bb412 100644 --- a/zephyr/management/commands/user_stats.py +++ b/zerver/management/commands/user_stats.py @@ -4,7 +4,7 @@ import datetime import pytz from django.core.management.base import BaseCommand -from zephyr.models import UserProfile, Realm, Stream, Message +from zerver.models import UserProfile, Realm, Stream, Message class Command(BaseCommand): help = "Generate statistics on user activity." diff --git a/zephyr/middleware.py b/zerver/middleware.py similarity index 96% rename from zephyr/middleware.py rename to zerver/middleware.py index fc58a30f6e..8f6649805d 100644 --- a/zephyr/middleware.py +++ b/zerver/middleware.py @@ -1,12 +1,12 @@ from __future__ import absolute_import from django.conf import settings -from zephyr.lib.response import json_error +from zerver.lib.response import json_error from django.db import connection -from zephyr.lib.utils import statsd -from zephyr.lib.cache import get_memcached_time, get_memcached_requests -from zephyr.lib.bugdown import get_bugdown_time, get_bugdown_requests -from zephyr.exceptions import RateLimited +from zerver.lib.utils import statsd +from zerver.lib.cache import get_memcached_time, get_memcached_requests +from zerver.lib.bugdown import get_bugdown_time, get_bugdown_requests +from zerver.exceptions import RateLimited import logging import time @@ -175,7 +175,7 @@ class RateLimitMiddleware(object): if not settings.RATE_LIMITING: return response - from zephyr.lib.rate_limiter import max_api_calls + from zerver.lib.rate_limiter import max_api_calls # Add X-RateLimit-*** headers if hasattr(request, '_ratelimit_applied_limits'): response['X-RateLimit-Limit'] = max_api_calls(request.user) diff --git a/zephyr/migrations/0001_initial.py b/zerver/migrations/0001_initial.py similarity index 100% rename from zephyr/migrations/0001_initial.py rename to zerver/migrations/0001_initial.py diff --git a/zephyr/migrations/0017_auto__add_field_subscription_color.py b/zerver/migrations/0017_auto__add_field_subscription_color.py similarity index 100% rename from zephyr/migrations/0017_auto__add_field_subscription_color.py rename to zerver/migrations/0017_auto__add_field_subscription_color.py diff --git a/zephyr/migrations/0018_auto__add_unique_userprofile_email.py b/zerver/migrations/0018_auto__add_unique_userprofile_email.py similarity index 100% rename from zephyr/migrations/0018_auto__add_unique_userprofile_email.py rename to zerver/migrations/0018_auto__add_unique_userprofile_email.py diff --git a/zephyr/migrations/0019_auto__add_field_userprofile_tutorial_status.py b/zerver/migrations/0019_auto__add_field_userprofile_tutorial_status.py similarity index 100% rename from zephyr/migrations/0019_auto__add_field_userprofile_tutorial_status.py rename to zerver/migrations/0019_auto__add_field_userprofile_tutorial_status.py diff --git a/zephyr/migrations/0020_set_tutorial_finished.py b/zerver/migrations/0020_set_tutorial_finished.py similarity index 96% rename from zephyr/migrations/0020_set_tutorial_finished.py rename to zerver/migrations/0020_set_tutorial_finished.py index 882ad78147..9ed02f24db 100644 --- a/zephyr/migrations/0020_set_tutorial_finished.py +++ b/zerver/migrations/0020_set_tutorial_finished.py @@ -7,7 +7,14 @@ from django.db import models class Migration(DataMigration): def forwards(self, orm): - orm.UserProfile.objects.all().update(tutorial_status="F") + # HACK: Replace app name in db.pending_create_signals to avoid crashing + # out at the end of the migration. + create_signals = db.get_pending_creates() + for i in xrange(0, len(create_signals)): + if create_signals[i][0] == 'zephyr': + create_signals[i] = ('zerver', create_signals[i][1]) + + orm['zephyr.UserProfile'].objects.all().update(tutorial_status="F") def backwards(self, orm): "Write your backwards methods here." diff --git a/zephyr/migrations/0021_auto__add_field_subscription_notifications.py b/zerver/migrations/0021_auto__add_field_subscription_notifications.py similarity index 100% rename from zephyr/migrations/0021_auto__add_field_subscription_notifications.py rename to zerver/migrations/0021_auto__add_field_subscription_notifications.py diff --git a/zephyr/migrations/0022_create_humbug_search_config.py b/zerver/migrations/0022_create_humbug_search_config.py similarity index 100% rename from zephyr/migrations/0022_create_humbug_search_config.py rename to zerver/migrations/0022_create_humbug_search_config.py diff --git a/zephyr/migrations/0023_rebuild_search_tsvector.py b/zerver/migrations/0023_rebuild_search_tsvector.py similarity index 100% rename from zephyr/migrations/0023_rebuild_search_tsvector.py rename to zerver/migrations/0023_rebuild_search_tsvector.py diff --git a/zephyr/migrations/0024_create_escape_html_function.py b/zerver/migrations/0024_create_escape_html_function.py similarity index 100% rename from zephyr/migrations/0024_create_escape_html_function.py rename to zerver/migrations/0024_create_escape_html_function.py diff --git a/zephyr/migrations/0025_auto__add_field_userprofile_enable_sounds.py b/zerver/migrations/0025_auto__add_field_userprofile_enable_sounds.py similarity index 100% rename from zephyr/migrations/0025_auto__add_field_userprofile_enable_sounds.py rename to zerver/migrations/0025_auto__add_field_userprofile_enable_sounds.py diff --git a/zephyr/migrations/0026_auto__add_field_userprofile_enable_offline_email_notifications__add_fi.py b/zerver/migrations/0026_auto__add_field_userprofile_enable_offline_email_notifications__add_fi.py similarity index 100% rename from zephyr/migrations/0026_auto__add_field_userprofile_enable_offline_email_notifications__add_fi.py rename to zerver/migrations/0026_auto__add_field_userprofile_enable_offline_email_notifications__add_fi.py diff --git a/zephyr/migrations/0027_auto__add_field_userprofile_is_bot__add_field_userprofile_bot_owner.py b/zerver/migrations/0027_auto__add_field_userprofile_is_bot__add_field_userprofile_bot_owner.py similarity index 100% rename from zephyr/migrations/0027_auto__add_field_userprofile_is_bot__add_field_userprofile_bot_owner.py rename to zerver/migrations/0027_auto__add_field_userprofile_is_bot__add_field_userprofile_bot_owner.py diff --git a/zephyr/migrations/0028_auto__add_field_userprofile_onboarding_steps.py b/zerver/migrations/0028_auto__add_field_userprofile_onboarding_steps.py similarity index 100% rename from zephyr/migrations/0028_auto__add_field_userprofile_onboarding_steps.py rename to zerver/migrations/0028_auto__add_field_userprofile_onboarding_steps.py diff --git a/zephyr/migrations/0029_auto__add_field_message_last_edit_time__add_field_message_edit_history.py b/zerver/migrations/0029_auto__add_field_message_last_edit_time__add_field_message_edit_history.py similarity index 100% rename from zephyr/migrations/0029_auto__add_field_message_last_edit_time__add_field_message_edit_history.py rename to zerver/migrations/0029_auto__add_field_message_last_edit_time__add_field_message_edit_history.py diff --git a/zephyr/migrations/0030_auto__chg_field_userprofile_last_reminder.py b/zerver/migrations/0030_auto__chg_field_userprofile_last_reminder.py similarity index 100% rename from zephyr/migrations/0030_auto__chg_field_userprofile_last_reminder.py rename to zerver/migrations/0030_auto__chg_field_userprofile_last_reminder.py diff --git a/zephyr/migrations/0031_auto__add_field_userprofile_rate_limits.py b/zerver/migrations/0031_auto__add_field_userprofile_rate_limits.py similarity index 100% rename from zephyr/migrations/0031_auto__add_field_userprofile_rate_limits.py rename to zerver/migrations/0031_auto__add_field_userprofile_rate_limits.py diff --git a/zephyr/migrations/0032_auto__add_field_userprofile_avatar_source.py b/zerver/migrations/0032_auto__add_field_userprofile_avatar_source.py similarity index 100% rename from zephyr/migrations/0032_auto__add_field_userprofile_avatar_source.py rename to zerver/migrations/0032_auto__add_field_userprofile_avatar_source.py diff --git a/zephyr/migrations/0033_remove_postgres_zephyr_message_full_text_idx.py b/zerver/migrations/0033_remove_postgres_zephyr_message_full_text_idx.py similarity index 100% rename from zephyr/migrations/0033_remove_postgres_zephyr_message_full_text_idx.py rename to zerver/migrations/0033_remove_postgres_zephyr_message_full_text_idx.py diff --git a/zephyr/migrations/0034_change_search_stopwords.py b/zerver/migrations/0034_change_search_stopwords.py similarity index 100% rename from zephyr/migrations/0034_change_search_stopwords.py rename to zerver/migrations/0034_change_search_stopwords.py diff --git a/zephyr/migrations/0035_auto__add_field_userprofile_is_superuser.py b/zerver/migrations/0035_auto__add_field_userprofile_is_superuser.py similarity index 100% rename from zephyr/migrations/0035_auto__add_field_userprofile_is_superuser.py rename to zerver/migrations/0035_auto__add_field_userprofile_is_superuser.py diff --git a/zephyr/migrations/0036_async_fts_update.py b/zerver/migrations/0036_async_fts_update.py similarity index 97% rename from zephyr/migrations/0036_async_fts_update.py rename to zerver/migrations/0036_async_fts_update.py index 63248e1581..c1702a6629 100644 --- a/zephyr/migrations/0036_async_fts_update.py +++ b/zerver/migrations/0036_async_fts_update.py @@ -25,9 +25,15 @@ class Migration(SchemaMigration): "FOR EACH ROW EXECUTE PROCEDURE append_to_fts_update_log()") db.execute("DROP TRIGGER zephyr_message_update_search_tsvector ON zephyr_message") - db.commit_transaction() + # HACK: Replace app name in db.pending_create_signals to avoid crashing + # out at the end of the migration. + create_signals = db.get_pending_creates() + for i in xrange(0, len(create_signals)): + if create_signals[i][0] == 'zephyr': + create_signals[i] = ('zerver', create_signals[i][1]) + def backwards(self, orm): db.start_transaction() diff --git a/zephyr/migrations/0037_auto__add_field_preregistrationuser_realm.py b/zerver/migrations/0037_auto__add_field_preregistrationuser_realm.py similarity index 100% rename from zephyr/migrations/0037_auto__add_field_preregistrationuser_realm.py rename to zerver/migrations/0037_auto__add_field_preregistrationuser_realm.py diff --git a/zephyr/migrations/0038_auto__add_referral__add_field_userprofile_invites_granted__add_field_u.py b/zerver/migrations/0038_auto__add_referral__add_field_userprofile_invites_granted__add_field_u.py similarity index 100% rename from zephyr/migrations/0038_auto__add_referral__add_field_userprofile_invites_granted__add_field_u.py rename to zerver/migrations/0038_auto__add_referral__add_field_userprofile_invites_granted__add_field_u.py diff --git a/zerver/migrations/0039_rename_database_tables.py b/zerver/migrations/0039_rename_database_tables.py new file mode 100644 index 0000000000..ec1777b6be --- /dev/null +++ b/zerver/migrations/0039_rename_database_tables.py @@ -0,0 +1,217 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +def rename(old_name, new_name): + for table_name in ['zephyr_realm', + 'zephyr_userprofile', + 'zephyr_client', + 'zephyr_huddle', + 'zephyr_mituser', + 'zephyr_message', + 'zephyr_usermessage', + 'zephyr_stream', + 'zephyr_streamcolor', + 'zephyr_useractivity', + 'zephyr_userpresence', + 'zephyr_referral', + 'zephyr_recipient', + 'zephyr_preregistrationuser', + 'zephyr_preregistrationuser_streams', + 'zephyr_subscription', + 'zephyr_defaultstream', + 'zephyr_userprofile_user_permissions', + 'zephyr_userprofile_groups']: + db.rename_table(table_name.replace(new_name, old_name), + table_name.replace(old_name, new_name)) + +class Migration(SchemaMigration): + + def forwards(self, orm): + rename("zephyr", "zerver") + + create_signals = db.get_pending_creates() + for i in xrange(0, len(create_signals)): + if create_signals[i][0] == 'zephyr': + create_signals[i] = ('zerver', create_signals[i][1]) + + def backwards(self, orm): + rename("zerver", "zephyr") + + create_signals = db.get_pending_creates() + for i in xrange(0, len(create_signals)): + if create_signals[i][0] == 'zerver': + create_signals[i] = ('zephyr', create_signals[i][1]) + pass + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'zerver.client': { + 'Meta': {'object_name': 'Client'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30', 'db_index': 'True'}) + }, + u'zerver.defaultstream': { + 'Meta': {'unique_together': "(('realm', 'stream'),)", 'object_name': 'DefaultStream'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Realm']"}), + 'stream': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Stream']"}) + }, + u'zerver.huddle': { + 'Meta': {'object_name': 'Huddle'}, + 'huddle_hash': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) + }, + u'zerver.message': { + 'Meta': {'object_name': 'Message'}, + 'content': ('django.db.models.fields.TextField', [], {}), + 'edit_history': ('django.db.models.fields.TextField', [], {'null': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'last_edit_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'pub_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}), + 'recipient': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Recipient']"}), + 'rendered_content': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'rendered_content_version': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), + 'sender': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.UserProfile']"}), + 'sending_client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Client']"}), + 'subject': ('django.db.models.fields.CharField', [], {'max_length': '60', 'db_index': 'True'}) + }, + u'zerver.mituser': { + 'Meta': {'object_name': 'MitUser'}, + 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}) + }, + u'zerver.preregistrationuser': { + 'Meta': {'object_name': 'PreregistrationUser'}, + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'invited_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Realm']", 'null': 'True'}), + 'referred_by': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.UserProfile']", 'null': 'True'}), + 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'streams': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['zerver.Stream']", 'null': 'True', 'symmetrical': 'False'}) + }, + u'zerver.realm': { + 'Meta': {'object_name': 'Realm'}, + 'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'restricted_to_domain': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) + }, + u'zerver.recipient': { + 'Meta': {'unique_together': "(('type', 'type_id'),)", 'object_name': 'Recipient'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'type': ('django.db.models.fields.PositiveSmallIntegerField', [], {'db_index': 'True'}), + 'type_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}) + }, + u'zerver.referral': { + 'Meta': {'object_name': 'Referral'}, + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.UserProfile']"}) + }, + u'zerver.stream': { + 'Meta': {'unique_together': "(('name', 'realm'),)", 'object_name': 'Stream'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'invite_only': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}), + 'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Realm']"}) + }, + u'zerver.streamcolor': { + 'Meta': {'object_name': 'StreamColor'}, + 'color': ('django.db.models.fields.CharField', [], {'max_length': '10'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'subscription': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Subscription']"}) + }, + u'zerver.subscription': { + 'Meta': {'unique_together': "(('user_profile', 'recipient'),)", 'object_name': 'Subscription'}, + 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'color': ('django.db.models.fields.CharField', [], {'default': "'#c2c2c2'", 'max_length': '10'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'in_home_view': ('django.db.models.fields.NullBooleanField', [], {'default': 'True', 'null': 'True', 'blank': 'True'}), + 'notifications': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'recipient': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Recipient']"}), + 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.UserProfile']"}) + }, + u'zerver.useractivity': { + 'Meta': {'unique_together': "(('user_profile', 'client', 'query'),)", 'object_name': 'UserActivity'}, + 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Client']"}), + 'count': ('django.db.models.fields.IntegerField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'last_visit': ('django.db.models.fields.DateTimeField', [], {}), + 'query': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), + 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.UserProfile']"}) + }, + u'zerver.usermessage': { + 'Meta': {'unique_together': "(('user_profile', 'message'),)", 'object_name': 'UserMessage'}, + 'archived': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'flags': ('django.db.models.fields.BigIntegerField', [], {'default': '0'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'message': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Message']"}), + 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.UserProfile']"}) + }, + u'zerver.userpresence': { + 'Meta': {'unique_together': "(('user_profile', 'client'),)", 'object_name': 'UserPresence'}, + 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Client']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '1'}), + 'timestamp': ('django.db.models.fields.DateTimeField', [], {}), + 'user_profile': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.UserProfile']"}) + }, + u'zerver.userprofile': { + 'Meta': {'object_name': 'UserProfile'}, + 'api_key': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'avatar_source': ('django.db.models.fields.CharField', [], {'default': "'G'", 'max_length': '1'}), + 'bot_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.UserProfile']", 'null': 'True', 'on_delete': 'models.SET_NULL'}), + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75', 'db_index': 'True'}), + 'enable_desktop_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'enable_offline_email_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'enable_sounds': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'enter_sends': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), + 'full_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'invites_granted': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'invites_used': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_bot': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_pointer_updater': ('django.db.models.fields.CharField', [], {'max_length': '64'}), + 'last_reminder': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True'}), + 'onboarding_steps': ('django.db.models.fields.TextField', [], {'default': "'[]'"}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'pointer': ('django.db.models.fields.IntegerField', [], {}), + 'rate_limits': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}), + 'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zerver.Realm']"}), + 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'tutorial_status': ('django.db.models.fields.CharField', [], {'default': "'W'", 'max_length': '1'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + } + } + + complete_apps = ['zerver'] diff --git a/zephyr/migrations/__init__.py b/zerver/migrations/__init__.py similarity index 100% rename from zephyr/migrations/__init__.py rename to zerver/migrations/__init__.py diff --git a/zephyr/models.py b/zerver/models.py similarity index 98% rename from zephyr/models.py rename to zerver/models.py index fff541a4cb..d454853848 100644 --- a/zephyr/models.py +++ b/zerver/models.py @@ -4,16 +4,16 @@ from django.db import models from django.conf import settings from django.contrib.auth.models import AbstractBaseUser, UserManager, \ PermissionsMixin -from zephyr.lib.cache import cache_with_key, update_user_profile_cache, \ +from zerver.lib.cache import cache_with_key, update_user_profile_cache, \ user_profile_by_id_cache_key, user_profile_by_email_cache_key, \ update_user_presence_cache, generic_bulk_cached_fetch -from zephyr.lib.utils import make_safe_digest +from zerver.lib.utils import make_safe_digest from django.db import transaction, IntegrityError -from zephyr.lib import bugdown -from zephyr.lib.avatar import gravatar_hash, avatar_url +from zerver.lib import bugdown +from zerver.lib.avatar import gravatar_hash, avatar_url from django.utils import timezone from django.contrib.sessions.models import Session -from zephyr.lib.timestamp import datetime_to_timestamp +from zerver.lib.timestamp import datetime_to_timestamp from django.db.models.signals import post_save import zlib @@ -296,7 +296,7 @@ def bulk_get_streams(realm, stream_names): if len(stream_names) == 0: return [] upper_list = ", ".join(["UPPER(%s)"] * len(stream_names)) - where_clause = "UPPER(zephyr_stream.name::text) IN (%s)" % (upper_list,) + where_clause = "UPPER(zerver_stream.name::text) IN (%s)" % (upper_list,) return Stream.objects.select_related("realm").filter(realm_id=realm_id).extra( where=[where_clause], params=stream_names) @@ -643,7 +643,7 @@ class DefaultStream(models.Model): # FIXME: The foreign key relationship here is backwards. # # We can't easily get a list of streams and their associated colors (if any) in -# a single query. See zephyr.views.gather_subscriptions for an example. +# a single query. See zerver.views.gather_subscriptions for an example. # # We should change things around so that is possible. Probably this should # just be a column on Subscription. diff --git a/zephyr/openid.py b/zerver/openid.py similarity index 100% rename from zephyr/openid.py rename to zerver/openid.py diff --git a/zephyr/retention_policy.py b/zerver/retention_policy.py similarity index 97% rename from zephyr/retention_policy.py rename to zerver/retention_policy.py index a6deb3f429..c2ac426cf9 100644 --- a/zephyr/retention_policy.py +++ b/zerver/retention_policy.py @@ -16,7 +16,7 @@ import operator from django.utils import timezone from django.db.models import Q from datetime import datetime, timedelta -from zephyr.models import Realm, UserMessage, get_user_profile_by_email +from zerver.models import Realm, UserMessage, get_user_profile_by_email # Each domain has a maximum age for retained messages. # diff --git a/zephyr/static_header.txt b/zerver/static_header.txt similarity index 100% rename from zephyr/static_header.txt rename to zerver/static_header.txt diff --git a/zephyr/storage.py b/zerver/storage.py similarity index 100% rename from zephyr/storage.py rename to zerver/storage.py diff --git a/zephyr/templatetags/__init__.py b/zerver/templatetags/__init__.py similarity index 100% rename from zephyr/templatetags/__init__.py rename to zerver/templatetags/__init__.py diff --git a/zephyr/templatetags/minified_js.py b/zerver/templatetags/minified_js.py similarity index 100% rename from zephyr/templatetags/minified_js.py rename to zerver/templatetags/minified_js.py diff --git a/zephyr/tests.py b/zerver/tests.py similarity index 99% rename from zephyr/tests.py rename to zerver/tests.py index b613853999..d7f55c1753 100644 --- a/zephyr/tests.py +++ b/zerver/tests.py @@ -6,19 +6,19 @@ from django.test.simple import DjangoTestSuiteRunner from django.utils.timezone import now from django.db.models import Q -from zephyr.models import Message, UserProfile, Stream, Recipient, Subscription, \ +from zerver.models import Message, UserProfile, Stream, Recipient, Subscription, \ get_display_recipient, Realm, Client, \ PreregistrationUser, UserMessage, \ get_user_profile_by_email, email_to_domain -from zephyr.tornadoviews import json_get_updates, api_get_messages -from zephyr.decorator import RespondAsynchronously, RequestVariableConversionError, profiled -from zephyr.lib.initial_password import initial_password -from zephyr.lib.actions import do_send_message, gather_subscriptions, \ +from zerver.tornadoviews import json_get_updates, api_get_messages +from zerver.decorator import RespondAsynchronously, RequestVariableConversionError, profiled +from zerver.lib.initial_password import initial_password +from zerver.lib.actions import do_send_message, gather_subscriptions, \ create_stream_if_needed, do_add_subscription -from zephyr.lib.rate_limiter import add_ratelimit_rule, remove_ratelimit_rule -from zephyr.lib import bugdown -from zephyr.lib.cache import bounce_key_prefix_for_testing -from zephyr.lib.rate_limiter import clear_user_history +from zerver.lib.rate_limiter import add_ratelimit_rule, remove_ratelimit_rule +from zerver.lib import bugdown +from zerver.lib.cache import bounce_key_prefix_for_testing +from zerver.lib.rate_limiter import clear_user_history from django.conf import settings import os @@ -1003,7 +1003,7 @@ class SubscriptionAPITest(AuthedTestCase): def test_subscriptions_add_invalid_stream(self): """ Calling /json/subscriptions/add on a stream whose name is invalid (as - defined by valid_stream_name in zephyr/views.py) should return a JSON + defined by valid_stream_name in zerver/views.py) should return a JSON error. """ # currently, the only invalid name is the empty string @@ -1194,7 +1194,7 @@ class SubscriptionAPITest(AuthedTestCase): def test_subscriptions_exist_invalid_name(self): """ Calling /json/subscriptions/exist on a stream whose name is invalid (as - defined by valid_stream_name in zephyr/views.py) should return a JSON + defined by valid_stream_name in zerver/views.py) should return a JSON error. """ # currently, the only invalid stream name is the empty string diff --git a/zephyr/tests/.gitignore b/zerver/tests/.gitignore similarity index 100% rename from zephyr/tests/.gitignore rename to zerver/tests/.gitignore diff --git a/zephyr/tests/frontend/.gitignore b/zerver/tests/frontend/.gitignore similarity index 100% rename from zephyr/tests/frontend/.gitignore rename to zerver/tests/frontend/.gitignore diff --git a/zephyr/tests/frontend/casperjs/.gitignore b/zerver/tests/frontend/casperjs/.gitignore similarity index 100% rename from zephyr/tests/frontend/casperjs/.gitignore rename to zerver/tests/frontend/casperjs/.gitignore diff --git a/zephyr/tests/frontend/casperjs/.gitmodules b/zerver/tests/frontend/casperjs/.gitmodules similarity index 100% rename from zephyr/tests/frontend/casperjs/.gitmodules rename to zerver/tests/frontend/casperjs/.gitmodules diff --git a/zephyr/tests/frontend/casperjs/.jshintconfig b/zerver/tests/frontend/casperjs/.jshintconfig similarity index 100% rename from zephyr/tests/frontend/casperjs/.jshintconfig rename to zerver/tests/frontend/casperjs/.jshintconfig diff --git a/zephyr/tests/frontend/casperjs/.jshintignore b/zerver/tests/frontend/casperjs/.jshintignore similarity index 100% rename from zephyr/tests/frontend/casperjs/.jshintignore rename to zerver/tests/frontend/casperjs/.jshintignore diff --git a/zephyr/tests/frontend/casperjs/.travis.yml b/zerver/tests/frontend/casperjs/.travis.yml similarity index 100% rename from zephyr/tests/frontend/casperjs/.travis.yml rename to zerver/tests/frontend/casperjs/.travis.yml diff --git a/zephyr/tests/frontend/casperjs/CHANGELOG.md b/zerver/tests/frontend/casperjs/CHANGELOG.md similarity index 100% rename from zephyr/tests/frontend/casperjs/CHANGELOG.md rename to zerver/tests/frontend/casperjs/CHANGELOG.md diff --git a/zephyr/tests/frontend/casperjs/CONTRIBUTING.md b/zerver/tests/frontend/casperjs/CONTRIBUTING.md similarity index 100% rename from zephyr/tests/frontend/casperjs/CONTRIBUTING.md rename to zerver/tests/frontend/casperjs/CONTRIBUTING.md diff --git a/zephyr/tests/frontend/casperjs/CONTRIBUTORS.md b/zerver/tests/frontend/casperjs/CONTRIBUTORS.md similarity index 100% rename from zephyr/tests/frontend/casperjs/CONTRIBUTORS.md rename to zerver/tests/frontend/casperjs/CONTRIBUTORS.md diff --git a/zephyr/tests/frontend/casperjs/LICENSE.md b/zerver/tests/frontend/casperjs/LICENSE.md similarity index 100% rename from zephyr/tests/frontend/casperjs/LICENSE.md rename to zerver/tests/frontend/casperjs/LICENSE.md diff --git a/zephyr/tests/frontend/casperjs/README.md b/zerver/tests/frontend/casperjs/README.md similarity index 100% rename from zephyr/tests/frontend/casperjs/README.md rename to zerver/tests/frontend/casperjs/README.md diff --git a/zephyr/tests/frontend/casperjs/batchbin/casperjs.bat b/zerver/tests/frontend/casperjs/batchbin/casperjs.bat similarity index 100% rename from zephyr/tests/frontend/casperjs/batchbin/casperjs.bat rename to zerver/tests/frontend/casperjs/batchbin/casperjs.bat diff --git a/zephyr/tests/frontend/casperjs/bin/bootstrap.js b/zerver/tests/frontend/casperjs/bin/bootstrap.js similarity index 100% rename from zephyr/tests/frontend/casperjs/bin/bootstrap.js rename to zerver/tests/frontend/casperjs/bin/bootstrap.js diff --git a/zephyr/tests/frontend/casperjs/bin/casperjs b/zerver/tests/frontend/casperjs/bin/casperjs similarity index 100% rename from zephyr/tests/frontend/casperjs/bin/casperjs rename to zerver/tests/frontend/casperjs/bin/casperjs diff --git a/zephyr/tests/frontend/casperjs/bin/usage.txt b/zerver/tests/frontend/casperjs/bin/usage.txt similarity index 100% rename from zephyr/tests/frontend/casperjs/bin/usage.txt rename to zerver/tests/frontend/casperjs/bin/usage.txt diff --git a/zephyr/tests/frontend/casperjs/casperjs.gemspec b/zerver/tests/frontend/casperjs/casperjs.gemspec similarity index 100% rename from zephyr/tests/frontend/casperjs/casperjs.gemspec rename to zerver/tests/frontend/casperjs/casperjs.gemspec diff --git a/zephyr/tests/frontend/casperjs/modules/casper.js b/zerver/tests/frontend/casperjs/modules/casper.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/casper.js rename to zerver/tests/frontend/casperjs/modules/casper.js diff --git a/zephyr/tests/frontend/casperjs/modules/cli.js b/zerver/tests/frontend/casperjs/modules/cli.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/cli.js rename to zerver/tests/frontend/casperjs/modules/cli.js diff --git a/zephyr/tests/frontend/casperjs/modules/clientutils.js b/zerver/tests/frontend/casperjs/modules/clientutils.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/clientutils.js rename to zerver/tests/frontend/casperjs/modules/clientutils.js diff --git a/zephyr/tests/frontend/casperjs/modules/colorizer.js b/zerver/tests/frontend/casperjs/modules/colorizer.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/colorizer.js rename to zerver/tests/frontend/casperjs/modules/colorizer.js diff --git a/zephyr/tests/frontend/casperjs/modules/events.js b/zerver/tests/frontend/casperjs/modules/events.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/events.js rename to zerver/tests/frontend/casperjs/modules/events.js diff --git a/zephyr/tests/frontend/casperjs/modules/http.js b/zerver/tests/frontend/casperjs/modules/http.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/http.js rename to zerver/tests/frontend/casperjs/modules/http.js diff --git a/zephyr/tests/frontend/casperjs/modules/mouse.js b/zerver/tests/frontend/casperjs/modules/mouse.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/mouse.js rename to zerver/tests/frontend/casperjs/modules/mouse.js diff --git a/zephyr/tests/frontend/casperjs/modules/pagestack.js b/zerver/tests/frontend/casperjs/modules/pagestack.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/pagestack.js rename to zerver/tests/frontend/casperjs/modules/pagestack.js diff --git a/zephyr/tests/frontend/casperjs/modules/querystring.js b/zerver/tests/frontend/casperjs/modules/querystring.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/querystring.js rename to zerver/tests/frontend/casperjs/modules/querystring.js diff --git a/zephyr/tests/frontend/casperjs/modules/tester.js b/zerver/tests/frontend/casperjs/modules/tester.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/tester.js rename to zerver/tests/frontend/casperjs/modules/tester.js diff --git a/zephyr/tests/frontend/casperjs/modules/utils.js b/zerver/tests/frontend/casperjs/modules/utils.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/utils.js rename to zerver/tests/frontend/casperjs/modules/utils.js diff --git a/zephyr/tests/frontend/casperjs/modules/vendors/coffee-script.js b/zerver/tests/frontend/casperjs/modules/vendors/coffee-script.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/vendors/coffee-script.js rename to zerver/tests/frontend/casperjs/modules/vendors/coffee-script.js diff --git a/zephyr/tests/frontend/casperjs/modules/xunit.js b/zerver/tests/frontend/casperjs/modules/xunit.js similarity index 100% rename from zephyr/tests/frontend/casperjs/modules/xunit.js rename to zerver/tests/frontend/casperjs/modules/xunit.js diff --git a/zephyr/tests/frontend/casperjs/package.json b/zerver/tests/frontend/casperjs/package.json similarity index 100% rename from zephyr/tests/frontend/casperjs/package.json rename to zerver/tests/frontend/casperjs/package.json diff --git a/zephyr/tests/frontend/casperjs/rpm/casperjs.spec b/zerver/tests/frontend/casperjs/rpm/casperjs.spec similarity index 100% rename from zephyr/tests/frontend/casperjs/rpm/casperjs.spec rename to zerver/tests/frontend/casperjs/rpm/casperjs.spec diff --git a/zephyr/tests/frontend/casperjs/rpm/mkrpm.sh b/zerver/tests/frontend/casperjs/rpm/mkrpm.sh similarity index 100% rename from zephyr/tests/frontend/casperjs/rpm/mkrpm.sh rename to zerver/tests/frontend/casperjs/rpm/mkrpm.sh diff --git a/zephyr/tests/frontend/casperjs/rubybin/casperjs b/zerver/tests/frontend/casperjs/rubybin/casperjs similarity index 100% rename from zephyr/tests/frontend/casperjs/rubybin/casperjs rename to zerver/tests/frontend/casperjs/rubybin/casperjs diff --git a/zephyr/tests/frontend/casperjs/samples/bbcshots.coffee b/zerver/tests/frontend/casperjs/samples/bbcshots.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/bbcshots.coffee rename to zerver/tests/frontend/casperjs/samples/bbcshots.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/bbcshots.js b/zerver/tests/frontend/casperjs/samples/bbcshots.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/bbcshots.js rename to zerver/tests/frontend/casperjs/samples/bbcshots.js diff --git a/zephyr/tests/frontend/casperjs/samples/cliplay.coffee b/zerver/tests/frontend/casperjs/samples/cliplay.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/cliplay.coffee rename to zerver/tests/frontend/casperjs/samples/cliplay.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/cliplay.js b/zerver/tests/frontend/casperjs/samples/cliplay.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/cliplay.js rename to zerver/tests/frontend/casperjs/samples/cliplay.js diff --git a/zephyr/tests/frontend/casperjs/samples/customevents.coffee b/zerver/tests/frontend/casperjs/samples/customevents.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/customevents.coffee rename to zerver/tests/frontend/casperjs/samples/customevents.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/customevents.js b/zerver/tests/frontend/casperjs/samples/customevents.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/customevents.js rename to zerver/tests/frontend/casperjs/samples/customevents.js diff --git a/zephyr/tests/frontend/casperjs/samples/customlogging.coffee b/zerver/tests/frontend/casperjs/samples/customlogging.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/customlogging.coffee rename to zerver/tests/frontend/casperjs/samples/customlogging.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/customlogging.js b/zerver/tests/frontend/casperjs/samples/customlogging.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/customlogging.js rename to zerver/tests/frontend/casperjs/samples/customlogging.js diff --git a/zephyr/tests/frontend/casperjs/samples/download.coffee b/zerver/tests/frontend/casperjs/samples/download.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/download.coffee rename to zerver/tests/frontend/casperjs/samples/download.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/download.js b/zerver/tests/frontend/casperjs/samples/download.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/download.js rename to zerver/tests/frontend/casperjs/samples/download.js diff --git a/zephyr/tests/frontend/casperjs/samples/dynamic.coffee b/zerver/tests/frontend/casperjs/samples/dynamic.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/dynamic.coffee rename to zerver/tests/frontend/casperjs/samples/dynamic.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/dynamic.js b/zerver/tests/frontend/casperjs/samples/dynamic.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/dynamic.js rename to zerver/tests/frontend/casperjs/samples/dynamic.js diff --git a/zephyr/tests/frontend/casperjs/samples/each.coffee b/zerver/tests/frontend/casperjs/samples/each.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/each.coffee rename to zerver/tests/frontend/casperjs/samples/each.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/each.js b/zerver/tests/frontend/casperjs/samples/each.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/each.js rename to zerver/tests/frontend/casperjs/samples/each.js diff --git a/zephyr/tests/frontend/casperjs/samples/events.coffee b/zerver/tests/frontend/casperjs/samples/events.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/events.coffee rename to zerver/tests/frontend/casperjs/samples/events.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/events.js b/zerver/tests/frontend/casperjs/samples/events.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/events.js rename to zerver/tests/frontend/casperjs/samples/events.js diff --git a/zephyr/tests/frontend/casperjs/samples/extends.coffee b/zerver/tests/frontend/casperjs/samples/extends.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/extends.coffee rename to zerver/tests/frontend/casperjs/samples/extends.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/extends.js b/zerver/tests/frontend/casperjs/samples/extends.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/extends.js rename to zerver/tests/frontend/casperjs/samples/extends.js diff --git a/zephyr/tests/frontend/casperjs/samples/googlelinks.coffee b/zerver/tests/frontend/casperjs/samples/googlelinks.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/googlelinks.coffee rename to zerver/tests/frontend/casperjs/samples/googlelinks.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/googlelinks.js b/zerver/tests/frontend/casperjs/samples/googlelinks.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/googlelinks.js rename to zerver/tests/frontend/casperjs/samples/googlelinks.js diff --git a/zephyr/tests/frontend/casperjs/samples/googlematch.coffee b/zerver/tests/frontend/casperjs/samples/googlematch.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/googlematch.coffee rename to zerver/tests/frontend/casperjs/samples/googlematch.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/googlematch.js b/zerver/tests/frontend/casperjs/samples/googlematch.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/googlematch.js rename to zerver/tests/frontend/casperjs/samples/googlematch.js diff --git a/zephyr/tests/frontend/casperjs/samples/googlepagination.coffee b/zerver/tests/frontend/casperjs/samples/googlepagination.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/googlepagination.coffee rename to zerver/tests/frontend/casperjs/samples/googlepagination.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/googlepagination.js b/zerver/tests/frontend/casperjs/samples/googlepagination.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/googlepagination.js rename to zerver/tests/frontend/casperjs/samples/googlepagination.js diff --git a/zephyr/tests/frontend/casperjs/samples/googletesting.coffee b/zerver/tests/frontend/casperjs/samples/googletesting.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/googletesting.coffee rename to zerver/tests/frontend/casperjs/samples/googletesting.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/googletesting.js b/zerver/tests/frontend/casperjs/samples/googletesting.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/googletesting.js rename to zerver/tests/frontend/casperjs/samples/googletesting.js diff --git a/zephyr/tests/frontend/casperjs/samples/logcolor.coffee b/zerver/tests/frontend/casperjs/samples/logcolor.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/logcolor.coffee rename to zerver/tests/frontend/casperjs/samples/logcolor.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/logcolor.js b/zerver/tests/frontend/casperjs/samples/logcolor.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/logcolor.js rename to zerver/tests/frontend/casperjs/samples/logcolor.js diff --git a/zephyr/tests/frontend/casperjs/samples/metaextract.coffee b/zerver/tests/frontend/casperjs/samples/metaextract.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/metaextract.coffee rename to zerver/tests/frontend/casperjs/samples/metaextract.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/metaextract.js b/zerver/tests/frontend/casperjs/samples/metaextract.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/metaextract.js rename to zerver/tests/frontend/casperjs/samples/metaextract.js diff --git a/zephyr/tests/frontend/casperjs/samples/multirun.coffee b/zerver/tests/frontend/casperjs/samples/multirun.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/multirun.coffee rename to zerver/tests/frontend/casperjs/samples/multirun.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/multirun.js b/zerver/tests/frontend/casperjs/samples/multirun.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/multirun.js rename to zerver/tests/frontend/casperjs/samples/multirun.js diff --git a/zephyr/tests/frontend/casperjs/samples/screenshot.coffee b/zerver/tests/frontend/casperjs/samples/screenshot.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/screenshot.coffee rename to zerver/tests/frontend/casperjs/samples/screenshot.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/screenshot.js b/zerver/tests/frontend/casperjs/samples/screenshot.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/screenshot.js rename to zerver/tests/frontend/casperjs/samples/screenshot.js diff --git a/zephyr/tests/frontend/casperjs/samples/statushandlers.coffee b/zerver/tests/frontend/casperjs/samples/statushandlers.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/statushandlers.coffee rename to zerver/tests/frontend/casperjs/samples/statushandlers.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/statushandlers.js b/zerver/tests/frontend/casperjs/samples/statushandlers.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/statushandlers.js rename to zerver/tests/frontend/casperjs/samples/statushandlers.js diff --git a/zephyr/tests/frontend/casperjs/samples/steptimeout.coffee b/zerver/tests/frontend/casperjs/samples/steptimeout.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/steptimeout.coffee rename to zerver/tests/frontend/casperjs/samples/steptimeout.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/steptimeout.js b/zerver/tests/frontend/casperjs/samples/steptimeout.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/steptimeout.js rename to zerver/tests/frontend/casperjs/samples/steptimeout.js diff --git a/zephyr/tests/frontend/casperjs/samples/timeout.coffee b/zerver/tests/frontend/casperjs/samples/timeout.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/timeout.coffee rename to zerver/tests/frontend/casperjs/samples/timeout.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/timeout.js b/zerver/tests/frontend/casperjs/samples/timeout.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/timeout.js rename to zerver/tests/frontend/casperjs/samples/timeout.js diff --git a/zephyr/tests/frontend/casperjs/samples/translate.coffee b/zerver/tests/frontend/casperjs/samples/translate.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/translate.coffee rename to zerver/tests/frontend/casperjs/samples/translate.coffee diff --git a/zephyr/tests/frontend/casperjs/samples/translate.js b/zerver/tests/frontend/casperjs/samples/translate.js similarity index 100% rename from zephyr/tests/frontend/casperjs/samples/translate.js rename to zerver/tests/frontend/casperjs/samples/translate.js diff --git a/zephyr/tests/frontend/casperjs/tests/commands/mytest.js b/zerver/tests/frontend/casperjs/tests/commands/mytest.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/commands/mytest.js rename to zerver/tests/frontend/casperjs/tests/commands/mytest.js diff --git a/zephyr/tests/frontend/casperjs/tests/commands/script.js b/zerver/tests/frontend/casperjs/tests/commands/script.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/commands/script.js rename to zerver/tests/frontend/casperjs/tests/commands/script.js diff --git a/zephyr/tests/frontend/casperjs/tests/run.js b/zerver/tests/frontend/casperjs/tests/run.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/run.js rename to zerver/tests/frontend/casperjs/tests/run.js diff --git a/zephyr/tests/frontend/casperjs/tests/sample_modules/config.json b/zerver/tests/frontend/casperjs/tests/sample_modules/config.json similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/sample_modules/config.json rename to zerver/tests/frontend/casperjs/tests/sample_modules/config.json diff --git a/zephyr/tests/frontend/casperjs/tests/sample_modules/csmodule.coffee b/zerver/tests/frontend/casperjs/tests/sample_modules/csmodule.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/sample_modules/csmodule.coffee rename to zerver/tests/frontend/casperjs/tests/sample_modules/csmodule.coffee diff --git a/zephyr/tests/frontend/casperjs/tests/sample_modules/jsmodule.js b/zerver/tests/frontend/casperjs/tests/sample_modules/jsmodule.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/sample_modules/jsmodule.js rename to zerver/tests/frontend/casperjs/tests/sample_modules/jsmodule.js diff --git a/zephyr/tests/frontend/casperjs/tests/selftest.js b/zerver/tests/frontend/casperjs/tests/selftest.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/selftest.js rename to zerver/tests/frontend/casperjs/tests/selftest.js diff --git a/zephyr/tests/frontend/casperjs/tests/site/alert.html b/zerver/tests/frontend/casperjs/tests/site/alert.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/alert.html rename to zerver/tests/frontend/casperjs/tests/site/alert.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/click.html b/zerver/tests/frontend/casperjs/tests/site/click.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/click.html rename to zerver/tests/frontend/casperjs/tests/site/click.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/confirm.html b/zerver/tests/frontend/casperjs/tests/site/confirm.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/confirm.html rename to zerver/tests/frontend/casperjs/tests/site/confirm.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/dummy.js b/zerver/tests/frontend/casperjs/tests/site/dummy.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/dummy.js rename to zerver/tests/frontend/casperjs/tests/site/dummy.js diff --git a/zephyr/tests/frontend/casperjs/tests/site/elementattribute.html b/zerver/tests/frontend/casperjs/tests/site/elementattribute.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/elementattribute.html rename to zerver/tests/frontend/casperjs/tests/site/elementattribute.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/error.html b/zerver/tests/frontend/casperjs/tests/site/error.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/error.html rename to zerver/tests/frontend/casperjs/tests/site/error.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/field-array.html b/zerver/tests/frontend/casperjs/tests/site/field-array.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/field-array.html rename to zerver/tests/frontend/casperjs/tests/site/field-array.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/form.html b/zerver/tests/frontend/casperjs/tests/site/form.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/form.html rename to zerver/tests/frontend/casperjs/tests/site/form.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/frame1.html b/zerver/tests/frontend/casperjs/tests/site/frame1.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/frame1.html rename to zerver/tests/frontend/casperjs/tests/site/frame1.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/frame2.html b/zerver/tests/frontend/casperjs/tests/site/frame2.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/frame2.html rename to zerver/tests/frontend/casperjs/tests/site/frame2.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/frame3.html b/zerver/tests/frontend/casperjs/tests/site/frame3.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/frame3.html rename to zerver/tests/frontend/casperjs/tests/site/frame3.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/frames.html b/zerver/tests/frontend/casperjs/tests/site/frames.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/frames.html rename to zerver/tests/frontend/casperjs/tests/site/frames.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/global.html b/zerver/tests/frontend/casperjs/tests/site/global.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/global.html rename to zerver/tests/frontend/casperjs/tests/site/global.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/includes/include1.js b/zerver/tests/frontend/casperjs/tests/site/includes/include1.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/includes/include1.js rename to zerver/tests/frontend/casperjs/tests/site/includes/include1.js diff --git a/zephyr/tests/frontend/casperjs/tests/site/includes/include2.js b/zerver/tests/frontend/casperjs/tests/site/includes/include2.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/includes/include2.js rename to zerver/tests/frontend/casperjs/tests/site/includes/include2.js diff --git a/zephyr/tests/frontend/casperjs/tests/site/index.html b/zerver/tests/frontend/casperjs/tests/site/index.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/index.html rename to zerver/tests/frontend/casperjs/tests/site/index.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/mouse-events.html b/zerver/tests/frontend/casperjs/tests/site/mouse-events.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/mouse-events.html rename to zerver/tests/frontend/casperjs/tests/site/mouse-events.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/multiple-forms.html b/zerver/tests/frontend/casperjs/tests/site/multiple-forms.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/multiple-forms.html rename to zerver/tests/frontend/casperjs/tests/site/multiple-forms.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/page1.html b/zerver/tests/frontend/casperjs/tests/site/page1.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/page1.html rename to zerver/tests/frontend/casperjs/tests/site/page1.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/page2.html b/zerver/tests/frontend/casperjs/tests/site/page2.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/page2.html rename to zerver/tests/frontend/casperjs/tests/site/page2.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/page3.html b/zerver/tests/frontend/casperjs/tests/site/page3.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/page3.html rename to zerver/tests/frontend/casperjs/tests/site/page3.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/popup.html b/zerver/tests/frontend/casperjs/tests/site/popup.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/popup.html rename to zerver/tests/frontend/casperjs/tests/site/popup.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/prompt.html b/zerver/tests/frontend/casperjs/tests/site/prompt.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/prompt.html rename to zerver/tests/frontend/casperjs/tests/site/prompt.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/resources.html b/zerver/tests/frontend/casperjs/tests/site/resources.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/resources.html rename to zerver/tests/frontend/casperjs/tests/site/resources.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/result.html b/zerver/tests/frontend/casperjs/tests/site/result.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/result.html rename to zerver/tests/frontend/casperjs/tests/site/result.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/test.html b/zerver/tests/frontend/casperjs/tests/site/test.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/test.html rename to zerver/tests/frontend/casperjs/tests/site/test.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/urls.html b/zerver/tests/frontend/casperjs/tests/site/urls.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/urls.html rename to zerver/tests/frontend/casperjs/tests/site/urls.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/visible.html b/zerver/tests/frontend/casperjs/tests/site/visible.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/visible.html rename to zerver/tests/frontend/casperjs/tests/site/visible.html diff --git a/zephyr/tests/frontend/casperjs/tests/site/waitFor.html b/zerver/tests/frontend/casperjs/tests/site/waitFor.html similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/site/waitFor.html rename to zerver/tests/frontend/casperjs/tests/site/waitFor.html diff --git a/zephyr/tests/frontend/casperjs/tests/suites/.casper b/zerver/tests/frontend/casperjs/tests/suites/.casper similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/.casper rename to zerver/tests/frontend/casperjs/tests/suites/.casper diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/.casper b/zerver/tests/frontend/casperjs/tests/suites/casper/.casper similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/.casper rename to zerver/tests/frontend/casperjs/tests/suites/casper/.casper diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/agent.js b/zerver/tests/frontend/casperjs/tests/suites/casper/agent.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/agent.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/agent.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/alert.js b/zerver/tests/frontend/casperjs/tests/suites/casper/alert.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/alert.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/alert.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/auth.js b/zerver/tests/frontend/casperjs/tests/suites/casper/auth.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/auth.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/auth.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/capture.js b/zerver/tests/frontend/casperjs/tests/suites/casper/capture.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/capture.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/capture.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/click.js b/zerver/tests/frontend/casperjs/tests/suites/casper/click.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/click.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/click.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/confirm.js b/zerver/tests/frontend/casperjs/tests/suites/casper/confirm.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/confirm.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/confirm.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/debug.js b/zerver/tests/frontend/casperjs/tests/suites/casper/debug.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/debug.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/debug.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/elementattribute.js b/zerver/tests/frontend/casperjs/tests/suites/casper/elementattribute.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/elementattribute.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/elementattribute.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/encode.js b/zerver/tests/frontend/casperjs/tests/suites/casper/encode.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/encode.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/encode.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/evaluate.js b/zerver/tests/frontend/casperjs/tests/suites/casper/evaluate.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/evaluate.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/evaluate.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/events.js b/zerver/tests/frontend/casperjs/tests/suites/casper/events.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/events.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/events.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/exists.js b/zerver/tests/frontend/casperjs/tests/suites/casper/exists.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/exists.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/exists.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/fetchtext.js b/zerver/tests/frontend/casperjs/tests/suites/casper/fetchtext.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/fetchtext.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/fetchtext.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/flow.coffee b/zerver/tests/frontend/casperjs/tests/suites/casper/flow.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/flow.coffee rename to zerver/tests/frontend/casperjs/tests/suites/casper/flow.coffee diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/formfill.js b/zerver/tests/frontend/casperjs/tests/suites/casper/formfill.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/formfill.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/formfill.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/frames.js b/zerver/tests/frontend/casperjs/tests/suites/casper/frames.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/frames.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/frames.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/global.js b/zerver/tests/frontend/casperjs/tests/suites/casper/global.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/global.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/global.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/headers.js b/zerver/tests/frontend/casperjs/tests/suites/casper/headers.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/headers.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/headers.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/history.js b/zerver/tests/frontend/casperjs/tests/suites/casper/history.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/history.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/history.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/hooks.js b/zerver/tests/frontend/casperjs/tests/suites/casper/hooks.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/hooks.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/hooks.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/keys.js b/zerver/tests/frontend/casperjs/tests/suites/casper/keys.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/keys.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/keys.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/location.js b/zerver/tests/frontend/casperjs/tests/suites/casper/location.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/location.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/location.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/logging.js b/zerver/tests/frontend/casperjs/tests/suites/casper/logging.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/logging.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/logging.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/mouseevents.js b/zerver/tests/frontend/casperjs/tests/suites/casper/mouseevents.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/mouseevents.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/mouseevents.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/onerror.js b/zerver/tests/frontend/casperjs/tests/suites/casper/onerror.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/onerror.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/onerror.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/open.js b/zerver/tests/frontend/casperjs/tests/suites/casper/open.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/open.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/open.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/popup.js b/zerver/tests/frontend/casperjs/tests/suites/casper/popup.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/popup.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/popup.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/prompt.js b/zerver/tests/frontend/casperjs/tests/suites/casper/prompt.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/prompt.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/prompt.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/request.js b/zerver/tests/frontend/casperjs/tests/suites/casper/request.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/request.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/request.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/resources.coffee b/zerver/tests/frontend/casperjs/tests/suites/casper/resources.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/resources.coffee rename to zerver/tests/frontend/casperjs/tests/suites/casper/resources.coffee diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/scripts.js b/zerver/tests/frontend/casperjs/tests/suites/casper/scripts.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/scripts.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/scripts.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/start.js b/zerver/tests/frontend/casperjs/tests/suites/casper/start.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/start.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/start.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/steps.js b/zerver/tests/frontend/casperjs/tests/suites/casper/steps.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/steps.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/steps.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/urls.js b/zerver/tests/frontend/casperjs/tests/suites/casper/urls.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/urls.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/urls.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/viewport.js b/zerver/tests/frontend/casperjs/tests/suites/casper/viewport.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/viewport.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/viewport.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/visible.js b/zerver/tests/frontend/casperjs/tests/suites/casper/visible.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/visible.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/visible.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/wait.js b/zerver/tests/frontend/casperjs/tests/suites/casper/wait.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/wait.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/wait.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/casper/xpath.js b/zerver/tests/frontend/casperjs/tests/suites/casper/xpath.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/casper/xpath.js rename to zerver/tests/frontend/casperjs/tests/suites/casper/xpath.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/cli.js b/zerver/tests/frontend/casperjs/tests/suites/cli.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/cli.js rename to zerver/tests/frontend/casperjs/tests/suites/cli.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/clientutils.js b/zerver/tests/frontend/casperjs/tests/suites/clientutils.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/clientutils.js rename to zerver/tests/frontend/casperjs/tests/suites/clientutils.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/coffee.coffee b/zerver/tests/frontend/casperjs/tests/suites/coffee.coffee similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/coffee.coffee rename to zerver/tests/frontend/casperjs/tests/suites/coffee.coffee diff --git a/zephyr/tests/frontend/casperjs/tests/suites/fs.js b/zerver/tests/frontend/casperjs/tests/suites/fs.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/fs.js rename to zerver/tests/frontend/casperjs/tests/suites/fs.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/http_status.js b/zerver/tests/frontend/casperjs/tests/suites/http_status.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/http_status.js rename to zerver/tests/frontend/casperjs/tests/suites/http_status.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/popup.js b/zerver/tests/frontend/casperjs/tests/suites/popup.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/popup.js rename to zerver/tests/frontend/casperjs/tests/suites/popup.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/require.js b/zerver/tests/frontend/casperjs/tests/suites/require.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/require.js rename to zerver/tests/frontend/casperjs/tests/suites/require.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/tester.js b/zerver/tests/frontend/casperjs/tests/suites/tester.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/tester.js rename to zerver/tests/frontend/casperjs/tests/suites/tester.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/utils.js b/zerver/tests/frontend/casperjs/tests/suites/utils.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/utils.js rename to zerver/tests/frontend/casperjs/tests/suites/utils.js diff --git a/zephyr/tests/frontend/casperjs/tests/suites/xunit.js b/zerver/tests/frontend/casperjs/tests/suites/xunit.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/suites/xunit.js rename to zerver/tests/frontend/casperjs/tests/suites/xunit.js diff --git a/zephyr/tests/frontend/casperjs/tests/testdir/01_a/abc.js b/zerver/tests/frontend/casperjs/tests/testdir/01_a/abc.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/testdir/01_a/abc.js rename to zerver/tests/frontend/casperjs/tests/testdir/01_a/abc.js diff --git a/zephyr/tests/frontend/casperjs/tests/testdir/01_a/def.js b/zerver/tests/frontend/casperjs/tests/testdir/01_a/def.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/testdir/01_a/def.js rename to zerver/tests/frontend/casperjs/tests/testdir/01_a/def.js diff --git a/zephyr/tests/frontend/casperjs/tests/testdir/02_b/abc.js b/zerver/tests/frontend/casperjs/tests/testdir/02_b/abc.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/testdir/02_b/abc.js rename to zerver/tests/frontend/casperjs/tests/testdir/02_b/abc.js diff --git a/zephyr/tests/frontend/casperjs/tests/testdir/03_a.js b/zerver/tests/frontend/casperjs/tests/testdir/03_a.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/testdir/03_a.js rename to zerver/tests/frontend/casperjs/tests/testdir/03_a.js diff --git a/zephyr/tests/frontend/casperjs/tests/testdir/03_b.js b/zerver/tests/frontend/casperjs/tests/testdir/03_b.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/testdir/03_b.js rename to zerver/tests/frontend/casperjs/tests/testdir/03_b.js diff --git a/zephyr/tests/frontend/casperjs/tests/testdir/04/01_init.js b/zerver/tests/frontend/casperjs/tests/testdir/04/01_init.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/testdir/04/01_init.js rename to zerver/tests/frontend/casperjs/tests/testdir/04/01_init.js diff --git a/zephyr/tests/frontend/casperjs/tests/testdir/04/02_do.js b/zerver/tests/frontend/casperjs/tests/testdir/04/02_do.js similarity index 100% rename from zephyr/tests/frontend/casperjs/tests/testdir/04/02_do.js rename to zerver/tests/frontend/casperjs/tests/testdir/04/02_do.js diff --git a/zephyr/tests/frontend/common.js b/zerver/tests/frontend/common.js similarity index 100% rename from zephyr/tests/frontend/common.js rename to zerver/tests/frontend/common.js diff --git a/zephyr/tests/frontend/node/message_tour.js b/zerver/tests/frontend/node/message_tour.js similarity index 100% rename from zephyr/tests/frontend/node/message_tour.js rename to zerver/tests/frontend/node/message_tour.js diff --git a/zephyr/tests/frontend/node/search_suggestion.js b/zerver/tests/frontend/node/search_suggestion.js similarity index 100% rename from zephyr/tests/frontend/node/search_suggestion.js rename to zerver/tests/frontend/node/search_suggestion.js diff --git a/zephyr/tests/frontend/node/unread.js b/zerver/tests/frontend/node/unread.js similarity index 100% rename from zephyr/tests/frontend/node/unread.js rename to zerver/tests/frontend/node/unread.js diff --git a/zephyr/tests/frontend/run b/zerver/tests/frontend/run similarity index 87% rename from zephyr/tests/frontend/run rename to zerver/tests/frontend/run index a7aee98587..1e0fe0b533 100755 --- a/zephyr/tests/frontend/run +++ b/zerver/tests/frontend/run @@ -36,11 +36,11 @@ for file in args: os.chdir(path.join(path.dirname(__file__), '../../..')) -subprocess.check_call('zephyr/tests/generate-fixtures') +subprocess.check_call('zerver/tests/generate-fixtures') subprocess.check_call(['rm', '-f'] + glob.glob('/tmp/casper-failure*.png')) -log = open('zephyr/tests/frontend/server.log', 'w') +log = open('zerver/tests/frontend/server.log', 'w') # Run this not through the shell, so that we have the actual PID. server = subprocess.Popen(('tools/run-dev.py', '--test'), @@ -49,7 +49,7 @@ server = subprocess.Popen(('tools/run-dev.py', '--test'), def assert_server_running(): # Get the exit code of the server, or None if it is still running. if server.poll() is not None: - raise RuntimeError, 'Server died unexpectedly! Check zephyr/tests/frontend/server.log' + raise RuntimeError, 'Server died unexpectedly! Check zerver/tests/frontend/server.log' def server_is_up(): assert_server_running() @@ -73,12 +73,12 @@ try: remote_debug = "" if options.remote_debug: remote_debug = "--remote-debugger-port=7777 --remote-debugger-autorun=yes" - cmd = "zephyr/tests/frontend/casperjs/bin/casperjs %s test " % (remote_debug,) + cmd = "zerver/tests/frontend/casperjs/bin/casperjs %s test " % (remote_debug,) if test_files: cmd += ' '.join(test_files) else: - cmd += 'zephyr/tests/frontend/tests' + cmd += 'zerver/tests/frontend/tests' print "Running %s" % (cmd,) ret = subprocess.call(cmd, shell=True) finally: diff --git a/zephyr/tests/frontend/tests/00-login.js b/zerver/tests/frontend/tests/00-login.js similarity index 100% rename from zephyr/tests/frontend/tests/00-login.js rename to zerver/tests/frontend/tests/00-login.js diff --git a/zephyr/tests/frontend/tests/01-site.js b/zerver/tests/frontend/tests/01-site.js similarity index 100% rename from zephyr/tests/frontend/tests/01-site.js rename to zerver/tests/frontend/tests/01-site.js diff --git a/zephyr/tests/frontend/tests/02-narrow.js b/zerver/tests/frontend/tests/02-narrow.js similarity index 100% rename from zephyr/tests/frontend/tests/02-narrow.js rename to zerver/tests/frontend/tests/02-narrow.js diff --git a/zephyr/tests/frontend/tests/03-compose.js b/zerver/tests/frontend/tests/03-compose.js similarity index 100% rename from zephyr/tests/frontend/tests/03-compose.js rename to zerver/tests/frontend/tests/03-compose.js diff --git a/zephyr/tests/frontend/tests/04-subscriptions.js b/zerver/tests/frontend/tests/04-subscriptions.js similarity index 100% rename from zephyr/tests/frontend/tests/04-subscriptions.js rename to zerver/tests/frontend/tests/04-subscriptions.js diff --git a/zephyr/tests/frontend/tests/05-settings.js b/zerver/tests/frontend/tests/05-settings.js similarity index 100% rename from zephyr/tests/frontend/tests/05-settings.js rename to zerver/tests/frontend/tests/05-settings.js diff --git a/zephyr/tests/frontend/tests/06-unread.js b/zerver/tests/frontend/tests/06-unread.js similarity index 100% rename from zephyr/tests/frontend/tests/06-unread.js rename to zerver/tests/frontend/tests/06-unread.js diff --git a/zephyr/tests/frontend/tests/07-stars.js b/zerver/tests/frontend/tests/07-stars.js similarity index 100% rename from zephyr/tests/frontend/tests/07-stars.js rename to zerver/tests/frontend/tests/07-stars.js diff --git a/zephyr/tests/generate-fixtures b/zerver/tests/generate-fixtures similarity index 72% rename from zephyr/tests/generate-fixtures rename to zerver/tests/generate-fixtures index 3f7fa457ba..69eaef9ccc 100755 --- a/zephyr/tests/generate-fixtures +++ b/zerver/tests/generate-fixtures @@ -7,9 +7,9 @@ function migration_status { template_grep_error_code=$(echo "SELECT 1 from pg_database WHERE datname='humbug_test_template';" | python manage.py dbshell --settings=humbug.test_settings | grep -q "1 row"; echo $?) if [ $template_grep_error_code == "0" ]; then - migration_status zephyr/fixtures/available-migrations - if [ -e zephyr/fixtures/migration-status ] && - cmp -s zephyr/fixtures/available-migrations zephyr/fixtures/migration-status && + migration_status zerver/fixtures/available-migrations + if [ -e zerver/fixtures/migration-status ] && + cmp -s zerver/fixtures/available-migrations zerver/fixtures/migration-status && [ "$1" != "--force" ]; then psql -h localhost postgres humbug_test << EOF DROP DATABASE humbug_test; @@ -19,26 +19,26 @@ EOF fi fi -mkdir -p zephyr/fixtures +mkdir -p zerver/fixtures # Remove time.pyc to try to prevent it from screwing people importing -# time from inside zephyr.lib. We can drop this hack after a bit. -rm -f zephyr/lib/time.pyc +# time from inside zerver.lib. We can drop this hack after a bit. +rm -f zerver/lib/time.pyc echo "DROP SCHEMA humbug CASCADE; CREATE SCHEMA humbug;" | python manage.py dbshell --settings=humbug.test_settings python manage.py syncdb --noinput --settings=humbug.test_settings python manage.py migrate --settings=humbug.test_settings --all -migration_status "zephyr/fixtures/migration-status" +migration_status "zerver/fixtures/migration-status" # This next line can be simplified to "-n0" once we fix our app with 0 messages. python manage.py populate_db --settings=humbug.test_settings --test-suite -n2 \ --threads=1 --huddles=0 --personals=0 --percent-huddles=0 --percent-personals=0 python manage.py dumpdata --settings=humbug.test_settings \ - zephyr.UserProfile zephyr.Stream zephyr.Recipient \ - zephyr.Subscription zephyr.Message zephyr.Huddle zephyr.Realm \ - zephyr.UserMessage zephyr.Client \ - zephyr.DefaultStream > zephyr/fixtures/messages.json + zerver.UserProfile zerver.Stream zerver.Recipient \ + zerver.Subscription zerver.Message zerver.Huddle zerver.Realm \ + zerver.UserMessage zerver.Client \ + zerver.DefaultStream > zerver/fixtures/messages.json # create pristine template database, for fast fixture restoration after tests are run. psql -h localhost postgres humbug_test << EOF diff --git a/zephyr/tornado_callbacks.py b/zerver/tornado_callbacks.py similarity index 97% rename from zephyr/tornado_callbacks.py rename to zerver/tornado_callbacks.py index 1550f52a88..99237458d0 100644 --- a/zephyr/tornado_callbacks.py +++ b/zerver/tornado_callbacks.py @@ -1,13 +1,13 @@ from __future__ import absolute_import from django.conf import settings -from zephyr.models import Message, UserProfile, UserMessage, \ +from zerver.models import Message, UserProfile, UserMessage, \ Recipient, Stream, get_stream, get_user_profile_by_id -from zephyr.decorator import JsonableError -from zephyr.lib.cache_helpers import cache_get_message -from zephyr.lib.queue import queue_json_publish -from zephyr.lib.event_queue import get_client_descriptors_for_user +from zerver.decorator import JsonableError +from zerver.lib.cache_helpers import cache_get_message +from zerver.lib.queue import queue_json_publish +from zerver.lib.event_queue import get_client_descriptors_for_user import os import sys @@ -105,7 +105,7 @@ def initialize_user_messages(): # inefficient; total time consumed with the raw SQL is about # 600ms, vs. 3000ms-5000ms if we go through the ORM. cursor = connection.cursor() - cursor.execute("SELECT user_profile_id, message_id from zephyr_usermessage " + + cursor.execute("SELECT user_profile_id, message_id from zerver_usermessage " + "where message_id >= %s order by message_id", [cache_minimum_id]) for row in cursor.fetchall(): (user_profile_id, message_id) = row diff --git a/zephyr/tornadoviews.py b/zerver/tornadoviews.py similarity index 96% rename from zephyr/tornadoviews.py rename to zerver/tornadoviews.py index 420d6b8931..9f799c367f 100644 --- a/zephyr/tornadoviews.py +++ b/zerver/tornadoviews.py @@ -1,22 +1,22 @@ from __future__ import absolute_import from django.conf import settings -from zephyr.models import get_client +from zerver.models import get_client -from zephyr.decorator import asynchronous, authenticated_api_view, \ +from zerver.decorator import asynchronous, authenticated_api_view, \ authenticated_json_post_view, internal_notify_view, RespondAsynchronously, \ has_request_variables, to_non_negative_int, json_to_bool, json_to_list, \ authenticated_rest_api_view, REQ -from zephyr.lib.response import json_success, json_error -from zephyr.middleware import async_request_restart -from zephyr.tornado_callbacks import \ +from zerver.lib.response import json_success, json_error +from zerver.middleware import async_request_restart +from zerver.tornado_callbacks import \ get_user_pointer, fetch_stream_messages, fetch_user_messages, \ add_stream_receive_callback, add_user_receive_callback, \ add_pointer_update_callback, process_notification -from zephyr.lib.cache_helpers import cache_get_message -from zephyr.lib.event_queue import allocate_client_descriptor, get_client_descriptor +from zerver.lib.cache_helpers import cache_get_message +from zerver.lib.event_queue import allocate_client_descriptor, get_client_descriptor import ujson import socket diff --git a/zephyr/views.py b/zerver/views.py similarity index 97% rename from zephyr/views.py rename to zerver/views.py index 7ac7148c03..f63228e58d 100644 --- a/zephyr/views.py +++ b/zerver/views.py @@ -15,14 +15,14 @@ from django.contrib.auth.views import login as django_login_page, \ from django.db.models import Q, F from django.core.mail import send_mail, mail_admins, EmailMessage from django.db import transaction -from zephyr.models import Message, UserProfile, Stream, Subscription, \ +from zerver.models import Message, UserProfile, Stream, Subscription, \ Recipient, Realm, UserMessage, bulk_get_recipients, \ PreregistrationUser, get_client, MitUser, UserActivity, \ MAX_SUBJECT_LENGTH, get_stream, bulk_get_streams, UserPresence, \ get_recipient, valid_stream_name, to_dict_cache_key, to_dict_cache_key_id, \ extract_message_dict, stringify_message_dict, parse_usermessage_flags, \ email_to_domain, email_to_username, get_realm -from zephyr.lib.actions import do_remove_subscription, bulk_remove_subscriptions, \ +from zerver.lib.actions import do_remove_subscription, bulk_remove_subscriptions, \ do_change_password, create_mit_user_if_needed, do_change_full_name, \ do_change_enable_desktop_notifications, do_change_enter_sends, do_change_enable_sounds, \ do_send_confirmation_email, do_activate_user, do_create_user, check_send_message, \ @@ -34,31 +34,31 @@ from zephyr.lib.actions import do_remove_subscription, bulk_remove_subscriptions do_update_onboarding_steps, do_update_message, internal_prep_message, \ do_send_messages, do_add_subscription, get_default_subs, do_deactivate, \ user_email_is_unique, do_invite_users, do_refer_friend -from zephyr.lib.create_user import random_api_key -from zephyr.forms import RegistrationForm, HomepageForm, ToSForm, CreateBotForm, \ +from zerver.lib.create_user import random_api_key +from zerver.forms import RegistrationForm, HomepageForm, ToSForm, CreateBotForm, \ is_inactive, isnt_mit from django.views.decorators.csrf import csrf_exempt, csrf_protect from django_openid_auth.views import default_render_failure, login_complete from openid.consumer.consumer import SUCCESS as openid_SUCCESS from openid.extensions import ax -from zephyr.lib import bugdown +from zerver.lib import bugdown -from zephyr.decorator import require_post, \ +from zerver.decorator import require_post, \ authenticated_api_view, authenticated_json_post_view, \ has_request_variables, authenticated_json_view, \ to_non_negative_int, json_to_dict, json_to_list, json_to_bool, \ JsonableError, get_user_profile_by_email, \ authenticated_rest_api_view, process_as_post, REQ, rate_limit_user -from zephyr.lib.query import last_n -from zephyr.lib.avatar import avatar_url -from zephyr.lib.upload import upload_message_image, upload_avatar_image -from zephyr.lib.response import json_success, json_error, json_response, json_method_not_allowed -from zephyr.lib.cache import cache_get_many, cache_set_many, \ +from zerver.lib.query import last_n +from zerver.lib.avatar import avatar_url +from zerver.lib.upload import upload_message_image, upload_avatar_image +from zerver.lib.response import json_success, json_error, json_response, json_method_not_allowed +from zerver.lib.cache import cache_get_many, cache_set_many, \ generic_bulk_cached_fetch -from zephyr.lib.unminify import SourceMap -from zephyr.lib.queue import queue_json_publish -from zephyr.lib.utils import statsd -from zephyr import tornado_callbacks +from zerver.lib.unminify import SourceMap +from zerver.lib.queue import queue_json_publish +from zerver.lib.utils import statsd +from zerver import tornado_callbacks from django.db import connection from confirmation.models import Confirmation @@ -182,7 +182,7 @@ def principal_to_user_profile(agent, principal): METHODS = ('GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'PATCH') # Import the Tornado REST views that are used by rest_dispatch -from zephyr.tornadoviews import get_events_backend, get_updates_backend +from zerver.tornadoviews import get_events_backend, get_updates_backend @csrf_exempt def rest_dispatch(request, **kwargs): @@ -326,11 +326,11 @@ def accounts_register(request): login(request, authenticate(username=email, password=password)) if first_in_realm: - return HttpResponseRedirect(reverse('zephyr.views.initial_invite_page')) + return HttpResponseRedirect(reverse('zerver.views.initial_invite_page')) else: - return HttpResponseRedirect(reverse('zephyr.views.home')) + return HttpResponseRedirect(reverse('zerver.views.home')) - return render_to_response('zephyr/register.html', + return render_to_response('zerver/register.html', {'form': form, 'company_name': domain, 'email': email, @@ -348,7 +348,7 @@ def accounts_accept_terms(request): if form.is_valid(): full_name = form.cleaned_data['full_name'] send_mail('Terms acceptance for ' + full_name, - loader.render_to_string('zephyr/tos_accept_body.txt', + loader.render_to_string('zerver/tos_accept_body.txt', {'name': full_name, 'email': email, 'ip': request.META['REMOTE_ADDR'], @@ -360,12 +360,12 @@ def accounts_accept_terms(request): else: form = ToSForm() - return render_to_response('zephyr/accounts_accept_terms.html', + return render_to_response('zerver/accounts_accept_terms.html', { 'form': form, 'company_name': domain, 'email': email }, context_instance=RequestContext(request)) def api_endpoint_docs(request): - raw_calls = open('templates/zephyr/api_content.json', 'r').read() + raw_calls = open('templates/zerver/api_content.json', 'r').read() calls = ujson.loads(raw_calls) langs = set() for call in calls: @@ -373,7 +373,7 @@ def api_endpoint_docs(request): for lang in call.get('example_' + example_type, []): langs.add(lang) return render_to_response( - 'zephyr/api_endpoints.html', { + 'zerver/api_endpoints.html', { 'content': calls, 'langs': langs, }, @@ -433,7 +433,7 @@ def handle_openid_errors(request, issue, openid_response=None): '?gafyd_name=', urllib.quote_plus(full_name)))) else: - return render_to_response('zephyr/accounts_home.html', {'form': form}) + return render_to_response('zerver/accounts_home.html', {'form': form}) return default_render_failure(request, issue) def process_openid_login(request): @@ -466,14 +466,14 @@ def initial_invite_page(request): # Only show the bulk-invite page for the first user in a realm domain_count = len(UserProfile.objects.filter(realm=user.realm)) if domain_count > 1: - return redirect('zephyr.views.home') + return redirect('zerver.views.home') params = {'company_name': user.realm.domain} if (user.realm.restricted_to_domain): params['invite_suffix'] = user.realm.domain - return render_to_response('zephyr/initial_invite_page.html', params, + return render_to_response('zerver/initial_invite_page.html', params, context_instance=RequestContext(request)) @require_post @@ -507,7 +507,7 @@ def accounts_home_with_domain(request, domain): request.session["domain"] = domain return accounts_home(request) else: - return HttpResponseRedirect(reverse('zephyr.views.accounts_home')) + return HttpResponseRedirect(reverse('zerver.views.accounts_home')) def accounts_home(request): if request.method == 'POST': @@ -525,7 +525,7 @@ def accounts_home(request): return HttpResponseRedirect(reverse('django.contrib.auth.views.login') + '?email=' + urllib.quote_plus(email)) else: form = HomepageForm() - return render_to_response('zephyr/accounts_home.html', + return render_to_response('zerver/accounts_home.html', {'form': form, 'current_url': request.get_full_path}, context_instance=RequestContext(request)) @@ -608,7 +608,7 @@ def home(request): (not user_profile.email.lower().endswith("@customer4.invalid"))): show_invites = False - return render_to_response('zephyr/index.html', + return render_to_response('zerver/index.html', {'user_profile': user_profile, 'page_params' : page_params, 'avatar_url': avatar_url(user_profile), @@ -932,10 +932,10 @@ def get_old_messages_backend(request, user_profile, cursor = connection.cursor() # These queries should always be the same as what we would do # in the !include_history case. - cursor.execute("SELECT zephyr_message.id, zephyr_usermessage.flags FROM " + - "zephyr_usermessage INNER JOIN zephyr_message ON " + - "zephyr_message.id = zephyr_usermessage.message_id " + - "WHERE zephyr_usermessage.user_profile_id = %s and zephyr_message.id <= %s " + + cursor.execute("SELECT zerver_message.id, zerver_usermessage.flags FROM " + + "zerver_usermessage INNER JOIN zerver_message ON " + + "zerver_message.id = zerver_usermessage.message_id " + + "WHERE zerver_usermessage.user_profile_id = %s and zerver_message.id <= %s " + "ORDER BY message_id DESC LIMIT %s", [user_profile.id, before_anchor, num_before]) before_result = reversed(cursor.fetchall()) else: @@ -945,10 +945,10 @@ def get_old_messages_backend(request, user_profile, cursor = connection.cursor() # These queries should always be the same as what we would do # in the !include_history case. - cursor.execute("SELECT zephyr_message.id, zephyr_usermessage.flags FROM " + - "zephyr_usermessage INNER JOIN zephyr_message ON " + - "zephyr_message.id = zephyr_usermessage.message_id " + - "WHERE zephyr_usermessage.user_profile_id = %s and zephyr_message.id >= %s " + + cursor.execute("SELECT zerver_message.id, zerver_usermessage.flags FROM " + + "zerver_usermessage INNER JOIN zerver_message ON " + + "zerver_message.id = zerver_usermessage.message_id " + + "WHERE zerver_usermessage.user_profile_id = %s and zerver_message.id >= %s " + "ORDER BY message_id LIMIT %s", [user_profile.id, anchor, num_after]) after_result = cursor.fetchall() else: @@ -1568,7 +1568,7 @@ def can_view_activity(request): @login_required(login_url = settings.HOME_NOT_LOGGED_IN) def get_activity(request): if not can_view_activity(request): - return HttpResponseRedirect(reverse('zephyr.views.login_page')) + return HttpResponseRedirect(reverse('zerver.views.login_page')) web_queries = ( ("get_updates", ["/json/get_updates", "/json/get_events"]), @@ -1581,7 +1581,7 @@ def get_activity(request): ("send_message", ["/api/v1/send_message"]), ) - return render_to_response('zephyr/activity.html', + return render_to_response('zerver/activity.html', { 'data': { 'Website': ActivityTable('website', web_queries, default_tab=True), 'Mirror': ActivityTable('zephyr_mirror', api_queries),