wamp_client 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/README.md +5 -0
- data/lib/wamp_client/session.rb +7 -4
- data/lib/wamp_client/version.rb +1 -1
- data/wamp_client.gemspec +2 -2
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89777a1693c71983f0e12863bc34c6c6976549b4
|
4
|
+
data.tar.gz: 87ffbcbdf160a92bb92436f316b87030cebf5ac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 516a31f32f64e581290f8629668632510c79ef8bdccc0c5be04e2bb6eb3d8fde65048ec5ec3e74d2522003d71c5dafeaec09b31f9ae70088b9acd57c8e99a393
|
7
|
+
data.tar.gz: 144113bc2572aebb2d19a883523f50695ad08b0263e842cf3f07863fb683295e84cc5469f4b1b65d052c347f2edcae2cbfd45094b9a9bc23b9c9abd994b5ea6f
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -6,8 +6,13 @@
|
|
6
6
|
|
7
7
|
Client for talking to a WAMP Router. This is defined [here](https://tools.ietf.org/html/draft-oberstet-hybi-tavendo-wamp-02)
|
8
8
|
|
9
|
+
Please use [wamp_rails](https://github.com/ericchapman/ruby_wamp_rails) to integrate this GEM in to RAILS.
|
10
|
+
|
9
11
|
## Revision History
|
10
12
|
|
13
|
+
- v0.0.8:
|
14
|
+
- Exposed 'yield' publicly to allow higher level libraries to not use the 'defer'
|
15
|
+
- Removed library version dependency
|
11
16
|
- v0.0.7:
|
12
17
|
- Added 'session' to the 'details' in the callbacks and handlers
|
13
18
|
- v0.0.6:
|
data/lib/wamp_client/session.rb
CHANGED
@@ -693,7 +693,10 @@ module WampClient
|
|
693
693
|
end
|
694
694
|
|
695
695
|
# Sends a result for the invocation
|
696
|
-
|
696
|
+
# @param request [Integer] - The id of the request
|
697
|
+
# @param result [CallError, CallResult, anything] - If it is a CallError, the error will be returned
|
698
|
+
# @param options [Hash] - The options to be sent with the yield
|
699
|
+
def yield(request, result, options={}, check_defer=false)
|
697
700
|
# Prevent responses for defers that have already completed or had an error
|
698
701
|
if check_defer and not self._defers[request]
|
699
702
|
return
|
@@ -745,7 +748,7 @@ module WampClient
|
|
745
748
|
|
746
749
|
# On complete, send the result
|
747
750
|
value.on_complete do |defer, result|
|
748
|
-
self.
|
751
|
+
self.yield(defer.request, result, {}, true)
|
749
752
|
self._defers.delete(defer.request)
|
750
753
|
end
|
751
754
|
|
@@ -758,13 +761,13 @@ module WampClient
|
|
758
761
|
# For progressive, return the progress
|
759
762
|
if value.is_a? WampClient::Defer::ProgressiveCallDefer
|
760
763
|
value.on_progress do |defer, result|
|
761
|
-
self.
|
764
|
+
self.yield(defer.request, result, {progress: true}, true)
|
762
765
|
end
|
763
766
|
end
|
764
767
|
|
765
768
|
# Else it was a normal response
|
766
769
|
else
|
767
|
-
self.
|
770
|
+
self.yield(request, value)
|
768
771
|
end
|
769
772
|
|
770
773
|
rescue Exception => error
|
data/lib/wamp_client/version.rb
CHANGED
data/wamp_client.gemspec
CHANGED
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'simplecov'
|
25
25
|
spec.add_development_dependency 'codecov'
|
26
26
|
|
27
|
-
spec.add_dependency 'websocket-eventmachine-client'
|
28
|
-
spec.add_dependency 'json'
|
27
|
+
spec.add_dependency 'websocket-eventmachine-client'
|
28
|
+
spec.add_dependency 'json'
|
29
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wamp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Chapman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,30 +84,30 @@ dependencies:
|
|
84
84
|
name: websocket-eventmachine-client
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: json
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: '0'
|
111
111
|
description: An implementation of The Web Application Messaging Protocol (WAMP)
|
112
112
|
email:
|
113
113
|
- eric.chappy@gmail.com
|