Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e65cc45

Browse filesBrowse files
author
Devendra
committed
adding makefiles for version updates
1 parent dd2e548 commit e65cc45
Copy full SHA for e65cc45

File tree

Expand file treeCollapse file tree

18 files changed

+142
-36
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

18 files changed

+142
-36
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboard
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SUBDIRS = common python python-twisted python-tornado
2+
3+
.PHONY: all
4+
all:
5+
for dir in $(SUBDIRS); do \
6+
$(MAKE) -C $$dir; \
7+
done
8+
9+
.PHONY: clean
10+
clean:
11+
for dir in $(SUBDIRS); do \
12+
$(MAKE) clean -C $$dir; \
13+
done
14+
15+
.PHONY: test
16+
test:
17+
for dir in $(SUBDIRS); do \
18+
$(MAKE) test -C $$dir; \
19+
done
Collapse file

‎Makefile.inc‎

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
REPOS_DIR=..
2+
VERSION=$(shell cat $(REPOS_DIR)/VERSION)
3+
ECHO=/bin/echo
Collapse file

‎VERSION‎

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.2
1+
3.3.4
Collapse file

‎common/Makefile‎

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
include ../Makefile.inc
2+
3+
4+
.PHONY: all
5+
all: build
6+
7+
.PHONY: build
8+
build:
9+
find -name "Pubnub*py" | xargs sed -i "s/PubNub\ [0-9]\.[0-9]\.[0-9]/PubNub\ $(VERSION)/g"
10+
11+
12+
.PHONY: clean
13+
clean:
14+
15+
.PHONY: test
16+
test:
Collapse file

‎common/PubnubBase.py‎

Copy file name to clipboardExpand all lines: common/PubnubBase.py
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -319,22 +319,22 @@ def detailedHistory(self, args) :
319319
## Capture User Input
320320
channel = str(args['channel'])
321321

322-
params = []
322+
params = dict()
323323
count = 100
324324

325325
if args.has_key('count'):
326326
count = int(args['count'])
327327

328-
params.append('count' + '=' + str(count))
328+
params['count'] = str(count)
329329

330330
if args.has_key('reverse'):
331-
params.append('reverse' + '=' + str(args['reverse']).lower())
331+
params['reverse'] = str(args['reverse']).lower()
332332

333333
if args.has_key('start'):
334-
params.append('start' + '=' + str(args['start']))
334+
params['start'] = str(args['start'])
335335

336336
if args.has_key('end'):
337-
params.append('end' + '=' + str(args['end']))
337+
params['end'] = str(args['end'])
338338

339339
## Fail if bad input.
340340
if not channel :
@@ -348,14 +348,14 @@ def detailedHistory(self, args) :
348348
callback = None
349349

350350
## Get History
351-
return self._request([
351+
return self._request({ 'urlcomponents' : [
352352
'v2',
353353
'history',
354354
'sub-key',
355355
self.subscribe_key,
356356
'channel',
357357
channel,
358-
],params=params , callback=callback);
358+
],'urlparams' : params }, callback=callback);
359359

360360
def time(self, args = None) :
361361
"""
@@ -377,10 +377,10 @@ def time(self, args = None) :
377377
callback = args['callback']
378378
else :
379379
callback = None
380-
time = self._request([
380+
time = self._request({'urlcomponents' : [
381381
'time',
382382
'0'
383-
], callback)
383+
]}, callback)
384384
if time != None:
385385
return time[0]
386386

@@ -400,5 +400,5 @@ def getUrl(self,request):
400400
ch for ch in list(bit)
401401
]) for bit in request["urlcomponents"]])
402402
if (request.has_key("urlparams")):
403-
url = url + '?' + "&".join([ x + "=" + y for x,y in request["urlparams"].items()])
403+
url = url + '?' + "&".join([ x + "=" + y for x,y in request["urlparams"].iteritems()])
404404
return url
Collapse file

‎common/PubnubCoreAsync.py‎

Copy file name to clipboardExpand all lines: common/PubnubCoreAsync.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,12 @@ def time_callback(_time):
188188

189189
## BEGIN SUBSCRIPTION (LISTEN FOR MESSAGES)
190190
_subscribe()
191+
def unsubscribe( self, args ):
192+
channel = str(args['channel'])
193+
if not (channel in self.subscriptions):
194+
return False
195+
196+
## DISCONNECT
197+
self.subscriptions[channel]['connected'] = 0
198+
self.subscriptions[channel]['timetoken'] = 0
199+
self.subscriptions[channel]['first'] = False
Collapse file

‎python-tornado/Makefile‎

Copy file name to clipboard
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
include ../Makefile.inc
2+
3+
4+
.PHONY: all
5+
all: build
6+
7+
.PHONY: build
8+
build:
9+
find -name "Pubnub*py" | xargs sed -i "s/PubNub\ [0-9]\.[0-9]\.[0-9]/PubNub\ $(VERSION)/g"
10+
11+
12+
.PHONY: clean
13+
clean:
14+
15+
.PHONY: test
16+
test:
17+
Collapse file

‎python-tornado/Pubnub.py‎

Copy file name to clipboardExpand all lines: python-tornado/Pubnub.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def __init__(
6363

6464
def _request( self, request, callback ) :
6565
url = self.getUrl(request)
66-
print url
6766
## Send Request Expecting JSON Response
6867
#print self.headers
6968
request = tornado.httpclient.HTTPRequest( url, 'GET', self.headers, connect_timeout=310, request_timeout=310 )
Collapse file

‎python-tornado/tests/benchmark.py‎

Copy file name to clipboardExpand all lines: python-tornado/tests/benchmark.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
import sys
1313
import datetime
1414
import tornado
15+
sys.path.append('./')
1516
sys.path.append('../')
17+
sys.path.append('../common')
1618
from Pubnub import Pubnub
1719

1820
publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo'
Collapse file

‎python-tornado/tests/unit-test.py‎

Copy file name to clipboardExpand all lines: python-tornado/tests/unit-test.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
import sys
2121
sys.path.append('../')
22+
sys.path.append('./')
23+
sys.path.append('../common/')
2224
from Pubnub import Pubnub
2325

2426
publish_key = len(sys.argv) > 1 and sys.argv[1] or 'demo'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.