This commit is contained in:
Alan Hamlett 2014-08-07 08:30:44 -07:00
parent 6ec3b171e1
commit 986e592d1e
5 changed files with 24 additions and 4 deletions

View File

@ -3,6 +3,13 @@ History
------- -------
2.0.8 (2014-08-07)
++++++++++++++++++
- upgrade external wakatime package to v2.0.6
- fix unicode bug by encoding json POST data
2.0.7 (2014-07-25) 2.0.7 (2014-07-25)
++++++++++++++++++ ++++++++++++++++++

View File

@ -6,7 +6,7 @@ License: BSD, see LICENSE for more details.
Website: https://wakatime.com/ Website: https://wakatime.com/
===========================================================""" ==========================================================="""
__version__ = '2.0.7' __version__ = '2.0.8'
import sublime import sublime
import sublime_plugin import sublime_plugin

View File

@ -36,3 +36,4 @@ nosetests.xml
virtualenv virtualenv
venv venv
.DS_Store

View File

@ -3,6 +3,18 @@ History
------- -------
2.0.5 (2014-07-25)
++++++++++++++++++
- option in .wakatime.cfg to obfuscate file names
2.0.4 (2014-07-25)
++++++++++++++++++
- use unique logger namespace to prevent collisions in shared plugin environments
2.0.3 (2014-06-18) 2.0.3 (2014-06-18)
++++++++++++++++++ ++++++++++++++++++

View File

@ -13,7 +13,7 @@
from __future__ import print_function from __future__ import print_function
__title__ = 'wakatime' __title__ = 'wakatime'
__version__ = '2.0.5' __version__ = '2.0.6'
__author__ = 'Alan Hamlett' __author__ = 'Alan Hamlett'
__license__ = 'BSD' __license__ = 'BSD'
__copyright__ = 'Copyright 2014 Alan Hamlett' __copyright__ = 'Copyright 2014 Alan Hamlett'
@ -127,7 +127,7 @@ def parseConfigFile(configFile):
return None return None
except IOError: except IOError:
if not os.path.isfile(configFile): if not os.path.isfile(configFile):
print('Error: Could not read from config file ~/.wakatime.conf') print('Error: Could not read from config file ~/.wakatime.cfg')
return configs return configs
@ -284,7 +284,7 @@ def send_action(project=None, branch=None, stats=None, key=None, targetFile=None
log.debug(data) log.debug(data)
# setup api request # setup api request
request = Request(url=url, data=json.dumps(data)) request = Request(url=url, data=str.encode(json.dumps(data)))
request.add_header('User-Agent', get_user_agent(plugin)) request.add_header('User-Agent', get_user_agent(plugin))
request.add_header('Content-Type', 'application/json') request.add_header('Content-Type', 'application/json')
auth = unicode('Basic {key}').format(key=bytes.decode(base64.b64encode(str.encode(key)))) auth = unicode('Basic {key}').format(key=bytes.decode(base64.b64encode(str.encode(key))))