Commit Graph

478 Commits

Author SHA1 Message Date
Steve Howell 35ac129496 Remove unnecessary code in check-all.js.
(imported from commit 3b35f8f951692955402524100efc49cc1bffef69)
2013-05-29 17:52:14 -04:00
Tim Abbott 1960c8e8f1 Show data for every day we have, for now.
(imported from commit d1f26176c1efaf8ba5fa1a74bcd53d38627757d5)
2013-05-29 15:39:53 -04:00
Leo Franchi 444bec285b Add a rough tool to get day over day and week over week activity metrics
(imported from commit fd6e6771fd29a31d553620c0f29ed663e2d680aa)
2013-05-29 15:39:53 -04:00
Zev Benjamin ad2e59b506 update-deployment: Log the fact that we're about to clone the repo
(imported from commit 5dd09ed84c9aec228c700dfff651aea0e74a4a5b)
2013-05-29 15:29:52 -04:00
Tim Abbott 7927edb374 Ensure your dev environment API key matches your ~/.humbugrc.
(imported from commit d4d0699ce912685ede445ed677c46dfeefa68b42)
2013-05-29 15:11:24 -04:00
Zev Benjamin 4cd9abdf10 Fix post-receive to work with new update-deployment
update-deployment now expects the ref name to already be relative to
origin

(imported from commit 0a1792119dd2565c2413acbca25e0fe370f09bf8)
2013-05-29 13:53:41 -04:00
acrefoot c58ac9cc0c Re-focus on the compose box after a send
Re-focuses on the compose box after a send, but only if
the compose-box was opened by responding to the message
at the cursor (by hitting "r", enter, or clicking on the message)

(imported from commit 8e7560c8ea31397b57b2bc3e2e7d9dd996226a6f)
2013-05-29 13:07:45 -04:00
Zev Benjamin 6824c94b7e [manual] Remove dependence on /home/humbug/humbug git checkout on app frontends
Modified files need to be copied into the right place.  The checkout
on git.humbughq.com also needs to be updated.

(imported from commit dbe9e05a0512e1f59c7819dd8d44c2c4e9c83bcf)
2013-05-29 12:00:03 -04:00
Zev Benjamin de3b7253c2 update-deployment: Do a fresh git checkout instead of a copy
(imported from commit 13de8b0daf7725b8aa6ea46a7ee26649ceb4c0b0)
2013-05-29 12:00:03 -04:00
Zev Benjamin cce8dfab84 [manual] Use the same socket across server restarts
We let supervisor create the socket for us by making humbug-django a
fcig-program.  Unfortunately, supevisor doesn't support putting
fcgi-programs in groups (see
https://github.com/Supervisor/supervisor/issues/148), so we have to
restart tornado and django separately.

To deploy, copy the config files over and restart nginx and
supervisor (via stopping and then starting it because restart is
broken).  I believe the automated restart as part of
update-deployment will fail because of the way supervisor treats
programs in groups.  If so, after restarting supervisor, you will
also need to run restart-server manually to fill the caches and then
delete the lock directory in humbug-deployments.

(imported from commit bfb5db7dd42dcbc4bfefa2944355b3cbb2ef9104)
2013-05-23 00:19:17 -04:00
Tim Abbott 00a6cc902e postgres-init-db: Auto-detect whether we need to use sudo.
(imported from commit 4b01672835139c57486811e51399c3f03bc4182b)
2013-05-22 14:58:43 -04:00
Zev Benjamin a4bda36ab4 Add a wrapper to mixpanel so that we can selectively enable metrics collection
(imported from commit 1d72f2e98c4c756a8a988d08731282e4195b8e1a)
2013-05-21 17:56:49 -04:00
Zev Benjamin 8fd72a09bc Restart Django and Tornado separately from the other worker processes
The amount of process downtime during a supervisord-mediated restart
appears to be linear in the number of processes that are being
restarted.  Therefore, restarting just Django and Tornado causes less
downtime than doing them at the same time as the other worker
processes.

(imported from commit 1fa9ef547bcd88caeec49800664e37d5f2fcb7a8)
2013-05-21 16:13:39 -04:00
acrefoot 94c61f5507 [manual] Humbug testing databases now backed by postgres
Currently our test database is backed by sqlite; this commit moves
us to using postgres for our all database needs. This, in conjunction
with the patched django on github, allow us to have fewer hacks and
more true-to-life tests. It also sets the stage for testing the bulk_create
and schema search_path patches made to django.

Developers will need to run:
./tools/postgres-init-test-db
./tools/do-destroy-rebuild-test-database

this is assuming that they have already run:
./tools/postgres-init-db
./tools/do-destroy-rebuild-database

at some point on this pg_cluster. (The ordering is important; it will other-
wise complain about the south_migration table).

(imported from commit c56c6f27e13df7ae10b2e643e65d669dde61af3d)
2013-05-20 23:55:03 -04:00
acrefoot 9d8f847fed [manual] Run server using supervisord
This change will make it so that processes related to the app.humbughq.com
server are run under supervisord, which uses a state machine model to ensure
that programs are running. It also ensure process startup order.

We will need to manually switch the old way of running server (in screen) into
this new way of doing things, on both staging and prod (app_frontend.pp has been
updated appropriately). This means:
1) cp servers/puppet/modules/humbug/files/supervisord/conf.d/humbug.conf /etc/supervisord/conf.d
2) installing the supervisor package.
3) killing those while loops in that screen session
4) mkdir /var/log/humbug (as root)
5) /etc/init.d/supervisord start
6) check that nothing broke

(imported from commit 055269a70973db89acd69049e01b185fabdc8f90)
2013-05-20 23:42:28 -04:00
Steve Howell 62d6360a48 Extracted model code out to unread.js.
Most of the model logic pertaining to unread counts had been in
zephyr.js, along with a couple global variables.  Now the code
is encapsulated in unread.js.  It was a pretty straightforward
extraction with some minor method name changes.  Also, a small
bit of the logic had also been in stream_list.js.

Conflicts:
	tools/jslint/check-all.js

(imported from commit f0abdd48f26ab20c5beaef203479eb5a70dacfff)
2013-05-20 23:42:11 -04:00
Tim Abbott 2bdecd130a Add user interface frontend for editing messages.
The only known outstanding bug with this is that it doesn't properly
handle the updating of a message's highlighting/presence in a narrowed
view (e.g. in theory, a message should disappear if it is edited such
that its subject doesn't match your narrow or it no longer matches
your search).  I think I'll just open a trac ticket about that once
this is merged, since it's a little hairy to deal with and kinda a
marginal use case.

Also it's not pretty, but that should be easy to tweak once we get the
framework merged.

Conflicts:
	tools/jslint/check-all.js

(imported from commit 2d0e3a440bcd885546bd8e28aff97bf379649950)
2013-05-20 23:40:57 -04:00
Leo Franchi a6486a1fa0 Add a tab bar at the top of the Message list to aid navigation
The intent is that this will also make it easier to tell when you are narrowed.

(imported from commit 5e37721fbad304d30fc725aacf2cc9e6560e9da2)
2013-05-20 23:37:57 -04:00
Tim Abbott fe987fb1c3 [manual] Excise South migrations prior to the User merge.
South doesn't properly deal with removing the Django User model, so
this commit redoes our South history to instead start after that
migration has already been applied.  This allows us to get rid of some
annoying hacks.

Note that developers and staging will need to run

./manage.py migrate --delete-ghost-migrations zephyr

in order to clear out the old versions of the migrations.

(imported from commit 7f45ea601b809dde33720f76e7dfb0ab348b0e65)
2013-05-20 23:29:54 -04:00
Zev Benjamin 4bfda4c49e update-deployment: Purge old deployments after deploy
(imported from commit 9a320617e22a1d71506fbb76443a00c178ae5367)
2013-05-17 01:02:34 -04:00
Zev Benjamin 30d417a692 Add tool to purge old deployments
(imported from commit d214e1a843ea5e5902b14551730d004ff04e903d)
2013-05-17 01:02:34 -04:00
Zev Benjamin 4cdecdea21 update-deployment: Move constants to humbug_tools
(imported from commit d3699d684b74b15a10f0a464f58623a376f7d486)
2013-05-17 01:02:34 -04:00
Zev Benjamin 6b3b418010 update-deployment: Make the deployment directory a constant
(imported from commit fcbd5f3e98881f33c5b50b28a90b4627593abe83)
2013-05-17 01:02:34 -04:00
Zev Benjamin 578eead441 update-deployment: Create the logs directory in addition to the humbug-deployments directory
The logs directory needs to be there the first time we start a frontend.

(imported from commit c37825f5bd41cbfa3ac22f61d05552e3d4f3ccbb)
2013-05-17 01:02:34 -04:00
Zev Benjamin e4e9613a59 Add a deployment lock to prevent concurrent deployments
The lock file is a directory in case we want to add future metadata
information.

(imported from commit 505a684870baff94f28bf689b0c5ca2e8265a3c0)
2013-05-17 01:02:34 -04:00
Steve Howell f024a7ab14 Call process_loaded_for_unread() more directly.
This is a prefactoring to eventually eliminate the home_unread_messages
global variable.  More commits to follow.

In order to set up process_loaded_for_unread() not to modify
global variable to get its job done, we want to pull it out of
add_messages(), so that add_messages() doesn't have to pass back
state to the 9 different places in the codebase where it's called.
There are only 2 places where process_loaded_for_unread() get
called after this commit.

In order to facilitate pulling up process_loaded_for_unread(), I
made it so that the contract for add_messages() was to accept
already-hydrated messages.  This way I could hydrate the messages
before calling process_loaded_for_unread() without have to
worry about double-caching them in add_messages.  This will
slightly improve performance, but it was mostly done for code
clarity.

(imported from commit ad5aaad5b1f22c31647370f4c9dcb5f89d7d99a7)
2013-05-14 15:21:27 -04:00
Jessica McKellar 76a57e78ed Enumerate onboarding steps client-side, and give a way to update them.
(imported from commit 0a993976e898cdb20ebb814a19d520572ef8b7e6)
2013-05-14 10:27:39 -04:00
Zev Benjamin 028d3adabf [manual] Lower the max number of child processes that runfcgi can spawn
The default is 50, which we believe was causing too much CPU
contention in prod during restarts.  This commit lowers the max to 20.

The django-command-line script needs to be restarted manually to pick
up this change.

(imported from commit c2d097d2141be50b6222efb4a34142108c241cce)
2013-05-10 17:39:49 -04:00
Leo Franchi 77fd5f1113 Also kill/restart send_missedmessage_reminders on a deploy
(imported from commit 560f6aabb0daec63d55806f8caab76d3fb7d260a)
2013-05-10 09:41:49 -04:00
Leo Franchi 1267ffe542 Show unread counts next to expanded subject names
(imported from commit 6de1145cdec8d7e68395c1f9a7a95cd59136d805)
2013-05-09 10:41:32 -04:00
Leo Franchi b9a39d7982 Make missed message keepalive executable
(imported from commit 66f96b2bd75ae84bc4aec7073542b11611990dee)
2013-05-09 10:35:48 -04:00
Leo Franchi 065e6de420 Add management command to handle & email notifications about missed messages
(imported from commit 5b1479bc91d559e96467aa09405d823f9b2bbdf6)
2013-05-09 10:35:48 -04:00
Tim Abbott 85742823d9 zephyr_mirror: Use json if simplejson is not available.
(imported from commit 4b5f6ff71067cd2697c864c715afbb3b9dd19302)
2013-05-09 10:35:47 -04:00
Zev Benjamin 7becd3e504 Move stream sidebar functions to their own module
(imported from commit 50771c1590eb3a0dbb151bf6a798bd14a4418857)
2013-05-09 10:35:46 -04:00
Zev Benjamin 96129b1cf0 Speed up string comparison for sorting
The String.localeCompare function is really slow, at least partially
because it creates a locale-aware collator object each time.  So now,
when we can, we create and cache a locale-aware collator object.
However, this is not supported on most browsers, so we fall back to a
non-locale-aware comparison.  This is not ideal, but for now we are
mostly working with English-speaking customers.

(imported from commit 51aa02e3b9fe4a0ef0cb084874fe26e91c57f65e)
2013-05-07 11:47:12 -04:00
Luke Faraone d7dba4ca3c Add audio folder to update-prod-static.
(imported from commit 08316159d8a9dd39b92402231dfa3b7c605a1485)
2013-05-03 15:22:54 -07:00
Leo Franchi 9362731e4d Mark messages behind pointer as read when moving pointer
(imported from commit 7e1d3d7124aec239a8fdd24da4aab682a41ff435)
2013-05-03 11:14:47 -04:00
Leo Franchi d0b8a2fd21 Mark messages as read when using the End key
(imported from commit b2495cb27b1362d037e786db7f108540f2ce655b)
2013-05-01 17:26:19 -04:00
Leo Franchi 7b0423efc1 Use incr instead of gauge when sending events to drawAsInfinite to statsd
(imported from commit 08a4b6920c7a4a8f472f147ddce7c04710fe5c0a)
2013-04-19 09:56:41 -04:00
Leo Franchi d02f46fba7 Log a statsd event when restarting the server
(imported from commit e9fa632a39f0a6b6aa7311e80e68faf4178a2cf3)
2013-04-18 18:05:52 -04:00
Tim Abbott 3fa32c8f7d Decrease restart timeouts for django and tornado command lines.
(imported from commit 5653de5e4e39f6ecfade794738d334a360bf2a7e)
2013-04-18 17:15:29 -04:00
Luke Faraone 80e452af82 Include get_messages call in tarball.
(imported from commit ed030c97ba3c34a72eb7ced867c20d1a7c315159)
2013-04-18 09:57:53 -07:00
Tim Abbott a54e8fee1c Add tool used for backing up wiki, trac, events.
This is a slightly tweaked version of the tool Keegan was using for
these backups.

(imported from commit c9fb7f0585c219703130fe1431ea40ca7320408e)
2013-04-17 10:19:13 -04:00
Tim Abbott 6ab480d9c6 restart-server: Call fill_memcached_caches via more direct path.
The previous version ended up being (at least sometimes) wrong after
the recent deployment system changes.

(imported from commit dec3beb1b1bf8b9c9ad6820b93b0a5d730d020e8)
2013-04-17 10:19:13 -04:00
Tim Abbott 104d3c8101 Make tools/send_confirmation_emails_command_line executable.
(imported from commit 3923efcbddaca705a64fb4359adc408c7f948ad4)
2013-04-12 15:37:49 -04:00
Tim Abbott 3ef78dd01c Fix restarting of commands with new deployment loops.
(imported from commit 139d80097d74b1c7f4ec92175a2052b4acf55af1)
2013-04-12 15:35:49 -04:00
Tim Abbott 1b3d93ad47 Fix restarting of various tools during deployments.
(imported from commit b16b8b3d7ce159a91e7d9c3781f1e69861bd3ff3)
2013-04-12 15:35:49 -04:00
Tim Abbott 28c77382d1 Update foo-command-line scripts for new deployment model.
(imported from commit 62a1fc9a5d90966d33afe31bdd5f4b80f6754fad)
2013-04-12 15:03:11 -04:00
Tim Abbott 1b8cf16988 [manual] Update deployment process to run atomically.
This requires manual steps on deploy to each of staging and prod:
(1) Run the new update-deployment code to setup the initial deployment directory.
(2) Restart all the programs running in screen sessions.
(3) Deploy the nginx changes and restart nginx.

(imported from commit 1ffe27933ee79274dc0a93d35c9938712de0ef36)
2013-04-12 11:54:50 -04:00
Tim Abbott 88e2949818 Move update-prod-static etc. out of restart-server.
(imported from commit 763af1c8b1937cda860acc635d9d87c12d66a938)
2013-04-12 11:54:49 -04:00
Leo Franchi 9130f6722f Show latest 5 subjects in sidebar when narrowed to a stream
This is a V1 of this feature. For now, the only way to expand is by narrowing
to the stream---future revisions may add a manual toggle if it is found to be
useful.

Additionally, showing per-subject unread counts will be coming in a future revision
as well.

(imported from commit fb5df0d27e928fa3b0f32b9ff2c1c508202cf7e5)
2013-04-12 11:51:09 -04:00
Keegan McAllister d6aafa260f JSLint: Allow typeof x === 'undefined' for testing if a variable exists
(imported from commit c6429911f65f05ba7ec11c43950d338cfc97b793)
2013-04-10 18:05:00 -04:00
Keegan McAllister 07bb220194 Add a password strength check on the signup page
(imported from commit a44101485e49fd7a7951bda05ba10a021b6d3ee0)
2013-04-10 18:05:00 -04:00
Luke Faraone 2fd4525531 Add process-mailchimp-signups-command-line so we can fire and forget this daemon.
(imported from commit 7a966199da51ec22ae62386d6382ebf05d151f31)
2013-04-05 10:22:27 -07:00
Tim Abbott c65f37c910 do-destroy-rebuild-database: Fix migration with AUTH_USER_MODEL.
Django's South migrations support for setting up a new database
doesn't properly handle AUTH_USER_MODEL changing over time.  Fix this
by having the initial migration be run with AUTH_USER_MODEL set to the
default value.

(imported from commit c373db9edc61f26527c486c741f8e870614600e3)
2013-04-04 17:39:01 -04:00
Tim Abbott a1aae4a39f [South] [schema] Add an index on Userprofile.email.
We accidentally lost this when we did the User/UserProfile merge (this
commit also deletes the old code to add the auth_user index in
do-destroy-rebuild-database).

This below is mostly just notes for future reference, but when
deploying this change to staging, we should consider running the
following instead of using the migration directly:

CREATE UNIQUE INDEX CONCURRENTLY zephyr_userprofile_email_uniq ON zephyr_userprofile(email);
ALTER TABLE zephyr_userprofile ADD CONSTRAINT zephyr_userprofile_email_uniq UNIQUE USING INDEX zephyr_userprofile_email_uniq;
CREATE INDEX CONCURRENTLY zephyr_userprofile_email ON zephyr_userprofile(email);

But I think it might be the case that it's fine to just run it
directly, since the ALTER TABLE part seems to hang if there's an open
transaction working on a UserProfile object anyway.

(imported from commit 1bf34ce242de51e97c91c8bab86b6b273e17fb43)
2013-04-04 15:45:42 -04:00
Zev Benjamin de1f4b0be2 Remove all inline event handlers
This allows blueslip to catch exceptions from the event handlers on
these elements in addition to the other benefits that not using
inline handlers provide.

(imported from commit 2bdcb2496c6c08fa7228a20ce6164b527cf64e41)
2013-04-04 11:34:32 -04:00
Tim Abbott 39e79271e2 test-all: Run frontend tests after backend tests.
When the backend is failing, the frontend often fails in much less
clear ways (e.g. timing out), so it's generally more useful to run the
backend tests first.

(imported from commit 36ac862ad1dbb21e32c0f44ba135c3c29bbea2f5)
2013-04-02 16:27:13 -04:00
Tim Abbott a095666770 test-backend: Don't pass --skip-generate to testing system by default.
It doesn't save much time (maybe 0.5s out of 12+s).

I'm leaving the option in because I think it is still useful for
iteratively testing a single test case.

(imported from commit a0ac43f4c48eec101f05d731740394b30a15773b)
2013-04-02 16:27:12 -04:00
Keegan McAllister 9dd987be7e Precompile Handlebars templates in production
Fixes #908.

(imported from commit 30458e9bea8117d1fa15dc962bb1a495f22672cc)
2013-04-02 14:43:59 -04:00
Keegan McAllister 17d5406b55 [manual] Fetch Handlebars templates using Ajax
...rather than embedding them into index.html.

This is only acceptable for dev, but the next commit adds an alternative
mechanism for prod.

There isn't actually a manual deployment step here.  However, this commit won't
work on staging / prod without the next one (since we don't serve
zephyr/static/templates in prod).

(imported from commit dce7ddfe89e07afc3a96699bb972fd124335aa05)
2013-04-02 14:43:58 -04:00
Keegan McAllister c375de29ad check-all: Ignore node_modules
Which we add in the next commit.

(imported from commit 8b55ec7ac5a62657d9ff28bee39c43d01158f982)
2013-04-02 14:43:58 -04:00
Jessica McKellar 3df47f2025 Do not try to recenter if you were already moving in the right direction.
Before this commit, if you try to arrow around when the selected
message is outside the pointer threshold for recentering, you get a
big jump, even if you are arrowing towards the center of the viewport.

(imported from commit 5c15d5ccccdf027a8bfa8b79bf519fccbfa971d8)
2013-03-28 17:08:25 -04:00
Zev Benjamin 401fa6063e [manual] Add get_events URL routing
The new nginx configuration file needs to be copied to
/etc/nginx/humbug-include and nginx needs to be restarted when this
commit is deployed.

(imported from commit 6c43f3c2c7a6acee6a852c672c96a38bda01dd0d)
2013-03-28 16:48:52 -04:00
Luke Faraone 3738d8215d Update run-dev to prefix match messages/latest.
This means all GET parameters were chopped off previously in local testing.

Nginx does pattern matching so this is not a problem on staging.

(imported from commit 25a28155b70d168228ca793fc0122b2ebea408e9)
2013-03-28 12:53:42 -07:00
Keegan McAllister aa3c446665 Generate source maps from Closure Compiler
(imported from commit 0e4de860b1dba85aa43b60a2c819ac44403186c5)
2013-03-28 12:11:23 -04:00
Luke Faraone 0d51e59fd5 Implement URLs for API redesign.
(imported from commit 2020491a737ec4c1e99a63f84eb6cfc594a2dd56)
2013-03-28 07:57:38 -07:00
Zev Benjamin 878646542f deploy-branch: Check out original ref by name if possible
(imported from commit eefc68574f1d1a94f1284670df18f59ef2aa1aa5)
2013-03-27 14:15:03 -04:00
Leo Franchi dbb2157457 Make home view unread count only count messages newer than the pointer
(imported from commit 0f699ed23f59380b04606bd30600373956f89ae4)
2013-03-26 18:34:16 -04:00
Jessica McKellar eaa2cc702e Autoscroll when you are at the bottom of your message feed.
(imported from commit 7ca92b13c874346f846aea8200a638a7914fe7d6)
2013-03-26 14:05:45 -04:00
Keegan McAllister 6d9aca5f1a Move "page parameters" (email, enter_sends, etc) into a single object
(imported from commit 842b2371bf6364982f1358f1cd2d91118c7fb2bf)
2013-03-26 13:50:03 -04:00
Keegan McAllister a5979f9e6a check-all: Restore failure on pyflakes fatal errors
(imported from commit 28db869c2b184d466e07373cb7ac8b11630780d0)
2013-03-26 13:50:03 -04:00
Keegan McAllister ae45217671 run-dev: Clean repo first
Makes sense because test-all has the same behavior.

(imported from commit 4c4e5ed539bf36fbb5f298abc40f4718dd9a93f1)
2013-03-26 13:50:03 -04:00
Leo Franchi 59228f7458 Run clean-repo before tests in test-all
(imported from commit 49bd072f6f60a742ea9fb7f55c479b8eb8ceb8aa)
2013-03-22 16:22:49 -04:00
Leo Franchi 6263c9ba1e Unify calculation of unread-count for notifications and use it in the title bar
Fixes trac #1004

(imported from commit 6f04d1d3ded198b46cc2ff1733b94b5c17beb581)
2013-03-20 10:09:40 -04:00
Keegan McAllister e8aec9d009 post-receive: Don't actually update servers on push to test-post-receive
Fixes #924.

(imported from commit 85789b39ef2665901c8a7c9560ef072d80d5e24d)
2013-03-18 17:21:13 -04:00
Leo Franchi 79dfe57840 Mark all messages between start of scroll and end of scroll as read
If the user scrolls super fast, our scroll handler might not catch
the user  passing by some messages.

(imported from commit 14cebffcd1321f02443971ac5e1c922db19648ab)
2013-03-15 10:43:17 -04:00
Tim Abbott c0d65124f8 restart-server: Add some output on what's happening as we go.
restart-server has been relatively slow recently, and it'd be nice to
know what it is spending its time doing when it hangs for a few
seconds.

(imported from commit a411c951f5a3f2a1366b6d5d3a40d0660ebec11b)
2013-03-14 15:07:42 -04:00
Tim Abbott 60c3cf826d restart-server: Fill memcached caches after clearing the cache.
Our previous code could in theory end up clearing the caches it had
just filled, if Tornado's cache filling work happened to be faster
than the memcached flush.

(imported from commit 48174aadad398fb7a7c917a1df765c1261b12a55)
2013-03-14 15:07:41 -04:00
Leo Franchi 7510f87eac Select first unread when narrowing by clicking on stream in sidebar
(imported from commit 557751f44e3fee61b6a55f8f8328e2f97e6adc04)
2013-03-14 15:01:13 -04:00
Leo Franchi ff42774551 Refactor unread client handling to use 'read' flags per message
(imported from commit ca48745396e7fbac456e5eb2e7dbe4adc62b3492)
2013-03-13 14:14:45 -04:00
Leo Franchi 0df3d5f2aa Give create db permissions to humbug postgres user
(imported from commit 85775d1885efcd8790593e6841ce9d56f027eea7)
2013-03-12 12:51:12 -04:00
Waseem Daher 33dc3a2fb7 Properly start tutorial on first run, even if you have new messages.
We were previously having an issue where the tutorial could
be pre-empted if you got a few messages while you were first
logging in.

I have some reservations about this being slightly fragile, and a
better approach might be to just have a bit that we use to determine
whether or not you've already seen a tutorial. (Or potentially that
checks whether or not you've ever sent a message.)

(imported from commit f8858f64a36bcd25887b76314caff283929f340c)
2013-03-12 09:56:57 -04:00
Zev Benjamin dc0913077a Add a new frontend error-reporting system
The new system, called blueslip, makes errors fatal when in debug
mode and only output a message when running in production.  In the
future, it could also send user errors back to us automatically.

(imported from commit 1232607c0311e885c8b5a5e8a45ffb28822426e0)
2013-03-11 13:22:12 -04:00
Tim Abbott d679a72952 [manual] Cache results of the Twitter API in the database.
This should substantially improve the repeat-rendering time for pages
with large numbers of tweets since we don't need to go all the way to
twitter.com, which can take like a second, to render tweets properly.

To deploy this commit properly, one needs to run

./manage.py createcachetable third_party_api_results

(imported from commit 01b528e61f9dde2ee718bdec0490088907b6017e)
2013-03-11 13:15:55 -04:00
Zev Benjamin d05ac105fe Move clear_table into MessageList
(imported from commit 138c3103920413580f86fede115843ecfddc0691)
2013-03-05 12:48:32 -05:00
Zev Benjamin f6ba728a24 Move message rendering into the MessageList
(imported from commit c1e16b1d2fafe5c079991e7ae96a013e25bc8618)
2013-03-05 12:48:32 -05:00
Zev Benjamin 95309539bc Move same_{stream_and_subject,recipient,sender} into the util module
(imported from commit 0d79bc3ae29be16eba59acea8bc5fda2aba1d4de)
2013-03-05 12:45:12 -05:00
Tim Abbott 91fb10e7dc restart-server: Move memcached flush to after server code restart.
(imported from commit 12123beac108db54e7e8a0c62b65762920997f7e)
2013-03-04 11:30:00 -05:00
Leo Franchi 7374fe53f1 Only show the "More messages below" if unread messages are in the home view
(imported from commit 6b1ded10519305bca935b093a74b59d7ab814c55)
2013-03-01 14:35:39 -05:00
Luke Faraone 2f6bc7ca1b Use dbshell instead of direct psql invocations
(imported from commit 6dd28dc353c0d79626c2853961bcb6873929e274)
2013-02-28 15:46:33 -05:00
Luke Faraone 903fbbe38e Script to automate creating a database for Humbug.
(imported from commit d44cd5ca1ab3383a8c262ed287f075cf21e3b129)
2013-02-28 15:40:21 -05:00
Jeff Arnold fcd033e33e [schema] Save enter_sends on the server in the database.
(imported from commit 4d82f6aaf5918f155a930253c9cc334dbcc0d97a)
2013-02-27 17:25:29 -05:00
Leo Franchi 19d107e42b Add a home_msg_list that contains all messages shown in the home view
By splitting up all_msg_list and home_msg_list, we can properly add/remove
streams from the home view without having to jump through hoops.

(imported from commit 92767197759f7519197dfc58be951b60fa823fbb)
2013-02-26 14:13:35 -05:00
Keegan McAllister 293be02d53 Don't clear prod-static/collected
Hopefully fixes the race condition where we get 500s during a deploy.

(imported from commit 2df471220a98e8902ab43e8c846a320c24c7fd25)
2013-02-25 17:55:50 -05:00
Keegan McAllister 49e16b0ba6 Add portico and misc CSS and JS to Pipeline
Fixes #963.

(imported from commit 63ec313a41fd13350657c78356efc16422a5fff1)
2013-02-25 16:18:35 -05:00
Keegan McAllister d31eab9325 Include hash in minified filenames to avoid browsers using stale files
Fixes #853.

(imported from commit f85ebe52df754f488a29c2ad814d582b78aadd14)
2013-02-25 16:18:35 -05:00
Tim Abbott c657be9fbc do-destroy-rebuild-database: Update for South.
(imported from commit f3e5d62aa2be0fd907a24fb9b4a5be6438e76c8d)
2013-02-22 17:52:39 -05:00
Keegan McAllister 56d183ea06 Remove lurk mode from web client and API examples
See #796.

(imported from commit e238ce571c3f30d8312b630df7048ad1d9cad6d2)
2013-02-21 15:11:10 -05:00
Zev Benjamin 4c9e3a167e Move message selection to an event-based system
Messages are now selected on a MessageList, which triggers a
message_selected event that other parts of the code can listen for.

(imported from commit 1da9e4121425c0ac4461b41b7aea169072e1512b)
2013-02-21 13:29:17 -05:00
Zev Benjamin ed51bd0432 Select messages on the MessageList instead of calling a global function
(imported from commit 0ea1c2695cda5ec415c42a450103e768cf2ff5db)
2013-02-21 13:29:17 -05:00
Zev Benjamin fc10556b84 Select a more correct message when narrowing by clicking on message's stream or subject
Previously we would select the first message in the block.  Now, we
only do that if a message that is selected will not be in the
resulting narrowed view.  If the selected message will be in the
narrowed view, we select that message once narrowed.

(imported from commit 4da5a3a0b597b58c2e028f1b29ac20ae3808a4d1)
2013-02-21 13:29:17 -05:00
Zev Benjamin e9b915c2b9 Remove global selected_message_id and persistent_message_id variables
Each message list now has a selected message id.

(imported from commit 041abc54ea42c636c30e39df4a2e838bb830e1aa)
2013-02-21 13:29:17 -05:00
Zev Benjamin 97160d79d4 Use the new MessageList for storing messages
(imported from commit 38a04d2ff504aa49189997b972318af7c944d528)
2013-02-21 13:28:23 -05:00
Zev Benjamin 814e3d6385 Implement a message list structure for storing messages and related information
(imported from commit 171de93636a215d9357c7fc4ee8fb71696d23fb5)
2013-02-21 13:27:45 -05:00
Waseem Daher b51dc36667 Add a tutorial.js file.
(imported from commit 58b72d08c0cd7815c3c54bd37c4a8033f32cc7ad)
2013-02-20 23:04:49 +00:00
Keegan McAllister 2d3212f3a4 check-all.js: Compact list of globals
(imported from commit c6d67517feaa5f33fa0a25e836ab0fe6ab8edc01)
2013-02-20 16:02:31 -05:00
Keegan McAllister c39e51cc30 Rewrite check-all with various enhancements
- Find Python and JavaScript files the same way, by looking at
  everything in Git with specific exceptions

- Check the non-browser JavaScript, with appropriate JSLint options

Fixes #19 and #387.

(imported from commit 042bd6c26aa7a7ea2209935320ef4da12344b02b)
2013-02-20 16:02:31 -05:00
Keegan McAllister 02ce209b5e Add a generic script to run the right Node binary
(imported from commit cf187323786cf1ee576ec70b6f7db4cbf61d6911)
2013-02-20 16:02:30 -05:00
Keegan McAllister 5f33298bf4 [manual] tools: Move check_output into a shared file
We leave the stuff under api/ alone for now, since we need to be able to ship
it as a standalone thing.

tools/post-receive wasn't using the function anyway.

For push to master: Push this commit, update post-receive per instructions at
the top of that file, then push the rest of the branch to confirm that the hook
still works.

No manual instructions for prod.

(imported from commit 9bcbe14c08d15eda47d82f0b702bad33e217a074)
2013-02-20 16:02:30 -05:00
Keegan McAllister 75704ad1e8 Consistently use #!/usr/bin/env python
At Ksplice we used /usr/bin/python because we shipped dependencies as Debian /
Red Hat packages, which would be installed against the system Python.  We were
also very careful to use only Python 2.3 features so that even old system
Python would still work.

None of that is true at Humbug.  We expect users to install dependencies
themselves, so it's more likely that the Python in $PATH is correct.  On OS X
in particular, it's common to have five broken Python installs and there's no
expectation that /usr/bin/python is the right one.

The files which aren't marked executable are not interesting to run as scripts,
so we just remove the line there.  (In general it's common to have libraries
that can also be executed, to run test cases or whatever, but that's not the
case here.)

(imported from commit 437d4aee2c6e66601ad3334eefd50749cce2eca6)
2013-02-20 16:02:30 -05:00
Leo Franchi 8162d46d5c Mark as unread messages loaded in a narrow view older than pointer
(imported from commit 37362d1fbb4932f064753a5d3d335d9b2bec2964)
2013-02-20 14:05:49 -05:00
Tim Abbott cdedb85934 Fix post-receive hook arguments issues and document the setup.
(imported from commit 0440cbc97337b8dd9f92bbbd428a069f79df400a)
2013-02-20 11:10:45 -05:00
Tim Abbott 3bc083ab0d post-receive: Remove unused imports.
(imported from commit 492b5a4a3a883022984d45d0d0934e7fe10a6f31)
2013-02-19 16:23:47 -05:00
Reid Barton 61350d65d1 Render recent dates as weekdays, part 2.
This commit does the actual work of formatting recent dates as weekday
names and updating the format when the date is sufficiently far in the
past.

Also, silence a bogus jslint warning.

(imported from commit 503286fbd9c1e33a81cc7d78cf8d08d5e7f78c1a)
2013-02-19 15:58:25 -05:00
Reid Barton 59dab21fcd Render recent dates as weekdays, part 1.
This commit just moves time rendering logic to its own file, and does
not make any functionality changes.

(imported from commit d111d03c6abc8d9550fcf65e4f89eab8056d1ed4)
2013-02-19 15:58:25 -05:00
Leo Franchi 5d79bb6a20 Add a 'show in home view' toggle to the stream settings
(imported from commit af8bcc4df6fcd9f6ffed4ccb1b9be5261ffe619d)
2013-02-19 15:43:27 -05:00
Keegan McAllister bb5f59d310 Use white text for recipient labels on streams set to dark colors
Fixes #577.

(imported from commit 0518e33b96bc0028fc80d533f6b8ec35fd5cdc04)
2013-02-19 15:33:35 -05:00
Reid Barton 37b5a84af4 Track total number of unread messages
(imported from commit 0a6f270b8a4debf0cbb7e869ecbff59f39f22049)
2013-02-19 13:43:34 -05:00
Tim Abbott 4caafd66ce Rewrite git hook for distribution and document it.
(imported from commit c3238bc5b5e29727cddb43bc55ab418326226acd)
2013-02-19 09:17:06 -05:00
Tim Abbott 8ee139f9be post-receive: Get rid of the sleep(1) before sending Humbugs.
This code is no longer needed now that we send the Humbug _before_
restarting the server.

(imported from commit c281ac7db55ad2801d2da43d4aca5583ad48de93)
2013-02-19 08:52:15 -05:00
Keegan McAllister e25d9a8492 Remove unused Notificon library
(imported from commit 8c0717b4e305d28f30b9088a974e99d510ab3021)
2013-02-15 16:19:58 -05:00
Jeff Arnold d0f422979b Change the favicon on notification (great for pinned tabs)
(imported from commit 025ad165d15b2e6d979c246776148f13ebc555fb)
2013-02-12 16:27:07 -05:00
Leo Franchi 83011f7f47 Show a user activity list in the sidebar
(imported from commit 95aaa55c7e4cc39f844518b5308866bedf2cd1c5)
2013-02-11 18:05:57 -05:00
Zev Benjamin da95bb2988 puppet: Move all puppetized config files to the humbug module and reference them with puppet URLs
(imported from commit f0f325bbad381b87c12c6f7888f4dd5d6989f09f)
2013-02-08 16:06:34 -05:00
Tim Abbott 2d9a21654b Fix messages being added to the home view out of order.
So here's the reproduction recipe:
(1) Find a narrow that doesn't have any messages since 4 days ago

(2) Directly visit that narrow in your browser (or wait for someone to
do a deploy and thus auto-reload)

(3) Wait until load_old_messages has been called at least once

(4) Un-narrow

(5) Scroll up, and notice that the 400 most recent messages are above
sets of older messages.

The cause is that the code in add_messages assumed that
selected_message_id was within the range of message already in the
home view.  This is true in most cases where add_message is being
called, but it is not true in the case that the user was in a narrowed
view containing only very old messages (And thus selected_message_id
would be older than everything in the home view).

We can fix this by tracking persistent_message_id separately and using
that for the relevant test in add_messages.

(imported from commit f0da2561ba68f729343b260adc398029fae6acf7)
2013-02-08 14:43:13 -05:00
Keegan McAllister 401f591ab7 [manual] post-receive: Remove handling of refs/heads/hunt
Deployment steps: See comment at the top of tools/post-receive.
Will do this when the commit hits master.

(imported from commit 8e096609fca618ed82bfbee43bae701daaf49261)
2013-02-08 13:33:28 -05:00
Keegan McAllister e4d6a6d3cd review: Send @username syntax rather than @username@humbughq.com
(imported from commit ab7d1120aba829fd629e705409b3677e6cb49dbd)
2013-02-05 15:51:22 -05:00
Jessica McKellar cea18d6561 Don't build non-send_message bindings.
(imported from commit 4e94989e3da7d87490e483d6d2ecc39a0824ced0)
2013-02-05 14:09:29 -05:00
Keegan McAllister a8ade10fde Restore streams-example.png for /new-user
This was removed in 63788aa3.  It was the only non-symlink in
zephyr/static-access-control/.

(imported from commit c9ee043b07c5fd4050aeaafa40394a6b69915bfb)
2013-02-05 12:07:41 -05:00
Keegan McAllister 637d4a74f2 [manual] *-command-line: Drop sh -e
This meant that (in some circumstances, anyway) the script would bail after the
inner process was killed by restart-server.

Manual deployment steps:

    After pushing, log into {staging,app} and restart these commands within
    the screen session.

(imported from commit 696bc8148fa9df4b536253d54c65b7c4cb908530)
2013-02-04 19:12:35 -05:00
Keegan McAllister b55c9fdd08 chmod +x tools/process-user-activity-command-line
(imported from commit 11888d81e6e9e74cb503effbe5efd07bd1c290ec)
2013-02-04 19:12:35 -05:00
Waseem Daher 17b1829775 Expose pygments.css to the portico code.
(imported from commit 2f8cffa17ce1efd26d9c0ed9ce02e6f352ea8617)
2013-02-04 17:58:12 -05:00
Jacob Hurwitz 61acc58947 Add a notifications bar when there are additional messages out of view
(imported from commit 38fa78f63fd520d0b1f09921ba064cba010a6f99)
2013-02-02 01:16:25 -05:00
Tim Abbott eb4930591d Send review requests to stream review.
(imported from commit 6e2e5ad2a4fadd2693341cb044c3e2152c787952)
2013-02-01 16:48:35 -05:00
Tim Abbott df5cef6a0d review: Use a more information Humbug message content.
(imported from commit 1c6ecce9920287b07527002421861dfe24817409)
2013-02-01 16:48:35 -05:00
Luke Faraone a18d6ff9c7 Update build-api-tarball to use setup.py.
This comes at the expense of only functioning on the current working tree.

(imported from commit a92dd47f0cc4d47858c2ea678d86ceb9458a6fe5)
2013-02-01 15:52:29 -05:00
Keegan McAllister 1622f53cb1 test-backend: Allow running a subset of tests
This now allows e.g.

    ./tools/test-backend zephyr.BugdownTest

or

    ./tools/test-backend zephyr.BugdownTest --verbosity=2

but unfortunately not

    ./tools/test-backend --verbosity=2 zephyr.BugdownTest

(imported from commit 95302db3efe45182d789c40c2a2899230a06b091)
2013-02-01 15:38:56 -05:00
Keegan McAllister 27b82c205f test-backend: Allow passing command arguments to manage.py test
This allows e.g.

    ./tools/test-backend --verbosity=2

(imported from commit 68979731e6d4ddba2bda62daa5f3206e633b54da)
2013-02-01 15:33:24 -05:00
Keegan McAllister 638b8d29bc Enable testing minified files in dev
(imported from commit 257b8547849a85c447319d3d211f2c989616ce64)
2013-01-31 15:41:01 -05:00
Keegan McAllister 6990260b59 [manual] Minify JavaScript and CSS in production
Manual deployment steps: The same Nginx reload as for "Get rid of the
static-access-control mechanism".  If deploying both commits at once,
just do it once.

(imported from commit dd8dbbf14b95fce0a4b6f66f462fa0a6b50bfb8c)
2013-01-31 15:41:01 -05:00
Tim Abbott 97aec279b3 Add deployment auto-restart for process_user_activity.
(imported from commit 7ff384629552e454a9b25577f17d06ac27ae5239)
2013-01-31 12:09:16 -05:00
Tim Abbott 9cc3e29de5 Split restart-server code out of update-deployment.
(imported from commit 3ae913b950be0a0c94fbaf0173012ea315f36d62)
2013-01-31 12:09:16 -05:00
Leo Franchi 54cfea9252 Use /usr/bin/env python in review script
(imported from commit a56c09e617ee89858fcac3d60deb549754d465f1)
2013-01-31 11:54:25 -05:00
Tim Abbott 46f956c57e review: Drop the line about advancing master.
(imported from commit 93a4f9b66a83efe69e7ee6638b6edc34b7f52d79)
2013-01-30 15:34:34 -05:00
Tim Abbott b81aa35c24 review: Fix exception running review on some detached HEADs.
(imported from commit 8f6e4a82ade10945cfac0104e4f8ff5d48379348)
2013-01-30 15:34:33 -05:00
Tim Abbott f701a38287 review: Automatically push personal local branches to the remote.
(imported from commit 29cf7d7316eb3666e2f8b39aacf3baa86990bace)
2013-01-30 15:34:33 -05:00
Tim Abbott 7a7fc54234 review: Get the current user's email via a function.
(imported from commit 082b035912395c56e89ace1622ef885562d13669)
2013-01-30 15:34:33 -05:00
Zev Benjamin ac4c13e349 Make munge_postgres_logs.pl executable
(imported from commit 95350474c7ef45bcfd20b41e1a93100e8b9a5ab6)
2013-01-29 12:16:32 -05:00
Zev Benjamin c2ca608b05 Add tool to convert our Postgres log lines into the format expected by pgFouine
(imported from commit 824c2b46c0296ae43464784767f8dbb7ffbd8acb)
2013-01-28 16:24:32 -05:00
Tim Abbott bbec562397 Add scripts for the Django and Tornado command lines on prod servers.
(imported from commit 7af5034cd26c5a6a99cece744feeaf3d0a1d843e)
2013-01-17 22:08:39 -05:00
Tim Abbott 6893cce9dc post-receive: Deploy to hunt server automatically.
(imported from commit ac3c0ea31aaa213f2b20dac2f67ab1a8a861ee3a)
2013-01-17 22:08:39 -05:00
Luke Faraone d7d5621602 Make API tarballs have a prefix of humbug/
This way you can just extract it to a directory on your PYTHONPATH and
do an "import humbug"

(imported from commit d71de15fa51a0dde6534046902cfa058064a77ef)
2013-01-16 16:56:58 -05:00
Zev Benjamin 9d27878abf Destroy spinners with a new abstraction instead of hiding them
If you create a spinner in a hidden element and then show the
element, the spinner is placed differently than if you had created
the spinner while the element was visible.  This commit makes it so
that we never create spinners while their parent is hidden.

(imported from commit a21e68976d70fcceece30ee35f5e7cf6f9490497)
2013-01-16 14:45:23 -05:00
Zev Benjamin beea0f747e Rename loading_{indicator,spinner} to page_loading_{indicator,spinner}
(imported from commit e1222569f62ac693d45d2f057ef6b05c883c900e)
2013-01-16 14:45:23 -05:00
Reid Barton 9e23907259 Add "Lurk" mode
/?lurk=foo will show all messages to the stream "foo", regardless of
whether you're subscribed.

(imported from commit 049d98b3ee8df19ef0a9dc392ae941dd463f8dd5)
2013-01-16 14:19:06 -05:00
Zev Benjamin cb8c67b325 Keep a dictionary of user email address to person object
(imported from commit 16d63fefff3bda33cfc2f90398539b5e2d9bb499)
2013-01-15 17:02:39 -05:00
Tim Abbott d121c51584 update-deployment: Delete pyc files on deploy.
(imported from commit 852258b1fd1b837807d11e5f4693012cd438c395)
2013-01-14 11:52:39 -05:00
Waseem Daher d9e50117be Frontend for invitations.
(imported from commit 8afab7cc5a4a5c14b605f1b27b48036c9414f7d0)
2013-01-14 10:25:26 -05:00
Tim Abbott af88c10c5e Add tools/test-backend script to run backend tests.
(imported from commit fde4c7deb1e64e8cca9d62cda905f13d90392961)
2013-01-10 16:59:36 -05:00
Jeff Arnold 7709e21a24 Notify the user when someone is speaking at them
(imported from commit 662ea67b2cf210bfd327ae2db6f924e4424d6d50)
2013-01-09 20:18:39 -05:00
Jeff Arnold db6f03d46d Make the back button work when narrowed
(imported from commit be922b06e7b53ec21751e67a490bb518333c3e6c)
2012-12-19 14:46:31 -05:00
Tim Abbott 15c83127ee Rename do-schema-change to something more scary.
(imported from commit e02b9e7a778d104fb0bdb346947f639622186aa7)
2012-12-14 17:57:23 -05:00
Zev Benjamin e6a26d1bb1 Adapt do-schema-change for Postgres
(imported from commit 3ab9054d110acf379c8d1686acaf56a92b4f90da)
2012-12-14 17:56:12 -05:00
Keegan McAllister 44b9925bfc Configure get_updates timeout in settings.py
(imported from commit 2a647bdd73c43ca5fed704925808efafc70da044)
2012-12-14 16:22:42 -05:00
Luke Faraone 5a0f1897bc Add humbug-send, a more full-featured sending tool.
(imported from commit 631f3c7320192a502b60bc4c4838d068ed60ee76)
2012-12-12 16:48:00 -05:00
Tim Abbott b14e4d2a57 Add tool to merge messages logs together for populate_db.
This tool hardcodes the paths to the input log files; we'll need to
change that down the line.

(imported from commit 8b067a6d3dc781694a001d549e5e60900d9c2596)
2012-12-11 17:17:38 -05:00
Tim Abbott feda941ac4 build-api-tarball: Fix prefixes.
(imported from commit 870ae9ab242c4d373a5901beec83b4c03d371d89)
2012-12-11 17:17:27 -05:00
Zev Benjamin 7e4776322d [manual] Unify huddles and personals into private messages on the receive path
feedback-bot and zephyr_mirror will need to be updated and restarted
when this is deployed to prod.

(imported from commit fe2b524424c174bcb1b717a851a5d3815fda3f69)
2012-12-04 18:01:51 -05:00
Zev Benjamin 3e1802bcea Add tool for deploying branches to origin/master
(imported from commit 0fb0b5d37ee5c8486791e55fa731d207477ba248)
2012-12-04 12:46:07 -05:00
Keegan McAllister 9125489c20 Rename class HumbugAPI to Client
(imported from commit 4270f31fc5febcd9c444d0d133a1dad3860618f0)
2012-12-03 15:54:54 -05:00
Keegan McAllister bd7b7adb6b Rename api.common to humbug
Fixes #482.

(imported from commit 1bd6a7fd993d8d5e225e0311c288dbce0c369a40)
2012-12-03 15:54:54 -05:00
Zev Benjamin 46f4a5eb38 Add util module
(imported from commit 3844e136fb799c6f57f8823255addf00a07ef686)
2012-11-30 15:04:46 -05:00
Jessica McKellar 37968bc9c7 If necessary, scroll to avoid occluding the message to which you are replying.
(imported from commit adf23d647a3d462d6236d8f1039da89a31b782d5)
2012-11-30 14:32:41 -05:00
Jeff Arnold b52dbe1ca9 Auto-invoke "Load older messages" when at the top of the page
Resolves Trac #445

(imported from commit d7d96fe82e9e1cbef32e0dde284ce217e83aff55)
2012-11-29 14:18:38 -05:00
Tim Abbott aba2192ec2 Restore the time-travel functionality with Waseem's UI.
This restores the time-travel functionality and fixes Waseem's laundry
list of problems with its original UI.

(imported from commit e30e02c25af994435adb815d26284b3669c945a4)
2012-11-28 22:26:31 -05:00
Zev Benjamin 9edea3454a inject-messages: use new send_message API
(imported from commit a0ea83fcd1944d06d8b0d9e6bed49a33901b20fe)
2012-11-27 16:08:54 -05:00
Jeff Arnold 2f882b505a Show "how many messages have arrived while away" in the document title
(imported from commit 6e2a18be9953694048d107a56a03a67f8bc2bd5a)
2012-11-27 13:39:46 -05:00
Keegan McAllister 41e43cb707 Flush memcached on every deploy
This uses pylibmc, the same memcached client library we use from Django.  If
that becomes a problem for whatever reason, all we really need to do is send
"flush_all\n" to TCP port 11211 on localhost.

(imported from commit 0b9736bd31b0549b5dabd4b735706351635a9cf2)
2012-11-26 16:59:37 -05:00
Jeff Arnold 4cb0c6225e Add webkit desktop notifications
Partially addresses Trac #31

(imported from commit f1f04b5c50bf9f33b69c90926fd67015cd2dc219)
2012-11-26 14:43:55 -05:00
Tim Abbott c86fd609e2 Add tool to build an API tarball for distribution.
(imported from commit eeaf9f526f243cc628eede603fe1b1691c34977f)
2012-11-26 12:25:39 -05:00
Tim Abbott 7314c12527 api: Read the API key from ~/.humbug-api-key by default.
(imported from commit 309469a0955969eafd78fbdf89d9651cb530010d)
2012-11-26 12:25:38 -05:00
Tim Abbott 14494d6a1f Add "time travel" feature.
(imported from commit b7b6794ad635ec63269a2043cd48b02749fbffda)
2012-11-20 17:17:39 -05:00
Zev Benjamin 90e0fc6259 Module pattern for ui.js
(imported from commit 951984ec1006e93a0ffc7e299b52fa02c10eb976)
2012-11-19 23:31:22 -05:00
Zev Benjamin da6cc30134 Add abstraction for manipulating userinfo popovers
(imported from commit 155302f103cfef8475482339596eafc594467532)
2012-11-19 23:22:50 -05:00
Jeff Arnold 9ce4c103c0 Implement full history search by creating a narrow for a search term
(imported from commit 3f2df6a6e590458ff774bbd658bbd1d95076a4db)
2012-11-19 17:12:59 -05:00
Waseem Daher f214c2df75 Lay the groundwork for a "typeahead helper" module.
(imported from commit 0b73238e935fac7c13d7152b262d3e71a714f3ea)
2012-11-18 19:41:03 -05:00
Keegan McAllister 08a43f2f5c Add a tool to run all the test suites
(imported from commit 073f3f0595669ce7c2cc9334e7318bc2856e1e8e)
2012-11-16 15:33:38 -05:00
Keegan McAllister 88a76518ec run-dev: Print traceback on exception
We can't rely on the builtin exception printing, because killpg will kill the
process before that happens.

(imported from commit e7db6a39e0549e21653b4a705d2278eb3dc7b2d4)
2012-11-16 15:33:37 -05:00
Keegan McAllister 5d8b66bf33 run-dev: Don't leak servers when we fail to bind to the proxy port
(imported from commit da7cd1f62f3d073bdae6fe72e71f4127931f4d57)
2012-11-16 15:33:37 -05:00
Tim Abbott b8f65fb8aa review: Fix review with new to: sending.
(imported from commit 67f588afbc6ec6556d31827c8c9495fbaa59fadf)
2012-11-15 16:27:05 -05:00
Tim Abbott 411a7f6b4f [manual] send_message: Rename recipient/stream fields to 'to'.
This commit changes APIs and requires and update of all zephyr
mirroring bots to deploy properly.

(imported from commit 2672d2d07269379f7a865644aaeb6796d54183e1)
2012-11-15 15:30:06 -05:00
Waseem Daher a1c4aa6865 Modularize search.js.
(imported from commit 72f00f832846124d833071fdd46b026c99189512)
2012-11-14 15:29:18 -05:00
Keegan McAllister 122281553a Make csrf_token global
(imported from commit 734d9c886c3a77d2ba40bd449cb089a00807a656)
2012-11-14 13:35:24 -05:00
Zev Benjamin 796869863c review: fix for send_message API change
(imported from commit 2a171dc298449e2dacc2f8250e81577741122464)
2012-11-13 16:09:43 -05:00
Zev Benjamin 195bdb07c9 Unify huddles and personals into private messages on the send path
Personals are now just private messages between two people (which
sometimes manifests as a private message with one recipient).  The
new message type on the send path is 'private'.  Note that the receive
path still has 'personal' and 'huddle' message types.

(imported from commit 97a438ef5c0b3db4eb3e6db674ea38a081265dd3)
2012-11-13 15:40:53 -05:00
Zev Benjamin 33c23c0113 Use a JSON array for recipients in send_message
(imported from commit e2184f92b708cc2e8ef3e9ae79ee4241c0aa12a1)
2012-11-13 15:40:53 -05:00
Keegan McAllister eee951440d run-dev: Use a process group to kill all spawned processes
(imported from commit 9dfddd4d9cb45c70139a167b7949bd5c4fc2791a)
2012-11-13 10:59:02 -05:00
Keegan McAllister ed490c672f Allow running the dev server with the test database, on different ports
For use by frontend tests.

(imported from commit c8f81b862963f00e5b5517ba05b2d1adcab6d78a)
2012-11-13 10:59:02 -05:00
Jeff Arnold 5c7419307c Fix style mistakes we didn't catch the first time
(imported from commit ae1ca10ea8559702e4e73481715239ff456eca4b)
2012-11-11 13:24:44 -05:00