- commit
- 8a6839e7fa38bd96ac18312a2941574c9ad99439
- parent
- 9cf318b640d6d388bb8ef0fde6c2d85d76f20f6a
- Author
- Tobias Bengfort <tobias.bengfort@gmx.net>
- Date
- 2015-03-22 14:28
add travis
Diffstat
| M | projects.py | 15 | +++++++++++++-- |
1 files changed, 13 insertions, 2 deletions
diff --git a/projects.py b/projects.py
@@ -16,7 +16,7 @@ try: 16 16 except ImportError: 17 17 Cheesecake = None 18 1819 -1 SOURCES = ['github', 'gitorious', 'local', 'pypi', 'bower']-1 19 SOURCES = ['github', 'gitorious', 'local', 'pypi', 'bower', 'travis'] 20 20 21 21 KEYS = [ 22 22 'name', @@ -27,6 +27,7 @@ KEYS = [ 27 27 'updated', 28 28 'license', 29 29 'language', -1 30 'tests', 30 31 'commit_count', 31 32 'file_count', 32 33 'unstaged_files', @@ -74,7 +75,7 @@ class Claims(object): 74 75 75 76 76 77 class ClaimsDict(object):77 -1 def __init__(self, keys, short=8):-1 78 def __init__(self, keys, short=9): 78 79 self._keys = keys 79 80 self._short = short 80 81 self._data = {} @@ -276,6 +277,16 @@ def get_bower(name): 276 277 } 277 278 278 279 -1 280 def get_travis(url): -1 281 api_url = re.sub( -1 282 'https?://travis-ci.org', 'https://api.travis-ci.org/repos', url) -1 283 data = get_json(api_url) -1 284 return { -1 285 'description': data['description'], -1 286 'tests': data['last_build_result'] == 0, -1 287 } -1 288 -1 289 279 290 def load_config(): 280 291 with open('projects.yml') as fh: 281 292 return yaml.load(fh)