plezi 0.12.19 → 0.12.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/plezi/version.rb +1 -1
- data/resources/plezi_client.js +4 -1
- data/test/dispatch +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67b08fc4fb11066038232a931493efec82a441a9
|
4
|
+
data.tar.gz: 2027a428e55e2d2ae9dbb071f10cdc0db5f5ee07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b886af9e5a9a93fe98e4f80d336bb6fd472f28dcb208ec3182a9c96f7d364c6c0adfc974cbc505e92f3a3832dd3bd51ac1dc54f642cb10fcb8210b076e6830c
|
7
|
+
data.tar.gz: 48598ce1bc2dc17f13bc4d8917cfa07dc38420c43bfb50407b36d8190c4de362d49a7ec8c42a160ff9123fb72e67790f21a2281597211757f9e4ff69fe1e68ea
|
data/CHANGELOG.md
CHANGED
@@ -2,8 +2,18 @@
|
|
2
2
|
|
3
3
|
***
|
4
4
|
|
5
|
+
Change log v.0.12.20
|
6
|
+
|
7
|
+
**Fix (Client)**: The onopen callback is now called (the issue was related to a typo in the name of the onopen callback).
|
8
|
+
|
9
|
+
**Updates**: Auto-Dispatch Client - logging is now easier with the `log_events` property (set to `true` to log all events).
|
10
|
+
|
11
|
+
***
|
12
|
+
|
5
13
|
Change log v.0.12.19
|
6
14
|
|
15
|
+
**Fix**: The Controller's `close` method went missing... It's back. Closing the Websocket/Http connections was never easier with the `close` method available straight from the controller.
|
16
|
+
|
7
17
|
**Updates**: Auto-Dispatch updates:
|
8
18
|
|
9
19
|
* Updated the Auto-Dispatch API conventions, so that the client and the server conventions are the same (both map events to methods with the same name (without the `on` prefix) and map unknown events to the `unknown` callback).
|
data/lib/plezi/version.rb
CHANGED
data/resources/plezi_client.js
CHANGED
@@ -36,6 +36,8 @@ function PleziClient(url, autoreconnect) {
|
|
36
36
|
// auto-reconnection
|
37
37
|
this.autoreconnect = false;
|
38
38
|
this.reconnect_interval = 200
|
39
|
+
// dump data to console?
|
40
|
+
this.log_events = false
|
39
41
|
// the timeout for a message ack receipt
|
40
42
|
this.emit_timeout = false
|
41
43
|
// Set the autoreconnect property
|
@@ -64,6 +66,7 @@ PleziClient.prototype.___on_error = function(e) {
|
|
64
66
|
PleziClient.prototype.___on_message = function(e) {
|
65
67
|
try {
|
66
68
|
var msg = JSON.parse(e.data);
|
69
|
+
if (this.owner.log_events) {console.log(msg)}
|
67
70
|
if ( msg.event == '_ack_') { clearTimeout(msg._EID_) }
|
68
71
|
if ( (msg.event) && (this.owner[msg.event])) {
|
69
72
|
this.owner[msg.event](msg);
|
@@ -107,7 +110,7 @@ PleziClient.prototype.reconnect = function() {
|
|
107
110
|
// lets us access the client from the callbacks
|
108
111
|
this.ws.owner = this
|
109
112
|
// The Websocket onopen callback
|
110
|
-
this.ws.
|
113
|
+
this.ws.onopen = this.___on_open
|
111
114
|
// The Websocket onclose callback
|
112
115
|
this.ws.onclose = this.___on_close
|
113
116
|
// The Websocket onerror callback
|
data/test/dispatch
CHANGED
@@ -35,17 +35,17 @@ document.body.onload = function() {
|
|
35
35
|
connection = new PleziClient();
|
36
36
|
connection.alert = function(data) {
|
37
37
|
alert(JSON.stringify(data));
|
38
|
-
console.log(data);
|
39
|
-
}
|
40
|
-
connection.err = function(data) {
|
41
|
-
alert("Error: " + JSON.stringify(data));
|
42
|
-
console.log(data);
|
43
38
|
}
|
44
39
|
connection.emit_timeout = 3000;
|
45
|
-
connection.
|
46
|
-
|
47
|
-
|
48
|
-
|
40
|
+
connection.log_events = true;
|
41
|
+
// connection.err = function(data) {
|
42
|
+
// alert("Error: " + JSON.stringify(data));
|
43
|
+
// console.log(data);
|
44
|
+
// }
|
45
|
+
// connection.unknown = function(data) {
|
46
|
+
// alert("Unknown event: " + JSON.stringify(data));
|
47
|
+
// console.log(data);
|
48
|
+
// }
|
49
49
|
}
|
50
50
|
</script></body></html>}
|
51
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plezi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iodine
|