Commit graph

566 commits

Author SHA1 Message Date
Tim Abbott 20d36e5df8 Add admin API endpoint for creating users.
(imported from commit a8b919c7d21b28dfd75b6b95736a375874ead15f)
2013-12-10 13:21:33 -05:00
Luke Faraone e7e90bd60e Specify client in User-agent in our Jira integration.
(imported from commit e436478c6fd2836c06faa90ddb1ca5641d3f61e4)
2013-12-09 11:47:54 -05:00
Luke Faraone c03ac5e3ce Update style of client strings.
(imported from commit 1516461cf53b2715de68e01f16bb8a8cc33c48ad)
2013-12-09 11:47:52 -05:00
Luke Faraone a1cf1f04a2 Add a version number to our Perforce integration.
(imported from commit 402f7a1e57aa1c77255cdc5c58a081a8b209a65d)
2013-12-09 11:47:20 -05:00
Luke Faraone edf6166898 api: Let users of init_from_options specify a default client.
This way command-line scripts that use our `optparse` populator can
still specify a custom client without munging their `parser` object.

(imported from commit df8d28a46a4d4574523b106030dbfed2d9ac931e)
2013-12-09 11:47:20 -05:00
Luke Faraone de686fc83f api: Specify a default client of ZulipPython/version
(imported from commit 366d0e81a67f6a993fb0e9539d51e593c7863299)
2013-12-09 11:47:20 -05:00
Luke Faraone df29a93a61 api: Provide an informative User-agent instead of a client parameter
We previously sent our client type to the server as a GET/POST parameter
of "client=<something>", most commonly "client=API: Python".

We switch here to providing the same information as a User-agent header
sent on each request, which is more standards-compliant.

Also added is some data about the platform the user is using. If your
client string was set to "MyLittleZulip/1.0", the resultant string could
look something like this:
    MyLittleZulip/1.0 (Ubuntu; 12.04)

(imported from commit 39fd187a8f9d4b3c9b63fc623e0836e57a4099ca)
2013-12-09 11:47:20 -05:00
Luke Faraone 6478da983e Perforce integration.
This is designed to be run as a "change-commit" trigger. See [Perforce's
documentation][1] on how to set up a trigger for your platform.

[1]: http://www.perforce.com/perforce/r12.1/manuals/cmdref/triggers.html

Closes trac #1034.

(imported from commit d94fa4e50637ade2847a96eab8c5514de3811c24)
2013-12-06 11:54:38 -05:00
Luke Faraone bd72921f7e [third] Disable git_p4's usage of git configuration
Since we're using the module outside of a git repository context we
don't have a git config to reference. Instead, we'll just use the
environment variables we're passed.

(imported from commit 8ae707d5d60eb700052e0ee89e7d36c660e00bb6)
2013-12-06 11:54:38 -05:00
Luke Faraone 4e7eb8b377 [third] Import git's P4 command.
From github.com/git/git@34022ba

License: Expat

(imported from commit 995439bf2fc458ef7ed73fd7ea9add77abacbc53)
2013-12-06 11:54:38 -05:00
Waseem Daher 7345a878e9 Add "client" string to Nagios integration.
(imported from commit 0e42d297b5be668da9b28c9970621a1f9a4229ca)
2013-12-05 18:06:13 -05:00
Waseem Daher 2240a03c9e Add 'client' string to our missing integrations.
Not done: Jira, Nagios

(imported from commit 3e2505653b377f8c307745e507bdc40e980dca05)
2013-12-05 17:51:21 -05:00
Tim Abbott 1c320cce17 api: Add support for setting site in mercurial integration.
(imported from commit 697f4697af27be6f4eddd6ddbf7affbc8739cffe)
2013-12-04 16:30:57 -05:00
Tim Abbott d38929d525 api: Document options required for use with Zulip Enterprise.
(imported from commit 59f136cf0f1a5d9509bec054b060ab44695b77e0)
2013-12-04 16:30:51 -05:00
Tim Abbott c9b0e190d0 api: Update documentation on ZULIP_SITE option.
(imported from commit 82109dc08847240440f90524343c0f9562e4a0bf)
2013-12-04 15:14:15 -05:00
Tim Abbott 239e3ede02 Remove api/examples/curl-examples.
It's out of date and we've never distributed it anyway.

(imported from commit 884e302ea4f55f9b3f986694a786cc5c17128e71)
2013-12-04 15:10:54 -05:00
Waseem Daher 3ce6fc8602 Link to our API page from the Github repo README.md
(imported from commit 2dfa7a3bf27a15f1f43ee2ecef5d501c17669bde)
2013-12-02 13:18:04 -05:00
Jessica McKellar 5186787da2 API release 0.2.3.
(imported from commit 80591f61785b492b2ec8897bb2a2e5eff8e089fc)
2013-11-27 13:15:21 -05:00
Luke Faraone 98b63639e9 setup.cfg to run install_data on API install
Previously, users of setuptools would get our data embedded in eggs.
Eggs are horrible things, but more importantly our package data should
be free, in a well-known albeit system-dependant path that is
independent of the package.

By specifying [install_data][1] as an alias of install, we assure that
our data (examples, integrations, etc) are placed in $data/share as
$DEITY intended.

Alternative suggestions included force-adding "--old-and-unmanageable",
which would invoke the distutils-style install command, but that had the
unfortunate side effect of turning off eggs and dependency resolution
altogether.

We could also use "--single-version-externally-managed", but I think
that was designed to be used by package managers, not by us.

In any case, both of the above were fragile and might break if the user
specified additional options to setup.py.

In closing, Python module management is horrible. See [this][2],
[this][3], and [this][4] for info about the status quo, and [this][5]
for information about crack to be smoked later down the road. Don't even
get me started about [PEP 427 -- Python wheels][6].

[1]: http://docs.python.org/2/distutils/commandref.html#install-data
[2]: http://lucumr.pocoo.org/2012/6/22/hate-hate-hate-everywhere/
[3]: http://stackoverflow.com/a/6522905/90777
[4]: http://python-notes.boredomandlaziness.org/en/latest/pep_ideas/core_packaging_api.html
[5]: https://python-packaging-user-guide.readthedocs.org/en/latest/future.html
[6]: http://www.python.org/dev/peps/pep-0427/

(imported from commit 6cf1bd2b8f5a60b2f02f5d11094e4a41cc5e48aa)
2013-11-26 13:26:31 -05:00
Jessica McKellar 1e79f5fc85 rss-bot: handle feeds that don't have a title.
(imported from commit 2d95ee0cd85ac25a7c0241ce1747509e2f9c6be6)
2013-11-22 11:28:19 -05:00
Tim Abbott 9b8555ba12 Deregister event queues when done in our Nagios scripts.
(imported from commit a1f73403163323e1dd9eda2f5269e94c60abdd1a)
2013-11-20 18:34:16 -05:00
Tim Abbott 3da6c41345 Use the new !avatar syntax in our git integration.
(imported from commit e00bc63f6fb1944ed206b3ede5431ac2b1ae1ac2)
2013-11-20 13:10:43 -05:00
Jessica McKellar 6fbf905289 Add basic Asana integration.
Due to limitations in their API, we have to poll and check for
creation and completion events.

(imported from commit be65e507fac16a7f8ad3dc57b2af9c4b98aacf39)
2013-11-19 13:30:34 -05:00
Tim Abbott 1232e7d0ab Update paths to rss-bot.
(imported from commit ab6ea5e881593c8533680323bf525faacc2ddfec)
2013-11-18 08:11:06 -05:00
Tim Abbott 3493c4fa76 Fix rss-bot parsing of feeds that don't specify a post ID.
(imported from commit 67fdb8b92b39fc14c81b87b7fa8089964c07be8b)
2013-11-18 08:11:06 -05:00
Tim Abbott 30416c860b api: Fix our handling of the --site option.
Tested that the following all do the same thing after this patch:

--site=https://ls-dev.zulip.net
--site=https://ls-dev.zulip.net/
--site=https://ls-dev.zulip.net/api
--site=https://ls-dev.zulip.net/api/

(imported from commit 785c005e4b4be3621d7d330a0173023ab2c77a4d)
2013-11-15 11:10:25 -05:00
Tim Abbott 8f75d55795 zephyr_mirror: Update maximum length of stream names when syncing.
(imported from commit 6ab7f5ae47c9dfe9edf411e73ac9e5ab22d375a7)
2013-11-12 09:38:43 -05:00
Tim Abbott 4cdec3c46e 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
Tim Abbott efa5df1fac Clean up some unused imports.
(imported from commit 0c5d8e2a55ba1b8909ba807fee3afe863dcdc226)
2013-11-04 11:51:17 -05:00
Luke Faraone 8b7ba417ea api: Include MANIFEST.in
This should have been included in an earlier commit.

(imported from commit 683f3dbbe8730cc588836b7b27a881a50caa284d)
2013-11-01 12:08:04 -04:00
Luke Faraone 1f8dcd0589 Remove accidentally left-in import of zulip in setup.py.
This is **actually** 0.2.2 :)

(imported from commit 4ae69809b550d76b7c3bdf7b1420b25b6e41f73b)
2013-10-31 16:27:59 -04:00
Luke Faraone cc20b23975 API 0.2.2 release.
(imported from commit 891ab7549e96c30dceb70bb18add1cd533fafd36)
2013-10-31 16:23:03 -04:00
Luke Faraone 534f64e79c Increment copyright year.
(imported from commit d42dfd080807a11d898a1c7b96b9f048e20bccf8)
2013-10-31 16:23:03 -04:00
Luke Faraone 1f77ee4389 Switch to four-spaces indentation in setup.py
(imported from commit 621e5755e8cfd7117e012f4245de0916e45060bb)
2013-10-31 16:23:03 -04:00
Luke Faraone f9a800b046 Update support email address
(imported from commit 3265ea2ec037093bd883a440fe9f8c6d72642a31)
2013-10-31 16:22:51 -04:00
Rory Kirchner fb5a3dc3d8 Added a stream class for use with the logging module.
License assent:
    https://github.com/zulip/python-zulip/pull/3#issuecomment-18182458

(imported from commit 9faf9dd147032b1e56b113bc0f0d729a653e1e49)
2013-10-31 16:22:51 -04:00
Luke Faraone b0f73806de Optionally use setuptools if it is installed.
Thanks to to github.com/roryk for the suggestion.

(imported from commit 9e4365dc56f1bc2f1a1a49be4a7b662d94bf42a9)
2013-10-31 16:22:51 -04:00
Rory Kirchner 0923b7d3ef Parse __version__ from __init__.py
This way we don't crash if dependencies aren't installed.

License assent:
    https://github.com/zulip/python-zulip/pull/3#issuecomment-18182458

(imported from commit f1aa37e97c60a06234c004ada48e08984a085d6f)
2013-10-31 16:22:51 -04:00
Tim Abbott 4a0758e058 Initial IRC mirror prototype.
(imported from commit fb1c482aaebc317b8b071346cb3bf54d4c7d2c8d)
2013-10-29 16:49:42 -04:00
Jessica McKellar 1d0edf473c Add a first pass at Mercurial changegroup (hg push) integration.
(imported from commit 94c91aed6282a2fffcd7753a06dc68a298b7bdc7)
2013-10-29 09:58:04 -04:00
Tim Abbott 8c62df2890 zmirror: Add some more non-world-readable Zephyr classes.
These are from a list that Camilla Fox sent me of all
non-world-readable Zephyr classes currently configured.

(imported from commit 6246a981402b47056b28cd14be688e15224aacd1)
2013-10-28 15:44:34 -04:00
Tim Abbott 6894453ab5 Use os.path directly rather than sometimes importing it separately.
(imported from commit 48486c4ea64d02a15faeebb0f490d31e9b113d62)
2013-10-28 15:44:13 -04:00
Tim Abbott 491d21302c Move zulip_tools library to root of repository.
(imported from commit 2fada9d2acbcf81f8e2b3de8caadbf335141dfaa)
2013-10-28 10:54:48 -04:00
Luke Faraone 4279785695 [manual] Deconfigure standalone feedback bot, replacing it with a worker.
Steps needed:
 - puppet apply on staging/prod when deployed to respective sites
 - puppet apply on bots.z.n when deployed to prod
 - copy /var/tmp/.feedback-bot-ticket-number from bots to staging

(imported from commit 2c943dac8d871809b0997a4484f508ec5b078bcd)
2013-10-25 14:13:30 -04:00
Luke Faraone 518da346e3 Enable absolute imports for non-third-party code where it was omitted previously
(imported from commit 34856ac32c6b94b614273a6fe46c87a314058d9b)
2013-10-25 14:13:30 -04:00
Zev Benjamin 3c455e48a9 Remove redundant return statement
(imported from commit eac3298f3004d2dd519c5444755e729111d13482)
2013-10-22 13:19:00 -04:00
Tim Abbott 6f4fd336cd api: Add support for specifying client using zulip.init_from_options.
(imported from commit f92db44af606d67d5a1dcc9c978cee0d079d466d)
2013-10-21 14:37:36 -04:00
Zev Benjamin fab71363f4 zephyr_mirror: Make outgoing zephyrs to ctl instead go to golem
This makes zulips to ctl@mit.edu cause the mirroring system to zephyr
golem@mit.edu.

(imported from commit 9059a92ba51fa87e45feae2f0d5549b36b048e8b)
2013-10-17 23:20:57 -04:00
Jessica McKellar 43764d415c twitter-search-bot: update the path to the bot in the help.
(imported from commit c1097685870029d9f6e7d0ba5a9e61912cf00885)
2013-10-16 21:26:01 -04:00
Jessica McKellar 13fb709e96 twitter-search-bot: add the version requirement for twitter-python to the help.
(imported from commit dbee40c3081e50b07a80a297691acf98f4aaf89a)
2013-10-16 21:26:01 -04:00