Commit Graph

951 Commits

Author SHA1 Message Date
Tim Abbott 232de3015a Add lint checks for tab-based whitespace.
We exclude the one file we have with issues that comes from a
third-party vendor.

(imported from commit 47e097b39440aea8e4d7468892176ffce4818b5f)
2015-09-19 23:23:02 -07:00
Tim Abbott b3dfacae19 Change API example usernames to use example.com domain.
(imported from commit 41b7be58735df0ea3d3a3daf23bc0f78606abc0d)
2015-09-19 18:12:02 -07:00
Tim Abbott 87d2d543a5 Remove some tools unlikely to be relevant externally.
(imported from commit 557f5590d87b3267a2e37e9be72a77815ca392d9)
2015-09-19 17:45:31 -07:00
Tim Abbott 155958871d Include Zulip financial projections tool in open source release.
It doesn't have any sensitive data since that lives in a separate
configuration file, and it's potentially useful.

(imported from commit 094e315439f8bd23ad07a8c2bc7d9776c8c7f096)
2015-09-19 17:45:31 -07:00
Reid Barton 3239ca6728 Update build-voyager-tarball local settings hack
The tarball build process runs in DEVELOPMENT mode, assuming it is run
on a dev VM (since then there is no /etc/zulip directory). Commit
d067bcfe9d71 made settings.py import local_settings_template.py in
DEVELOPMENT mode (then "not DEPLOYED"), not local_settings.py.

(imported from commit 9a08138d748dfca9c4ab8b366bee5c2fb96c25af)
2015-08-23 23:08:45 -07:00
Reid Barton 1f07cbed1e Remove tree forcefully when finished in build-voyager-tarball
Just importing zerver.lib.cache creates a file memcached_prefix that
is mode 0444, so we need to use -f or rm will prompt about whether to
remove it. Not sure why this is apparently a new issue.

(imported from commit 93c5140b66992339859e2b204c200d1dd7a35f2d)
2015-08-23 23:00:32 -07:00
Reid Barton 3cfebbd9c0 Fix peer authentication error for process_fts_updates in run-dev.py
(imported from commit 1c73877a1c437ec51d909034460c3c1b54178183)
2015-08-21 14:10:52 -07:00
David Roe 3f7cb34b00 enterprise => voyager
(imported from commit 04be792bb480d5e5db1c91d296d1000cf1682571)
2015-08-21 10:33:35 -07:00
David Roe edf7e732a2 ENTERPRISE => VOYAGER.
(imported from commit 4f8080b9f506a87ca40bef32e39de5218cba916a)
2015-08-21 10:33:35 -07:00
David Roe d702ddb3cf DEPLOYED => PRODUCTION
(imported from commit a7d365c07916c5103fc721c712db94f9af977640)
2015-08-21 10:33:35 -07:00
Reid Barton 362f9c6c5f Django 1.7: syncdb and migrate are now synonyms
(imported from commit b8a1b2476892bab2418240b04deea6aa40ff1b03)
2015-08-20 23:01:26 -07:00
Reid Barton 599742536b Switch from South to native Django migrations
This commit loses some indexes, unique constraints etc. that were
manually added by the old migrations. I plan to add them to a new
migration in a subsequent commit.

(imported from commit 4bcbf06080a7ad94788ac368385eac34b54623ce)
2015-08-20 23:01:26 -07:00
David Roe 13f3b448e5 Kill Embed.ly integration.
(imported from commit dfe42a26e57100108c3c50298041bd520e0d8b1b)
2015-08-20 19:46:48 -07:00
Tim Abbott e79447131f Make build-enterprise-tarball run again.
(imported from commit e3dd8d75811458d0cee8a2d05a4b47abd6eda7fd)
2015-08-20 17:33:16 -07:00
Reid Barton 53c2b3f6f4 Clean up vagrant postgres user creation code
We don't need to check whether the user exists before creating it:
CREATE USER failing is fine.

(imported from commit e8b2bc5495e328ee30d15445a566c0edff2f069d)
2015-08-20 16:30:21 -07:00
Reid Barton 748f931999 Fix postgres users when re-provisioning
If we run provision.py a second time, there will already be
zulip/zulip_test users, so the CREATE USER will fail and the password
won't get updated to the newly generated value. By creating the user
and setting the password in two commands, we allow the creation to
fail without affecting whether the password is set.

Also the quoting for updating .pgpass was wrong.

(imported from commit 5e249813c17cb4829e4e4958e92aaa30563c5f96)
2015-08-20 16:30:21 -07:00
Anders Kaseorg dd8eda4edc run-dev: Run compile-handlebars-templates inside the pgrp
(imported from commit bb13f8804b7e9e930ecd2542ea8772c76370d32e)
2015-08-20 15:54:53 -07:00
Anders Kaseorg bd66b2139b run-dev: Eschew useless shells
(imported from commit 34dab15941f5c63f381f5b2b7b78482dbc2b02ea)
2015-08-20 15:54:53 -07:00
Reid Barton 664db6b622 Generate more test messages to avoid test failures
Sometimes I get the error "Selected message id not in MessageList"
when running the casper tests. I think it's probably when the test
user's home view does not contain any messages.

Ideally we would fix this in a way that guarantees that we generate
whatever messages the test suite needs...

(imported from commit 51a02da612dda88d60681b9e09cd6e6a2c39a470)
2015-08-20 15:43:43 -07:00
Reid Barton 5a747ab690 Make the CasperJS frontend tests work again
(At least when PhantomJS doesn't crash...)

(imported from commit 62936b12883e4c6bbd3701da80783b4bffe46025)
2015-08-20 13:33:07 -07:00
Cat Miller 0a20f168a7 Auto-generate dev-secrets file.
Source LOCAL_DATABASE_PASSWORD and INITIAL_PASSWORD_SALT from the secrets file.
Fix the creation of pgpass file.

Tim's note: This will definitely break the original purpose of the
tool but it should be pretty easy to add that back as an option.

(imported from commit 8ab31ea2b7cbc80a4ad2e843a2529313fad8f5cf)
2015-08-20 00:20:44 -07:00
Jonathan Dahan 795f191fb3 Remove git commit domain restrictions.
(imported from commit a756428d0b95db95fb093e78a182ad8873914f54)
2015-08-19 21:40:04 -07:00
Luke Faraone 1e7d7c0b71 Install a supervisor job for run-dev.
The development server will automatically start after provisioning finishes.

(imported from commit 6be3d954d9049acd0360189b07b1481756b69eef)
2015-08-19 21:07:23 -07:00
Luke Faraone 04d3eb33b1 run-dev.py: Reword --interface help text.
The old language was confusing because "the interface" could refer to something
like eth0, but in actuality refers to the IP/hostname to listen on.

(imported from commit 4f77d72a4dfcdbe7e7747c6228975aa68dfbe6ac)
2015-08-19 21:07:22 -07:00
Reid Barton 54adbb1737 Create vagrant postgres user and grant it rights to zulip{,_test}
(imported from commit bb57a3f5ef8bc48553f1eff95c47894aed4ef975)
2015-08-18 22:41:31 -07:00
Yoyo Zhou c25d9679a5 Utility for unescaping HTML entities leftover from MediaWiki->rST conversion
(imported from commit 2f2507f299c3d09c67bfd26d6c11fab47431d935)
2015-08-18 17:31:33 -07:00
Reid Barton 9c310c6cdd Update review email address
(imported from commit 2642b9fb91ab4ca0445063bccc0d46738adb64eb)
2015-08-17 15:24:33 -07:00
Luke Faraone 4702d8e9b3 Fix broken shebang in postgres-init-test-db
This was causing failures when execing outside of a shell

(imported from commit b63f8269d121b2bb8be5bcd84b3f868c9bedc9cd)
2015-08-16 21:36:36 -07:00
Luke Faraone 81a2a20bbf Disable sync_api_key if no zuliprc
(imported from commit f9e7f924c00230137ca45c204158b709cd311ebb)
2015-08-16 16:45:15 -07:00
Zev Benjamin 466a678c2c Remove "More messages below" indicator
It's been very buggy for a while, has limited usefulness compared with
unread counts, and profiling over the weekend indicates that it's very
slow.

(imported from commit 716fe47f2bbec1bd8a6e4d265ded5c64efe2ad5c)
2015-03-30 15:44:36 -07:00
Jason Michalski 53b02a694a Update the review script to use @dropbox.com
(imported from commit 30c8c516d0542c1319cb2faf5a9da8e9c8b26041)
2015-01-30 23:39:47 -08:00
Zev Benjamin 2c760ae735 Remove mixpanel
(imported from commit 9b6cc58ee9be483db8bf2d2eaaaecabc14f821e4)
2015-02-06 13:59:30 -08:00
Zev Benjamin b9baf049e6 Send deployment zulips to prod
(imported from commit 8f75e028ead3016093ff7f8eacdebf05dc0687f5)
2015-02-05 22:46:30 -08:00
Zev Benjamin fc828ed116 Update review script
(imported from commit f8902233a29dcde900218fc7a62735024eb67974)
2015-02-05 22:46:30 -08:00
Luke Faraone fe0a1c2643 Add dbx.zulip.net to post-receive
(imported from commit 824f664f4622e0096b9a6004006a02903ac869e1)
2014-10-06 15:27:55 -07:00
Luke Faraone 0ca76e8cd8 install-server: don't fail if ~root/.ssh already exists
New AMIs install an authorized_keys file that rejects user login.

(imported from commit ad64d0a92e38319b705225a599edfd31a6ba037b)
2014-10-06 15:27:55 -07:00
Luke Faraone 5507575b7e Switch install scripts to use apt.zulip.net for ops systems
(imported from commit 3ff243459237ac673c5e8ae23077e628fa07a6b9)
2014-06-10 13:16:27 -07:00
Waseem Daher ffc75cb074 A script to export an entire stream.
(imported from commit 7c8bc0c0c1f9c987bda9503ca53051d2e4ad27dd)
2014-05-13 22:42:42 -07:00
Tim Abbott ddbb3a37fb Allow committing with dropbox.com email addresses.
Later we can remove the ability to commit with older emails.

(imported from commit fe44cc1ffcc79f3c393e3a84c15741130605d3ec)
2014-04-29 10:55:12 -07:00
Steve Howell e5467d3268 Move ui.js click handlers to click_handlers.js
(imported from commit adfeb1f152cca473bc4c6ba5ccd142b38947b335)
2014-03-14 20:48:59 -04:00
Steve Howell 16faed0a83 Create copy_and_paste.js (with code from ui.js).
(imported from commit 37a06af5489e7da5196e5710f384d1f5a7ee7578)
2014-03-14 20:48:59 -04:00
Steve Howell c5993c2d2d Create gear_menu.js (with code from ui.js).
(imported from commit fc4d058d49d5d4aaaa20ef6237ea3e927eac03e3)
2014-03-14 20:48:58 -04:00
Steve Howell 405c3d7626 Created floating_recipient_bar.js (with code from ui.js).
(imported from commit 2b6631938b0fc8e39c14aacd92f9f1670b68b199)
2014-03-14 20:48:58 -04:00
Steve Howell f8b71fa497 Created condense.js (with code taken from ui.js).
(imported from commit 72b27b48614a7c396170d46936646e52757e2743)
2014-03-14 20:48:58 -04:00
Steve Howell 84b59d4335 Created scroll_bar.js (with code taken from ui.js).
(imported from commit 0c4e8538031ceb1a0f50eea9a34e315e23e7d9ff)
2014-03-14 20:48:56 -04:00
Steve Howell be2a1c2893 Move resizing code to resize.js.
(imported from commit b6df0007307872751e1a4200af740076e08b5c11)
2014-03-14 20:48:55 -04:00
Steve Howell 7fce920522 Move favicon-related functions to favicon.js
util.reset_favicon -> favicon.reset
util.set_favicon -> favicon.set

(imported from commit 250848ec5dc7ac58649197c8cc4b7b4e7b19f25c)
2014-03-14 20:48:55 -04:00
Steve Howell 50bc5401a4 Moved loading_indicator functions to loading.js.
util.make_loading_indicator -> loading.make_indicator
util.destroy_loading_indicator -> loading.destroy_indicator

(imported from commit 8a171622a6096476dd040912d3f1460d53159f20)
2014-03-14 20:48:52 -04:00
Zev Benjamin e9acdd147f tests: Don't try to edit locally echoed messages
(imported from commit 04760e67b1c18766dc23072b4a735d8cb28a658b)
2014-03-11 13:06:21 -04:00
Jason Michalski 3f6e53db6e Add bot_data module that updated with events
(imported from commit b0bd714258132fc81db763d316a15f5a81b1f4ff)
2014-03-05 14:16:20 -05:00
Jessica McKellar 5f7df38b8a Unbreak custom alert words on the settings page.
This doesn't change the alerting UI logic, it just turns
alert_words_ui into a module and calls the setup code from settings.js
when the settings page is rendered.

(imported from commit 05f95383b046086641280f82f648be58688efe61)
2014-03-04 18:06:48 -05:00
Tim Abbott d75412764e Add Zulip ops apt key when installing new servers.
(imported from commit 5b8db30be24c08bc2fb4af548944776157e231dd)
2014-03-03 14:56:40 -05:00
Steve Howell f4764e58c6 Check Django block tags in check-templates.
(imported from commit a5d6336eeba63df365d3e59dce4d7f32aae637c7)
2014-02-27 20:25:40 -05:00
Steve Howell 98bc0b04c5 Clean up handling of HTML tags in check-templates.
(imported from commit 10f3ce97eecefcedc806d1a6a20ad230ebcf1f0f)
2014-02-27 20:25:40 -05:00
Steve Howell a07299f1d6 Clean up while loop in check-templates.
(imported from commit 79c2cc2b1ced0fc80b0a1996fd9150b39e689a31)
2014-02-27 20:25:40 -05:00
Steve Howell 9da693c371 Simplify pulling out of tags in check-templates.
Before this change, the way we'd strip tags of punctuation
was just sort of messed up, because we'd strip the start tags
one way and strip the end tags another, and we had conditionals
for the different flavors of tags, instead of doing the stripping
when we already knew what flavor of tag we were dealing with.

(imported from commit 60c5ebd45e21b88bbfc98ff4b43dbbc6b32b38a1)
2014-02-27 20:25:39 -05:00
Steve Howell bf5ebf1d2d Check that handlebars tags are balanced in check-templates.
(imported from commit 4a36b874f5dab314cf5af5357bf0250d6fc1bd8b)
2014-02-27 20:25:37 -05:00
Steve Howell f22665e710 Extract matching_tags() in check-templates.
(imported from commit bf54e656ba5f924298270c8e76b60faf78689099)
2014-02-27 20:25:37 -05:00
Steve Howell 7e49396fc5 Extract get_html_tag in check-templates.
(imported from commit 365a2bb4e9b2bf94f7b8e16a40fec0b461b64ab8)
2014-02-27 20:25:37 -05:00
Steve Howell c7a9e08105 Extract check_our_files in check-templates.
(imported from commit 68049b19aacfb159a92e7142b9975a5376c0f9f5)
2014-02-27 20:25:37 -05:00
Jason Michalski 94db0466a7 Add scripts to extract emoji from the android fonts
(imported from commit 361d9570030a8b6a122c59b68b229c4f8382df32)
2014-02-27 20:25:22 -05:00
Jason Michalski 9d973ff106 Change get_bots API to use rest_dispatch
(imported from commit 921895dd636ba118a0f57e60a7bcb9dca1c7c605)
2014-02-18 15:09:19 -05:00
Jason Michalski 2530009123 Use optparse for command line argument parsing
optparse was already being the interface change was conflicting with it.

(imported from commit abdb153484a98a46b21fa77cc6deb00afd615720)
2014-02-12 14:03:58 -05:00
Jason Michalski 97d4f2b009 Allow passing a bind interface to run-dev.py
This makes it simpler to test between two VMs by allowing you to bind to
non localhost interfaces.

(imported from commit f70755533b52ff8c49fd916941d2210fb8c33b47)
2014-02-12 11:59:45 -05:00
Jason Michalski f31b61ea5b Pass the client's Host header to django as X-Forwarded-Host
This allows Django to build correct redirects to hostnames other than
localhost.

(imported from commit 886b345f29fc03518cedd93ecbcea0be251f3230)
2014-02-12 11:59:45 -05:00
Steve Howell 42a67576b4 Have better stack traces for node tests.
(imported from commit 7053852dcd1b8479f1dbcb8cf7e46f008afe8a5a)
2014-02-10 15:11:42 -05:00
Zev Benjamin 6ea795915e Allow install-server to install according to a branch other than master
(imported from commit 28c643593540f6a679bf32677dfff8946e777554)
2014-02-10 13:23:28 -05:00
Jason Michalski 1136d399ca Add a check for blueslip.warning to perform_extra_js_checks
(imported from commit 92872542c4a97c31d7864137b759abb8bf26a551)
2014-02-05 10:43:55 -05:00
Zev Benjamin 395bf9abf6 Start up process_fts_updates in run-dev.py
(imported from commit 46912d89160f7a9b992f7c21a069030ba3823a43)
2014-02-03 17:46:57 -05:00
Zev Benjamin 4c2800ef9d Start up queue processor workers in parallel with the rest of run-dev.py
Importing zerver.worker.queue_processors (which is needed to get the list of
workers to start) is slow because it, in turn, imports a bunch of stuff.  So we
move the process of starting up queue processing workers into another script
that gets started in parallel with everything else.

(imported from commit 839bada6dc7b93825c69b0d8fd9fbe2de75eabee)
2014-02-03 17:46:57 -05:00
Jason Michalski 7b8acfea8e Add support for patching globals in the node tests
Add a helper to patch_global to change a global and then reset it to the
original value after a test file is complete.

(imported from commit 1b65ff6ea8693ad61b7f18f35dafa942429252a8)
2014-02-02 00:47:50 -05:00
Steve Howell 4b095cbad1 Make "assert" global in the node tests.
In the early days of the node tests we didn't have an index.js
driver, so each test set it up its own environment.  That ship
has long since sailed, so now we just require assert in index.js
as a global and make it so that the linter doesn't complain.

(imported from commit 1ded3d330ff40603cf4dd7c5578f6a47088d7cc8)
2014-02-03 10:54:38 -05:00
Zev Benjamin 8d88d04148 generate-fixtures: Run `./manage.py migrate --list` against test settings
(imported from commit 3538fe98ab36f2938d6d4491254e8d2ffa449a13)
2014-01-31 19:02:16 -05:00
Tim Abbott 4b30afbb27 Fix display of unread counts.
I apparently screwed up when backing up the process_loaded_for_unread
move in a way that just lost the function.

(imported from commit 91dfcf1abc85d439274cb8b0be380e9230942ebb)
2014-01-31 17:53:11 -05:00
Tim Abbott 88fbd5d16a Split out new module message_store.js.
(imported from commit 57cf3f2b8e74d7c56e3baf75859d5b3646282225)
2014-01-31 15:57:28 -05:00
Tim Abbott f5d3a6ddc7 Move suppress_unread_counts to unread.js.
(imported from commit fb64edc27b661d036c9f24715aeb3b4dbdf9463a)
2014-01-31 15:57:28 -05:00
Tim Abbott 004fd0eab8 Move unread-related functions from zulip.js to unread.js.
(imported from commit efc0dd84c2cd30b0203b906af6991475d8a63985)
2014-01-31 14:59:03 -05:00
Tim Abbott c8d57fcafb Split out message_flags.js.
(imported from commit 52afa76fa71141630e325e558cb9c6955d8c03d5)
2014-01-31 14:59:03 -05:00
Zev Benjamin 364bbf08cf Don't drop the public schema when initializing the database
The production database has a public schema.  I thought we had dropped it, but
apparently not.  We should match what exists in prod either way.

(imported from commit 1bf956360029ebbd59afc3cc30fca9a859343adf)
2014-01-31 13:29:10 -05:00
Zev Benjamin 655bacc06d postgres-init-db: Don't duplicate lines in .pgpass
(imported from commit 2a9d56a2aee2a7fcb2c12e4647bdfedabaee390b)
2014-01-31 13:29:10 -05:00
Zev Benjamin 8767c33536 Persist the tsearch_extras extension across rebuilding of the database
We do this by creating a new zulip{_test}_base database that only has the zulip
schema and the tsearch_extras extension.  We then use that as a template when
creating zulip{_test}.

(imported from commit 8adb4b98410e4042a0187902e89c99561eac8c8f)
2014-01-31 13:29:10 -05:00
Zev Benjamin 17826dba42 generate-fixtures: Be more robust to databases being missing
(imported from commit f42d673c433b8d3df4af79159831e57f5db1ee1c)
2014-01-31 13:29:10 -05:00
Zev Benjamin 2b1a5ae141 Fix postgres-init-db shebang line
(imported from commit 408d0ae05e104c076c9875135c7387af89fa8954)
2014-01-31 13:29:10 -05:00
Zev Benjamin 3212ced8e7 Remove unneeded code to delete time.pyc
lib/time.py was removed January 10, 2013

(imported from commit bd48cb7d81e98dd1723cd37553cc64c4f10face1)
2014-01-31 13:29:10 -05:00
Tim Abbott 70df0b933c check-all: Clean up some values that are no longer globals.
(imported from commit 0cd8d5de8b9e30dc40274f1a3d64b9f6e53d26b2)
2014-01-31 11:15:14 -05:00
Tim Abbott e505583f52 Split out new module people.js for tracking people.
(imported from commit fb9b769819ade25d1d3d6e452e68c7ee8651cfdd)
2014-01-30 17:32:58 -05:00
Tim Abbott a7b1b29bf0 Move get_updates into a module.
(imported from commit 9a6c0ab1e76dd96abad8626bc5b1fdbd234b2645)
2014-01-30 15:57:28 -05:00
Jason Michalski de522029d5 Switch to DiscoverRunner from DjangoTestSuiteRunner
(imported from commit 77dd694b20509bfdc7327186e0524d686f0415f7)
2014-01-29 11:34:31 -05:00
Steve Howell 582f7eb24d Extract test_hooks.py.
These classes are in test_hooks.py now.  They still run as part of
the regular suite, so this is just to make it easier to navigate the
files.

  JiraHookTests
  BeanstalkHookTests
  GithubV1HookTests
  GithubV2HookTests
  PivotalV3HookTests
  PivotalV5HookTests
  NewRelicHookTests
  StashHookTests
  FreshdeskHookTests
  ZenDeskHookTests

(imported from commit 26a9572dd5170f9516e739d587a119bd1f87959a)
2014-01-29 10:56:00 -05:00
Leo Franchi daecc7993a Add a fenced code parser in javascript
(imported from commit 42b1dc18ca34cbbdf3cda6e833adde631a9d88f5)
2014-01-28 15:35:32 -05:00
Tim Abbott d7c274fcfa Fix paths in backup script.
(imported from commit 44a179c62590b646bd9437adbf8601c41717d07c)
2014-01-24 16:02:44 -05:00
Leo Franchi 24cb5fb079 Add a localstorage.js module
(imported from commit 9f3ab248ce84ce296bb1fb918de3b2dd8cde1ded)
2014-01-23 16:28:58 -05:00
Leo Franchi e24dcb3952 Report proper displayed/receive time and local echo data
(imported from commit 63aba6ef05b1a55d61e975831ebbaa074f8ea74f)
2014-01-23 16:28:58 -05:00
Leo Franchi c0d56c822f Use the batched_flag_updater in ui.js as well as zulip.js
(imported from commit 6dea64d068d013471baf4022a8041f54da5c111e)
2014-01-23 16:28:57 -05:00
Leo Franchi b7b322d8cd Parse user mentions client side
(imported from commit b2919912792b8a02afad45f48e1c8df4783b93a9)
2014-01-23 16:28:56 -05:00
Leo Franchi 883122b129 Allow editing of locally echoed messages that failed to be sent
(imported from commit eff8d55af7a1ff123ed2a2e45e58ff74de96beac)
2014-01-23 16:28:55 -05:00
Leo Franchi 00f64113e9 Support locally echoing messages when sending
(imported from commit 00b5c5f9b933d119553c32cadff0f17b9f7c2879)
2014-01-23 16:28:55 -05:00
Leo Franchi 5b8e46f971 Allow emails in display recipient until local PMs are reified from server
(imported from commit 73f87449206c3789a4d74b8f776588d588ef88e1)
2014-01-23 16:28:55 -05:00
acrefoot 7ecace0066 Improve deployment locking tool; now with color
(imported from commit e02056ee43e748c29ce59fc9558f1b324d01bb8a)
2014-01-22 16:40:45 -05:00
Zev Benjamin 3b8f45a78b Teach {un}block-deployments how to {un}block deployments to prod
(imported from commit b2b292ede08a6bfc6d8804fedbefa4e622130a18)
2014-01-21 15:43:42 -05:00
Tim Abbott a8825e1c5d Fix linting for zerver/lib/tornado_ioloop_logging.py with older pyflakes.
(imported from commit 998d95df05acdc610336bf6da48fafd8c129e52e)
2014-01-14 11:43:06 -05:00
Steve Howell eaeb097026 Rename tools/PythonProxy.py to tools/python-proxy.
(imported from commit c3f7efa200109f7e778d3cd55a8442b4fc7f7139)
2014-01-14 11:16:12 -05:00
Steve Howell 88f5a89c93 Avoid touching changed_files when prev_deploy is None.
(imported from commit d72d2c34fb5301a6ffdc134bb6ea0db78ef80938)
2014-01-11 16:38:50 -05:00
Luke Faraone e8632635d0 Distribute "get_streams" endpoint in API.
We changed our endpoint from "get_public_streams" in August, but the
API call whitelist was not updated.

(imported from commit 293c1da8e43c24ad8188ed2096a47992ad3a2c89)
2014-01-11 15:52:21 -05:00
Steve Howell 1ad82b1f70 Make run-dev.py watch for template changes.
Have run-dev.py watch for template changes by calling
`./tools/compile-handlebars-templates forever`.  This doesn't
have much effect until the subsequent commit, but it does
alert users to broken templates.

(imported from commit 3fa5f403cabe0057f6f43180f1d09db669d98682)
2014-01-10 21:39:04 -05:00
Steve Howell d256994528 Add "forever" option to tools/compile-handlebars-templates.
The "forever" option causes the tool to continue looking for
template changes and, when they happen, to recompile them.

(imported from commit 2fa719a205f02c7c90cc071f99252148a888654f)
2014-01-10 21:39:03 -05:00
Steve Howell 1f82cb2138 Created tools/compile-handlebars-templates
(imported from commit 731e6a0a663dccaa8e6667a8a8ffdbf9ae208e52)
2014-01-10 21:39:03 -05:00
Steve Howell 22dcf2e883 Never use compiled handlebars templates from the previous deploy.
Before this change, we were compiling handlebars templates but then
still sometimes used the copy of compiled.js from the previous deploy,
which made zero sense. Since compiling is super fast, we continue to
compile during every deployment, and now we actually use the results
of compiling. Forcing a recompile every time avoids pitfalls like
failing to notice deleted files or failing to notice a Handlebars
upgrade.

(imported from commit 675932428ec420bfe0fd5a5c748a85600206764c)
2014-01-10 21:39:03 -05:00
Leo Franchi 2b68a1520a Move message insertion into standalone method
(imported from commit 25706d73e5629130ad278c858e67cc9148515706)
2014-01-07 17:33:33 -05:00
Jason Michalski 14c0f3def9 Fix the path in postgres-init-db to get-django-setting
postgres-init-db was expecting to be located two directories below the
project root. It is only one directory below the root of the project so
remove a set of .. .

(imported from commit 228b47ac2539caf2b6cd12a1b5f399534cf0c866)
2014-01-07 10:24:04 -05:00
Tim Abbott 8f865af0c1 Stop automated backups of legacy wiki.
(imported from commit 1cc9bdfac429cb3f75bb5981364591c067a8b13c)
2014-01-06 15:26:06 -05:00
Tim Abbott 795930c803 Add channel module wrapping our various JSON requests to the server.
(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
2013-12-19 16:52:47 -05:00
Steve Howell ea49e9d1b0 Rename check-handlebar-templates to check-templates.
(It's been checking Django templates too.)

(imported from commit e1a92210d07dfd68666a8c93642c4eb8d5ff081f)
2013-12-17 12:44:59 -05:00
acrefoot c30f2bbe3e slightly stricter linting of html templates
(imported from commit 5bd0aa3c49d6ff95559a73bd5f134cc50ae98ce9)
2013-12-17 12:05:23 -05:00
Steve Howell 751f400afb Add a --minimal option to run-dev.py.
This replaces the --noworkers option; the new --minimal option
starts a couple "essential" workers.

(imported from commit 4ca08709052c47257bc0448e51760edb4969d92e)
2013-12-16 14:36:06 -05:00
Tim Abbott 5c9def5be4 Add script to parse user agents with historical data set.
(imported from commit e529c0b914ed3d3d06e9581a6239676f68c97b3f)
2013-12-13 11:26:36 -05:00
Steve Howell 504d882090 Add --noworkers option to run_dev.
(imported from commit d8253f50af79fcf290e75d31d5c5d9b79118a463)
2013-12-13 10:17:27 -05:00
Tim Abbott d6aa8ecaff Only send get_updates_xhr error if we don't have a timeout either.
(imported from commit b77c6c67917f8d2bc5d59fb46f3a5ffa4a0ac443)
2013-12-12 17:36:38 -05:00
Tim Abbott 2aad7baac0 Restart get_updates if it is ever not running while sending a message.
(imported from commit 12d74c1193dd978e171d2e2aaf236ad71bebe6a3)
2013-12-12 16:03:45 -05:00
Jessica McKellar b6e46986f0 Remove unused message_tour.js.
(imported from commit e25a9315377ad11d47ad78a5d466df40e306f713)
2013-12-12 11:47:09 -05:00
Tim Abbott 1fb9c09f02 Don't import bugdown in models.py headings.
This allows us to avoid a circular import when importing models.py
from inside bugdown for the realm-filters-from-database branch.

(imported from commit 7de85b54243132ade6818b080abdc8c5e8ad84f5)
2013-12-11 14:39:09 -05:00
Waseem Daher 419a3d3098 Shorter topics for git/svn integration.
(imported from commit 6c9822f6ba383d885e48d3bb64c30e49ea8cf1e5)
2013-12-11 12:20:42 -05:00
Steve Howell d25f0a7580 Add PythonProxy.
This program can help us test error situations like CSS not
loading.

(imported from commit 4c3ed0825401741fe4aa826513d4eb43afd59ea3)
2013-12-11 11:58:10 -05:00
Luke Faraone 1b5c1ac021 Update style of client strings.
(imported from commit 1516461cf53b2715de68e01f16bb8a8cc33c48ad)
2013-12-09 11:47:52 -05:00
Jessica McKellar 81b493ba0b Change pointer semantic to better support side bar users.
There are now 2 cases for narrowing:

1. We narrowed, but only backwards in time (ie no unread were
read). In this case, try to go back to exactly where we were before
narrowing. This behavior is unchanged.

2. We read some unread messages in a narrow. Instead of going back to
where we were before the narrow, go to our first unread message (or
the bottom of the feed, if there are no unread messages). This is new.

This means that after catching up through the sidebar, on returning
home you'll be at the bottom of your feed.

Searching for the first unread message in a message list with 40,000
messages only takes 17ms according to:

function timeit() {
    var t0 = new Date().getTime();
    _.find(current_msg_list.all(), unread.message_unread);
    var t1 = new Date().getTime();
    console.log('Find first unread: ' + (t1 - t0) + ' ms');
}

(imported from commit 87c467578a2cced0aa976d8ae2924371b85d2445)
2013-12-09 10:41:26 -05:00
Luke Faraone 5ada0ab93e Exclude git_p4 from the linter, not our code.
(imported from commit 221a7947f1679dde888198f6d1da2d5bdf8f6ba4)
2013-12-06 11:54:38 -05:00
Steve Howell 87814572c9 Create tools/get-handlebar-vars utility.
This basically prints out a template JSON data structure to
be used with a handlebar template that you specify on the command
line.  (You can actually supply multiple files, too.)

Example usage:

    $ ./tools/get-handlebar-vars static/templates/tab_bar.handlebars
    === static/templates/tab_bar.handlebars
    {
        "tabs": [
            {
                "hash": "",
                "title": "",
                "active": "",
                "icon": true,
                "data": "",
                "cls": ""
            }
        ]
    }

(imported from commit d7239fcae7d94038fa0e4b34c8b1208a1070ecbb)
2013-12-04 13:58:04 -05:00
Tim Abbott 7aef6423de Include /usr/lib/nodejs in node search path.
(imported from commit c818905a91a5fe5754a0bddeb12caa00b50bfed3)
2013-12-02 17:49:08 -05:00
Steve Howell 2423c9bc15 Speed up ./tools/pre-commit by checking only staged files.
(imported from commit 2669635c94c41890bfe712f609b640b013a61782)
2013-12-02 16:14:06 -05:00
Steve Howell 3e51ac2f3d Add -m to lint-all to check modified files.
This uses git ls-files -m, which will show modified and added files,
but it doesn't seem to show staged files, so buyer beware.

(imported from commit 6ecc1d5ee628deae17197addf5586f1f6bcd4b9c)
2013-12-02 16:14:06 -05:00
Steve Howell 72e2fbd725 Allow specific files to be checked by lint-all.
(imported from commit a17800e3ab079e95033243bc82446737dc456b68)
2013-12-02 16:14:06 -05:00
Steve Howell 95320b7369 DRY up forking code in lint-all.
(imported from commit f4c52596c9e9cf0a1be5d4bea26f9793c67f93d5)
2013-12-02 16:14:06 -05:00
Zev Benjamin 87632c6526 install-server: Explicitly disable ControlMaster for the initial ssh
If you use persistent ssh connections, ssh'ing as admin will cause a sshd
process to hang around on the server, preventing us from deleting the admin
account.  Therefore, we disable persistent connections for that ssh connection.

(imported from commit 2d043768417d20ef2f12695475a20b74bf3374de)
2013-11-23 11:41:22 -05:00
Tim Abbott ca8225cf47 [manual] Add endpoint to cleanup a finished events queue.
This requires a puppet apply on each of staging and prod0 to update
the nginx configuration to support the new URL when it is deployed.

(imported from commit a35a71a563fd1daca0d3ea4ec6874c5719a8564f)
2013-11-20 18:34:15 -05:00
Luke Faraone 376a467d89 Tools for building Debian packages and publishing the results.
(imported from commit 2ca54e7f4da57dc1087563a5fb5ce70d82592b85)
2013-11-19 17:02:52 -05:00
Steve Howell 8339a40acd Prevent stale avatars from showing in new messages.
When you upload a 2nd avatar to Zulip, the URL doesn't actually
change, so even new messages can show the old avatar, if your
browser is caching.  We work against the cache by having the
"stamp" argument, which we vary at reload time and also when
we upload the new avatar.  The browser still benefits from
cached images as new messages come in.

(imported from commit 84869c8d7f251c9f2498026a5e9e3b2451784879)
2013-11-19 16:04:41 -05:00
Steve Howell 1c91d1a5bc Clean up back end HTML templates.
The check-handlebars-templates script now looks at most of our
back end templates to try and find imbalanced tags.  This commit
fixes a bunch of the existing templates.

(imported from commit fad4a5d85d68160370dd588b41d6f125f64d198f)
2013-11-19 10:43:56 -05:00
Kevin Mehall b469066e66 Fix emoji on enterprise.
static/ doesn't exist on enterprise, so we can't get the list from the
files there.

(imported from commit ce34a62478abf541feb013da4f970dac3c09d98a)
2013-11-14 11:18:23 -05:00
Kevin Mehall e375f11a78 Check for excluded files in tarball in case .gitattributes doesn't work
Because git < 1.8.1 ignores lines with trailing slashes and
1.8.1.1 - 1.8.1.6 ignore lines without!

(imported from commit 8139a742f4a52ccb1bce4e06fb24c9626fdb01f2)
2013-11-13 17:54:43 -05:00
Tim Abbott bf991dac94 enterprise: Create feedback_bot as a bot.
(imported from commit 8bd985f82aa80380188a644869c55bc54b6f7977)
2013-11-13 17:26:30 -05:00
Zev Benjamin 031dfbcc46 zulip_tools.py: Add a make_deploy_path function and make it invokable from the commandline
(imported from commit 94578d117864fba76f9353784734c712c89c4bf2)
2013-11-13 16:26:04 -05:00
Luke Faraone 6c57a9ec26 Hide 'redefinition of unused' pyflakes errors
(imported from commit d5c0129c40121f8bca8f2ebedde8fcbf03d718f2)
2013-11-13 13:44:14 -05:00
Tim Abbott b2d4883165 postgres-init-db: Split into internal and external versions for now.
(imported from commit 3516b1377e5914dac2b504961922ef8d08148d1f)
2013-11-13 12:02:50 -05:00
Tim Abbott 270f5730fa Rename local server => enterprise in some scripts.
(imported from commit 98cdb4c2e1be5a6abb59821eb32f749c058b773b)
2013-11-12 15:57:42 -05:00
Kevin Mehall e6ca5d265d Include handlebars templates in build-local-server-tarball
update-prod-static needs DEBUG=False. This also replaces our
local_settings.py before generating anything included in the tarball.

(imported from commit 890cd9d1a44acfd2c20e1662e0c68132c633d1b3)
2013-11-12 15:50:07 -05:00
Kevin Mehall d0b81f6b2e build-local-server-tarball: Add prod-static to a clean git archive tarball
This avoids exporting .pyc files and any other junk left behind by the
build process.

(imported from commit 8bdb9de3867b10eb5be9f52b784aa906c5f19d23)
2013-11-12 15:50:07 -05:00
Tim Abbott 442ae115a2 Remove legacy check_output implementation for pre-2.7 Pythons.
We still need it in integrations, because those don't require Python
2.7, but we don't need it in any of our code that runs on internal
servers.

(imported from commit 3c340567f1a372dcb4206c6af9a6e5e18005b1b8)
2013-11-10 09:28:55 -05:00
Steve Howell c11cc80f60 Make build-local-server-tarball work on OSX.
(imported from commit ae0853882181e2489679f8c6870461fab6cb29b4)
2013-11-06 13:49:00 -05:00
Steve Howell f5bb2409ef Create "analytics" app with activity reports.
(imported from commit 6385935c3d7894fe52bcc265faecc30b07629717)
2013-11-06 12:07:32 -05:00
Steve Howell a827d727cc Create non-localserver "corporate" app with jobs pages.
The corporate "app" is not a full-fledged Django app, but it has
a urls.py and a templates directory.  This commit creates the app
and moves the jobs pages into it.  Localserver deployments will
not see any of the corporate code.

(imported from commit 35889c3cf92329258c30741fdfa564769a4fac1a)
2013-11-06 12:07:31 -05:00
Zev Benjamin 1271ca0f45 Add a simple pair of tools for blocking and unblocking deployments
The main use-case here is for ensuring that we don't deploy to master
while doing demos.

(imported from commit d3c8ba502052b352291548200032f39e0743b774)
2013-11-05 17:13:45 -05:00
Tim Abbott 7f0eb71d9b Don't include local_settings.py in local server tarballs.
(imported from commit 5d893375de87f878d270bf8dc3270c7fcd3b25af)
2013-11-05 17:06:33 -05:00
Tim Abbott b5979a3fed [manual]: Rename zulip-internal puppet module to zulip_internal.
(imported from commit 64ac7ec0f3495b1fe7810da3d4d41263c52b9b3b)
2013-11-05 17:06:32 -05:00
Tim Abbott e06722657a [manual] Remove /messages/latest API and related legacy code.
This requires doing a puppet apply on our servers to take effect
properly.

(imported from commit 19dc56f071f07a5d2571eef49dd835121b2e82b6)
2013-11-05 14:19:40 -05:00
Zev Benjamin 787215d743 [manual] Switch over to new /etc/zulip/zulip.conf config file
Run the following commands as root before deploying this branch:
 # /root/zulip/tools/migrate-server-config
 # rm /etc/zulip/machinetype /etc/zulip/server /etc/zulip/local /etc/humbug-machinetype /etc/humbug-server /etc/humbug-local

(imported from commit aa7dcc50d2f4792ce33834f14761e76512fca252)
2013-11-05 14:14:19 -05:00
Kevin Mehall 78b45b61fb Minify JS in the localserver upgrade tarball.
This moves the list of removed files from .gitattributes to
tools/build-local-server-tarball because static/ and tools/ are
necessary for update-prod-static, and it seemed best to keep the
entire list in one place.

(imported from commit 2a447cbde29e90d776da43bb333650a40d4d363c)
2013-11-04 13:40:43 -05:00
Tim Abbott 5f92ccb422 [manual] Move update-prod-static and update-deployments back to tools/.
update-deployment has been replaced by upgrade-zulip for local server
instances, since it won't be running off a git repository, and
update-prod-static won't be needed since we plan on shipping minified
javascript.

When we deploy this, the deployment will fail, and then we'll need to
update the git checkout from which post-receive runs on git.zulip.net.

(imported from commit 86aaedbab09c60ae86ac1d0ae492d0d1bc45569f)
2013-11-04 13:22:41 -05:00
Tim Abbott dc596f7a47 build-local-server-tarball: Add prefix.
(imported from commit 725b197e93133d81a2fdfe23c1cdd34103d52a11)
2013-11-04 13:22:41 -05:00
Leo Franchi fe1313ad76 Split management commands for internal use into zilencer/
(imported from commit 3fd81bfc7e987fc88bd1d632546850eebbb92234)
2013-11-04 11:58:52 -05:00
Tim Abbott 68dcc760c3 Clean up some unused imports.
(imported from commit 0c5d8e2a55ba1b8909ba807fee3afe863dcdc226)
2013-11-04 11:51:17 -05:00
acrefoot 9af244a6bc fix narrowing bug introduced by composebox notifications
I switched narrow.by_subject and narrow.by_recipient to use the all_msg_list
instead of current_msg_list, since we wanted to be able to narrow to messages
specifically not in the current_msg_list. However, in searches which revealed
old messages outside the range of all_msg_list (which only has a single contiguous range),
this broke narrowing.

Let's use msg_metadata_cache instead.

(imported from commit 427f717484b4ae83d9bb4cc6e51ce17177d037fe)
2013-11-01 18:33:10 -04:00
Luke Faraone 7fd9c607ea Exclude api/setup.py from the linter's wrath.
(imported from commit 2e9718b6be472523b2684b6fcae4545f0a7fba49)
2013-10-31 17:26:52 -04:00
Tim Abbott a616800d8d review: Rename humbug => zulip in test git repo path.
(imported from commit 1551003af066401914dbc055e75769911a335441)
2013-10-31 15:29:49 -04:00
Tim Abbott ba7c3a50f2 Remove migration code from database username migration.
(imported from commit 87a4ab08420b03aac331fda072149140804ee467)
2013-10-31 15:29:49 -04:00
Tim Abbott eb4286bddd Fix saving historical backups for our mediawiki.
Previously we were not commiting them to the right git repository.

(imported from commit 2a99db84fe6fce4d9fb970425af92d92507dce21)
2013-10-31 15:05:23 -04:00
Tim Abbott 161a1d4091 Rename humbug => zulip in paths for non-postgres backups.
(imported from commit a35065d3d94f86574d837a3e826023ee3a70819a)
2013-10-31 15:05:23 -04:00
Jessica McKellar f1e90086f5 Remove the onboarding checklist.
Looking at the historical data, fewer than 50% of active users have
completed the checklist, which means that it is just persistent
clutter. We also have other better ways of encouraging people to send
traffic and get the apps now.

This commit removes both the frontend UI and backend work but leaves
the db row for now for the historical data.

(imported from commit e8f5780be37bbc75f794fb118e4dd41d8811f2bf)
2013-10-31 11:34:15 -04:00
Zev Benjamin 0b461ec947 Add one-off tool for automating manual steps of recent puppet changes
(imported from commit 7add18afc7927cbbb5006a5a6c2b1c45092035f7)
2013-10-31 11:06:21 -04:00
Tim Abbott ac745c8bf5 Move install-server under tools/.
(imported from commit 0999b09fbfd9f28a4bd421565aa8a884b7d2c3bc)
2013-10-30 20:39:39 -04:00
Zev Benjamin dd678465ae [manual] Move puppet modules to the top level
The new puppet.conf file has to be moved into place manually.

(imported from commit 253d9a95386dae8c803a998ce2dc7e8be40c880a)
2013-10-30 15:42:26 -04:00
Tim Abbott 5b33c44f64 Add tool to build local server tarballs.
We need to maintain this by labeling the files that we don't want to
ship with our local server tarballs in the .gitattributes file.

(imported from commit e29f38c477a4cdfd80fbb8e4e95c611b34f3b212)
2013-10-29 17:55:07 -04:00
Steve Howell 3494ce6ebc Start to clean up settings.html.
Check that settings.html has at least balanced tags, and
automate the checking of those tags.

(imported from commit 35e9be269caa211803d64f2b54cb0287e13707b3)
2013-10-29 10:59:41 -04:00
Tim Abbott 901a5c342c Use os.path directly rather than sometimes importing it separately.
(imported from commit 48486c4ea64d02a15faeebb0f490d31e9b113d62)
2013-10-28 15:44:13 -04:00
Zev Benjamin e5470b2b66 Run queue processor workers from run-dev.py
(imported from commit d8977fbb899bf4a1b7e3a644a9259279ac744efd)
2013-10-28 14:30:53 -04:00
Tim Abbott f41f0e4084 [manual] Move write-rabbitmq-consumers-state-file to bin/.
We need to do a puppet apply immediately after deploying this, or our
rabbitmq consumer state files will become stale.

(imported from commit 18696a5a8b1ff431425d1f71c208acc9bf0694f2)
2013-10-28 10:54:49 -04:00
Tim Abbott fffd4f3c59 Move zulip_tools library to root of repository.
(imported from commit 2fada9d2acbcf81f8e2b3de8caadbf335141dfaa)
2013-10-28 10:54:48 -04:00
Tim Abbott 38c5629505 Move generate_localserver_secrets.py to scripts/setup.
(imported from commit 8d9ca2fc78700a38ec3ce5866b2b1032aabe1635)
2013-10-28 10:54:48 -04:00
Tim Abbott 7c6ca81df5 Move zulip-puppet-apply to scripts/.
(imported from commit c4e4c98f0a50feb31f7a716e04009d814cf047e7)
2013-10-28 10:54:48 -04:00
Tim Abbott 56e9ad230e [manual] Move our deployment scripts to scripts/.
This will require updating the post-receive code on git.zulip.net to
work.

(imported from commit 2e51fa2d7b891c1138d3f22ae534cfb8a6cf174c)
2013-10-28 10:54:48 -04:00
Tim Abbott 1a448c256e Move get-django-setting to bin/.
(imported from commit b4d908897550f9818b6db862d95bb0cbbc1da15a)
2013-10-28 10:54:48 -04:00
Tim Abbott cdd7ab895d Move postgres-init-db to scripts/setup/.
(imported from commit 7844fc5cac3e3c90466216e14b2c5b25b4830216)
2013-10-28 10:54:48 -04:00
Steve Howell e6991c299d Add tools/migrate-db-osx.
(imported from commit b422f7d4e93655b77322170b2bdd4e2eb4493696)
2013-10-28 10:39:46 -04:00
Tim Abbott 5b2775724a Make tools/migrate-db optimized for the local dev instance case.
(imported from commit a4db99435646e337a09cbfe2f64d3d7ca6b0346a)
2013-10-28 10:39:46 -04:00
Zev Benjamin cdcbe61cb0 [manual] Change references to the humbug_test user, schema, and database to zulip_test
This requires no changes in production, but is tagged as manual to
remind developers that they need to edit and run the tools/migrate-db
script to fix up their local database instances.

(imported from commit fbf764fb61592ef994d6d2ad56edad65ff01f14b)
2013-10-26 04:16:28 -04:00
Zev Benjamin 7b6f6823a5 [manual] Change references to the humbug user, schema, and database to zulip
This commit must be simultaneously deployed on both staging and
prod0.  It also requires completely taking down the app.

To deploy these changes, do:
* check out this commit at /root/zulip on postgres0, postgres1, staging, and prod0

* stop the process_fts_updates job on postgres0 and postgres1
* stop the app on staging and prod0

* do a puppet apply on postgres0, postgres1, staging, and prod0
* move the new client certificates into place on staging and app
* move the new server certificates into place on postgres0 and postgres1
* reload the database config on postgres0 and postgres1 (this might
  actually require a restart)
* run tools/migrate-db on postgres0 as root

* do a deploy through this commit on staging and prod0
* start the process_fts_updates job on postgres0 and postgres1

* do a puppet apply on nagios

(imported from commit 819bdd14326c1425e2d3041a491a8ca3b9716506)
2013-10-26 04:16:27 -04:00
Zev Benjamin 05b9c08cfa Add one-off tool for migrating our database user, schema, and db name from humbug to zulip
(imported from commit 4b5e27eb3b083f2e2f2cabe64901f3dbaecd4739)
2013-10-26 04:16:27 -04:00
Leo Franchi 9e1173eb9e Add a generate_localserver_secrets.py script that populates local_settings.py
(imported from commit ced1397d225efe0cf2f0eef7d43b495e3ab9b845)
2013-10-25 16:29:18 -04:00
Zev Benjamin a463d2a386 Remove inaccurate comment
(imported from commit 8584f14435c1db89f5a9f538d0048f0e42705f85)
2013-10-24 16:40:38 -04:00
Tim Abbott 5270b8875b Add a simple script to fetch a setting out of Django.
(imported from commit c0ebaf02108a930f0290d56bd666611e36ba28c0)
2013-10-24 16:26:45 -04:00
Zev Benjamin ca16644152 Add client-side SockJS wrapper
The wrapper handles our RPC protocol, authentication scheme, and
reconnections.

(imported from commit 1fed2d160582c235a32de80a80b3e451c13a7b1c)
2013-10-22 18:45:11 -04:00
Zev Benjamin 5979af3a45 [manual] Add asynchronous message sender via sockjs-tornado
New dependency: sockjs-tornado

One known limitation is that we don't clean up sessions for
non-websockets transports.  This is a bug in Tornado so I'm going to
look at upgrading us to the latest version:
https://github.com/mrjoes/sockjs-tornado/issues/47

(imported from commit 31cdb7596dd5ee094ab006c31757db17dca8899b)
2013-10-22 18:45:11 -04:00
Tim Abbott 080f5922e1 lint-all: Fix gotcha regexps to not misparse certain quoting cases.
(imported from commit fed305fce9cf6f88e05f4d7310e25928ae6add4b)
2013-10-21 14:37:36 -04:00
Steve Howell 5c4fb277c1 Add tools/check-handlebar-templates.
(imported from commit e9f634be4d3699eb2d4fc12f6311b42ead710427)
2013-10-09 17:16:52 -04:00
Tim Abbott aad13aea04 post-receive: Login as the zulip user when deploying.
(imported from commit 750c3de9dc37ae3bc32964543da26a4d26eb8591)
2013-10-08 17:21:58 -04:00
Tim Abbott 0f2fa7e59a puppet: Fixup some humbug => zulip rename issues.
(imported from commit 4d83dc2af380cfbae3a1958f98c671c7e8c58f05)
2013-10-08 08:57:30 -04:00
Tim Abbott f3fd1a2c44 [manual] puppet: Rename humbug user to zulip.
(imported from commit 90e517a4a657d2821b371c833e557c2003c9340c)
2013-10-08 08:57:30 -04:00
Tim Abbott b8b0eb4508 Some zulip => humbug updates in comments and print statements.
(imported from commit 9253569a1df7f96fda81ab162d710cdda03f30ca)
2013-10-08 08:57:29 -04:00
Tim Abbott e11ae77ba6 [manual] Rename /home/humbug to /home/zulip.
This may require just doing an mv on the home directory, plus changing
the home directory in /etc/passwd.  It should of course be done carefully.

(imported from commit 660997d897ee6d33563af74f0fc5d4267a911755)
2013-10-08 08:57:29 -04:00
Tim Abbott 9677ce8920 [manual] Move git checkouts from /home/humbug/humbug to /home/humbug/zulip.
(imported from commit d58be28e57fcb3b5585c0018f1dbb53adf5067df)
2013-10-08 08:57:28 -04:00
Tim Abbott 31a445e42e [manual] Rename /home/humbug/humbug-deployments to /home/humbug/deployments.
This requires doing an `mv` and then `puppet apply` on each of staging
and prod as part of the deployment process.

(imported from commit 5d0be64a3846f7151d2036d2e0b31049bc1c2dd2)
2013-10-08 08:57:28 -04:00
Zev Benjamin 959a5c4835 zulip-puppet-apply: Always do a dry run first and then prompt to do the real run
You can immediately apply the changes by passing '-f' or '--force' as
the first argument.

(imported from commit 91f00f6afd3c42e2b11f60e92fc20962bc952f0d)
2013-10-07 16:22:55 -04:00
Jessica McKellar cdc6c50620 Unbreak non-stdout review script invocations.
The API directory wasn't making it onto sys.path in time anymore.

(imported from commit d4ed145913e0119d56de435811f793895da175fe)
2013-10-07 15:43:17 -04:00
Luke Faraone 80c2eb0367 Repoint to new repository
(imported from commit bc90453bf9776b1e3d05c222f78cc66383278c32)
2013-10-07 13:43:23 -04:00
Steve Howell 84c147a379 Abort the review script when pointed to localhost.
(imported from commit 3a7b2123f9667508425dc8e33300a28294b58f2d)
2013-10-06 15:30:00 -04:00
Zev Benjamin 6e54ca3045 puppet: Factor out writing the rabbitmq consumer check state file into its own script
This temporarily breaks the rabbitmq consumer checks for the
user_activity and notify_tornado queues because their state files
were renamed to match their queue names.  It will be fixed for
staging in the next commit.

(imported from commit a6aaa330a1134d8ddffe8f4959deb12b219f241a)
2013-10-04 14:19:16 -04:00
Steve Howell 94cec018c0 Force-minify min/activity.js.
The minify logic doesn't have an easy way to detect that you
removed a file since the last deployment.

(imported from commit 50d05fcdad382a586073c06d29d279433d1bba81)
2013-09-26 13:55:45 -04:00
Tim Abbott fff4244b54 Move various settings into local_settings.py.
(imported from commit 03c4a61383f3f8cf8207050d68d5ce870e12fcca)
2013-09-25 15:40:21 -04:00
Waseem Daher 675baf102b norman-mailer: Deal more gracefully with fewer fields.
(imported from commit b83380c72e9ac2be77f4c1e74c82d63fe2d42244)
2013-09-20 14:36:00 -04:00
Steve Howell 7228ce956b Wait for puppet checks to finish in lint-all
(imported from commit 760c49622e5f33e12551f24128e1df54a9ae8848)
2013-09-19 10:46:29 -04:00
Steve Howell 203a71dcd0 Fail hard on pyflakes errors.
Also, run pyflakes in the background like the other processes.

(imported from commit b168a5f7dd6dd5ec4b75e3148aea82b3e1040f87)
2013-09-19 10:46:28 -04:00
Waseem Daher 790e2b67de norman-mailer: Declare that our file is UTF-8.
(imported from commit 54236cd3bc4e4291767a47da21043992e592de48)
2013-09-19 10:44:25 -04:00
Zev Benjamin 952f15762e Add tool for sending Github payloads to a local instance
This is very useful for testing our Github integration.

(imported from commit c61fd883c599395d31416a25090e57594fddeadf)
2013-09-17 13:55:39 -04:00
Steve Howell b4b6fa14d3 Persist muting preferences to the back end
(imported from commit db2d4362a0601f35a75b798cf6945556e44532fb)
2013-09-11 16:47:37 -04:00
Waseem Daher ad66b2244c norman-mailer: Add ability to use multiple templates.
(imported from commit a896ce14408c75c7dcf520439a3e7a6ff463e8a9)
2013-09-10 21:24:03 -05:00
Leo Franchi f70e899518 Use exec to launch unicorn so it dies when we kill the script
(imported from commit 59ca5b28f4d1674a0e904f191cc11dbdbf5fc289)
2013-09-10 10:26:24 -04:00
Kevin Mehall 810dd89621 Maintain a list of people in the realm.
people_list and people_dict include the feedback bot and anyone you've
cross-realm PM'd with. Useful for autocomplete, but not for admin and
stream settings views.

Fixes the UI part of Trac #1772.

(imported from commit cdefd4e86980447aad5190e7fc8ae3666d66e3c3)
2013-09-09 12:13:33 -04:00
Leo Franchi 8c0e112aa7 Update generate-activity-metrics to use new graphite url
(imported from commit 4664e9f389d05edb014ddb3b7f271cfc32245f3f)
2013-09-06 15:14:55 -04:00
Zev Benjamin 2f1551e745 Replace comment references to trac.humbughq.com with trac.zulip.net
(imported from commit 231d0884345be525d58ce51f48a76bba6960f09d)
2013-09-05 15:43:08 -04:00
Leo Franchi 897dd87b94 Add a span around alert words to mark them visually
(imported from commit 9b8fbbd957086f1eeaa3409e5830aa6d7974fbe8)
2013-09-05 10:18:40 -04:00
Waseem Daher 07d692758e Script to help send welcome emails to new Zulip users.
(imported from commit 787c950a71f34a6137e53448594ba9ff42fc939f)
2013-09-04 13:30:06 -04:00
Zev Benjamin f7a7527049 Start and stop all our processes in one invocation of supervisorctl
With the supervisor speedups, these run much faster.

(imported from commit d8b96178f7c57861e9de8dd640a861c22df6e9ad)
2013-08-27 17:30:57 -04:00
Tim Abbott 134da30fdf Add webathena authentication button for Zephyr users.
This shows up when you're not running a Zephyr mirroring bot and lets
you use Webathena to have us run it.  Obviously needs more docs.

Current problems include:

* supervisorctl reload ends up recreating /var/run/supervisor.sock
  with the wrong permissions, so it only works once in a row before
  you need to chmod that.

* /etc/supervisor/conf.d needs to be humbug-writeable; this is a clear
  local root vulnerability

* This uses SSH and thus is kinda slow.

(imported from commit 7029979615ffd50b10f126ce2cf9a85a5eefd7a2)
2013-08-26 18:17:25 -04:00
Scott Feeney 95719a91cf [third] Add Lazyload.js
This is a small, MIT-licensed lib from https://github.com/rgrove/lazyload

(imported from commit c6e43c06dfe3fa8559b2a3d28a48d9e0a6848283)
2013-08-26 13:02:57 -04:00
Steve Howell 795248a1d0 Mute any topic named "muted" on zulip.com.
This change will allow us to test the muting feature on
staging.  Any topic named "muted" will automatically be
muted.  You can also mute any other topic on the console:

    muting.mute_topic('devel', 'ios');
    current_msg_list.rerender();

More UI around this experiment will be coming soon, as well
as support for muting entire streams.

The muting module keeps track of which topics are muted, but a
user can expand muted messages, and once that happens, the
messages are marked with the "force_expand" flag that gets
persisted to the back end.

Muted messages are rendered in similar fashion to the summarized
rows, and as part of unifying some of that code, we have
made it so that expanding a summarized section doesn't remove
individual flags related to summaries; instead, the messages
get the force_expand flag set.

(imported from commit acee4190e63813d46850415c41ff8ebfae4a6953)
2013-08-23 12:10:27 -04:00
Steve Howell 58c141ad79 Avoid side effects in ui.set_presence_list().
Have ui.set_presence_list() only touch the presence list.

Before this change, it was calling update_unread_counts(), which
has a bunch of side effects unrelated to the presence list.

(imported from commit 690f754d78874a03fa36f8ff8765d5a63e431d28)
2013-08-22 14:46:13 -04:00
Scott Feeney 6de6ced290 Fix PM unread counts not displaying
This was broken in two ways:

1. Commit ad59d6f78042ce89, "Make the left sidebar and right sidebar
more consistent", pushed last Monday, changed the markup for the right
sidebar without changing a selector in stream_list.js that was looking
for the old markup.

2. Even then, whenever new user presence information came in, we would
rerender the user list and blow away the unread counts. This commit
patches around that by updating unread counts after rendering the user
list. I'm not sure what broke this or how it was working before.

(imported from commit 53ed40139e257e44411e918d1ecdce3a49e9ee51)
2013-08-22 14:46:12 -04:00
Steve Howell d21cbac611 Clean up globals after each unit test.
The functions add_dependencies() and set_global() are convenience
methods that allow you to modify the global namespace while
the current file is running but then have it be cleaned up
by index.js when you're done.

(imported from commit f75b8a10c19f773a8d2d3a8fa4bc39b1679566fe)
2013-08-21 18:18:58 -04:00
Tim Abbott 8879b84293 run-dev: Ignore certain request.finish() exceptions.
(imported from commit e797c0a6f5cd753bd84069bff202b421f0ff3be9)
2013-08-21 12:01:55 -04:00
Scott Feeney 5f2517bddc Add support for analyzing test coverage with Istanbul
To use, make sure your Node installation is up to date and install
istanbul with npm:

  sudo npm install -g istanbul      # 'sudo' may be optional on OSX

Then run

  tools/test-js-with-node cover

and navigate to coverage/lcov-report/js/index.html in a browser.

(imported from commit 2da4894d1725e2f9540b3895304246e3cd138f6c)
2013-08-20 10:46:45 -04:00
Scott Feeney 69efe2a695 Add a Node.js-based test runner
There are no functional changes; you can still use the shell script
tools/test-js-with-node. It just delegates now to the new index.js to
iterate through all the other .js files in the test directory and run
them. This sets the stage for Istanbul to correctly compute test
coverage.

(imported from commit 6f521c78b7a314d010fa113f9c2c971ab999b637)
2013-08-20 10:46:22 -04:00
Jessica McKellar b32219c8eb Don't display unread counts until after making a bankruptcy decision.
Users were getting confused about why the unread count in the sidebar
/ notification bar / Dock was different from what the bankruptcy modal
said, so only show them the true server count until they've made a
decision.

(imported from commit 71d376cd4a85749ccf49936b251e6b8ac21361b7)
2013-08-20 10:26:52 -04:00
Steve Howell 53f62bd71c Created MessageListView class.
(The code for MessageListView  was extracted from message_list.js.)

(imported from commit 60c0bac4c734d3850f8b8c047a978c292b19cc13)
2013-08-19 12:17:56 -04:00
Steve Howell 29c012dc74 Create stream_data.js module.
This pulls a lot of data-centric functions out of subs.js.

(imported from commit 0deed7d4bf5697e893af9bc9d888c2d5da8d9fa2)
2013-08-19 12:17:55 -04:00
Luke Faraone 6e81fd46af Update review script to accept non-ASCII branch names
(imported from commit 391dd3a549c4a2f4766105b85a6ebc885a293db2)
2013-08-15 10:56:46 -04:00
Steve Howell 050c8ad103 zulip.subject_dict -> composebox_typeahead.seen_topics
Move zulip.subject_dict into composebox_typeahead.seen_topics,
and encapsulate the use of seen_topics inside composebox_typeahead
with add_topic() and topics_seen_for().

(imported from commit 2bc2d1714fabdc07a661cbf815d14b36a08990e2)
2013-08-14 13:15:00 -04:00
Luke Faraone ecc42bc9f8 Add administrative panel to allow for user deactivations etc.
We now show a list of users and allow you to deactivate a user using the
same process as `python manage.py deactivate_user`.

We add a new menu item accessible from the gear icon which will eventually
have much more than just this, but we have a good start here.

Here we also add a property to UserProfile which determines whether you're
eligible to access the administration panel, and then have code which shows
the menu option if so.

This introduces a new JS file, admin.js.

(imported from commit 52296fdedb46b4f32d541df43022ffccfb277297)
2013-08-13 14:20:18 -04:00
Steve Howell 0879648f0e Remove respond_to_cursor flag.
The prior commit, which was a functional fix, made the
flag obsolete.

(imported from commit 203a080106b00e0355a1223f783bbe579430b4ad)
2013-08-13 14:12:28 -04:00
Steve Howell d27feeed62 Extract code to summary.js.
(imported from commit 51d958b27e53555f5f77d6e6b661eade57190e23)
2013-08-13 11:26:12 -04:00
Waseem Daher 02dba3da11 iframe-bot: Don't show tweets.
(imported from commit 584fdbfa50e2ff1d3526f741e96ef6691fa731e1)
2013-08-13 10:41:02 -04:00
Waseem Daher 7329cedd84 iframe-bot: Properly style emoji (but you need to copy in the images).
(imported from commit 3fbf54a46d4f20e9da21c73cfe9f6a0064749f1c)
2013-08-13 10:36:05 -04:00
Waseem Daher dfb60ee966 File uploads using Dropbox.
(imported from commit c552133fc7025eca526fbfef24fd544260d7111b)
2013-08-12 17:22:23 -04:00
Waseem Daher 932d002ff4 Zulip embedded iframe bot.
Currently running for CUSTOMER3, at MIT.

(imported from commit 1c29d3fb3fbf29b9ea633e9fc102e7737eba4fd7)
2013-08-12 17:09:48 -04:00
Waseem Daher 067bd390ac Remove kiosk mode.
We instead implemented the ~desired functionality here using the
API and a bot to make a totally read-only, static, slowly-updating
view into the Zuliverse.

This is the moral equivalent of reverting deb035b4c702fcdb0e660ed549fe74c682abb6d9

(imported from commit 9d743fe82f197b37f005e5a038f77cc4b8566024)
2013-08-12 16:19:53 -04:00
Steve Howell 878ee2b3fd Move Filter class to filter.js from narrow.js.
1) The class Filter now lives in its own module.
2) The function canonicalized_operators() is now a class method on Filter.
3) The function message_in_home moved to filter.js and became private.
4) Various calling code had to change, of course.
5) Splitting out Filter helped simplify a few tests.

(imported from commit e41d792b46d3d6a30d3bd03db0419f129d0a2a7b)
2013-08-12 13:58:32 -04:00
Steve Howell 37f8cc9294 Extracted code into compose_fade.js.
The compose_fade has three public exports:

    set_focused_recipient
    unfade_messages
    update_faded_messages

All code was pulled directly from compose.js, except for the
one-line setter of set_focused_recipient.  The focused_recipients
variable that used to be in compose.js was moved to compose_fade.js,
hence the need for the setter.

(imported from commit 462ca5d0d0bd58612d0197f3734a8c78de8c6d30)
2013-08-11 17:05:13 -04:00
Waseem Daher 0dcaf9ca3d Kiosk mode [unsafe].
"Kiosk mode" is a "read-only" Zulip suitable for embedding into
an iframe on another site. I say "read-only" in quotation marks,
because the account is still a fully-fledged active account on
the server, and we just tear out a bunch of stuff in Javascript
(that a malicious user could easily re-enable).

So in that sense, it's not actually safe in security-sensitive
environments -- malicious users logged in via kiosk mode
can do anything the kiosk-mode user can do.

(We need this functionality for the customer3 realm specifically;
 we'll possibly just tear this code back out once that experiment
 has run its course.)

(imported from commit deb035b4c702fcdb0e660ed549fe74c682abb6d9)
2013-08-11 15:57:21 -04:00
Scott Feeney 4aab49657d Fix minify-js failure to update app.js when templates changed
Also adds a clarifying comment.

(imported from commit ae05fa7063b7e77ab6d8942eab2a2191429b312f)
2013-08-09 23:31:44 -04:00
Zev Benjamin 0cfc8fae9f Add basic Javascript Dict implementation
(imported from commit 9f2fb089eb6e269549de26b37bd588355757d22c)
2013-08-09 17:20:14 -04:00
Zev Benjamin e0eddabeb1 Add util.enforce_arity
util.enforce_arity takes a function and returns a new version which
throws an error if an incorrect number of arguments (as determined by
the function prototype) are passed.

(imported from commit 20e69a6dc7b6f8455726ab4fae8d5b7b04dc4103)
2013-08-09 17:12:23 -04:00
Steve Howell 9130fbec84 Show script names in test-js-with-node.
This makes it more like how we do other tests.

(imported from commit e7d96ad31aeed6186ef6ff1d23f8028c68762caa)
2013-08-09 14:47:11 -04:00
Steve Howell d897d0ad57 Fix pre-commit to call lint-all, not check-all
(imported from commit 8450e79c2d9538c7bfd3cebe597a2869f8800eea)
2013-08-09 14:23:36 -04:00
Steve Howell abba52fd4d Simplify test-js-with-node to simply run *.js in the test directory.
I finally got tired of the tedium of adding files explicitly to the
script.

(imported from commit 4c573fe4752c32a452e592fad687dd5145a173c8)
2013-08-09 14:23:36 -04:00
Tim Abbott 2b8fd43edd check-all: Run 'puppet parser validate' to validate puppet changes.
(imported from commit f1ab619b6e0b993f3b9b6fe081f085d2dd2072b0)
2013-08-09 13:53:17 -04:00
Steve Howell 6790ed79cc Add a unit test for activity.js.
This includes slightly invasive, but harmless, changes to
the production code.

(imported from commit ff40af504de2360ada866508da262e0d2e9f7ad9)
2013-08-09 13:11:59 -04:00
Steve Howell 29fd84fdbd Rename check-all to lint-all.
(imported from commit 844b2c69748f6d9df8ff1189c006ccf405f787c3)
2013-08-09 13:06:02 -04:00
Steve Howell db33028b98 Added tools/test-js-with-casper symlink.
The test-all script now calls the symlink, and the run script
has been cleaned up to be symlink friendly.

(imported from commit 8abb5c1e5744416e94ff843e50c53e0d0f7e1316)
2013-08-09 13:04:52 -04:00
Steve Howell 0a21b9b294 Simplify test-all: just use the script names as banners.
(imported from commit 20e48c468a5ccae63c64385dc114a4f8c892fc61)
2013-08-09 13:04:52 -04:00
Steve Howell cf1d94edef Add a test for stream_color.js (pick_color).
(imported from commit a49f96a4a7b61ef51c057e8a3f11c116d77ebb49)
2013-08-09 12:29:02 -04:00
Steve Howell cef72fd8b8 Add tests for the Filter class.
(imported from commit ef0917bd7911c5cc6f6d20d356c156d483ba723f)
2013-08-09 12:04:43 -04:00
Steve Howell cc73619a9d Add unit tests to narrow.js.
This includes slightly invasive, but harmless, changes to
production code.

(imported from commit 847557c11088b75c836cc399d0af75353a8faa3a)
2013-08-09 11:59:32 -04:00
Steve Howell e36fd929bc Created stream_color.js.
This is a pure refactoring that mostly just moves code from
subs.js to the new stream_color.js and updates module references
accordingly.  In order to prevent introducing some exports,
update_stream_color was given an additional "sub" parameter
and update_stream_sidebar_swatch_color was given an "id"
parameter.

Killed off unused initial_color_fetch var.

(imported from commit b7644ce67f50d31fb46f564d758d661eea776aa6)
2013-08-08 18:22:44 -04:00
Steve Howell 50b28dec49 Add node-based unit tests for util.js.
(imported from commit df666a5b96d378787e911c2cd6e509b7d42e1cb4)
2013-08-08 17:25:24 -04:00
Tim Abbott a8d553bd10 post-receive: Properly encode unicode argument.
(imported from commit adc94a100462a8a2de0be8c05e60c0e33180e50d)
2013-08-08 10:32:16 -04:00
Tim Abbott 9181c7c75b Move generate-fixtures to tools/.
(imported from commit 3d452b17e315ba9adf91e33408a7711d16b069a2)
2013-08-08 10:22:32 -04:00
Tim Abbott 6550134b3e Rename humbug_*_config.py to zulip_*_config.py.
(imported from commit a1d4dd22c59f812f0eb4875dc70c89ce96a4b90c)
2013-08-08 10:22:31 -04:00
Tim Abbott 03293b7be9 Rename humbug-send to zulip-send.
(imported from commit 61400841f8fffe4c706d867aaa012059bcba271d)
2013-08-08 10:22:31 -04:00
Tim Abbott 747a9c536f Rename the 'humbug' API module to 'zulip'.
(imported from commit b3a3d7c05459cbb0110cd0fbe2197d779f3a6264)
2013-08-08 10:22:31 -04:00
Tim Abbott 2ea1bb05a5 Rename ~/.humbugrc to ~/.zuliprc.
(imported from commit a0d53dd20097a56971874dc1d84c6f95267e84f2)
2013-08-08 10:22:31 -04:00
Tim Abbott 7b9305b06f Rename Django project to zproject.
This includes a hack to preserve humbug/backends.py as a symlink, so
that we don't need to regenerate all our old sessions.

(imported from commit b7918988b31c71ec01bbdc270db7017d4069221d)
2013-08-07 11:04:03 -04:00
Tim Abbott f512f53e9e Rename send_deployment_finished_humbug.
(imported from commit 8f1a0b6c70dcbda5bc7288ffd0eeae1ff494b40e)
2013-08-07 10:00:09 -04:00
Tim Abbott ef790d6793 Rename humbug-puppet-apply to zulip-puppet-apply.
(imported from commit f04563d5dcab6db23ddb3238b9c0e5c1a76e72d3)
2013-08-07 10:00:08 -04:00
Tim Abbott 130d381302 Rename humbug_tools to zulip_tools.
(imported from commit 7f21fdc2c2d6ad0bdbd99eb616ffc75c347d8dcb)
2013-08-07 10:00:08 -04:00
Tim Abbott 7232369619 Rename humbug puppet module to zulip.
(imported from commit 7ed2a40439a48f4ef47932b345b9fac1a76cbb58)
2013-08-07 10:00:08 -04:00
Tim Abbott a8c70f6dde Change Humbug => Zulip in tools.
(imported from commit a081a6f26407528d5952c8065f15f19c66ce9111)
2013-08-07 10:00:07 -04:00
Tim Abbott 1f1af26048 Change Humbug => Zulip in text/comments.
(imported from commit 2f9d73431ae40e1b9e9e11bc2f4f62f566ae758a)
2013-08-07 10:00:07 -04:00
Steve Howell 57f518c9c2 Add node JS unit tests for MessageList.
(imported from commit 486a343add91fd5037431504e1ce4a750bfa9fbf)
2013-08-07 09:25:13 -04:00
Tim Abbott e111a2f9a5 [manual] Rename Django app from zephyr to zerver.
This needs to be deployed to both staging and prod at the same
off-peak time (and the schema migration run).

At the time it is deployed, we need to make a few changes directly in
the database:

(1) UPDATE django_content_type set app_label='zerver' where app_label='zephyr';
(2) UPDATE south_migrationhistory set app_name='zerver' where app_name='zephyr';

(imported from commit eb3fd719571740189514ef0b884738cb30df1320)
2013-08-06 07:39:36 -04:00
Tim Abbott 6dd049fa26 Rename zephyr.js to zulip.js.
(imported from commit e62aa374f1bf2e75cebc00d0bba4e3ade82d19f6)
2013-08-05 17:59:04 -04:00
Waseem Daher c16651bf23 [schema] Add referral system
For now, we just get emails about referrals that we have to follow up
on manually.

I don't love using the name "referral" in some places and "invite" in
others, but we already use the verb "invite" to mean something else
and "invite" is a canonical noun.

(imported from commit 0814c18395952fcdef234c1584984f71ca1b6f37)
2013-08-05 17:14:51 -04:00
Steve Howell 770bc5c96a Fix pointer motion at top/bottom of viewport.
We always intended to move the pointer up when you were at the
top of the viewport and scrolling up, and we always intended to
move the pointer down when you were at the bottom of the viewport
and scrolling down.  We didn't intend to move the pointer up
when you were at the bottom, or vice versa.  This commit fixes
that bug, simplifies the code, and inlines the code into ui.js.

(imported from commit 77e2ace9d2fc1025e1349e3be13c76c3a397fd38)
2013-08-02 18:18:04 -04:00
Steve Howell 3726b86a94 (tests) Rename search.js -> search_suggestion.js
This follows up on extracting code to js/search_suggestion.js, and all
the search tests apply to the new module.

(imported from commit dec6c8614c25b4f82da57edeaddc7cfef28260a5)
2013-08-02 17:28:03 -04:00
Steve Howell b33858dd70 Created search_suggestion.js.
Moved 400+ lines out of search.js into search_suggestion.js.  This
leaves search.js primarily responsible for lots of little DOM
interactions, whereas search_suggestion is more about data.

(imported from commit 53d08b29367c0172e483064f213538d45098279e)
2013-08-02 17:28:03 -04:00
Steve Howell 2442edee9e Add the "static" directory to NODE_PATH for unit tests.
I added our "static" directory to NODE_PATH for our JS unit tests.
This eliminates most of the verbosity in our require statements, but
it still requires us to explicitly call out "js" or "third"
subdirectories, which should make it a bit easier for folks reading
the tests to distinguish modules from js, third, or node itself.

(imported from commit b77a5283135d388d46f4b7e511acc59986f1a8ba)
2013-08-01 17:58:25 -04:00
Waseem Daher 86cf40c8a9 Move feature_flags into its own file.
(imported from commit b775f85a24422d236b0079810b98b6b984cb60a2)
2013-08-01 13:00:15 -04:00
Tim Abbott f792adfa6a Disallow single-statement if statements without a brace.
(imported from commit e52f90a0f3e7340a764d391b1f38f1820e953ae7)
2013-08-01 11:47:54 -04:00
Kevin Mehall 0e0ed886e1 Add feature_flags mechanism to enable experiments.
In the future, this could come from the server to enable individual
experiments on a per-realm basis.

(imported from commit 8fd1ba1910b3cfd131f58bab8efbd11a42053bc3)
2013-08-01 11:26:55 -04:00
Tim Abbott 7b44451c3a Remove old code for backing up sqlite version of trac database.
(imported from commit 2b5c461a8426e9b93ce46f48ce14dbef1b099ae2)
2013-07-31 16:54:09 -04:00
Zev Benjamin e8112ff1c1 test-js-with-node: Fix searching for node binary
Previously, when the first `which` failed, the entire script would
fail with exist status 1 because we pass `-e` to the interpreter.

(imported from commit 601de3b3e3edd90110fc478f7874e644009d1b62)
2013-07-30 17:58:06 -04:00
Zev Benjamin b950121fc2 Account for nodejs sometimes being installed as 'node' and sometimes as 'nodejs'
(imported from commit 751216c9544671106dd555823e31ad9d4553a7aa)
2013-07-30 17:29:47 -04:00
Steve Howell d82ccb6243 rename tests
(imported from commit cd98a86a5e07765f753ac1904e45ccd1213d6d67)
2013-07-30 09:05:49 -04:00
Steve Howell 998a22eabb Created test_search.js. (unit tests for search.js)
(imported from commit 8127c04ccc68a9ac106e5684a7ea9a621cb1831f)
2013-07-30 08:55:44 -04:00
Steve Howell 032415fcb4 Move bot avatar code to avatar.js (from settings.js).
This step of the refactoring really just moves the code.

(imported from commit 4d551c43d25723b2556448f47b6b61228e782f54)
2013-07-30 08:40:49 -04:00
Steve Howell 46c4a6a9b3 Add unit test coverage to unread.js.
This covers most of the module's functionality, with special
emphasis on lines that use underscore.js (_.each and _.filter).

(imported from commit 074181a0273286a258504be634bdd1cead2eecd5)
2013-07-29 13:47:57 -04:00
Steve Howell 09bd52fff4 [third] Add underscore.js
(imported from commit ee17cc1d1dff2a6f816a81bb33fa04ca5562a441)
2013-07-29 13:47:56 -04:00
Tim Abbott 3bba0cc927 Move zephyr/static to just static.
It's not really a part of the server (aka the rest of zephyr/).

(imported from commit 27f6b6b064938ad927075a68d873e4b68710d279)
2013-07-29 12:11:26 -04:00
Luke Faraone a78718e299 Back up MediaWiki by dumping to an XML file and committing the result
(imported from commit 1f5d6b114e6dcf6940a56d9501ef41c15a772dd0)
2013-07-26 16:14:55 -04:00
Steve Howell 958955da23 Run node-based JS unit tests from test-all
(imported from commit 5bf9b690dfd3ac83296a58cf44a170960adaed39)
2013-07-26 14:52:33 -04:00
Steve Howell f258ce2127 Created test_message_tour.js.
I haven't hooked this into test-all yet, but I did modify
message_tour.js to accomodate the test.

(imported from commit e58f595f4fe1160f539c18ec09dbe22eebf1f104)
2013-07-26 14:52:32 -04:00
Steve Howell 625003cbe1 Nudge pointer past visited msgs when coming home.
When you return to Home, we normally restore your last
position when in Home, which might have been before the
first unread message.  This is cumbersome for sidebar readers,
so now we keep track of messages that you visit while on a
tour away from Home, and when you return Home, we skip forward
any messages that were in the tour, landing on the last visited
message.  This all happens before rendering.

(imported from commit 9124a231d94f153e283e5ea95e40c50a58406275)
2013-07-26 14:03:55 -04:00
Tim Abbott 3fcd6eb9e6 Update humbughq.com => zulip.net in tools.
This shouldn't be pushed until we get graphite.zulip.net working.

(imported from commit c0dd208222385a9ee92ad1ca8fbf141894f7c7b6)
2013-07-25 17:27:45 -04:00