From 10657d8f85b87dc4575b99de6df809ef3719922c Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Thu, 7 Aug 2014 08:29:01 -0700 Subject: [PATCH] v2.0.5 --- .gitignore | 1 + HISTORY.rst | 7 +++++++ plugin/packages/wakatime/.gitignore | 1 + plugin/packages/wakatime/wakatime/__init__.py | 6 +++--- plugin/wakatime.vim | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d2d6f36..83fea0f 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ nosetests.xml .mr.developer.cfg .project .pydevproject +.DS_Store diff --git a/HISTORY.rst b/HISTORY.rst index f7a6247..003291e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,13 @@ History ------- +2.0.5 (2014-08-07) +++++++++++++++++++ + +- upgrade external wakatime package to v2.0.6 +- fix unicode bug by encoding json POST data + + 2.0.4 (2014-07-25) ++++++++++++++++++ diff --git a/plugin/packages/wakatime/.gitignore b/plugin/packages/wakatime/.gitignore index b2fd43f..a8b8ca4 100644 --- a/plugin/packages/wakatime/.gitignore +++ b/plugin/packages/wakatime/.gitignore @@ -36,3 +36,4 @@ nosetests.xml virtualenv venv +.DS_Store diff --git a/plugin/packages/wakatime/wakatime/__init__.py b/plugin/packages/wakatime/wakatime/__init__.py index 5916e95..0774018 100644 --- a/plugin/packages/wakatime/wakatime/__init__.py +++ b/plugin/packages/wakatime/wakatime/__init__.py @@ -13,7 +13,7 @@ from __future__ import print_function __title__ = 'wakatime' -__version__ = '2.0.5' +__version__ = '2.0.6' __author__ = 'Alan Hamlett' __license__ = 'BSD' __copyright__ = 'Copyright 2014 Alan Hamlett' @@ -127,7 +127,7 @@ def parseConfigFile(configFile): return None except IOError: 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 @@ -284,7 +284,7 @@ def send_action(project=None, branch=None, stats=None, key=None, targetFile=None log.debug(data) # 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('Content-Type', 'application/json') auth = unicode('Basic {key}').format(key=bytes.decode(base64.b64encode(str.encode(key)))) diff --git a/plugin/wakatime.vim b/plugin/wakatime.vim index ac1c2e5..f3e6a66 100644 --- a/plugin/wakatime.vim +++ b/plugin/wakatime.vim @@ -6,7 +6,7 @@ " Website: https://wakatime.com/ " ============================================================================ -let s:VERSION = '2.0.4' +let s:VERSION = '2.0.5' " Init {{{