message_bus 2.0.0.beta.7 → 2.0.0.beta.8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of message_bus might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -0
- data/Gemfile +1 -0
- data/README.md +1 -1
- data/examples/bench/bench.lua +17 -1
- data/examples/bench/config.ru +2 -0
- data/lib/message_bus.rb +1 -1
- data/lib/message_bus/version.rb +1 -1
- data/message_bus.gemspec +0 -1
- data/spec/assets/support/jasmine.yml +1 -11
- data/spec/assets/support/jasmine_helper.rb +10 -0
- data/spec/lib/message_bus_spec.rb +12 -3
- metadata +4 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36e783040a809c36cf22fa4240a6c563c0b77445
|
4
|
+
data.tar.gz: 4c1912ddfd8af23adcab074d340094e32721528d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e4343488e590e4eb1270e2ba8c22b02d2e9b282be80fe79d606a8dce375ff90317abaccea16cf6f90350569a5be1e0daa1b9345f21253d522d42660091ff95c
|
7
|
+
data.tar.gz: 821d8f2fe45aef0dd014cc0315761e4b9bbc4eb47a0f8d67f5e323c8ebf302d7b8fc996bb01ad443f6f16ba1c1d5b421c92216eca85e31e8755618b645b889ce
|
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -176,7 +176,7 @@ that of the JavaScript client.
|
|
176
176
|
|
177
177
|
All client settings are settable via `MessageBus.OPTION`
|
178
178
|
|
179
|
-
Setting|Default|
|
179
|
+
Setting|Default|Info
|
180
180
|
----|---|---|
|
181
181
|
enableLongPolling|true|Allow long-polling (provided it is enable by the server)
|
182
182
|
callbackInterval|15000|Safeguard to ensure background polling does not exceed this interval (in milliseconds)
|
data/examples/bench/bench.lua
CHANGED
@@ -1,7 +1,23 @@
|
|
1
|
+
-- wrk returns lots of read errors, this is unavoidable cause
|
2
|
+
--
|
3
|
+
-- 1. There is no internal implmentation of chunked encoding in wrk (which would be ideal)
|
4
|
+
--
|
5
|
+
-- 2. MessageBus gem does not provide http keepalive (by design), and can not provide content length
|
6
|
+
-- if MessageBus provided keepalive it would have to be able to redispatch the reqs to rack, something
|
7
|
+
-- that is not supported by the underlying rack hijack protocol, once a req is hijacked it can not be
|
8
|
+
-- returned
|
9
|
+
--
|
10
|
+
-- This leads to certain read errors while the bench runs cause wrk can not figure out cleanly that
|
11
|
+
-- MessageBus is done with a request
|
12
|
+
--
|
13
|
+
|
1
14
|
wrk.method = "POST"
|
2
15
|
wrk.body = ""
|
3
16
|
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
|
4
|
-
|
17
|
+
|
18
|
+
-- chunking is not supported internally to wrk
|
19
|
+
wrk.headers["Dont-Chunk"] = "true"
|
20
|
+
wrk.headers["Connection"] = "Close"
|
5
21
|
|
6
22
|
request = function()
|
7
23
|
local hexdict = {48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102}
|
data/examples/bench/config.ru
CHANGED
data/lib/message_bus.rb
CHANGED
data/lib/message_bus/version.rb
CHANGED
data/message_bus.gemspec
CHANGED
@@ -77,17 +77,7 @@ src_dir:
|
|
77
77
|
#
|
78
78
|
spec_dir: spec/assets
|
79
79
|
|
80
|
-
|
81
|
-
#
|
82
|
-
# Ruby file that Jasmine server will require before starting.
|
83
|
-
# Returned relative to your root path
|
84
|
-
# Default spec/javascripts/support/jasmine_helper.rb
|
85
|
-
#
|
86
|
-
# EXAMPLE:
|
87
|
-
#
|
88
|
-
# spec_helper: spec/javascripts/support/jasmine_helper.rb
|
89
|
-
#
|
90
|
-
# spec_helper: spec/javascripts/support/jasmine_helper.rb
|
80
|
+
spec_helper: spec/assets/support/jasmine_helper.rb
|
91
81
|
|
92
82
|
# boot_dir
|
93
83
|
#
|
@@ -23,6 +23,7 @@ describe MessageBus do
|
|
23
23
|
|
24
24
|
data1 = []
|
25
25
|
data2 = []
|
26
|
+
data3 = []
|
26
27
|
|
27
28
|
@bus.subscribe("/minion") do |msg|
|
28
29
|
data1 << msg.data
|
@@ -32,12 +33,20 @@ describe MessageBus do
|
|
32
33
|
data2 << msg.data
|
33
34
|
end
|
34
35
|
|
36
|
+
@bus.subscribe("/minion", 1) do |msg|
|
37
|
+
data3 << msg.data
|
38
|
+
end
|
39
|
+
|
35
40
|
@bus.publish("/minion", "bananana")
|
41
|
+
@bus.publish("/minion", "it's so fluffy")
|
36
42
|
|
37
|
-
wait_for(2000)
|
43
|
+
wait_for(2000) do
|
44
|
+
data3.length == 3 && data2.length == 3 && data1.length == 2
|
45
|
+
end
|
38
46
|
|
39
|
-
data1.must_equal ['bananana']
|
40
|
-
data2.must_equal ['banana', 'bananana']
|
47
|
+
data1.must_equal ['bananana', "it's so fluffy"]
|
48
|
+
data2.must_equal ['banana', 'bananana', "it's so fluffy"]
|
49
|
+
data3.must_equal ['banana', 'bananana', "it's so fluffy"]
|
41
50
|
end
|
42
51
|
|
43
52
|
it "can transmit client_ids" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: message_bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.beta.
|
4
|
+
version: 2.0.0.beta.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: jasmine
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
description: A message bus for rack
|
70
56
|
email:
|
71
57
|
- sam.saffron@gmail.com
|
@@ -120,6 +106,7 @@ files:
|
|
120
106
|
- spec/assets/SpecHelper.js
|
121
107
|
- spec/assets/message-bus.spec.js
|
122
108
|
- spec/assets/support/jasmine.yml
|
109
|
+
- spec/assets/support/jasmine_helper.rb
|
123
110
|
- spec/lib/fake_async_middleware.rb
|
124
111
|
- spec/lib/message_bus/assets/asset_encoding_spec.rb
|
125
112
|
- spec/lib/message_bus/backends/postgres_spec.rb
|
@@ -161,6 +148,7 @@ test_files:
|
|
161
148
|
- spec/assets/SpecHelper.js
|
162
149
|
- spec/assets/message-bus.spec.js
|
163
150
|
- spec/assets/support/jasmine.yml
|
151
|
+
- spec/assets/support/jasmine_helper.rb
|
164
152
|
- spec/lib/fake_async_middleware.rb
|
165
153
|
- spec/lib/message_bus/assets/asset_encoding_spec.rb
|
166
154
|
- spec/lib/message_bus/backends/postgres_spec.rb
|