mirror of https://github.com/zulip/zulip.git
Change Humbug => Zulip in text/comments.
(imported from commit 2f9d73431ae40e1b9e9e11bc2f4f62f566ae758a)
This commit is contained in:
parent
e05979d4c4
commit
1f1af26048
|
@ -1,6 +1,6 @@
|
|||
#### Dependencies
|
||||
|
||||
The Humbug API Python bindings require the following Python libraries:
|
||||
The Zulip API Python bindings require the following Python libraries:
|
||||
|
||||
* simplejson
|
||||
* requests (version >= 0.12.1)
|
||||
|
@ -34,14 +34,14 @@ Alternatively, you may explicitly use "--user" and "--api-key" in our
|
|||
examples, which is especially useful if you are running several bots
|
||||
which share a home directory.
|
||||
|
||||
You can obtain your Humbug API key, create bots, and manage bots all
|
||||
from your Humbug [settings page](https://zulip.com/#settings).
|
||||
You can obtain your Zulip API key, create bots, and manage bots all
|
||||
from your Zulip [settings page](https://zulip.com/#settings).
|
||||
|
||||
A typical simple bot sending API messages will look as follows:
|
||||
|
||||
At the top of the file:
|
||||
|
||||
# Make sure the Humbug API distribution's root directory is in sys.path, then:
|
||||
# Make sure the Zulip API distribution's root directory is in sys.path, then:
|
||||
import humbug
|
||||
humbug_client = humbug.Client(email="your-bot@example.com")
|
||||
|
||||
|
@ -57,9 +57,9 @@ When you want to send a message:
|
|||
|
||||
Additional examples:
|
||||
|
||||
client.send_message({'type': 'stream', 'content': 'Humbug rules!',
|
||||
client.send_message({'type': 'stream', 'content': 'Zulip rules!',
|
||||
'subject': 'feedback', 'to': ['support']})
|
||||
client.send_message({'type': 'private', 'content': 'Humbug rules!',
|
||||
client.send_message({'type': 'private', 'content': 'Zulip rules!',
|
||||
'to': ['user1@example.com', 'user2@example.com']})
|
||||
|
||||
send_message() returns a dict guaranteed to contain the following
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# humbug-send -- Sends a message to the specified recipients.
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -16,7 +16,7 @@ import humbug
|
|||
RSS_DATA_DIR = os.path.expanduser(os.path.join('~', '.cache', 'humbug-rss'))
|
||||
OLDNESS_THRESHOLD = 30 # days
|
||||
|
||||
usage = """Usage: Send summaries of RSS entries for your favorite feeds to Humbug.
|
||||
usage = """Usage: Send summaries of RSS entries for your favorite feeds to Zulip.
|
||||
|
||||
This bot requires the feedparser module.
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ parser = optparse.OptionParser(r"""
|
|||
|
||||
%prog --user foo@zulip.com --api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 --search="@nprnews,quantum physics"
|
||||
|
||||
Send Twitter search results to a Humbug stream.
|
||||
Send Twitter search results to a Zulip stream.
|
||||
|
||||
Depends on: twitter-python
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2013 Humbug, Inc.
|
||||
# Copyright © 2013 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2013 Humbug, Inc.
|
||||
# Copyright © 2013 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -49,9 +49,9 @@ def commit_notice_destination(repo, branch, commit):
|
|||
# Return None for cases where you don't want a notice sent
|
||||
return None
|
||||
|
||||
## If properly installed, the Humbug API should be in your import
|
||||
## If properly installed, the Zulip API should be in your import
|
||||
## path, but if not, set a custom path below
|
||||
HUMBUG_API_PATH = None
|
||||
|
||||
# This should not need to change unless you have a custom Humbug subdomain.
|
||||
# This should not need to change unless you have a custom Zulip subdomain.
|
||||
HUMBUG_SITE = "https://api.zulip.com"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Humbug notification post-receive hook.
|
||||
# Copyright © 2012-2013 Humbug, Inc.
|
||||
# Zulip notification post-receive hook.
|
||||
# Copyright © 2012-2013 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013 Humbug, Inc
|
||||
* Copyright (c) 2013 Zulip, Inc
|
||||
*/
|
||||
|
||||
package org.humbug.jira
|
||||
|
@ -20,7 +20,7 @@ import org.apache.commons.httpclient.NameValuePair
|
|||
class HumbugListener extends AbstractIssueEventListener {
|
||||
Logger LOGGER = Logger.getLogger(HumbugListener.class.getName());
|
||||
|
||||
// The email address of one of the bots you created on your Humbug settings page.
|
||||
// The email address of one of the bots you created on your Zulip settings page.
|
||||
String humbugEmail = ""
|
||||
// That bot's API key.
|
||||
String humbugAPIKey = ""
|
||||
|
@ -113,7 +113,7 @@ class HumbugListener extends AbstractIssueEventListener {
|
|||
for (NameValuePair pair: parameters) {
|
||||
params += "\n" + pair.getName() + ":" + pair.getValue()
|
||||
}
|
||||
LOGGER.log(Level.SEVERE, "Error sending Humbug message:\n" + response + "\n\n" +
|
||||
LOGGER.log(Level.SEVERE, "Error sending Zulip message:\n" + response + "\n\n" +
|
||||
"We sent:" + params)
|
||||
}
|
||||
return response;
|
||||
|
|
|
@ -9,7 +9,7 @@ define contact{
|
|||
host_notification_commands notify-host-by-humbug
|
||||
}
|
||||
|
||||
# Humbug commands
|
||||
# Zulip commands
|
||||
define command {
|
||||
command_name notify-host-by-humbug
|
||||
command_line /usr/local/share/humbug/integrations/nagios/nagios-notify-humbug --stream=nagios --type="$NOTIFICATIONTYPE$" --host="$HOSTADDRESS$" --state="$HOSTSTATE$" --output="$HOSTOUTPUT$" --long-output="$LONGHOSTOUTPUT$"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2013 Humbug, Inc.
|
||||
# Copyright © 2013 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -49,9 +49,9 @@ def commit_notice_destination(path, commit):
|
|||
# Return None for cases where you don't want a notice sent
|
||||
return None
|
||||
|
||||
## If properly installed, the Humbug API should be in your import
|
||||
## If properly installed, the Zulip API should be in your import
|
||||
## path, but if not, set a custom path below
|
||||
HUMBUG_API_PATH = None
|
||||
|
||||
# This should not need to change unless you have a custom Humbug subdomain.
|
||||
# This should not need to change unless you have a custom Zulip subdomain.
|
||||
HUMBUG_SITE = "https://api.zulip.com"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Humbug notification post-commit hook.
|
||||
# Copyright © 2012-2013 Humbug, Inc.
|
||||
# Zulip notification post-commit hook.
|
||||
# Copyright © 2012-2013 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -21,7 +21,7 @@
|
|||
# THE SOFTWARE.
|
||||
|
||||
|
||||
# Humbug trac plugin -- sends humbugs when tickets change.
|
||||
# Zulip trac plugin -- sends humbugs when tickets change.
|
||||
#
|
||||
# Install by copying this file and humbug_trac_config.py to the trac
|
||||
# plugins/ subdirectory, customizing the constants in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2012 Humbug, Inc.
|
||||
# Copyright © 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -39,14 +39,14 @@ TRAC_BASE_TICKET_URL = "https://trac.example.com/ticket"
|
|||
# type, versions, description, resolution, summary, comment)
|
||||
#
|
||||
# The following is the list of fields which can be changed without
|
||||
# triggering a Humbug notification; change these to match your team's
|
||||
# triggering a Zulip notification; change these to match your team's
|
||||
# workflow.
|
||||
TRAC_NOTIFY_FIELDS = ["description", "summary", "resolution", "comment",
|
||||
"owner"]
|
||||
|
||||
## If properly installed, the Humbug API should be in your import
|
||||
## If properly installed, the Zulip API should be in your import
|
||||
## path, but if not, set a custom path below
|
||||
HUMBUG_API_PATH = None
|
||||
|
||||
# This should not need to change unless you have a custom Humbug subdomain.
|
||||
# This should not need to change unless you have a custom Zulip subdomain.
|
||||
HUMBUG_SITE = "https://api.zulip.com"
|
||||
|
|
|
@ -14,8 +14,8 @@ def recur_expand(target_root, dir):
|
|||
|
||||
setup(name='humbug',
|
||||
version=humbug.__version__,
|
||||
description='Bindings for the Humbug message API',
|
||||
author='Humbug, Inc.',
|
||||
description='Bindings for the Zulip message API',
|
||||
author='Zulip, Inc.',
|
||||
author_email='humbug@humbughq.com',
|
||||
classifiers=[
|
||||
'Development Status :: 3 - Alpha',
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
@ -60,8 +60,8 @@ logger.addHandler(file_handler)
|
|||
|
||||
# Initialize list of streams to test
|
||||
if options.sharded:
|
||||
# NOTE: Streams in this list must be in humbug_user's Humbug
|
||||
# subscriptions, or we won't receive messages via Humbug.
|
||||
# NOTE: Streams in this list must be in humbug_user's Zulip
|
||||
# subscriptions, or we won't receive messages via Zulip.
|
||||
|
||||
# The sharded stream list has a bunch of pairs
|
||||
# (stream, shard_name), where sha1sum(stream).startswith(shard_name)
|
||||
|
@ -105,7 +105,7 @@ def print_status_and_exit(status):
|
|||
def send_humbug(message):
|
||||
result = humbug_client.send_message(message)
|
||||
if result["result"] != "success":
|
||||
logger.error("Error sending humbug, args were:")
|
||||
logger.error("Error sending zulip, args were:")
|
||||
logger.error(message)
|
||||
logger.error(result)
|
||||
print_status_and_exit(1)
|
||||
|
@ -126,16 +126,16 @@ def send_zephyr(zwrite_args, content):
|
|||
print_status_and_exit(1)
|
||||
return False
|
||||
|
||||
# Subscribe to Humbugs
|
||||
# Subscribe to Zulip
|
||||
try:
|
||||
res = humbug_client.get_profile()
|
||||
max_message_id = res.get('max_message_id')
|
||||
if max_message_id is None:
|
||||
logging.error("Error subscribing to Humbugs!")
|
||||
logging.error("Error subscribing to Zulips!")
|
||||
logging.error(res)
|
||||
print_status_and_exit(1)
|
||||
except Exception:
|
||||
logger.exception("Unexpected error subscribing to Humbugs")
|
||||
logger.exception("Unexpected error subscribing to Zulips")
|
||||
print_status_and_exit(1)
|
||||
|
||||
# Subscribe to Zephyrs
|
||||
|
@ -234,7 +234,7 @@ for key, (stream, test) in zhkeys.items():
|
|||
receive_zephyrs()
|
||||
logger.info("Sent Zephyr messages!")
|
||||
|
||||
# Send Humbugs
|
||||
# Send Zulips
|
||||
for key, (stream, test) in hzkeys.items():
|
||||
if stream == "message":
|
||||
send_humbug({
|
||||
|
@ -251,7 +251,7 @@ for key, (stream, test) in hzkeys.items():
|
|||
})
|
||||
receive_zephyrs()
|
||||
|
||||
logger.info("Sent Humbug messages!")
|
||||
logger.info("Sent Zulip messages!")
|
||||
|
||||
# Normally messages manage to forward through in under 3 seconds, but
|
||||
# sleep 10 to give a safe margin since the messages do need to do 2
|
||||
|
@ -263,9 +263,9 @@ receive_zephyrs()
|
|||
|
||||
logger.info("Starting receiving messages!")
|
||||
|
||||
# receive humbugs
|
||||
# receive zulips
|
||||
messages = humbug_client.get_messages({'last': str(max_message_id)})['messages']
|
||||
logger.info("Finished receiving Humbug messages!")
|
||||
logger.info("Finished receiving Zulip messages!")
|
||||
|
||||
receive_zephyrs()
|
||||
logger.info("Finished receiving Zephyr messages!")
|
||||
|
@ -286,7 +286,7 @@ def process_keys(content_list):
|
|||
success = all(val == 1 for val in key_counts.values())
|
||||
return key_counts, z_missing, h_missing, duplicates, success
|
||||
|
||||
# The h_foo variables are about the messages we _received_ in Humbug
|
||||
# The h_foo variables are about the messages we _received_ in Zulip
|
||||
# The z_foo variables are about the messages we _received_ in Zephyr
|
||||
h_contents = [message["content"] for message in messages]
|
||||
z_contents = [notice.message.split('\0')[1] for notice in notices]
|
||||
|
@ -299,7 +299,7 @@ if z_success and h_success:
|
|||
elif z_success:
|
||||
logger.info("Received everything correctly in Zephyr!")
|
||||
elif h_success:
|
||||
logger.info("Received everything correctly in Humbug!")
|
||||
logger.info("Received everything correctly in Zulip!")
|
||||
|
||||
logger.error("Messages received the wrong number of times:")
|
||||
for key in all_keys:
|
||||
|
@ -311,37 +311,37 @@ for key in all_keys:
|
|||
(key, z_key_counts[key], h_key_counts[key], test, stream))
|
||||
if key in hzkeys:
|
||||
(stream, test) = hzkeys[key]
|
||||
logger.warning("%10s: z got %s. h got %s. Sent via Humbug(%s): class %s" % \
|
||||
logger.warning("%10s: z got %s. h got %s. Sent via Zulip(%s): class %s" % \
|
||||
(key, z_key_counts[key], h_key_counts[key], test, stream))
|
||||
logger.error("")
|
||||
logger.error("Summary of specific problems:")
|
||||
|
||||
if h_duplicates:
|
||||
logger.error("humbug: Received duplicate messages!")
|
||||
logger.error("humbug: This is probably a bug in our message loop detection.")
|
||||
logger.error("humbug: where Humbugs go humbug=>zephyr=>humbug")
|
||||
logger.error("zulip: Received duplicate messages!")
|
||||
logger.error("zulip: This is probably a bug in our message loop detection.")
|
||||
logger.error("zulip: where Zulips go zulip=>zephyr=>zulip")
|
||||
if z_duplicates:
|
||||
logger.error("zephyr: Received duplicate messages!")
|
||||
logger.error("zephyr: This is probably a bug in our message loop detection.")
|
||||
logger.error("zephyr: where Zephyrs go zephyr=>humbug=>zephyr")
|
||||
logger.error("zephyr: where Zephyrs go zephyr=>zulip=>zephyr")
|
||||
|
||||
if z_missing_z:
|
||||
logger.error("zephyr: Didn't receive all the Zephyrs we sent on the Zephyr end!")
|
||||
logger.error("zephyr: This is probably an issue with check-mirroring sending or receiving Zephyrs.")
|
||||
if h_missing_h:
|
||||
logger.error("humbug: Didn't receive all the Humbugs we sent on the Humbug end!")
|
||||
logger.error("humbug: This is probably an issue with check-mirroring sending or receiving Humbugs.")
|
||||
logger.error("zulip: Didn't receive all the Zulips we sent on the Zulip end!")
|
||||
logger.error("zulip: This is probably an issue with check-mirroring sending or receiving Zulips.")
|
||||
if z_missing_h:
|
||||
logger.error("zephyr: Didn't receive all the Humbugs we sent on the Zephyr end!")
|
||||
logger.error("zephyr: Didn't receive all the Zulips we sent on the Zephyr end!")
|
||||
if z_missing_h == h_missing_h:
|
||||
logger.error("zephyr: Including some Humbugs that we did receive on the Humbug end.")
|
||||
logger.error("zephyr: This suggests we have a humbug=>zephyr mirroring problem.")
|
||||
logger.error("zephyr: Including some Zulips that we did receive on the Zulip end.")
|
||||
logger.error("zephyr: This suggests we have a zulip=>zephyr mirroring problem.")
|
||||
logger.error("zephyr: aka the personals mirroring script has issues.")
|
||||
if h_missing_z:
|
||||
logger.error("humbug: Didn't receive all the Zephyrs we sent on the Humbug end!")
|
||||
logger.error("zulip: Didn't receive all the Zephyrs we sent on the Zulip end!")
|
||||
if h_missing_z == z_missing_z:
|
||||
logger.error("humbug: Including some Zephyrs that we did receive on the Zephyr end.")
|
||||
logger.error("humbug: This suggests we have a zephyr=>humbug mirroring problem.")
|
||||
logger.error("humbug: aka the global class mirroring script has issues.")
|
||||
logger.error("zulip: Including some Zephyrs that we did receive on the Zephyr end.")
|
||||
logger.error("zulip: This suggests we have a zephyr=>zulip mirroring problem.")
|
||||
logger.error("zulip: aka the global class mirroring script has issues.")
|
||||
|
||||
print_status_and_exit(1)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Humbug Inc's internal git plugin configuration.
|
||||
# Zulip, Inc's internal git plugin configuration.
|
||||
# The plugin and example config are under api/integrations/
|
||||
|
||||
# Leaving all the instructions out of this file to avoid having to
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Humbug Inc's internal trac plugin configuration.
|
||||
# Zulip, Inc's internal trac plugin configuration.
|
||||
# The plugin and example config are under api/integrations/
|
||||
|
||||
# Leaving all the instructions out of this file to avoid having to
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (C) 2012 Humbug, Inc.
|
||||
# Copyright (C) 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
@ -26,7 +26,7 @@ from os import path, environ
|
|||
|
||||
|
||||
# Configure this script as a Tddium post-build task and it will send
|
||||
# messages to Humbug when a build finishes.
|
||||
# messages to Zulip when a build finishes.
|
||||
#
|
||||
# Expects Tddium environment variables plus:
|
||||
#
|
||||
|
@ -64,5 +64,5 @@ result = client.send_message(dict(
|
|||
(repo_name, environ['TDDIUM_BUILD_STATUS'], report_url)))
|
||||
|
||||
if result['result'] != 'success':
|
||||
sys.stderr.write('Error sending to Humbug:\n%s\n' % (result['msg'],))
|
||||
sys.stderr.write('Error sending to Zulip:\n%s\n' % (result['msg'],))
|
||||
sys.exit(1)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (C) 2012 Humbug, Inc.
|
||||
# Copyright (C) 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (C) 2012 Humbug, Inc.
|
||||
# Copyright (C) 2012 Zulip, Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
|
@ -143,7 +143,7 @@ def send_humbug(zeph):
|
|||
message['time'] = zeph['time']
|
||||
message['sender'] = to_humbug_username(zeph['sender'])
|
||||
if "subject" in zeph:
|
||||
# Truncate the subject to the current limit in Humbug. No
|
||||
# Truncate the subject to the current limit in Zulip. No
|
||||
# need to do this for stream names, since we're only
|
||||
# subscribed to valid stream names.
|
||||
message["subject"] = zeph["subject"][:60]
|
||||
|
@ -952,6 +952,6 @@ or specify the --api-key-file option.""" % (options.api_key_file,))))
|
|||
if options.shard is not None:
|
||||
logger_name += "(%s)" % (options.shard,)
|
||||
configure_logger(logger, logger_name)
|
||||
# Have the kernel reap children for when we fork off processes to send Humbugs
|
||||
# Have the kernel reap children for when we fork off processes to send Zulips
|
||||
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
|
||||
zephyr_to_humbug(options)
|
||||
|
|
|
@ -55,7 +55,7 @@ urlpatterns = patterns('',
|
|||
url(r'^terms/$', TemplateView.as_view(template_name='zerver/terms.html')),
|
||||
url(r'^privacy/$', TemplateView.as_view(template_name='zerver/privacy.html')),
|
||||
|
||||
# "About Humbug" information
|
||||
# "About Zulip" information
|
||||
url(r'^what-is-humbug/$', TemplateView.as_view(template_name='zerver/what-is-humbug.html')),
|
||||
url(r'^new-user/$', TemplateView.as_view(template_name='zerver/new-user.html')),
|
||||
url(r'^features/$', TemplateView.as_view(template_name='zerver/features.html')),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Delete the "guest" default user and replace it with a Humbug user
|
||||
# Delete the "guest" default user and replace it with a Zulip user
|
||||
# with a real password
|
||||
|
||||
rabbitmqctl delete_user guest
|
||||
|
|
|
@ -15,7 +15,7 @@ Listen 80
|
|||
# Server Name Indication for SSL named virtual hosts is currently not
|
||||
# supported by MSIE on Windows XP.
|
||||
|
||||
# This line added by Humbug.
|
||||
# This line added by Zulip.
|
||||
NameVirtualHost *:443
|
||||
|
||||
Listen 443
|
||||
|
|
|
@ -96,7 +96,7 @@ define service {
|
|||
service_description Check feedback bot
|
||||
check_command check_feedback_bot!22
|
||||
host bots
|
||||
# Feedback isn't lost, it just isn't reported through Humbug
|
||||
# Feedback isn't lost, it just isn't reported through Zulip
|
||||
# if the bot is down, so don't page.
|
||||
contact_groups admins
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Humbug Inc's internal nagios plugin configuration.
|
||||
# Zulip, Inc's internal nagios plugin configuration.
|
||||
# The plugin and example config are under api/integrations/
|
||||
|
||||
[api]
|
||||
|
|
|
@ -78,12 +78,12 @@ def report(state, time, msg=None):
|
|||
def send_humbug(sender, message):
|
||||
result = sender.send_message(message)
|
||||
if result["result"] != "success" and options.nagios:
|
||||
report("CRITICAL", "Error sending Humbug, args were: %s, %s" % (message, result))
|
||||
report("CRITICAL", "Error sending Zulip, args were: %s, %s" % (message, result))
|
||||
|
||||
def get_humbug(recipient, max_message_id):
|
||||
result = recipient.get_messages({'last': str(max_message_id)})
|
||||
if result['result'] != "success" and options.nagios:
|
||||
report("CRITICAL", "Error receiving Humbugs, args were: %s, %s" % (max_message_id, result))
|
||||
report("CRITICAL", "Error receiving Zulips, args were: %s, %s" % (max_message_id, result))
|
||||
return result['messages']
|
||||
|
||||
if "staging" in options.site:
|
||||
|
|
|
@ -26,7 +26,7 @@ wiki_format_messages = true
|
|||
humbug_trac = enabled
|
||||
|
||||
[header_logo]
|
||||
alt = Humbug
|
||||
alt = Zulip
|
||||
height = 100
|
||||
src = site/humbug_logo.png
|
||||
width = 100
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
port: 5001
|
||||
# sets the port on which the web server will run.
|
||||
|
||||
wiki-title: Humbug Wiki
|
||||
wiki-title: Zulip Wiki
|
||||
# the title of the wiki.
|
||||
|
||||
repository-type: Git
|
||||
|
|
|
@ -9,7 +9,7 @@ class humbug::zmirror {
|
|||
# Configuring Kerberos and Zephyr for the MIT realm
|
||||
# Building python-zephyr after cloning it from https://github.com/ebroder/python-zephyr
|
||||
# Putting tabbott/extra's keytab on the system at /home/humbug/tabbott.extra.keytab
|
||||
# Setting api/bots/zephyr-mirror-crontab to be the Humbug user's crontab
|
||||
# Setting api/bots/zephyr-mirror-crontab to be the humbug user's crontab
|
||||
# Running the mirroring bot in a screen session with these arguments:
|
||||
# /home/humbug/api/bots/zephyr_mirror.py --root-path=/home/humbug/ --user=tabbott/extra --enable-log=/home/humbug/all_zephyrs_log --forward-class-messages
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Zulip, from Humbug Inc.</title>
|
||||
<title>Zulip, from Zulip, Inc.</title>
|
||||
<link href="/static/third/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<!-- NB: Relies on the fact that PipelineCachedStorage also includes
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Zulip, from Humbug Inc.</title>
|
||||
<title>Zulip, from Zulip, Inc.</title>
|
||||
<link href="/static/third/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<!-- NB: Relies on the fact that PipelineCachedStorage also includes
|
||||
|
|
|
@ -47,7 +47,7 @@ function amount_to_paginate() {
|
|||
var info = viewport.message_viewport_info();
|
||||
var page_size = info.visible_height;
|
||||
|
||||
// We don't want to page up a full page, because Humbug users
|
||||
// We don't want to page up a full page, because Zulip users
|
||||
// are especially worried about missing messages, so we want
|
||||
// a little bit of the old page to stay on the screen. The
|
||||
// value chosen here is roughly 2 or 3 lines of text, but there
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
$.fn.filedrop = function(options) {
|
||||
var opts = $.extend({}, default_opts, options),
|
||||
global_progress = []
|
||||
// Humbug modification: keep a pointer to the object that the function
|
||||
// Zulip modification: keep a pointer to the object that the function
|
||||
// was invoked on.
|
||||
caller = this;
|
||||
|
||||
|
@ -286,7 +286,7 @@
|
|||
boundary = '------multipartformboundary' + (new Date()).getTime(),
|
||||
upload = xhr.upload;
|
||||
|
||||
// Humbug modification: Shunt the XHR into the parent object so we
|
||||
// Zulip modification: Shunt the XHR into the parent object so we
|
||||
// can interrupt it later.
|
||||
caller.data("filedrop_xhr", xhr);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Modified by Humbug, Inc.
|
||||
* Modified by Zulip, Inc.
|
||||
*/
|
||||
|
||||
/** @preserve
|
||||
|
|
|
@ -28,7 +28,7 @@ hence the name.
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{# This lets people override things if they don't want a giant "Humbug" #}
|
||||
{# This lets people override things if they don't want a giant "Zulip" #}
|
||||
{% block inner_content %}
|
||||
<div class="row-fluid">
|
||||
<div class="content">
|
||||
|
|
|
@ -10,5 +10,5 @@ Hello,
|
|||
|
||||
Cheers,
|
||||
|
||||
Humbug Legal Bot
|
||||
Zulip Legal Bot
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copy this file to ~/.msmtprc, then add your Humbug Mail
|
||||
# Copy this file to ~/.msmtprc, then add your Zulip Mail
|
||||
# address and password here.
|
||||
|
||||
from you@zulip.com
|
||||
|
|
|
@ -63,7 +63,7 @@ with open('tools/print-all/tex/preamble.tex', 'w') as f:
|
|||
f.write(r'''
|
||||
\begin{center}
|
||||
|
||||
{\Huge Humbug, Inc. code printout}\\[1cm]
|
||||
{\Huge Zulip, Inc. code printout}\\[1cm]
|
||||
|
||||
{\Large Generated on \today\\[1cm]
|
||||
|
||||
|
|
|
@ -378,7 +378,7 @@ def sanitize_url(url):
|
|||
if scheme == '' and netloc == '' and '@' in path:
|
||||
scheme = 'mailto'
|
||||
|
||||
# Humbug modification: If scheme is not specified, assume http://
|
||||
# Zulip modification: If scheme is not specified, assume http://
|
||||
# It's unlikely that users want relative links within zulip.com.
|
||||
# We re-enter sanitize_url because netloc etc. need to be re-parsed.
|
||||
if not scheme:
|
||||
|
@ -681,7 +681,7 @@ def _sanitize_for_log(md):
|
|||
current_message = None
|
||||
|
||||
def do_convert(md, realm_domain=None, message=None):
|
||||
"""Convert Markdown to HTML, with Humbug-specific settings and hacks."""
|
||||
"""Convert Markdown to HTML, with Zulip-specific settings and hacks."""
|
||||
|
||||
if realm_domain in md_engines:
|
||||
_md_engine = md_engines[realm_domain]
|
||||
|
|
|
@ -42,7 +42,7 @@ def compute_stats(log_level):
|
|||
total_counts[client_name] += count
|
||||
total_user_counts[email] += count
|
||||
|
||||
logging.debug("%40s | %10s | %s" % ("User", "Messages", "Percentage Humbug"))
|
||||
logging.debug("%40s | %10s | %s" % ("User", "Messages", "Percentage Zulip"))
|
||||
top_percents = {}
|
||||
for size in [10, 25, 50, 100, 200, len(total_user_counts.keys())]:
|
||||
top_percents[size] = 0
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
license, information about that license will appear in this file.
|
||||
|
||||
All other software provided in this file is
|
||||
Copyright (c) 2012-2013 Humbug, Inc. and is provided under the license
|
||||
Copyright (c) 2012-2013 Zulip, Inc. and is provided under the license
|
||||
described in the Zulip Terms of Service: https://zulip.com/terms
|
||||
*/
|
||||
|
|
|
@ -1435,7 +1435,7 @@ class InviteUserTest(AuthedTestCase):
|
|||
|
||||
def invite(self, users, streams):
|
||||
"""
|
||||
Invites the specified users to Humbug with the specified streams.
|
||||
Invites the specified users to Zulip with the specified streams.
|
||||
|
||||
users should be a string containing the users to invite, comma or
|
||||
newline separated.
|
||||
|
@ -1507,7 +1507,7 @@ earl-test@zulip.com""", ["Denmark"]))
|
|||
|
||||
def test_invite_existing_user(self):
|
||||
"""
|
||||
If you invite an address already using Humbug, no invitation is sent.
|
||||
If you invite an address already using Zulip, no invitation is sent.
|
||||
"""
|
||||
self.login("hamlet@zulip.com")
|
||||
self.assert_json_error(
|
||||
|
@ -2291,8 +2291,8 @@ int x = 3
|
|||
'<p>%s</p>', 'https://jira.atlassian.com/browse/JRA-31953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel'),
|
||||
('http://web.archive.org/web/20120630032016/http://web.mit.edu/mitcard/idpolicies.html', '<p>%s</p>',
|
||||
'http://web.archive.org/web/20120630032016/http://web.mit.edu/mitcard/idpolicies.html'),
|
||||
('https://www.dropbox.com/sh/7d0ved3h5kf7dj8/_aD5_ceDFY?lst#f:Humbug-062-subscriptions-page-3rd-ver.fw.png',
|
||||
'<p>%s</p>', 'https://www.dropbox.com/sh/7d0ved3h5kf7dj8/_aD5_ceDFY?lst#f:Humbug-062-subscriptions-page-3rd-ver.fw.png'),
|
||||
('https://www.dropbox.com/sh/7d0ved3h5kf7dj8/_aD5_ceDFY?lst#f:Zulip-062-subscriptions-page-3rd-ver.fw.png',
|
||||
'<p>%s</p>', 'https://www.dropbox.com/sh/7d0ved3h5kf7dj8/_aD5_ceDFY?lst#f:Zulip-062-subscriptions-page-3rd-ver.fw.png'),
|
||||
('http://www.postgresql.org/message-id/14040.1364490185@sss.pgh.pa.us', '<p>%s</p>',
|
||||
'http://www.postgresql.org/message-id/14040.1364490185@sss.pgh.pa.us'),
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ casper.waitUntilVisible('#zhome', function () {
|
|||
casper.waitUntilVisible('#zfilt', function () {
|
||||
expect_huddle();
|
||||
|
||||
// Un-narrow by clicking "Humbug"
|
||||
// Un-narrow by clicking "Zulip"
|
||||
casper.test.info('Un-narrowing');
|
||||
casper.click('.brand');
|
||||
});
|
||||
|
|
|
@ -62,7 +62,7 @@ casper.waitUntilVisible('#settings-status', function () {
|
|||
casper.test.assertSelectorHasText('#settings-status', 'Updated settings!');
|
||||
});
|
||||
|
||||
// TODO: test the "Declare Humbug Bankruptcy option"
|
||||
// TODO: test the "Declare Zulip Bankruptcy option"
|
||||
|
||||
common.then_log_out();
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ def principal_to_user_profile(agent, principal):
|
|||
or agent.realm.domain == 'mit.edu'
|
||||
or agent.realm != principal_user_profile.realm):
|
||||
# We have to make sure we don't leak information about which users
|
||||
# are registered for Humbug in a different realm. We could do
|
||||
# are registered for Zulip in a different realm. We could do
|
||||
# something a little more clever and check the domain part of the
|
||||
# principal to maybe give a better error message
|
||||
raise PrincipalError(principal)
|
||||
|
@ -1074,7 +1074,7 @@ def is_super_user_api(request):
|
|||
def mit_to_mit(user_profile, email):
|
||||
# Are the sender and recipient both @mit.edu addresses?
|
||||
# We have to handle this specially, inferring the domain from the
|
||||
# e-mail address, because the recipient may not existing in Humbug
|
||||
# e-mail address, because the recipient may not existing in Zulip
|
||||
# and we may need to make a stub MIT user on the fly.
|
||||
try:
|
||||
validators.validate_email(email)
|
||||
|
@ -1321,7 +1321,7 @@ def add_subscriptions_backend(request, user_profile,
|
|||
notifications = []
|
||||
for email, subscriptions in result["subscribed"].iteritems():
|
||||
if email == user_profile.email:
|
||||
# Don't send a Humbug if you invited yourself.
|
||||
# Don't send a Zulip if you invited yourself.
|
||||
continue
|
||||
|
||||
if len(subscriptions) == 1:
|
||||
|
|
Loading…
Reference in New Issue