mirror of
https://github.com/kennethreitz/gistapi.py.git
synced 2026-06-05 23:10:17 +00:00
Merge branch 'release/0.2.1' into develop
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
History
|
||||
=======
|
||||
|
||||
0.2.1 (2010-09-01)
|
||||
------------------
|
||||
* StringIO support for Files
|
||||
* Added Install Requirements for Pip
|
||||
|
||||
|
||||
0.2.0 (2010-08-28)
|
||||
------------------
|
||||
* Support for Add, Rename, Modify, and Delete of Files!
|
||||
|
||||
+2
-2
@@ -10,6 +10,6 @@ from core import *
|
||||
|
||||
|
||||
__author__ = 'Kenneth Reitz'
|
||||
__version__ = '0.2.0'
|
||||
__build__ = 0x000200
|
||||
__version__ = '0.2.1'
|
||||
__build__ = 0x000201
|
||||
__license__ = 'MIT'
|
||||
|
||||
+5
-5
@@ -24,15 +24,13 @@ False
|
||||
>>> Gist('d4507e882a07ac6f9f92').filenames
|
||||
['exampleEmptyFile', 'exampleFile']
|
||||
|
||||
>>> Gist('d4507e882a07ac6f9f92').files
|
||||
{'exampleFile': u'Example file content.', 'exampleEmptyFile': u''}
|
||||
|
||||
>>> Gists.fetch_by_user('kennethreitz')[-1].description
|
||||
u'My .bashrc configuration'
|
||||
"""
|
||||
|
||||
import cStringIO
|
||||
import os.path
|
||||
import urllib
|
||||
|
||||
import urllib2
|
||||
from dateutil.parser import parse as dtime
|
||||
|
||||
@@ -191,7 +189,9 @@ class Gist(object):
|
||||
for fn in self._meta['files']:
|
||||
# Grab file contents
|
||||
_file_url = GIST_BASE % 'raw/%s/%s' % (self.id, fn)
|
||||
_files[fn] = unicode(urllib2.urlopen(_file_url).read())
|
||||
# _files[fn] = unicode(urllib2.urlopen(_file_url).read())
|
||||
_files[fn] = cStringIO.StringIO()
|
||||
_files[fn].write(urllib2.urlopen(_file_url).read())
|
||||
|
||||
return _files
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ from distutils.core import setup
|
||||
|
||||
|
||||
def publish():
|
||||
|
||||
"""Publish to PyPi"""
|
||||
os.system("python setup.py sdist upload")
|
||||
|
||||
@@ -25,6 +26,7 @@ setup(name='gistapi',
|
||||
author_email='me@kennethreitz.com',
|
||||
url='http://github.com/kennethreitz/gistapi.py',
|
||||
packages=['gistapi'],
|
||||
install_requires=['python-dateutil', 'simplejson'],
|
||||
license='MIT',
|
||||
classifiers=(
|
||||
"Development Status :: 4 - Beta",
|
||||
|
||||
Reference in New Issue
Block a user