Commit Graph

18184 Commits

Author SHA1 Message Date
Aditya Bansal 0b746c5df4 pep8: Add compliance with rule E261 bots_test_lib.py. 2017-06-04 09:18:22 -07:00
Aditya Bansal feb663ffb6 pep8: Add compliance with rule E261 backends.py. 2017-06-04 09:18:22 -07:00
Aditya Bansal e28cafebaf pep8: Add compliance with rule E261 hellosign/view.py. 2017-06-04 09:18:18 -07:00
Aditya Bansal 90cdebb04a pep8: Add compliance with rule E261 bitbucket2/view.py. 2017-06-04 09:18:11 -07:00
Aditya Bansal 25bb21238f pep8: Add compliance with rule E261 test_unread.py. 2017-06-04 15:07:39 +05:30
Aditya Bansal bf1e3a0125 pep8: Add compliance with rule E261 test_logging_handlers.py. 2017-06-04 15:07:26 +05:30
Aditya Bansal 4410b5889a pep8: Add compliance with rule E261 test_auth_backends.py. 2017-06-04 15:06:52 +05:30
Aditya Bansal b99d62d337 pep8: Add compliance with rule E261 timeout.py. 2017-06-04 15:06:29 +05:30
Aditya Bansal 1be11cbb56 pep8: Add compliance with rule E261 replace-tarball-shebang. 2017-06-04 15:06:12 +05:30
Aditya Bansal a9e0dbe085 pep8: Add compliance with rule E261 pretty_print.py. 2017-06-04 15:05:51 +05:30
Aditya Bansal e3cf43399f pep8: Add compliance with rule E261 send.py. 2017-06-04 15:05:34 +05:30
Aditya Bansal d2c215afde pep8: Add compliance with rule E261 zephyr_mirror_backend.py. 2017-06-04 15:05:22 +05:30
Aditya Bansal cf9725836c pep8: Add compliance with rule E261 rss-bot. 2017-06-04 15:02:31 +05:30
Aditya Bansal 880314e45e pep8: Add compliance with rule E261 jabber_mirror_backend.py. 2017-06-04 15:01:39 +05:30
Aditya Bansal 02b855a389 pep8: Add compliance with rule E261 test-bots. 2017-06-04 15:00:58 +05:30
Aditya Bansal 8d06b5d9d9 pep8: Add compliance with rule E261 bot_lib.py. 2017-06-04 15:00:42 +05:30
Aditya Bansal f0b1a6c8d2 pep8: Add compliance with rule E261 virtual_fs.py. 2017-06-04 14:58:37 +05:30
Tim Abbott a3515b2f06 docs: Improve documentation on resource requirements. 2017-06-03 23:40:38 -07:00
Tim Abbott e8166ee1b0 docs: Update installation docs for new RAM requirements.
This is a follow-up to #32.
2017-06-03 23:30:55 -07:00
Tim Abbott b70986469c generate_secrets: Fix handling of missing trailing newlines.
When we added support for automatically adding new secrets in
generate_secrets.py, we failed to account for the possibility that a
human editor might have let the secrets file without a trailing
newline.

We address this by adding a leading newline before our new secret.

Fixes #5209.
2017-06-03 23:17:04 -07:00
Tommy Ip 8d6af030c0 bugdown: Fix modal_link.
The `data-toggle` property prevented the new style of overlay modals
from launching, and regardless, isn't a future-proof options for how
this should work.
2017-06-03 18:41:19 -07:00
Tim Abbott cbce98edd6 Support informational overlays in hashchange system.
This helps the !modal_link links in our tutorial messages.

Fixes #5206.
2017-06-03 18:39:47 -07:00
Rishi Gupta 7527ac9a8c emails: Mark variables in non-HTML emails as HTML-safe.
Make sure 's, &s, and other characters are not HTML-escaped in subject
lines and plain-text emails.

Hack so that this isn't blocking the release of Zulip 1.6. A more robust way
to do this would be to have two different template Engines, one that renders
HTML, and one that doesn't.

Fixes #5088.
2017-06-03 16:04:06 -07:00
Tim Abbott ba74d74dca lint: Fix incorrectly placed docstring. 2017-06-03 16:02:24 -07:00
Yago González 9602f73d05 lint: Add validation for the Swagger file. 2017-06-03 15:48:04 -07:00
Yago González 99b004942f lint: Explain the purpose of target_langs.
Tweaked by tabbott to be a longer docstring.
2017-06-03 15:48:00 -07:00
Yago González 7225b7bdf8 docs: Move Swagger file to static/swagger. 2017-06-03 15:45:15 -07:00
Aditya Bansal 5fc7e590bc travis: Cache the built emoji across builds in Travis CI.
Apparently, when we implemented the emoji cache for development, we
failed to properly register its directory for Travis CI.

Commit message rewritten by tabbott.
2017-06-03 15:30:55 -07:00
Aditya Bansal e0d4eada4e travis: Fix zulip-npm-cache in Travis CI.
Apparently, when we migrated local development to use the
zulip-npm-cache structure, we failed to update the .travis.yml file
with the appropriate directory (and instead just uploaded a
node_modules symlink).
2017-06-03 15:30:53 -07:00
Aditya Bansal 23baaae980 travis: Stop deleting npm cache in production tests.
Now that we're not using the copy_modules functionality (basically
because including node_modules in production tarballs was a huge disk
sink), the production Zulip code isn't using `zulip-npm-cache` anyway.
And deleting that cache had a huge impact on the performance of the
development environment provisioning that we do as part of this suite.

Commit message rewritten by tabbott.
2017-06-03 15:29:08 -07:00
rht 940cf9db3b Run queue processors multithreaded in production if system memory <3.5GB.
While running queue processors multithreaded will limit the
performance available to very small systems, it's easy to fix that by
adding more RAM, and previously, Zulip didn't work on such systems at
all, so this is unambiguously an improvement there.

Fixes #32.
Fixes #34.

(Commit message expanded significantly by tabbott.)
2017-06-03 12:19:58 -07:00
Steve Howell 73afce23a0 Check for errors in process_read_message().
Report an error and early-exit if a stream message does
not have a stream_id for some reason.
2017-06-03 06:30:01 -06:00
Steve Howell 79acbcd1bf Refine error handling for stream_list.get_stream_li calls.
We avoid false warnings in get_stream_li and for updating
unread counts.  We also early-exit for A/D keys if there is
no current stream.
2017-06-03 06:16:45 -06:00
Tomasz Kolek acd986d959 integrations: Fix custom topic of hellosign integration.
This fixes support for using custom topics in the HelloSign
integration.

With significant fixes and rebasing by Eeshan Garg.
2017-06-02 22:08:12 -07:00
Tim Abbott 907a059301 docs: update changelog with recent changes and 1.5.2 release. 2017-06-02 17:49:13 -07:00
Abhijeet Kaur f320ff11f7 bots: Add tests for followup bot.
'followup' bot has different message handling behavior for
different messages.
For usual messages it calls 'send_message' function of
'BotHandlerApi' class.
For empty messages it calls 'send_reply' function of
'BotHandlerApi' class.
2017-06-02 17:24:41 -07:00
Abhijeet Kaur 72b877c7de bots: Add mock test for 'send_message' function in 'bots_test_lib' file.
Since few bots directly call 'send_message' function of
'BotHandlerApi' class instead of calling 'send_reply' function
first, add 'mock_test_send_message' to check for 'send_message'
function.

All test_<bot>.py files now need to specify which function the bot
will be sending the response to, for each particular message.

Make 'test_virtual_fs.py' and 'test_thesaurus.py' test files
consistent with other bots.
2017-06-02 17:24:41 -07:00
Cory Lynch 080a3b9286 Add test coverage for 'stream_sort.js'.
Added new file to test stream sort. Specifically,
it tests the `sort_group` function's ability to put
streams into the corect pinned/normal/dormant category,
filter them based on keyword, and sort alphabetically.
2017-06-02 18:13:33 -06:00
Eeshan Garg 32786802b0 docs: Document the release process for the Zulip API PyPI package. 2017-06-02 17:08:00 -07:00
Eeshan Garg c065f23090 tools: Remove build-api-tarball. 2017-06-02 17:08:00 -07:00
Cory Lynch 76a497650b docs: Update feature tutorial for server_events_dispatch.js. 2017-06-02 16:51:46 -07:00
Cory Lynch 5d7828096e Split out server_events_dispatch.js from server_events.js. 2017-06-02 16:49:18 -07:00
Steve Howell 24d443a061 Have stream_list.get_stream_li() use stream_sidebar.get_row().
Given a stream id, we now find list items using the internal
data structures we created when we built the sidebar, rather than
using a jQuery selector.
2017-06-02 16:32:39 -07:00
Tim Abbott d9b8da2483 docs: Fix emoji cache setup when not using provision.py.
There were 2 things wrong here:
(1) The new emoji cache directories weren't being created properly
(2) We weren't downloading the new emoji sprite sheets.

I think based on this experience, we should definitely invest in
moving more platforms to use provision.py.

Fixes #5160.
2017-06-02 15:21:46 -07:00
Tim Abbott c37204c62a upgrade-zulip-stage-2: Remove an unused import. 2017-06-02 15:14:13 -07:00
Tim Abbott 1549f8773e portico: Always display org info when a server has only 1 realm.
Previously, we were incorrectly using the get_unique_open_realm
function to determine whether we're in the (common) single-realm
server case and should just display an org-info-enabled login form on
the homepage.

Now, we use a slightly different function extracted from
get_unique_open_realm that doesn't check whether the realm is
invite-only.

Fixes #4841.
2017-06-02 15:00:22 -07:00
Steve Howell ed9eca90f2 node tests: Isolate timerender.js from i18n/jquery.
This makes the test run a lot faster, and it fixes
some leaky behavior where the test used to work only
when other tests ran before it.
2017-06-02 14:18:51 -07:00
Steve Howell dc2be44daf refactor: Clean up timerender.render_date_span(). 2017-06-02 14:18:51 -07:00
Steve Howell 0aaa182fbe node test: Use zjquery to test stream_list.js.
We use zjquery now for testing stream_list.js, which runs faster
than the real jQuery and allows some test isolation.  The nature
of the test is basically the same, but we don't actually render
templates.  Instead of making assertions about the DOM, we are
now making assertions about how the stream lists get constructed
from other elements.
2017-06-02 14:11:11 -07:00
Steve Howell ed49673555 stream_list: Use append() instead of appendTo().
Using append() is easier to unit test, and we avoid
creating a temporary jQuery object from the array
of sidebar rows.
2017-06-02 14:11:11 -07:00