Skip to content

Commit

Permalink
Bump to 1.7.1 and add stub for --collab (#226)
Browse files Browse the repository at this point in the history
* Bump to 1.7.1 and add stub for --collab

* Lowercase --collab help text
  • Loading branch information
Sumukh authored and knrafto committed Sep 20, 2016
1 parent 4052849 commit 0bb2eab
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = 'v1.7.0'
__version__ = 'v1.7.1'

FILE_NAME = 'ok'

Expand Down
2 changes: 2 additions & 0 deletions client/cli/ok.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def parse_input(command_input=None):
help="give a hint (if available)")
experiment.add_argument('--style', action='store_true',
help="run AutoStyle feedback system")
experiment.add_argument('--collab', action='store_true',
help="launch collaborative programming environment")

# Debug information
debug = parser.add_argument_group('debugging options')
Expand Down
33 changes: 33 additions & 0 deletions client/protocols/collaborate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from client.protocols.common import models
from client.utils import format

import logging

log = logging.getLogger(__name__)

class CollaborateProtocol(models.Protocol):

# Timeouts are specified in seconds.
SHORT_TIMEOUT = 30
LONG_TIMEOUT = 30
API_ENDPOINT = '{prefix}://{server}'
FIREBASE_CONFIG = {
'apiKey': "AIzaSyAFJn-q5SbxJnJcPVFhjxd25DA5Jusmd74",
'authDomain': "ok-server.firebaseapp.com",
'databaseURL': "https://ok-server.firebaseio.com",
'storageBucket': "ok-server.appspot.com"
}

FILE_TIME_FORMAT = '%m_%d_%H_%M_%S'
TIME_FORMAT = '%m/%d %H:%M:%S'
BACKUP_DIRECTORY = 'ok-collab'
COLLAB_SERVER = 'collab.cs61a.org'

def run(self, messages):
if not self.args.collab:
return

with format.block("-"):
print("Collaboration will be available soon.")

protocol = CollaborateProtocol

0 comments on commit 0bb2eab

Please sign in to comment.