message_bus 3.3.5 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.eslintrc.js +21 -0
- data/.github/workflows/ci.yml +79 -32
- data/.gitignore +2 -0
- data/.prettierrc +1 -0
- data/CHANGELOG +103 -52
- data/DEV.md +0 -2
- data/Gemfile +0 -25
- data/LICENSE +1 -1
- data/README.md +58 -25
- data/Rakefile +31 -26
- data/assets/message-bus-ajax.js +3 -3
- data/assets/message-bus.js +69 -54
- data/bench/codecs/all_codecs.rb +39 -0
- data/bench/codecs/marshal.rb +11 -0
- data/bench/codecs/packed_string.rb +67 -0
- data/bench/codecs/string_hack.rb +47 -0
- data/bench/codecs_large_user_list.rb +29 -0
- data/bench/codecs_standard_message.rb +29 -0
- data/examples/bench/bench.lua +2 -2
- data/lib/message_bus/backends/base.rb +8 -5
- data/lib/message_bus/backends/memory.rb +6 -2
- data/lib/message_bus/backends/postgres.rb +28 -18
- data/lib/message_bus/backends/redis.rb +10 -6
- data/lib/message_bus/client.rb +6 -7
- data/lib/message_bus/codec/base.rb +18 -0
- data/lib/message_bus/codec/json.rb +15 -0
- data/lib/message_bus/codec/oj.rb +21 -0
- data/lib/message_bus/connection_manager.rb +1 -1
- data/lib/message_bus/distributed_cache.rb +3 -1
- data/lib/message_bus/http_client.rb +2 -2
- data/lib/message_bus/rack/diagnostics.rb +30 -8
- data/lib/message_bus/rack/middleware.rb +6 -0
- data/lib/message_bus/rack/thin_ext.rb +2 -1
- data/lib/message_bus/version.rb +1 -1
- data/lib/message_bus.rb +45 -48
- data/message_bus.gemspec +21 -3
- data/package-lock.json +3744 -0
- data/package.json +15 -8
- data/spec/assets/SpecHelper.js +6 -5
- data/spec/assets/message-bus.spec.js +9 -6
- data/spec/helpers.rb +23 -7
- data/spec/integration/http_client_spec.rb +1 -1
- data/spec/lib/fake_async_middleware.rb +1 -0
- data/spec/lib/message_bus/backend_spec.rb +13 -44
- data/spec/lib/message_bus/client_spec.rb +7 -6
- data/spec/lib/message_bus/connection_manager_spec.rb +4 -0
- data/spec/lib/message_bus/distributed_cache_spec.rb +5 -7
- data/spec/lib/message_bus/multi_process_spec.rb +20 -9
- data/spec/lib/message_bus/rack/middleware_spec.rb +18 -6
- data/spec/lib/message_bus/timer_thread_spec.rb +1 -5
- data/spec/lib/message_bus_spec.rb +13 -8
- data/spec/spec_helper.rb +8 -9
- data/spec/support/jasmine-browser.json +16 -0
- data/vendor/assets/javascripts/message-bus-ajax.js +3 -3
- data/vendor/assets/javascripts/message-bus.js +69 -54
- metadata +229 -10
- data/lib/message_bus/em_ext.rb +0 -6
- data/spec/assets/support/jasmine.yml +0 -126
- data/spec/assets/support/jasmine_helper.rb +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb9967cb1c20e9a7c2f02ea36bfd54a3a13dac00ef44dcd0f27f7f878504ee2c
|
|
4
|
+
data.tar.gz: 6ad58769e032468f20411b507aab0c7eaf72e09ab904641f1f635a5061c42c3c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6f3ab3af97533e26cf7fc91eb529dd5bd90f7e3b7a818b6c86636bbd4cbfb5b8f38479ee81ca1230da1ec5d6101d59a56273186f46c8d3b52807a467c40abdb
|
|
7
|
+
data.tar.gz: ab4a57f673a4cb99c1a00225a041dfe69dfbc6f9c7213774a6e4f64e6250241d3c69148fc14cf900409e15f1574d0a6b41be43b9b3c5819f2313d25ab0713418
|
data/.eslintrc.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*global module*/
|
|
2
|
+
module.exports = {
|
|
3
|
+
env: {
|
|
4
|
+
browser: true,
|
|
5
|
+
es2021: false,
|
|
6
|
+
},
|
|
7
|
+
extends: 'eslint:recommended',
|
|
8
|
+
parserOptions: {
|
|
9
|
+
ecmaVersion: 2015,
|
|
10
|
+
sourceType: 'module',
|
|
11
|
+
},
|
|
12
|
+
rules: {},
|
|
13
|
+
ignorePatterns: [
|
|
14
|
+
'/vendor',
|
|
15
|
+
'/doc',
|
|
16
|
+
'/assets/babel.min.js',
|
|
17
|
+
'/assets/jquery-1.8.2.js',
|
|
18
|
+
'/assets/react-dom.js',
|
|
19
|
+
'/assets/react.js',
|
|
20
|
+
],
|
|
21
|
+
};
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -1,54 +1,101 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: CI
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
pull_request:
|
|
5
4
|
push:
|
|
6
5
|
branches:
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
env:
|
|
10
|
-
PGHOST: localhost
|
|
11
|
-
PGPORT: 5432
|
|
12
|
-
PGPASSWORD: postgres
|
|
13
|
-
PGUSER: postgres
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
14
8
|
|
|
15
9
|
jobs:
|
|
16
10
|
build:
|
|
17
11
|
runs-on: ubuntu-latest
|
|
18
|
-
name: Ruby ${{ matrix.ruby }}
|
|
12
|
+
name: Ruby ${{ matrix.ruby }} (redis ${{ matrix.redis }})
|
|
13
|
+
timeout-minutes: 10
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
PGHOST: localhost
|
|
17
|
+
PGPASSWORD: postgres
|
|
18
|
+
PGUSER: postgres
|
|
19
|
+
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
ruby: [2.6, 2.7, 3.0]
|
|
24
|
+
redis: [5, 6]
|
|
25
|
+
|
|
19
26
|
services:
|
|
20
27
|
postgres:
|
|
21
|
-
image: postgres:
|
|
28
|
+
image: postgres:14
|
|
22
29
|
env:
|
|
30
|
+
POSTGRES_DB: message_bus_test
|
|
23
31
|
POSTGRES_PASSWORD: postgres
|
|
24
32
|
ports:
|
|
25
33
|
- 5432:5432
|
|
26
34
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
redis:
|
|
36
|
+
image: ${{ format('redis:{0}', matrix.redis) }}
|
|
37
|
+
ports:
|
|
38
|
+
- 6379:6379
|
|
39
|
+
options: >-
|
|
40
|
+
--health-cmd "redis-cli ping"
|
|
41
|
+
--health-interval 10s
|
|
42
|
+
--health-timeout 5s
|
|
43
|
+
--health-retries 5
|
|
44
|
+
|
|
30
45
|
steps:
|
|
31
46
|
- uses: actions/checkout@v2
|
|
32
|
-
|
|
47
|
+
|
|
48
|
+
- uses: ruby/setup-ruby@v1
|
|
33
49
|
with:
|
|
34
50
|
ruby-version: ${{ matrix.ruby }}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
|
40
|
-
restore-keys: |
|
|
41
|
-
${{ runner.os }}-${{ matrix.ruby }}-gems-
|
|
42
|
-
- name: Create Database
|
|
43
|
-
run: |
|
|
44
|
-
createdb message_bus_test
|
|
45
|
-
- name: Setup redis
|
|
46
|
-
uses: shogo82148/actions-setup-redis@v1
|
|
51
|
+
bundler-cache: true
|
|
52
|
+
|
|
53
|
+
- name: Set up Node.js
|
|
54
|
+
uses: actions/setup-node@v2
|
|
47
55
|
with:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
node-version: 16
|
|
57
|
+
cache: npm
|
|
58
|
+
|
|
59
|
+
- name: Setup npm
|
|
60
|
+
run: npm install
|
|
61
|
+
|
|
53
62
|
- name: Tests
|
|
63
|
+
env:
|
|
64
|
+
TESTOPTS: --verbose
|
|
54
65
|
run: bundle exec rake
|
|
66
|
+
timeout-minutes: 3
|
|
67
|
+
|
|
68
|
+
- name: Linting
|
|
69
|
+
run: npx eslint .
|
|
70
|
+
|
|
71
|
+
publish:
|
|
72
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
73
|
+
needs: build
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v2
|
|
78
|
+
|
|
79
|
+
- name: Release gem
|
|
80
|
+
uses: discourse/publish-rubygems-action@v2
|
|
81
|
+
id: publish-gem
|
|
82
|
+
env:
|
|
83
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
|
84
|
+
GIT_EMAIL: team@discourse.org
|
|
85
|
+
GIT_NAME: discoursebot
|
|
86
|
+
|
|
87
|
+
- name: Update package version
|
|
88
|
+
if: steps.publish-gem.outputs.new_version == 'true'
|
|
89
|
+
run: |
|
|
90
|
+
VERSION=$(ruby -r './lib/message_bus/version' -e 'puts MessageBus::VERSION')
|
|
91
|
+
sed -i "s/0.0.0-version-placeholder/$VERSION/" package.json
|
|
92
|
+
git config --global user.email "ci@ci.invalid"
|
|
93
|
+
git config --global user.name "Discourse CI"
|
|
94
|
+
git add package.json
|
|
95
|
+
git commit -m 'bump'
|
|
96
|
+
|
|
97
|
+
- name: Publish package
|
|
98
|
+
uses: JS-DevTools/npm-publish@v1
|
|
99
|
+
if: steps.publish-gem.outputs.new_version == 'true'
|
|
100
|
+
with:
|
|
101
|
+
token: ${{ secrets.NPM_TOKEN }}
|
data/.gitignore
CHANGED
data/.prettierrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
data/CHANGELOG
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
31-12-2021
|
|
2
|
+
|
|
3
|
+
- Version 3.4.0
|
|
4
|
+
|
|
5
|
+
- FEATURE: remove "suicide" feature from message_bus - (message_bus used to terminate process when keepalive exceeded)
|
|
6
|
+
|
|
7
|
+
20-12-2021
|
|
8
|
+
|
|
9
|
+
- Version 3.3.8
|
|
10
|
+
|
|
11
|
+
- FIX: Restore dist js files to fix a regression in 3.3.7
|
|
12
|
+
- FIX: Stop various thread/pg connection leaks
|
|
13
|
+
- DEV: Fix ruby warnings
|
|
14
|
+
|
|
15
|
+
15-12-2021
|
|
16
|
+
|
|
17
|
+
- Version 3.3.7
|
|
18
|
+
|
|
19
|
+
- FIX: Prevent simple polling from clobbering the session
|
|
20
|
+
- SECURITY: Fix path traversal on diagnostics route.
|
|
21
|
+
|
|
22
|
+
31-05-2021
|
|
23
|
+
|
|
24
|
+
- Version 3.3.6
|
|
25
|
+
|
|
26
|
+
- FEATURE: Introduce support for transport codecs
|
|
27
|
+
- FIX: event subscription leak in JS after start/stop/start sequence
|
|
28
|
+
- FEATURE: MessageBus.onVisibilityChange() can be used to trigger a visibility change check by hand
|
|
29
|
+
|
|
1
30
|
28-04-2021
|
|
2
31
|
|
|
3
32
|
- Version 3.3.5
|
|
@@ -48,14 +77,14 @@
|
|
|
48
77
|
|
|
49
78
|
- Version 3.3.0
|
|
50
79
|
|
|
51
|
-
|
|
80
|
+
- FEATURE: `MessageBus.base_route=` to alter the route that message bus will listen on.
|
|
52
81
|
|
|
53
82
|
07-05-2020
|
|
54
83
|
|
|
55
84
|
- Version 3.2.0
|
|
56
85
|
|
|
57
|
-
|
|
58
|
-
|
|
86
|
+
- FIX: compatibility with Rails 6.0.3, note: apps without ActionDispatch::Flash may stop working after this upgrade
|
|
87
|
+
to correct this disable middleware injection with `config.skip_message_bus_middleware = true` and configure middleware by hand with `app.middleware.use(MessageBus::Rack::Middleware)`
|
|
59
88
|
|
|
60
89
|
28-04-2020
|
|
61
90
|
|
|
@@ -90,7 +119,6 @@
|
|
|
90
119
|
|
|
91
120
|
- FIX: In the redis backend make the `is_readonly?` method compatible with the redis gem both pre and post v4.0 when the `client` attribute was removed
|
|
92
121
|
|
|
93
|
-
|
|
94
122
|
30-04-2019
|
|
95
123
|
|
|
96
124
|
- Version 2.2.1
|
|
@@ -121,7 +149,7 @@
|
|
|
121
149
|
- Version 2.2.0.pre
|
|
122
150
|
|
|
123
151
|
- FIX: In redis backend we now expire the key used to track channel id this can cause a redis key leak
|
|
124
|
-
|
|
152
|
+
with large amounts of subscriptions that go away
|
|
125
153
|
- FEATURE: Much extra implementation documentation, and some improvements to usage documentation.
|
|
126
154
|
- FEATURE: Improvements to development workflow:
|
|
127
155
|
- Fully docker-based development and testing, with no other dependencies.
|
|
@@ -138,50 +166,53 @@
|
|
|
138
166
|
- Supports setting backlog size on publication for memory/postgres
|
|
139
167
|
- FEATURE: `MessageBus.off` now prevents the server subscription from starting up.
|
|
140
168
|
- FEATURE: Trims unused parts of the public API:
|
|
169
|
+
|
|
141
170
|
- Methods removed:
|
|
142
|
-
|
|
143
|
-
|
|
171
|
+
|
|
172
|
+
- ConnectionManager#stats (never used and the ConnectionManager is not exposed to application code)
|
|
173
|
+
- Client#cancel (effectively duplicate of Client#close and the Client is only available via the ConnectionManager, thus not available to application code)
|
|
144
174
|
|
|
145
175
|
- Methods made private:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
176
|
+
|
|
177
|
+
- MessageBus::Implementation#encode_channel_name
|
|
178
|
+
- MessageBus::Implementation#decode_channel_name
|
|
179
|
+
- Client#in_async?
|
|
180
|
+
- Client#ensure_closed!
|
|
181
|
+
- ConnectionManager#subscribe_client
|
|
182
|
+
- Diagnostics.full_process_path
|
|
183
|
+
- Diagnostics.hostname
|
|
184
|
+
- MessageBus::Rack::Diagnostics#js_asset
|
|
185
|
+
- MessageBus::Rack::Diagnostics#generate_script_tag
|
|
186
|
+
- MessageBus::Rack::Diagnostics#file_hash
|
|
187
|
+
- MessageBus::Rack::Diagnostics#asset_contents
|
|
188
|
+
- MessageBus::Rack::Diagnostics#asset_path
|
|
189
|
+
- MessageBus::Rack::Diagnostics#index
|
|
190
|
+
- MessageBus::Rack::Diagnostics#translate_handlebars
|
|
191
|
+
- MessageBus::Rack::Diagnostics#indent
|
|
192
|
+
- MessageBus::Rack::Middleware#start_listener
|
|
193
|
+
- MessageBus::Rack::Middleware#close_db_connection!
|
|
194
|
+
- MessageBus::Rack::Middleware#add_client_with_timeout
|
|
164
195
|
|
|
165
196
|
- Methods switched from protected to private:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
197
|
+
- MessageBus::Implementation#global?
|
|
198
|
+
- MessageBus::Implementation#decode_message!
|
|
199
|
+
- MessageBus::Implementation#replay_backlog
|
|
200
|
+
- MessageBus::Implementation#subscribe_impl
|
|
201
|
+
- MessageBus::Implementation#unsubscribe_impl
|
|
202
|
+
- MessageBus::Implementation#ensure_subscriber_thread
|
|
203
|
+
- MessageBus::Implementation#new_subscriber_thread
|
|
204
|
+
- MessageBus::Implementation#global_subscribe_thread
|
|
205
|
+
- MessageBus::Implementation#multi_each
|
|
206
|
+
- Client#write_headers
|
|
207
|
+
- Client#write_chunk
|
|
208
|
+
- Client#write_and_close
|
|
209
|
+
- Client#messages_to_json
|
|
179
210
|
|
|
180
211
|
15-10-2018
|
|
181
212
|
|
|
182
213
|
- Version 2.1.6
|
|
183
214
|
|
|
184
|
-
- FEATURE: `
|
|
215
|
+
- FEATURE: `MessageBus.publish` accepts option `site_id` to publish to a site
|
|
185
216
|
- FEATURE: Added MessageBus::DistributedCache for cross process caching
|
|
186
217
|
- PERF: Use monotonic times in timer thread
|
|
187
218
|
- FEATURE: min poll interval is now configurable client side
|
|
@@ -204,7 +235,7 @@
|
|
|
204
235
|
- Version 2.1.2
|
|
205
236
|
|
|
206
237
|
- FEATURE: minHiddenPollInterval set to 1500ms out of the box, ensures we never do hidden tab
|
|
207
|
-
|
|
238
|
+
polls at a high rate if tons of tabs are open
|
|
208
239
|
- FEATURE: added random 500ms to delayed polls to increase tab entropy
|
|
209
240
|
|
|
210
241
|
18-12-2017
|
|
@@ -218,7 +249,7 @@
|
|
|
218
249
|
- Version 2.1.0
|
|
219
250
|
|
|
220
251
|
- FEATURE: you can now lookup last N messages on channel on subscribe from JavaScript
|
|
221
|
-
|
|
252
|
+
Subscribe at position (-1 - numberOfMessages) from the client
|
|
222
253
|
|
|
223
254
|
24-11-2017
|
|
224
255
|
|
|
@@ -238,14 +269,13 @@
|
|
|
238
269
|
- Version 2.0.7
|
|
239
270
|
|
|
240
271
|
- Fix/Feature: use LUA script for publishing to bus, this eliminates a race condition
|
|
241
|
-
|
|
242
|
-
|
|
272
|
+
and ensures that we are never stuck in a multi transaction by mistake
|
|
243
273
|
|
|
244
274
|
29-09-2017
|
|
245
275
|
|
|
246
276
|
- Version 2.0.6
|
|
247
277
|
|
|
248
|
-
- Fix: correct after_fork so it correctly
|
|
278
|
+
- Fix: correct after_fork so it correctly disconnects redis
|
|
249
279
|
- Fix: correct message_bus #destroy used in tests to clean up spec (deadlock)
|
|
250
280
|
- Fix: deliver backlog unconditionally when polling (and not long polling)
|
|
251
281
|
|
|
@@ -267,12 +297,10 @@
|
|
|
267
297
|
- Version 2.0.2
|
|
268
298
|
- Feature: Add on_middleware_error callback for remapping middleware errors to HTTP results
|
|
269
299
|
|
|
270
|
-
|
|
271
300
|
25-07-2016
|
|
272
301
|
|
|
273
302
|
- Feature: Add JavaScript MessageBus.status() function
|
|
274
303
|
|
|
275
|
-
|
|
276
304
|
21-06-2016
|
|
277
305
|
|
|
278
306
|
- Version 2.0.1
|
|
@@ -315,7 +343,7 @@
|
|
|
315
343
|
|
|
316
344
|
- Version 2.0.0.beta.6
|
|
317
345
|
|
|
318
|
-
- Feature: Support standalone
|
|
346
|
+
- Feature: Support standalone operation without depending on jQuery @nathanstitt
|
|
319
347
|
- Feature: Support a noconflict mode @nathanstitt
|
|
320
348
|
- Feature: Support JSON POST payload @nathanstitt
|
|
321
349
|
|
|
@@ -353,97 +381,116 @@
|
|
|
353
381
|
|
|
354
382
|
- Version 1.1.1
|
|
355
383
|
- Fix: In multisite config there was no way to specify site for last_id or backlog
|
|
356
|
-
|
|
357
|
-
|
|
384
|
+
to resolve overrides were added to #last_id and #backlog, MessageBus::Client now
|
|
385
|
+
uses the new overrides
|
|
358
386
|
|
|
359
387
|
07-12-2015
|
|
360
388
|
|
|
361
389
|
- Version 1.1.0
|
|
362
390
|
- Fix: keep track of client sequence on server, abandon old subscribes
|
|
363
391
|
- Fix: rare concurrency issue when subscribing concurrently
|
|
364
|
-
-
|
|
392
|
+
- Feature: remove most jQuery dependency from message-bus.js
|
|
365
393
|
|
|
366
394
|
09-07-2015
|
|
395
|
+
|
|
367
396
|
- Version 1.0.16
|
|
368
397
|
- Fix: correct edge cases around keepalive checks on bus
|
|
369
398
|
|
|
370
399
|
09-07-2015
|
|
400
|
+
|
|
371
401
|
- Version 1.0.15
|
|
372
402
|
- Feature: MessageBus.reliable_pub_sub.max_backlog_age (in secs) configurable (default to 7 days)
|
|
373
403
|
- Fix: API for MessageBus.backlog("/bla") was returning global backlog by mistake
|
|
374
404
|
- Change: Max global backlog size reduced to 2000 elements
|
|
375
405
|
|
|
376
406
|
08-06-2015
|
|
407
|
+
|
|
377
408
|
- Version 1.0.14
|
|
378
409
|
- Fix: we can not use Thread#kill best keepalive can do is terminate process cleanly
|
|
379
410
|
- Feature: you can opt-out of keepalive with MessageBus.keepalive_timeout = 0
|
|
380
411
|
|
|
381
412
|
08-06-2015
|
|
413
|
+
|
|
382
414
|
- Version 1.0.13
|
|
383
415
|
- Fix: on global subscribe reconnect replay missed messages
|
|
384
416
|
- Feature: keepalive tests for global subscribe, catches hung redis connections
|
|
385
417
|
|
|
386
418
|
28-05-2015
|
|
419
|
+
|
|
387
420
|
- Version 1.0.12
|
|
388
|
-
- Feature: Support client_id
|
|
421
|
+
- Feature: Support client_id targeted message
|
|
389
422
|
|
|
390
423
|
06-05-2015
|
|
424
|
+
|
|
391
425
|
- Version 1.0.11
|
|
392
426
|
- Fix: race condition in TimerThread
|
|
393
427
|
|
|
394
428
|
01-05-2015
|
|
429
|
+
|
|
395
430
|
- Version: 1.0.10
|
|
396
431
|
- Feature: no longer depends on EventMachine (only used for Thin backend)
|
|
397
|
-
- Feature:
|
|
432
|
+
- Feature: reliable pub sub will queue messages in memory if redis is readonly, configurable
|
|
398
433
|
- Fix: if redis is flushed we will continue to deliver messages
|
|
399
434
|
|
|
400
435
|
23-03-2015
|
|
436
|
+
|
|
401
437
|
- Version 1.0.9
|
|
402
438
|
- Fix: inherit off StandardError not Exception for all exceptions raised
|
|
403
439
|
|
|
404
440
|
20-03-2015
|
|
441
|
+
|
|
405
442
|
- Version 1.0.8
|
|
406
443
|
- Fix: aggressive short polling in background
|
|
407
444
|
|
|
408
445
|
16-03-2015
|
|
446
|
+
|
|
409
447
|
- Version 1.0.7
|
|
410
448
|
- Feature: added pause and resume methods
|
|
411
449
|
|
|
412
450
|
03-02-2015
|
|
451
|
+
|
|
413
452
|
- Version 1.0.6
|
|
414
453
|
- Fix: global backlog not truncating correctly
|
|
415
454
|
|
|
416
455
|
23-09-2014
|
|
456
|
+
|
|
417
457
|
- Version 1.0.5
|
|
418
458
|
- Fix: missing custom headers from long polls
|
|
419
459
|
|
|
420
460
|
23-09-2014
|
|
461
|
+
|
|
421
462
|
- Version 1.0.4
|
|
422
463
|
- Change: MessageBus.access_control_allow_origin_lookup to extra_response_headers_lookup
|
|
423
464
|
|
|
424
465
|
23-09-2014
|
|
466
|
+
|
|
425
467
|
- Version 1.0.3
|
|
426
468
|
- Change: MessageBus.access_control_allow_origin to MessageBus.access_control_allow_origin_lookup
|
|
427
469
|
|
|
428
470
|
23-09-2014
|
|
471
|
+
|
|
429
472
|
- Version 1.0.2
|
|
430
473
|
- Feature: MessageBus.access_control_allow_origin to control origin header
|
|
431
474
|
|
|
432
475
|
23-09-2014
|
|
476
|
+
|
|
433
477
|
- Version 1.0.1
|
|
434
478
|
- Feature: $.ajax dependency can be passed in.
|
|
435
479
|
- Feature: unsubscribe accepts a second param for the function to unsubscribe.
|
|
436
480
|
|
|
437
481
|
22-09-2014
|
|
482
|
+
|
|
438
483
|
- Version 1.0.0
|
|
439
484
|
- Feature: add backgroundCallbackInterval - interval to send polls when page is in the background
|
|
440
485
|
- Feature: issue a long poll as soon as page moves into the foreground
|
|
441
486
|
|
|
442
487
|
11-08-2014
|
|
488
|
+
|
|
443
489
|
- Version 0.9.5
|
|
444
490
|
- Fix: release db connection a lot earlier for long polling (rails defer closes)
|
|
445
491
|
|
|
446
492
|
13-01-2014
|
|
493
|
+
|
|
447
494
|
- Version 0.9.4
|
|
448
495
|
- Added support for /global/ channel to publish messages across a multisite
|
|
449
496
|
- Cleaned up test harness so it uses local bus as opposed to global
|
|
@@ -452,19 +499,23 @@
|
|
|
452
499
|
- ensure_reactor could say the reactor is running, but it was not, on first call
|
|
453
500
|
|
|
454
501
|
06-12-2013
|
|
502
|
+
|
|
455
503
|
- Version 0.9.3.2
|
|
456
504
|
- Fix permissions in gem
|
|
457
505
|
|
|
458
506
|
05-12-2013
|
|
507
|
+
|
|
459
508
|
- Version 0.9.3.1
|
|
460
509
|
- Add MessageBus.diagnostics() for diagnosing bus issues client side
|
|
461
510
|
- Add more robustness to JavaScript, if callbacks used to fail they would halt the chain
|
|
462
511
|
|
|
463
512
|
03-12-2013
|
|
513
|
+
|
|
464
514
|
- Version 0.9.3
|
|
465
515
|
- Remove thin dependency
|
|
466
516
|
- Improve robustness under failure conditions
|
|
467
517
|
|
|
468
518
|
30-09-2013
|
|
519
|
+
|
|
469
520
|
- Fix failures in Ruby 1.9
|
|
470
521
|
- Set up rack hijack by default in light of passengers new setting
|
data/DEV.md
CHANGED
data/Gemfile
CHANGED
|
@@ -3,28 +3,3 @@ source 'https://rubygems.org'
|
|
|
3
3
|
|
|
4
4
|
# Specify your gem's dependencies in message_bus.gemspec
|
|
5
5
|
gemspec
|
|
6
|
-
|
|
7
|
-
group :test do
|
|
8
|
-
gem 'minitest'
|
|
9
|
-
gem 'minitest-hooks'
|
|
10
|
-
gem 'minitest-global_expectations'
|
|
11
|
-
gem 'rake'
|
|
12
|
-
gem 'http_parser.rb'
|
|
13
|
-
gem 'thin'
|
|
14
|
-
gem 'rack-test', require: 'rack/test'
|
|
15
|
-
gem 'jasmine'
|
|
16
|
-
gem 'puma'
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
group :test, :development do
|
|
20
|
-
gem 'byebug'
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
group :development do
|
|
24
|
-
gem 'yard'
|
|
25
|
-
gem 'rubocop-discourse', require: false
|
|
26
|
-
gem 'rubocop-rspec', require: false
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
gem 'rack'
|
|
30
|
-
gem 'concurrent-ruby' # for distributed-cache
|
data/LICENSE
CHANGED
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|