detect correct project and branch for travis-ci

This commit is contained in:
Alan Hamlett 2015-08-12 14:28:21 -07:00
parent 26024af1a2
commit 3c6ef2dcc9
1 changed files with 6 additions and 6 deletions

View File

@ -121,8 +121,8 @@ class BaseTestCase(utils.TestCase):
'language': 'Text only',
'lines': 2,
'entity': os.path.abspath(entity),
'project': 'wakatime-cli',
'branch': 'master',
'project': os.path.basename(os.path.abspath('.')),
'branch': os.environ.get('TRAVIS_COMMIT', 'master'),
'time': float(now),
'type': 'file',
}
@ -155,8 +155,8 @@ class BaseTestCase(utils.TestCase):
'language': 'Text only',
'lines': 2,
'entity': 'HIDDEN.txt',
'project': 'wakatime-cli',
'branch': 'master',
'project': os.path.basename(os.path.abspath('.')),
'branch': os.environ.get('TRAVIS_COMMIT', 'master'),
'time': float(now),
'type': 'file',
}
@ -189,8 +189,8 @@ class BaseTestCase(utils.TestCase):
'language': 'Text only',
'lines': 2,
'entity': 'HIDDEN.txt',
'project': 'wakatime-cli',
'branch': 'master',
'project': os.path.basename(os.path.abspath('.')),
'branch': os.environ.get('TRAVIS_COMMIT', 'master'),
'time': float(now),
'type': 'file',
}