Skip to content

Commit

Permalink
Merge pull request #41 from josuebrunel/dev
Browse files Browse the repository at this point in the history
fix #40 JSON file changes to YAML after OAuth request
  • Loading branch information
josuebrunel committed Oct 14, 2015
2 parents 526a5c3 + b55f856 commit b7b5a91
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 30 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sudo: false
language: python
python:
- '2.7'
Expand All @@ -12,7 +13,7 @@ install:
script:
- coverage run --source=yahoo_oauth -m pytest -v tests.py
before_install:
- openssl aes-256-cbc -K $encrypted_6d515aab85d8_key -iv $encrypted_6d515aab85d8_iv
- openssl aes-256-cbc -K $encrypted_177fac13197a_key -iv $encrypted_177fac13197a_iv
-in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
after_success:
Expand Down
54 changes: 29 additions & 25 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
Jinja2=>2.8
Markdown=>2.6.2
MarkupSafe=>0.23
PyYAML=>3.11
certifi=>2015.9.6.2
click=>5.1
coverage=>4.0
coveralls=>1.0
docopt=>0.6.2
ghp-import=>0.4.1
livereload=>2.4.0
mkdocs=>0.14.0
myql=>1.2.7
oauthlib=>1.0.3
pluggy=>0.3.1
py=>1.4.30
pytest=>2.8.2
rauth=>0.7.1
requests=>2.8.0
requests-oauthlib=>0.5.0
six=>1.10.0
tornado=>4.2.1
tox=>2.1.1
virtualenv=>13.1.2
yahoo-oauth=>0.1.7
Jinja2>=2.8
Markdown>=2.6.2
MarkupSafe>=0.23
PyYAML>=3.11
argparse>=1.2.1
backports.ssl-match-hostname>=3.4.0.2
certifi>=2015.09.06.2
click>=5.1
coverage>=4.0
coveralls>=1.0
distribute>=0.6.24
docopt>=0.6.2
ghp-import>=0.4.1
livereload>=2.4.0
mkdocs>=0.14.0
myql>=1.2.7
oauthlib>=1.0.3
pluggy>=0.3.1
py>=1.4.30
pytest>=2.8.2
rauth>=0.7.1
requests>=2.8.0
requests-oauthlib>=0.5.0
six>=1.10.0
tornado>=4.2.1
tox>=2.1.1
virtualenv>=13.1.2
wsgiref>=0.1.2
yahoo-oauth>=0.1.7
Binary file modified secrets.tar.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

__author__ = 'Josue Kouka'
__email__ = '[email protected]'
__version__ = '0.1.8'
__version__ = '0.1.9'

#requirements.txt
with open('requirements.txt') as f:
Expand Down
2 changes: 1 addition & 1 deletion yahoo_oauth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = 'Josue Kouka'
__email__ = '[email protected]'
__version__ = "0.1.8"
__version__ = "0.1.9"


from yahoo_oauth.yahoo_oauth import OAuth1, OAuth2
Expand Down
4 changes: 2 additions & 2 deletions yahoo_oauth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ def get_file_extension(filename):
def get_data(filename):
"""Calls right function according to file extension
"""
ext = get_file_extension(filename)
name, ext = get_file_extension(filename)
func = json_get_data if ext == '.json' else yaml_get_data
return func(filename)

def write_data(data, filename):
"""Call right func to save data according to file extension
"""
ext = get_file_extension(filename)
name, ext = get_file_extension(filename)
func = json_write_data if ext == '.json' else yaml_write_data
return func(data, filename)

Expand Down

0 comments on commit b7b5a91

Please sign in to comment.