From 57e0d37249147a88b31c88e9c943798a7387e989 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Thu, 31 Jan 2013 14:09:01 -0500 Subject: [PATCH] Move files around in the API. Bots are not part of what we distribute, so put them in the repo root. We also updated some of the bots to use relative path names. (imported from commit 0471d863450712fd0cdb651f39f32e9041df52ba) --- api/{humbug => }/README | 0 api/{humbug => }/bin/humbug-send | 0 api/{humbug => }/examples/curl-examples | 0 api/{humbug => }/examples/get-public-streams | 0 api/{humbug => }/examples/humbugrc | 0 api/{humbug => }/examples/list-subscriptions | 0 api/{humbug => }/examples/print-messages | 0 api/{humbug => }/examples/print-next-message | 0 api/{humbug => }/examples/send-message | 0 api/{humbug => }/examples/subscribe | 0 api/{humbug => }/examples/unsubscribe | 0 {api/humbug/bots => bots}/__init__.py | 0 {api/humbug/bots => bots}/check-mirroring | 0 {api/humbug/bots => bots}/check_send_receive.py | 0 {api/humbug/bots => bots}/feedback-bot | 0 {api/humbug/bots => bots}/gcal-bot | 2 +- {api/humbug/bots => bots}/humbug_trac.py | 1 + {api/humbug/bots => bots}/send-nagios-notification | 2 +- {api/humbug/bots => bots}/tddium-notify-humbug | 2 +- {api/humbug/bots => bots}/twitter-bot.py | 2 +- {api/humbug/bots => bots}/zephyr-mirror-crontab | 0 {api/humbug/bots => bots}/zephyr_mirror.py | 0 {api/humbug/bots => bots}/zephyr_mirror_backend.py | 0 23 files changed, 5 insertions(+), 4 deletions(-) rename api/{humbug => }/README (100%) rename api/{humbug => }/bin/humbug-send (100%) rename api/{humbug => }/examples/curl-examples (100%) rename api/{humbug => }/examples/get-public-streams (100%) rename api/{humbug => }/examples/humbugrc (100%) rename api/{humbug => }/examples/list-subscriptions (100%) rename api/{humbug => }/examples/print-messages (100%) rename api/{humbug => }/examples/print-next-message (100%) rename api/{humbug => }/examples/send-message (100%) rename api/{humbug => }/examples/subscribe (100%) rename api/{humbug => }/examples/unsubscribe (100%) rename {api/humbug/bots => bots}/__init__.py (100%) rename {api/humbug/bots => bots}/check-mirroring (100%) rename {api/humbug/bots => bots}/check_send_receive.py (100%) rename {api/humbug/bots => bots}/feedback-bot (100%) rename {api/humbug/bots => bots}/gcal-bot (98%) rename {api/humbug/bots => bots}/humbug_trac.py (98%) rename {api/humbug/bots => bots}/send-nagios-notification (96%) rename {api/humbug/bots => bots}/tddium-notify-humbug (97%) rename {api/humbug/bots => bots}/twitter-bot.py (98%) rename {api/humbug/bots => bots}/zephyr-mirror-crontab (100%) rename {api/humbug/bots => bots}/zephyr_mirror.py (100%) rename {api/humbug/bots => bots}/zephyr_mirror_backend.py (100%) diff --git a/api/humbug/README b/api/README similarity index 100% rename from api/humbug/README rename to api/README diff --git a/api/humbug/bin/humbug-send b/api/bin/humbug-send similarity index 100% rename from api/humbug/bin/humbug-send rename to api/bin/humbug-send diff --git a/api/humbug/examples/curl-examples b/api/examples/curl-examples similarity index 100% rename from api/humbug/examples/curl-examples rename to api/examples/curl-examples diff --git a/api/humbug/examples/get-public-streams b/api/examples/get-public-streams similarity index 100% rename from api/humbug/examples/get-public-streams rename to api/examples/get-public-streams diff --git a/api/humbug/examples/humbugrc b/api/examples/humbugrc similarity index 100% rename from api/humbug/examples/humbugrc rename to api/examples/humbugrc diff --git a/api/humbug/examples/list-subscriptions b/api/examples/list-subscriptions similarity index 100% rename from api/humbug/examples/list-subscriptions rename to api/examples/list-subscriptions diff --git a/api/humbug/examples/print-messages b/api/examples/print-messages similarity index 100% rename from api/humbug/examples/print-messages rename to api/examples/print-messages diff --git a/api/humbug/examples/print-next-message b/api/examples/print-next-message similarity index 100% rename from api/humbug/examples/print-next-message rename to api/examples/print-next-message diff --git a/api/humbug/examples/send-message b/api/examples/send-message similarity index 100% rename from api/humbug/examples/send-message rename to api/examples/send-message diff --git a/api/humbug/examples/subscribe b/api/examples/subscribe similarity index 100% rename from api/humbug/examples/subscribe rename to api/examples/subscribe diff --git a/api/humbug/examples/unsubscribe b/api/examples/unsubscribe similarity index 100% rename from api/humbug/examples/unsubscribe rename to api/examples/unsubscribe diff --git a/api/humbug/bots/__init__.py b/bots/__init__.py similarity index 100% rename from api/humbug/bots/__init__.py rename to bots/__init__.py diff --git a/api/humbug/bots/check-mirroring b/bots/check-mirroring similarity index 100% rename from api/humbug/bots/check-mirroring rename to bots/check-mirroring diff --git a/api/humbug/bots/check_send_receive.py b/bots/check_send_receive.py similarity index 100% rename from api/humbug/bots/check_send_receive.py rename to bots/check_send_receive.py diff --git a/api/humbug/bots/feedback-bot b/bots/feedback-bot similarity index 100% rename from api/humbug/bots/feedback-bot rename to bots/feedback-bot diff --git a/api/humbug/bots/gcal-bot b/bots/gcal-bot similarity index 98% rename from api/humbug/bots/gcal-bot rename to bots/gcal-bot index f51d5f93cd..45c0f7729c 100755 --- a/api/humbug/bots/gcal-bot +++ b/bots/gcal-bot @@ -10,7 +10,7 @@ import itertools import traceback from os import path -sys.path.append(path.join(path.dirname(__file__), '..')) +sys.path.append(path.join(path.dirname(__file__), '../api')) import humbug parser = optparse.OptionParser(r""" diff --git a/api/humbug/bots/humbug_trac.py b/bots/humbug_trac.py similarity index 98% rename from api/humbug/bots/humbug_trac.py rename to bots/humbug_trac.py index 2e1bf2e5fb..8b96dc7544 100644 --- a/api/humbug/bots/humbug_trac.py +++ b/bots/humbug_trac.py @@ -18,6 +18,7 @@ from trac.core import Component, implements from trac.ticket import ITicketChangeListener import sys +# This script lives on one machine, so an absolute path is fine. sys.path.append("/home/humbug/humbug/api") import humbug client = humbug.Client( diff --git a/api/humbug/bots/send-nagios-notification b/bots/send-nagios-notification similarity index 96% rename from api/humbug/bots/send-nagios-notification rename to bots/send-nagios-notification index 3caa0ca858..0efc71d5b9 100755 --- a/api/humbug/bots/send-nagios-notification +++ b/bots/send-nagios-notification @@ -3,7 +3,7 @@ import sys import optparse from os import path -sys.path.append(path.join(path.dirname(__file__), '..')) +sys.path.append(path.join(path.dirname(__file__), '../api')) import humbug # Nagios passes the notification details as command line options. diff --git a/api/humbug/bots/tddium-notify-humbug b/bots/tddium-notify-humbug similarity index 97% rename from api/humbug/bots/tddium-notify-humbug rename to bots/tddium-notify-humbug index 96f89e54c8..9c01819c9f 100755 --- a/api/humbug/bots/tddium-notify-humbug +++ b/bots/tddium-notify-humbug @@ -42,7 +42,7 @@ from os import path, environ # Here we assume it's in the parent of the directory # where this script lives. -humbug_directory = path.join(path.dirname(__file__), '..') +humbug_directory = path.join(path.dirname(__file__), '../api') sys.path.append(humbug_directory) diff --git a/api/humbug/bots/twitter-bot.py b/bots/twitter-bot.py similarity index 98% rename from api/humbug/bots/twitter-bot.py rename to bots/twitter-bot.py index 3cf9c310a3..29a8dd3132 100755 --- a/api/humbug/bots/twitter-bot.py +++ b/bots/twitter-bot.py @@ -7,7 +7,7 @@ from os import path CONFIGFILE = os.path.expanduser("~/.humbug_twitterrc") -sys.path.append(path.join(path.dirname(__file__), '../..')) +sys.path.append(path.join(path.dirname(__file__), '../api')) import humbug def write_config(config, since_id, user): diff --git a/api/humbug/bots/zephyr-mirror-crontab b/bots/zephyr-mirror-crontab similarity index 100% rename from api/humbug/bots/zephyr-mirror-crontab rename to bots/zephyr-mirror-crontab diff --git a/api/humbug/bots/zephyr_mirror.py b/bots/zephyr_mirror.py similarity index 100% rename from api/humbug/bots/zephyr_mirror.py rename to bots/zephyr_mirror.py diff --git a/api/humbug/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py similarity index 100% rename from api/humbug/bots/zephyr_mirror_backend.py rename to bots/zephyr_mirror_backend.py