Commit Graph

18359 Commits

Author SHA1 Message Date
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
Steve Howell fdea8f9334 Create stream_list.initialize(). 2017-06-02 14:11:11 -07:00
Steve Howell 5dad7372f9 minor: Remove unneeded render in template tests.
(We have had ways to track partial templates for a while.)
2017-06-02 14:11:11 -07:00
Yago González f878de8bd9 docs: Generalize the use of single quotes. 2017-06-02 14:08:57 -07:00
Yago González 08292f17a1 docs: Remove unnecesary quotes. 2017-06-02 14:08:57 -07:00
Yago González 6121a7ebd4 docs: Fix validation in the Swagger YAML file. 2017-06-02 14:08:57 -07:00
Tim Abbott c250c8647d gear_menu: Fix traceback accessing i18n before it is initialized. 2017-06-02 14:03:56 -07:00
Tim Abbott cecf7f1740 provision: Don't regenerate dev database unnecessarily.
This reuses the work we did some time ago to avoid regenerating the
test database unnecessarily.

In addition to being a nice convenience for developers (since any
accomulated test data is still available), this also saves about half
the time consumed in a no-op provision.

Fixes #5182.
2017-06-02 13:27:34 -07:00
Tim Abbott a0ef2babab text_fixtures: Rename migration status file to have test in name.
This is preparation for making things clear as we move towards not
always rebuilding the test database in provision.
2017-06-02 13:27:34 -07:00
Tim Abbott 6d00da2b80 test_fixtures: Remove hardcoding of check_files status dir.
This is preparatory support for using this framework in provision as
well.
2017-06-02 13:27:34 -07:00
Tim Abbott 4da9383f2d dev_urls: Add comments documenting sections. 2017-06-02 12:44:32 -07:00
Joshua Pan 3905602da5 node tests: Test user timezone functions in people.js. 2017-06-02 06:30:40 -06:00
Joshua Pan 7be1576513 people.js: Refactor get_user_time function. 2017-06-02 06:30:40 -06:00
Tim Abbott 9e0749ad82 email-mirror-postfix: Fix mypy errors. 2017-06-01 22:51:26 -07:00
Eeshan Garg e510c5d15a webhooks/pivotal: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 829491fde7 webhooks/papertrail: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 5d868b1612 webhooks/helloworld: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 6defd7f36e webhooks/pagerduty: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 36c5e8d11f webhooks/mention: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg ccd079b425 webhooks/solano: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg c3dda04270 webhooks/zapier: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 6e6c5c8fa6 webhooks/newrelic: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 88ed657412 webhooks/updown: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg a8e4abfb7c webhooks/teamcity: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 28a2166bd0 webhooks/transifex: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg 624bab83a7 webhooks: Use append-topic.md for gosquared, greenhouse, hellosign. 2017-06-01 22:16:12 -07:00