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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d954c0c77e2006ba7498cf8c756a1fe62e7b36fb
4
- data.tar.gz: ab84a9c9600defb28803571f11e64991b09fd6c0
3
+ metadata.gz: 89777a1693c71983f0e12863bc34c6c6976549b4
4
+ data.tar.gz: 87ffbcbdf160a92bb92436f316b87030cebf5ac3
5
5
  SHA512:
6
- metadata.gz: 816e1df133c17b32942d883965da83279c8b928a307c94753cd1d1acb95dafe0d3e3062e9412c65248ef692cc292ac227a91fa320a4c092292bb1e7529ca5734
7
- data.tar.gz: a90b9afafb5db01bc0d2d5b58e0efb27795bdb1c07f5b851e7989f05d3dd7d395c831427b3be5a8c2d08557e75b746b32fa4fca515fce6d5fcd2fa7860418911
6
+ metadata.gz: 516a31f32f64e581290f8629668632510c79ef8bdccc0c5be04e2bb6eb3d8fde65048ec5ec3e74d2522003d71c5dafeaec09b31f9ae70088b9acd57c8e99a393
7
+ data.tar.gz: 144113bc2572aebb2d19a883523f50695ad08b0263e842cf3f07863fb683295e84cc5469f4b1b65d052c347f2edcae2cbfd45094b9a9bc23b9c9abd994b5ea6f
data/.gitignore CHANGED
@@ -13,4 +13,5 @@
13
13
  *.a
14
14
  mkmf.log
15
15
  .idea
16
- *.tmp
16
+ *.tmp
17
+ .DS_Store
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:
@@ -693,7 +693,10 @@ module WampClient
693
693
  end
694
694
 
695
695
  # Sends a result for the invocation
696
- def _send_INVOCATION_result(request, result, options={}, check_defer=false)
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._send_INVOCATION_result(defer.request, result, {}, true)
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._send_INVOCATION_result(defer.request, result, {progress: true}, true)
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._send_INVOCATION_result(request, value)
770
+ self.yield(request, value)
768
771
  end
769
772
 
770
773
  rescue Exception => error
@@ -26,5 +26,5 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
26
  =end
27
27
 
28
28
  module WampClient
29
- VERSION = '0.0.7'
29
+ VERSION = '0.0.8'
30
30
  end
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', '~> 1.1.0'
28
- spec.add_dependency 'json', '~> 1.8.3'
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.7
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: 2016-11-24 00:00:00.000000000 Z
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: 1.1.0
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: 1.1.0
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: 1.8.3
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: 1.8.3
110
+ version: '0'
111
111
  description: An implementation of The Web Application Messaging Protocol (WAMP)
112
112
  email:
113
113
  - eric.chappy@gmail.com