aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2014-04-28 00:59:29 +0300
committerkongr45gpen <electrovesta@gmail.com>2014-04-28 00:59:29 +0300
commitac155dc4e25a6c91d36d9c7b5f8bed9aacbb426c (patch)
tree1ef564ebe9948bfbc71260e25a84c909296a32a2
parentb4c587246e389b72019f76515dc04e0e13b92eb6 (diff)
downloadsupybot_github-ac155dc4e25a6c91d36d9c7b5f8bed9aacbb426c.tar.gz
supybot_github-ac155dc4e25a6c91d36d9c7b5f8bed9aacbb426c.tar.bz2
supybot_github-ac155dc4e25a6c91d36d9c7b5f8bed9aacbb426c.zip
Add .travis.yml
-rw-r--r--.travis.yml18
-rw-r--r--local/handler/GithubHandler.py7
2 files changed, 22 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..4061c59
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,18 @@
+language: python
+python:
+ - "2.6"
+ - "2.7"
+
+install:
+ - mkdir void
+ - mkdir void/Github
+ - cp -R * void/Github/ || true
+ - git clone git://git.code.sf.net/p/supybot/code supybot
+ - pip install coverage
+ - cd supybot
+ - python setup.py install
+ - cd ../void/Github
+
+script:
+ - coverage run --source plugin.py,local --omit '*init*' ../../supybot/scripts/supybot-test --plugins-dir=.. Github
+ - coverage report -m
diff --git a/local/handler/GithubHandler.py b/local/handler/GithubHandler.py
index ea9f7d4..6735f22 100644
--- a/local/handler/GithubHandler.py
+++ b/local/handler/GithubHandler.py
@@ -48,9 +48,10 @@ class GithubHandler(BaseHTTPServer.BaseHTTPRequestHandler):
else:
eventType = ''
- f = open('requests/' + eventType + strftime("%Y-%m-%d %H:%M:%S") + '.json', 'w')
- f.write(json.dumps(data, sort_keys=True, indent=4, separators=(',', ': ')))
- f.close()
+ if not world.testing:
+ f = open('requests/' + eventType + strftime("%Y-%m-%d %H:%M:%S") + '.json', 'w')
+ f.write(json.dumps(data, sort_keys=True, indent=4, separators=(',', ': ')))
+ f.close()
path = s.path.split('/')
channel = configValue('channel')

© 2014-2024 Faster IT GmbH | imprint | privacy policy