message_bus 3.3.5 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +21 -0
  3. data/.github/workflows/ci.yml +79 -32
  4. data/.gitignore +2 -0
  5. data/.prettierrc +1 -0
  6. data/CHANGELOG +103 -52
  7. data/DEV.md +0 -2
  8. data/Gemfile +0 -25
  9. data/LICENSE +1 -1
  10. data/README.md +58 -25
  11. data/Rakefile +31 -26
  12. data/assets/message-bus-ajax.js +3 -3
  13. data/assets/message-bus.js +69 -54
  14. data/bench/codecs/all_codecs.rb +39 -0
  15. data/bench/codecs/marshal.rb +11 -0
  16. data/bench/codecs/packed_string.rb +67 -0
  17. data/bench/codecs/string_hack.rb +47 -0
  18. data/bench/codecs_large_user_list.rb +29 -0
  19. data/bench/codecs_standard_message.rb +29 -0
  20. data/examples/bench/bench.lua +2 -2
  21. data/lib/message_bus/backends/base.rb +8 -5
  22. data/lib/message_bus/backends/memory.rb +6 -2
  23. data/lib/message_bus/backends/postgres.rb +28 -18
  24. data/lib/message_bus/backends/redis.rb +10 -6
  25. data/lib/message_bus/client.rb +6 -7
  26. data/lib/message_bus/codec/base.rb +18 -0
  27. data/lib/message_bus/codec/json.rb +15 -0
  28. data/lib/message_bus/codec/oj.rb +21 -0
  29. data/lib/message_bus/connection_manager.rb +1 -1
  30. data/lib/message_bus/distributed_cache.rb +3 -1
  31. data/lib/message_bus/http_client.rb +2 -2
  32. data/lib/message_bus/rack/diagnostics.rb +30 -8
  33. data/lib/message_bus/rack/middleware.rb +6 -0
  34. data/lib/message_bus/rack/thin_ext.rb +2 -1
  35. data/lib/message_bus/version.rb +1 -1
  36. data/lib/message_bus.rb +45 -48
  37. data/message_bus.gemspec +21 -3
  38. data/package-lock.json +3744 -0
  39. data/package.json +15 -8
  40. data/spec/assets/SpecHelper.js +6 -5
  41. data/spec/assets/message-bus.spec.js +9 -6
  42. data/spec/helpers.rb +23 -7
  43. data/spec/integration/http_client_spec.rb +1 -1
  44. data/spec/lib/fake_async_middleware.rb +1 -0
  45. data/spec/lib/message_bus/backend_spec.rb +13 -44
  46. data/spec/lib/message_bus/client_spec.rb +7 -6
  47. data/spec/lib/message_bus/connection_manager_spec.rb +4 -0
  48. data/spec/lib/message_bus/distributed_cache_spec.rb +5 -7
  49. data/spec/lib/message_bus/multi_process_spec.rb +20 -9
  50. data/spec/lib/message_bus/rack/middleware_spec.rb +18 -6
  51. data/spec/lib/message_bus/timer_thread_spec.rb +1 -5
  52. data/spec/lib/message_bus_spec.rb +13 -8
  53. data/spec/spec_helper.rb +8 -9
  54. data/spec/support/jasmine-browser.json +16 -0
  55. data/vendor/assets/javascripts/message-bus-ajax.js +3 -3
  56. data/vendor/assets/javascripts/message-bus.js +69 -54
  57. metadata +229 -10
  58. data/lib/message_bus/em_ext.rb +0 -6
  59. data/spec/assets/support/jasmine.yml +0 -126
  60. data/spec/assets/support/jasmine_helper.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f34126c192c671b895e7cf912a04ffcb5d05a5a5447786c3f5e3db3595c79004
4
- data.tar.gz: 5a638bf3eb07680d17d93b762bc41d92d8b4c4412d9f3fae3e7410ec2ae67488
3
+ metadata.gz: bb9967cb1c20e9a7c2f02ea36bfd54a3a13dac00ef44dcd0f27f7f878504ee2c
4
+ data.tar.gz: 6ad58769e032468f20411b507aab0c7eaf72e09ab904641f1f635a5061c42c3c
5
5
  SHA512:
6
- metadata.gz: f7102c7e62cc9854237fab235e2020f318bbdc956ba64f6d0c77c515430df1169bb06e01a9125f71631546daa3dfa1179c971ca207f32a9cda96880b0d9be6c6
7
- data.tar.gz: 91b8e655e1dc27b4f386477d38dea8ef4f44daa658793a2205392135cb2f846a80ac0aca52fc04c9a471990b64cb18c6ea9dbd36818690c28cac0c80f922d8be
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
+ };
@@ -1,54 +1,101 @@
1
- name: Message Bus Tests
1
+ name: CI
2
2
 
3
3
  on:
4
- pull_request:
5
4
  push:
6
5
  branches:
7
- - master
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:9.4
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
- strategy:
28
- matrix:
29
- ruby: ["2.7", "2.6", "2.5"]
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
- - uses: actions/setup-ruby@v1
47
+
48
+ - uses: ruby/setup-ruby@v1
33
49
  with:
34
50
  ruby-version: ${{ matrix.ruby }}
35
- - name: Bundler cache
36
- uses: actions/cache@v2
37
- with:
38
- path: vendor/bundle
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
- redis-version: '5.x'
49
- - name: Setup gems
50
- run: |
51
- bundle config path vendor/bundle
52
- bundle install --jobs 4
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
@@ -18,3 +18,5 @@ tmp
18
18
  *.swp
19
19
  .rubocop-https---raw-githubusercontent-com-discourse-discourse-master--rubocop-yml
20
20
  .byebug_history
21
+ node_modules/
22
+ yarn.lock
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
- - FEATURE: `MessageBus.base_route=` to alter the route that message bus will listen on.
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
- - FIX: compatability with Rails 6.0.3, note: apps without ActionDispatch::Flash may stop working after this upgrade
58
- 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)`
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
- with large amounts of subscriptions that go away
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
- * ConnectionManager#stats (never used and the ConnectionManager is not exposed to application code)
143
- * Client#cancel (effectively duplicate of Client#close and the Client is only available via the ConnectionManager, thus not available to application code)
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
- * MessageBus::Implementation#encode_channel_name
147
- * MessageBus::Implementation#decode_channel_name
148
- * Client#in_async?
149
- * Client#ensure_closed!
150
- * ConnectionManager#subscribe_client
151
- * Diagnostics.full_process_path
152
- * Diagnostics.hostname
153
- * MessageBus::Rack::Diagnostics#js_asset
154
- * MessageBus::Rack::Diagnostics#generate_script_tag
155
- * MessageBus::Rack::Diagnostics#file_hash
156
- * MessageBus::Rack::Diagnostics#asset_contents
157
- * MessageBus::Rack::Diagnostics#asset_path
158
- * MessageBus::Rack::Diagnostics#index
159
- * MessageBus::Rack::Diagnostics#translate_handlebars
160
- * MessageBus::Rack::Diagnostics#indent
161
- * MessageBus::Rack::Middleware#start_listener
162
- * MessageBus::Rack::Middleware#close_db_connection!
163
- * MessageBus::Rack::Middleware#add_client_with_timeout
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
- * MessageBus::Implementation#global?
167
- * MessageBus::Implementation#decode_message!
168
- * MessageBus::Implementation#replay_backlog
169
- * MessageBus::Implementation#subscribe_impl
170
- * MessageBus::Implementation#unsubscribe_impl
171
- * MessageBus::Implementation#ensure_subscriber_thread
172
- * MessageBus::Implementation#new_subscriber_thread
173
- * MessageBus::Implementation#global_subscribe_thread
174
- * MessageBus::Implementation#multi_each
175
- * Client#write_headers
176
- * Client#write_chunk
177
- * Client#write_and_close
178
- * Client#messages_to_json
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: `MesssageBus.publish` accepts option `site_id` to publish to a site
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
- polls at a high rate if tons of tabs are open
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
- Subscribe at position (-1 - numberOfMessages) from the client
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
- and ensures that we are never stuck in a multi transaction by mistake
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 disconnnects redis
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 opertion without depending on jQuery @nathanstitt
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
- to resolve overrides were added to #last_id and #backlog, MessageBus::Client now
357
- uses the new overrides
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
- - Fature: remove most jQuery dependency from message-bus.js
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 targetted message
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: realiable pub sub will queue messages in memory if redis is readonly, configurable
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
@@ -5,5 +5,3 @@
5
5
  2. Log in to npm `yarn login`
6
6
 
7
7
  3. Publish: `yarn publish`
8
-
9
-
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.