mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
Change Humbug => Zulip in text/comments.
(imported from commit 2f9d73431ae40e1b9e9e11bc2f4f62f566ae758a)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#### Dependencies
|
#### Dependencies
|
||||||
|
|
||||||
The Humbug API Python bindings require the following Python libraries:
|
The Zulip API Python bindings require the following Python libraries:
|
||||||
|
|
||||||
* simplejson
|
* simplejson
|
||||||
* requests (version >= 0.12.1)
|
* 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
|
examples, which is especially useful if you are running several bots
|
||||||
which share a home directory.
|
which share a home directory.
|
||||||
|
|
||||||
You can obtain your Humbug API key, create bots, and manage bots all
|
You can obtain your Zulip API key, create bots, and manage bots all
|
||||||
from your Humbug [settings page](https://zulip.com/#settings).
|
from your Zulip [settings page](https://zulip.com/#settings).
|
||||||
|
|
||||||
A typical simple bot sending API messages will look as follows:
|
A typical simple bot sending API messages will look as follows:
|
||||||
|
|
||||||
At the top of the file:
|
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
|
import humbug
|
||||||
humbug_client = humbug.Client(email="your-bot@example.com")
|
humbug_client = humbug.Client(email="your-bot@example.com")
|
||||||
|
|
||||||
@@ -57,9 +57,9 @@ When you want to send a message:
|
|||||||
|
|
||||||
Additional examples:
|
Additional examples:
|
||||||
|
|
||||||
client.send_message({'type': 'stream', 'content': 'Humbug rules!',
|
client.send_message({'type': 'stream', 'content': 'Zulip rules!',
|
||||||
'subject': 'feedback', 'to': ['support']})
|
'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']})
|
'to': ['user1@example.com', 'user2@example.com']})
|
||||||
|
|
||||||
send_message() returns a dict guaranteed to contain the following
|
send_message() returns a dict guaranteed to contain the following
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# humbug-send -- Sends a message to the specified recipients.
|
# 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
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# 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'))
|
RSS_DATA_DIR = os.path.expanduser(os.path.join('~', '.cache', 'humbug-rss'))
|
||||||
OLDNESS_THRESHOLD = 30 # days
|
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.
|
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"
|
%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
|
Depends on: twitter-python
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2013 Humbug, Inc.
|
# Copyright © 2013 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright © 2013 Humbug, Inc.
|
# Copyright © 2013 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# 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 for cases where you don't want a notice sent
|
||||||
return None
|
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
|
## path, but if not, set a custom path below
|
||||||
HUMBUG_API_PATH = None
|
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"
|
HUMBUG_SITE = "https://api.zulip.com"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Humbug notification post-receive hook.
|
# Zulip notification post-receive hook.
|
||||||
# Copyright © 2012-2013 Humbug, Inc.
|
# Copyright © 2012-2013 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# 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
|
package org.humbug.jira
|
||||||
@@ -20,7 +20,7 @@ import org.apache.commons.httpclient.NameValuePair
|
|||||||
class HumbugListener extends AbstractIssueEventListener {
|
class HumbugListener extends AbstractIssueEventListener {
|
||||||
Logger LOGGER = Logger.getLogger(HumbugListener.class.getName());
|
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 = ""
|
String humbugEmail = ""
|
||||||
// That bot's API key.
|
// That bot's API key.
|
||||||
String humbugAPIKey = ""
|
String humbugAPIKey = ""
|
||||||
@@ -113,7 +113,7 @@ class HumbugListener extends AbstractIssueEventListener {
|
|||||||
for (NameValuePair pair: parameters) {
|
for (NameValuePair pair: parameters) {
|
||||||
params += "\n" + pair.getName() + ":" + pair.getValue()
|
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)
|
"We sent:" + params)
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ define contact{
|
|||||||
host_notification_commands notify-host-by-humbug
|
host_notification_commands notify-host-by-humbug
|
||||||
}
|
}
|
||||||
|
|
||||||
# Humbug commands
|
# Zulip commands
|
||||||
define command {
|
define command {
|
||||||
command_name notify-host-by-humbug
|
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$"
|
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
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright © 2013 Humbug, Inc.
|
# Copyright © 2013 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# 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 for cases where you don't want a notice sent
|
||||||
return None
|
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
|
## path, but if not, set a custom path below
|
||||||
HUMBUG_API_PATH = None
|
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"
|
HUMBUG_SITE = "https://api.zulip.com"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Humbug notification post-commit hook.
|
# Zulip notification post-commit hook.
|
||||||
# Copyright © 2012-2013 Humbug, Inc.
|
# Copyright © 2012-2013 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
# THE SOFTWARE.
|
# 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
|
# Install by copying this file and humbug_trac_config.py to the trac
|
||||||
# plugins/ subdirectory, customizing the constants in
|
# plugins/ subdirectory, customizing the constants in
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright © 2012 Humbug, Inc.
|
# Copyright © 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# 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)
|
# type, versions, description, resolution, summary, comment)
|
||||||
#
|
#
|
||||||
# The following is the list of fields which can be changed without
|
# 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.
|
# workflow.
|
||||||
TRAC_NOTIFY_FIELDS = ["description", "summary", "resolution", "comment",
|
TRAC_NOTIFY_FIELDS = ["description", "summary", "resolution", "comment",
|
||||||
"owner"]
|
"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
|
## path, but if not, set a custom path below
|
||||||
HUMBUG_API_PATH = None
|
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"
|
HUMBUG_SITE = "https://api.zulip.com"
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ def recur_expand(target_root, dir):
|
|||||||
|
|
||||||
setup(name='humbug',
|
setup(name='humbug',
|
||||||
version=humbug.__version__,
|
version=humbug.__version__,
|
||||||
description='Bindings for the Humbug message API',
|
description='Bindings for the Zulip message API',
|
||||||
author='Humbug, Inc.',
|
author='Zulip, Inc.',
|
||||||
author_email='humbug@humbughq.com',
|
author_email='humbug@humbughq.com',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 3 - Alpha',
|
'Development Status :: 3 - Alpha',
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
</dc:creator>
|
</dc:creator>
|
||||||
<dc:rights>
|
<dc:rights>
|
||||||
<cc:Agent>
|
<cc:Agent>
|
||||||
<dc:title>© 2012 Humbug, Inc. All Rights Reserved</dc:title>
|
<dc:title>© 2012 Zulip, Inc. All Rights Reserved</dc:title>
|
||||||
</cc:Agent>
|
</cc:Agent>
|
||||||
</dc:rights>
|
</dc:rights>
|
||||||
<dc:date>28 Sept 2012</dc:date>
|
<dc:date>28 Sept 2012</dc:date>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
@@ -60,7 +60,7 @@
|
|||||||
</dc:creator>
|
</dc:creator>
|
||||||
<dc:rights>
|
<dc:rights>
|
||||||
<cc:Agent>
|
<cc:Agent>
|
||||||
<dc:title>© 2012 Humbug, Inc. All Rights Reserved</dc:title>
|
<dc:title>© 2012 Zulip, Inc. All Rights Reserved</dc:title>
|
||||||
</cc:Agent>
|
</cc:Agent>
|
||||||
</dc:rights>
|
</dc:rights>
|
||||||
<dc:date>28 Sept 2012</dc:date>
|
<dc:date>28 Sept 2012</dc:date>
|
||||||
|
|||||||
|
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
|
# Initialize list of streams to test
|
||||||
if options.sharded:
|
if options.sharded:
|
||||||
# NOTE: Streams in this list must be in humbug_user's Humbug
|
# NOTE: Streams in this list must be in humbug_user's Zulip
|
||||||
# subscriptions, or we won't receive messages via Humbug.
|
# subscriptions, or we won't receive messages via Zulip.
|
||||||
|
|
||||||
# The sharded stream list has a bunch of pairs
|
# The sharded stream list has a bunch of pairs
|
||||||
# (stream, shard_name), where sha1sum(stream).startswith(shard_name)
|
# (stream, shard_name), where sha1sum(stream).startswith(shard_name)
|
||||||
@@ -105,7 +105,7 @@ def print_status_and_exit(status):
|
|||||||
def send_humbug(message):
|
def send_humbug(message):
|
||||||
result = humbug_client.send_message(message)
|
result = humbug_client.send_message(message)
|
||||||
if result["result"] != "success":
|
if result["result"] != "success":
|
||||||
logger.error("Error sending humbug, args were:")
|
logger.error("Error sending zulip, args were:")
|
||||||
logger.error(message)
|
logger.error(message)
|
||||||
logger.error(result)
|
logger.error(result)
|
||||||
print_status_and_exit(1)
|
print_status_and_exit(1)
|
||||||
@@ -126,16 +126,16 @@ def send_zephyr(zwrite_args, content):
|
|||||||
print_status_and_exit(1)
|
print_status_and_exit(1)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Subscribe to Humbugs
|
# Subscribe to Zulip
|
||||||
try:
|
try:
|
||||||
res = humbug_client.get_profile()
|
res = humbug_client.get_profile()
|
||||||
max_message_id = res.get('max_message_id')
|
max_message_id = res.get('max_message_id')
|
||||||
if max_message_id is None:
|
if max_message_id is None:
|
||||||
logging.error("Error subscribing to Humbugs!")
|
logging.error("Error subscribing to Zulips!")
|
||||||
logging.error(res)
|
logging.error(res)
|
||||||
print_status_and_exit(1)
|
print_status_and_exit(1)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Unexpected error subscribing to Humbugs")
|
logger.exception("Unexpected error subscribing to Zulips")
|
||||||
print_status_and_exit(1)
|
print_status_and_exit(1)
|
||||||
|
|
||||||
# Subscribe to Zephyrs
|
# Subscribe to Zephyrs
|
||||||
@@ -234,7 +234,7 @@ for key, (stream, test) in zhkeys.items():
|
|||||||
receive_zephyrs()
|
receive_zephyrs()
|
||||||
logger.info("Sent Zephyr messages!")
|
logger.info("Sent Zephyr messages!")
|
||||||
|
|
||||||
# Send Humbugs
|
# Send Zulips
|
||||||
for key, (stream, test) in hzkeys.items():
|
for key, (stream, test) in hzkeys.items():
|
||||||
if stream == "message":
|
if stream == "message":
|
||||||
send_humbug({
|
send_humbug({
|
||||||
@@ -251,7 +251,7 @@ for key, (stream, test) in hzkeys.items():
|
|||||||
})
|
})
|
||||||
receive_zephyrs()
|
receive_zephyrs()
|
||||||
|
|
||||||
logger.info("Sent Humbug messages!")
|
logger.info("Sent Zulip messages!")
|
||||||
|
|
||||||
# Normally messages manage to forward through in under 3 seconds, but
|
# 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
|
# 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!")
|
logger.info("Starting receiving messages!")
|
||||||
|
|
||||||
# receive humbugs
|
# receive zulips
|
||||||
messages = humbug_client.get_messages({'last': str(max_message_id)})['messages']
|
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()
|
receive_zephyrs()
|
||||||
logger.info("Finished receiving Zephyr messages!")
|
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())
|
success = all(val == 1 for val in key_counts.values())
|
||||||
return key_counts, z_missing, h_missing, duplicates, success
|
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
|
# The z_foo variables are about the messages we _received_ in Zephyr
|
||||||
h_contents = [message["content"] for message in messages]
|
h_contents = [message["content"] for message in messages]
|
||||||
z_contents = [notice.message.split('\0')[1] for notice in notices]
|
z_contents = [notice.message.split('\0')[1] for notice in notices]
|
||||||
@@ -299,7 +299,7 @@ if z_success and h_success:
|
|||||||
elif z_success:
|
elif z_success:
|
||||||
logger.info("Received everything correctly in Zephyr!")
|
logger.info("Received everything correctly in Zephyr!")
|
||||||
elif h_success:
|
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:")
|
logger.error("Messages received the wrong number of times:")
|
||||||
for key in all_keys:
|
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))
|
(key, z_key_counts[key], h_key_counts[key], test, stream))
|
||||||
if key in hzkeys:
|
if key in hzkeys:
|
||||||
(stream, test) = hzkeys[key]
|
(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))
|
(key, z_key_counts[key], h_key_counts[key], test, stream))
|
||||||
logger.error("")
|
logger.error("")
|
||||||
logger.error("Summary of specific problems:")
|
logger.error("Summary of specific problems:")
|
||||||
|
|
||||||
if h_duplicates:
|
if h_duplicates:
|
||||||
logger.error("humbug: Received duplicate messages!")
|
logger.error("zulip: Received duplicate messages!")
|
||||||
logger.error("humbug: This is probably a bug in our message loop detection.")
|
logger.error("zulip: This is probably a bug in our message loop detection.")
|
||||||
logger.error("humbug: where Humbugs go humbug=>zephyr=>humbug")
|
logger.error("zulip: where Zulips go zulip=>zephyr=>zulip")
|
||||||
if z_duplicates:
|
if z_duplicates:
|
||||||
logger.error("zephyr: Received duplicate messages!")
|
logger.error("zephyr: Received duplicate messages!")
|
||||||
logger.error("zephyr: This is probably a bug in our message loop detection.")
|
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:
|
if z_missing_z:
|
||||||
logger.error("zephyr: Didn't receive all the Zephyrs we sent on the Zephyr end!")
|
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.")
|
logger.error("zephyr: This is probably an issue with check-mirroring sending or receiving Zephyrs.")
|
||||||
if h_missing_h:
|
if h_missing_h:
|
||||||
logger.error("humbug: Didn't receive all the Humbugs we sent on the Humbug end!")
|
logger.error("zulip: Didn't receive all the Zulips we sent on the Zulip end!")
|
||||||
logger.error("humbug: This is probably an issue with check-mirroring sending or receiving Humbugs.")
|
logger.error("zulip: This is probably an issue with check-mirroring sending or receiving Zulips.")
|
||||||
if z_missing_h:
|
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:
|
if z_missing_h == h_missing_h:
|
||||||
logger.error("zephyr: Including some Humbugs that we did receive on the Humbug end.")
|
logger.error("zephyr: Including some Zulips that we did receive on the Zulip end.")
|
||||||
logger.error("zephyr: This suggests we have a humbug=>zephyr mirroring problem.")
|
logger.error("zephyr: This suggests we have a zulip=>zephyr mirroring problem.")
|
||||||
logger.error("zephyr: aka the personals mirroring script has issues.")
|
logger.error("zephyr: aka the personals mirroring script has issues.")
|
||||||
if h_missing_z:
|
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:
|
if h_missing_z == z_missing_z:
|
||||||
logger.error("humbug: Including some Zephyrs that we did receive on the Zephyr end.")
|
logger.error("zulip: 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("zulip: This suggests we have a zephyr=>zulip mirroring problem.")
|
||||||
logger.error("humbug: aka the global class mirroring script has issues.")
|
logger.error("zulip: aka the global class mirroring script has issues.")
|
||||||
|
|
||||||
print_status_and_exit(1)
|
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/
|
# The plugin and example config are under api/integrations/
|
||||||
|
|
||||||
# Leaving all the instructions out of this file to avoid having to
|
# 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/
|
# The plugin and example config are under api/integrations/
|
||||||
|
|
||||||
# Leaving all the instructions out of this file to avoid having to
|
# Leaving all the instructions out of this file to avoid having to
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# Copyright (C) 2012 Humbug, Inc.
|
# Copyright (C) 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person
|
# Permission is hereby granted, free of charge, to any person
|
||||||
# obtaining a copy of this software and associated documentation files
|
# 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
|
# 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:
|
# Expects Tddium environment variables plus:
|
||||||
#
|
#
|
||||||
@@ -64,5 +64,5 @@ result = client.send_message(dict(
|
|||||||
(repo_name, environ['TDDIUM_BUILD_STATUS'], report_url)))
|
(repo_name, environ['TDDIUM_BUILD_STATUS'], report_url)))
|
||||||
|
|
||||||
if result['result'] != 'success':
|
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)
|
sys.exit(1)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# Copyright (C) 2012 Humbug, Inc.
|
# Copyright (C) 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person
|
# Permission is hereby granted, free of charge, to any person
|
||||||
# obtaining a copy of this software and associated documentation files
|
# obtaining a copy of this software and associated documentation files
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# Copyright (C) 2012 Humbug, Inc.
|
# Copyright (C) 2012 Zulip, Inc.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person
|
# Permission is hereby granted, free of charge, to any person
|
||||||
# obtaining a copy of this software and associated documentation files
|
# obtaining a copy of this software and associated documentation files
|
||||||
@@ -143,7 +143,7 @@ def send_humbug(zeph):
|
|||||||
message['time'] = zeph['time']
|
message['time'] = zeph['time']
|
||||||
message['sender'] = to_humbug_username(zeph['sender'])
|
message['sender'] = to_humbug_username(zeph['sender'])
|
||||||
if "subject" in zeph:
|
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
|
# need to do this for stream names, since we're only
|
||||||
# subscribed to valid stream names.
|
# subscribed to valid stream names.
|
||||||
message["subject"] = zeph["subject"][:60]
|
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:
|
if options.shard is not None:
|
||||||
logger_name += "(%s)" % (options.shard,)
|
logger_name += "(%s)" % (options.shard,)
|
||||||
configure_logger(logger, logger_name)
|
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)
|
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
|
||||||
zephyr_to_humbug(options)
|
zephyr_to_humbug(options)
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ urlpatterns = patterns('',
|
|||||||
url(r'^terms/$', TemplateView.as_view(template_name='zerver/terms.html')),
|
url(r'^terms/$', TemplateView.as_view(template_name='zerver/terms.html')),
|
||||||
url(r'^privacy/$', TemplateView.as_view(template_name='zerver/privacy.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'^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'^new-user/$', TemplateView.as_view(template_name='zerver/new-user.html')),
|
||||||
url(r'^features/$', TemplateView.as_view(template_name='zerver/features.html')),
|
url(r'^features/$', TemplateView.as_view(template_name='zerver/features.html')),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/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
|
# with a real password
|
||||||
|
|
||||||
rabbitmqctl delete_user guest
|
rabbitmqctl delete_user guest
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Listen 80
|
|||||||
# Server Name Indication for SSL named virtual hosts is currently not
|
# Server Name Indication for SSL named virtual hosts is currently not
|
||||||
# supported by MSIE on Windows XP.
|
# supported by MSIE on Windows XP.
|
||||||
|
|
||||||
# This line added by Humbug.
|
# This line added by Zulip.
|
||||||
NameVirtualHost *:443
|
NameVirtualHost *:443
|
||||||
|
|
||||||
Listen 443
|
Listen 443
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ define service {
|
|||||||
service_description Check feedback bot
|
service_description Check feedback bot
|
||||||
check_command check_feedback_bot!22
|
check_command check_feedback_bot!22
|
||||||
host bots
|
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.
|
# if the bot is down, so don't page.
|
||||||
contact_groups admins
|
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/
|
# The plugin and example config are under api/integrations/
|
||||||
|
|
||||||
[api]
|
[api]
|
||||||
|
|||||||
@@ -78,12 +78,12 @@ def report(state, time, msg=None):
|
|||||||
def send_humbug(sender, message):
|
def send_humbug(sender, message):
|
||||||
result = sender.send_message(message)
|
result = sender.send_message(message)
|
||||||
if result["result"] != "success" and options.nagios:
|
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):
|
def get_humbug(recipient, max_message_id):
|
||||||
result = recipient.get_messages({'last': str(max_message_id)})
|
result = recipient.get_messages({'last': str(max_message_id)})
|
||||||
if result['result'] != "success" and options.nagios:
|
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']
|
return result['messages']
|
||||||
|
|
||||||
if "staging" in options.site:
|
if "staging" in options.site:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ wiki_format_messages = true
|
|||||||
humbug_trac = enabled
|
humbug_trac = enabled
|
||||||
|
|
||||||
[header_logo]
|
[header_logo]
|
||||||
alt = Humbug
|
alt = Zulip
|
||||||
height = 100
|
height = 100
|
||||||
src = site/humbug_logo.png
|
src = site/humbug_logo.png
|
||||||
width = 100
|
width = 100
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
port: 5001
|
port: 5001
|
||||||
# sets the port on which the web server will run.
|
# sets the port on which the web server will run.
|
||||||
|
|
||||||
wiki-title: Humbug Wiki
|
wiki-title: Zulip Wiki
|
||||||
# the title of the wiki.
|
# the title of the wiki.
|
||||||
|
|
||||||
repository-type: Git
|
repository-type: Git
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class humbug::zmirror {
|
|||||||
# Configuring Kerberos and Zephyr for the MIT realm
|
# Configuring Kerberos and Zephyr for the MIT realm
|
||||||
# Building python-zephyr after cloning it from https://github.com/ebroder/python-zephyr
|
# 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
|
# 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:
|
# 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
|
# /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>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<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.min.css" rel="stylesheet">
|
||||||
<link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
<!-- NB: Relies on the fact that PipelineCachedStorage also includes
|
<!-- NB: Relies on the fact that PipelineCachedStorage also includes
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<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.min.css" rel="stylesheet">
|
||||||
<link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
<link href="/static/third/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||||
<!-- NB: Relies on the fact that PipelineCachedStorage also includes
|
<!-- NB: Relies on the fact that PipelineCachedStorage also includes
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function amount_to_paginate() {
|
|||||||
var info = viewport.message_viewport_info();
|
var info = viewport.message_viewport_info();
|
||||||
var page_size = info.visible_height;
|
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
|
// are especially worried about missing messages, so we want
|
||||||
// a little bit of the old page to stay on the screen. The
|
// 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
|
// value chosen here is roughly 2 or 3 lines of text, but there
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
$.fn.filedrop = function(options) {
|
$.fn.filedrop = function(options) {
|
||||||
var opts = $.extend({}, default_opts, options),
|
var opts = $.extend({}, default_opts, options),
|
||||||
global_progress = []
|
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.
|
// was invoked on.
|
||||||
caller = this;
|
caller = this;
|
||||||
|
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
boundary = '------multipartformboundary' + (new Date()).getTime(),
|
boundary = '------multipartformboundary' + (new Date()).getTime(),
|
||||||
upload = xhr.upload;
|
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.
|
// can interrupt it later.
|
||||||
caller.data("filedrop_xhr", xhr);
|
caller.data("filedrop_xhr", xhr);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Modified by Humbug, Inc.
|
* Modified by Zulip, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @preserve
|
/** @preserve
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ hence the name.
|
|||||||
</div>
|
</div>
|
||||||
</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 %}
|
{% block inner_content %}
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ Hello,
|
|||||||
|
|
||||||
Cheers,
|
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.
|
# address and password here.
|
||||||
|
|
||||||
from you@zulip.com
|
from you@zulip.com
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ with open('tools/print-all/tex/preamble.tex', 'w') as f:
|
|||||||
f.write(r'''
|
f.write(r'''
|
||||||
\begin{center}
|
\begin{center}
|
||||||
|
|
||||||
{\Huge Humbug, Inc. code printout}\\[1cm]
|
{\Huge Zulip, Inc. code printout}\\[1cm]
|
||||||
|
|
||||||
{\Large Generated on \today\\[1cm]
|
{\Large Generated on \today\\[1cm]
|
||||||
|
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ def sanitize_url(url):
|
|||||||
if scheme == '' and netloc == '' and '@' in path:
|
if scheme == '' and netloc == '' and '@' in path:
|
||||||
scheme = 'mailto'
|
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.
|
# It's unlikely that users want relative links within zulip.com.
|
||||||
# We re-enter sanitize_url because netloc etc. need to be re-parsed.
|
# We re-enter sanitize_url because netloc etc. need to be re-parsed.
|
||||||
if not scheme:
|
if not scheme:
|
||||||
@@ -681,7 +681,7 @@ def _sanitize_for_log(md):
|
|||||||
current_message = None
|
current_message = None
|
||||||
|
|
||||||
def do_convert(md, realm_domain=None, 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:
|
if realm_domain in md_engines:
|
||||||
_md_engine = md_engines[realm_domain]
|
_md_engine = md_engines[realm_domain]
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ def compute_stats(log_level):
|
|||||||
total_counts[client_name] += count
|
total_counts[client_name] += count
|
||||||
total_user_counts[email] += 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 = {}
|
top_percents = {}
|
||||||
for size in [10, 25, 50, 100, 200, len(total_user_counts.keys())]:
|
for size in [10, 25, 50, 100, 200, len(total_user_counts.keys())]:
|
||||||
top_percents[size] = 0
|
top_percents[size] = 0
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
license, information about that license will appear in this file.
|
license, information about that license will appear in this file.
|
||||||
|
|
||||||
All other software provided in this file is
|
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
|
described in the Zulip Terms of Service: https://zulip.com/terms
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1435,7 +1435,7 @@ class InviteUserTest(AuthedTestCase):
|
|||||||
|
|
||||||
def invite(self, users, streams):
|
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
|
users should be a string containing the users to invite, comma or
|
||||||
newline separated.
|
newline separated.
|
||||||
@@ -1507,7 +1507,7 @@ earl-test@zulip.com""", ["Denmark"]))
|
|||||||
|
|
||||||
def test_invite_existing_user(self):
|
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.login("hamlet@zulip.com")
|
||||||
self.assert_json_error(
|
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'),
|
'<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', '<p>%s</p>',
|
||||||
'http://web.archive.org/web/20120630032016/http://web.mit.edu/mitcard/idpolicies.html'),
|
'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',
|
('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:Humbug-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', '<p>%s</p>',
|
||||||
'http://www.postgresql.org/message-id/14040.1364490185@sss.pgh.pa.us'),
|
'http://www.postgresql.org/message-id/14040.1364490185@sss.pgh.pa.us'),
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ casper.waitUntilVisible('#zhome', function () {
|
|||||||
casper.waitUntilVisible('#zfilt', function () {
|
casper.waitUntilVisible('#zfilt', function () {
|
||||||
expect_huddle();
|
expect_huddle();
|
||||||
|
|
||||||
// Un-narrow by clicking "Humbug"
|
// Un-narrow by clicking "Zulip"
|
||||||
casper.test.info('Un-narrowing');
|
casper.test.info('Un-narrowing');
|
||||||
casper.click('.brand');
|
casper.click('.brand');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ casper.waitUntilVisible('#settings-status', function () {
|
|||||||
casper.test.assertSelectorHasText('#settings-status', 'Updated settings!');
|
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();
|
common.then_log_out();
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ def principal_to_user_profile(agent, principal):
|
|||||||
or agent.realm.domain == 'mit.edu'
|
or agent.realm.domain == 'mit.edu'
|
||||||
or agent.realm != principal_user_profile.realm):
|
or agent.realm != principal_user_profile.realm):
|
||||||
# We have to make sure we don't leak information about which users
|
# 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
|
# something a little more clever and check the domain part of the
|
||||||
# principal to maybe give a better error message
|
# principal to maybe give a better error message
|
||||||
raise PrincipalError(principal)
|
raise PrincipalError(principal)
|
||||||
@@ -1074,7 +1074,7 @@ def is_super_user_api(request):
|
|||||||
def mit_to_mit(user_profile, email):
|
def mit_to_mit(user_profile, email):
|
||||||
# Are the sender and recipient both @mit.edu addresses?
|
# Are the sender and recipient both @mit.edu addresses?
|
||||||
# We have to handle this specially, inferring the domain from the
|
# 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.
|
# and we may need to make a stub MIT user on the fly.
|
||||||
try:
|
try:
|
||||||
validators.validate_email(email)
|
validators.validate_email(email)
|
||||||
@@ -1321,7 +1321,7 @@ def add_subscriptions_backend(request, user_profile,
|
|||||||
notifications = []
|
notifications = []
|
||||||
for email, subscriptions in result["subscribed"].iteritems():
|
for email, subscriptions in result["subscribed"].iteritems():
|
||||||
if email == user_profile.email:
|
if email == user_profile.email:
|
||||||
# Don't send a Humbug if you invited yourself.
|
# Don't send a Zulip if you invited yourself.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if len(subscriptions) == 1:
|
if len(subscriptions) == 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user