diff --git a/HISTORY.rst b/HISTORY.rst index 0eac495..905505a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,12 @@ History ======= +0.1.2 (2010-05-16) +------------------ +* URL Generation BugFix +* Updated versioning +* Metadata refactoring + 0.1.1 (2010-05-16) ------------------ diff --git a/gistapi/__init__.py b/gistapi/__init__.py index 77a3e52..e34ebce 100644 --- a/gistapi/__init__.py +++ b/gistapi/__init__.py @@ -1,3 +1,7 @@ # encoding: utf-8 -from gistapi import * \ No newline at end of file +from gistapi import * + +__author__ = 'Kenneth Reitz' +__version__ = '.'.join(('0', '1', '2')) +__license__ = 'MIT' diff --git a/gistapi/gistapi.py b/gistapi/gistapi.py index b035820..6b17840 100644 --- a/gistapi/gistapi.py +++ b/gistapi/gistapi.py @@ -34,11 +34,6 @@ import urllib try: import simplejson as json except ImportError: import json -__author__ = 'Kenneth Reitz' -__version__ = ('0', '1', '1') -__license__ = 'MIT' - - class Gist(object): """Gist Object""" @@ -71,9 +66,9 @@ class Gist(object): _meta_url = 'http://gist.github.com/api/v1/json/{0}'.format(self.id) _meta = json.load(urllib.urlopen(_meta_url))['gists'][0] - self.url = 'http://github.com/{0}'.format(id) - self.embed_url = 'http://github.com/{0}.js'.format(id) - self.json_url = 'http://github.com/{0}.json'.format(id) + self.url = 'http://github.com/{0}'.format(self.id) + self.embed_url = 'http://github.com/{0}.js'.format(self.id) + self.json_url = 'http://github.com/{0}.json'.format(self.id) for key, value in _meta.iteritems(): diff --git a/setup.py b/setup.py index 6c57b64..68cf821 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,8 @@ import os import sys +import gistapi + from distutils.core import setup @@ -15,7 +17,7 @@ if sys.argv[-1] == "publish": sys.exit() setup(name='gistapi', - version='0.1.1', + version=gistapi.__version__, description='Python wrapper for Gist API', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(), author='Kenneth Reitz', diff --git a/tests/test_examples.py b/tests/test_examples.py index e69de29..2e6b931 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -0,0 +1,7 @@ +from gistapi import * + +for gist in Gists.fetch_by_user('defunkt'): + if gist.description == 'A list of Gist clients.': + print gist.id + print gist.repo + print gist.embed_url \ No newline at end of file diff --git a/tests/test_gist.py b/tests/test_gist.py index e69de29..2e6b931 100644 --- a/tests/test_gist.py +++ b/tests/test_gist.py @@ -0,0 +1,7 @@ +from gistapi import * + +for gist in Gists.fetch_by_user('defunkt'): + if gist.description == 'A list of Gist clients.': + print gist.id + print gist.repo + print gist.embed_url \ No newline at end of file