Skip to content

Commit

Permalink
Merge pull request #17 from code-reef/master
Browse files Browse the repository at this point in the history
a few major fixes for download
  • Loading branch information
gfursin authored Feb 19, 2020
2 parents 6d2d482 + a6b5a53 commit 1b18c6b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 25 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
* 0.7.21
- fixed problem with downloading CK components
- fixed anonymous access to "cr versions"

* 0.7.20
- added "list-versions" to list all versions of a given component
- added "open" to open a CodeReef web page for a component
- added "cr versions" to list all versions of a given component
- added "cr open" to open a CodeReef web page for a component
- improved "cr init" last message
- added link to CodeReef docs to error message
- improved documentation building
Expand Down
2 changes: 1 addition & 1 deletion codereef/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Developer(s): Grigori Fursin, https://fursin.net
#

__version__ = "0.7.20"
__version__ = "0.7.21"
2 changes: 1 addition & 1 deletion codereef/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def open(cid):
CID: CK identifier ({repo UOA}:){module UOA}:{data UOA}.
'''
from . import obj
r=obj.open({'cid':cid})
r=obj.open_page({'cid':cid})

if r['return']>0: process_error(r)
return 0
Expand Down
22 changes: 1 addition & 21 deletions codereef/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,26 +403,6 @@ def versions(i):
if r['return']>0: return r
cfg=r['dict']

# Check commands
# Username ##########################################################
username=cfg.get('username','')
if i.get('username')!=None: username=i['username']

if username=='' or username==None:
return {'return':1, 'error':'Username is not defined'}

cfg['username']=username

# API key ###########################################################
api_key=cfg.get('api_key','')

if i.get('api_key')!=None: api_key=i['api_key']

if api_key=='' or api_key==None:
return {'return':1, 'error':'API key is not defined'}

cfg['api_key']=api_key

# CID ###########################################################
cid=i.get('cid')

Expand Down Expand Up @@ -458,7 +438,7 @@ def versions(i):
##############################################################################
# Open CodeReef portal with a given CK component

def open(i):
def open_page(i):

"""
Input: {
Expand Down

0 comments on commit 1b18c6b

Please sign in to comment.