ably 1.0.7 → 1.1.4.rc

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +14 -0
  3. data/.travis.yml +10 -8
  4. data/CHANGELOG.md +58 -4
  5. data/LICENSE +1 -3
  6. data/README.md +9 -5
  7. data/Rakefile +32 -0
  8. data/SPEC.md +920 -565
  9. data/ably.gemspec +16 -11
  10. data/lib/ably/auth.rb +28 -2
  11. data/lib/ably/exceptions.rb +10 -4
  12. data/lib/ably/logger.rb +7 -1
  13. data/lib/ably/models/channel_state_change.rb +1 -1
  14. data/lib/ably/models/connection_state_change.rb +1 -1
  15. data/lib/ably/models/device_details.rb +87 -0
  16. data/lib/ably/models/device_push_details.rb +86 -0
  17. data/lib/ably/models/error_info.rb +23 -2
  18. data/lib/ably/models/idiomatic_ruby_wrapper.rb +4 -4
  19. data/lib/ably/models/protocol_message.rb +32 -2
  20. data/lib/ably/models/push_channel_subscription.rb +89 -0
  21. data/lib/ably/modules/conversions.rb +1 -1
  22. data/lib/ably/modules/encodeable.rb +1 -1
  23. data/lib/ably/modules/exception_codes.rb +128 -0
  24. data/lib/ably/modules/model_common.rb +15 -2
  25. data/lib/ably/modules/state_machine.rb +2 -2
  26. data/lib/ably/realtime.rb +1 -0
  27. data/lib/ably/realtime/auth.rb +1 -1
  28. data/lib/ably/realtime/channel.rb +24 -102
  29. data/lib/ably/realtime/channel/channel_manager.rb +2 -6
  30. data/lib/ably/realtime/channel/channel_state_machine.rb +2 -2
  31. data/lib/ably/realtime/channel/publisher.rb +74 -0
  32. data/lib/ably/realtime/channel/push_channel.rb +62 -0
  33. data/lib/ably/realtime/client.rb +91 -3
  34. data/lib/ably/realtime/client/incoming_message_dispatcher.rb +6 -2
  35. data/lib/ably/realtime/client/outgoing_message_dispatcher.rb +1 -1
  36. data/lib/ably/realtime/connection.rb +34 -20
  37. data/lib/ably/realtime/connection/connection_manager.rb +25 -9
  38. data/lib/ably/realtime/connection/websocket_transport.rb +1 -1
  39. data/lib/ably/realtime/presence.rb +4 -4
  40. data/lib/ably/realtime/presence/members_map.rb +3 -3
  41. data/lib/ably/realtime/push.rb +40 -0
  42. data/lib/ably/realtime/push/admin.rb +61 -0
  43. data/lib/ably/realtime/push/channel_subscriptions.rb +108 -0
  44. data/lib/ably/realtime/push/device_registrations.rb +105 -0
  45. data/lib/ably/rest.rb +1 -0
  46. data/lib/ably/rest/channel.rb +53 -17
  47. data/lib/ably/rest/channel/push_channel.rb +62 -0
  48. data/lib/ably/rest/client.rb +161 -35
  49. data/lib/ably/rest/middleware/fail_if_unsupported_mime_type.rb +4 -1
  50. data/lib/ably/rest/middleware/parse_message_pack.rb +17 -1
  51. data/lib/ably/rest/presence.rb +1 -0
  52. data/lib/ably/rest/push.rb +42 -0
  53. data/lib/ably/rest/push/admin.rb +54 -0
  54. data/lib/ably/rest/push/channel_subscriptions.rb +121 -0
  55. data/lib/ably/rest/push/device_registrations.rb +103 -0
  56. data/lib/ably/version.rb +7 -2
  57. data/spec/acceptance/realtime/auth_spec.rb +22 -21
  58. data/spec/acceptance/realtime/channel_history_spec.rb +26 -20
  59. data/spec/acceptance/realtime/channel_spec.rb +177 -59
  60. data/spec/acceptance/realtime/client_spec.rb +153 -0
  61. data/spec/acceptance/realtime/connection_failures_spec.rb +72 -6
  62. data/spec/acceptance/realtime/connection_spec.rb +129 -18
  63. data/spec/acceptance/realtime/message_spec.rb +36 -34
  64. data/spec/acceptance/realtime/presence_spec.rb +201 -167
  65. data/spec/acceptance/realtime/push_admin_spec.rb +736 -0
  66. data/spec/acceptance/realtime/push_spec.rb +27 -0
  67. data/spec/acceptance/rest/auth_spec.rb +4 -3
  68. data/spec/acceptance/rest/base_spec.rb +2 -2
  69. data/spec/acceptance/rest/channel_spec.rb +79 -4
  70. data/spec/acceptance/rest/channels_spec.rb +6 -0
  71. data/spec/acceptance/rest/client_spec.rb +129 -10
  72. data/spec/acceptance/rest/message_spec.rb +158 -6
  73. data/spec/acceptance/rest/push_admin_spec.rb +952 -0
  74. data/spec/acceptance/rest/push_spec.rb +25 -0
  75. data/spec/acceptance/rest/time_spec.rb +1 -1
  76. data/spec/run_parallel_tests +33 -0
  77. data/spec/spec_helper.rb +1 -1
  78. data/spec/support/debug_failure_helper.rb +9 -5
  79. data/spec/support/test_app.rb +2 -2
  80. data/spec/unit/logger_spec.rb +10 -3
  81. data/spec/unit/models/device_details_spec.rb +102 -0
  82. data/spec/unit/models/device_push_details_spec.rb +101 -0
  83. data/spec/unit/models/error_info_spec.rb +51 -3
  84. data/spec/unit/models/message_spec.rb +17 -2
  85. data/spec/unit/models/presence_message_spec.rb +1 -1
  86. data/spec/unit/models/push_channel_subscription_spec.rb +86 -0
  87. data/spec/unit/modules/enum_spec.rb +1 -1
  88. data/spec/unit/realtime/client_spec.rb +13 -1
  89. data/spec/unit/realtime/connection_spec.rb +1 -1
  90. data/spec/unit/realtime/push_channel_spec.rb +36 -0
  91. data/spec/unit/rest/channel_spec.rb +8 -1
  92. data/spec/unit/rest/client_spec.rb +30 -0
  93. data/spec/unit/rest/push_channel_spec.rb +36 -0
  94. metadata +94 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 373c9adb90697b65eabdb90c26856ef0c030bd223a7b3b629cb34434f8e39426
4
- data.tar.gz: 0717a1945af00c95590b2ef031a0100a3d34309f9d413da9be031de0c77eafd3
3
+ metadata.gz: f5ca82ab77894c8b5ca135d7ef3c6075b59d485ed288982ef1376cbdc42f54b7
4
+ data.tar.gz: 337b9a88546b8e6024fd448140e94c18f7083298f32e599c810dea8f6c7812b6
5
5
  SHA512:
6
- metadata.gz: '07294fc5b261efa16f5ba461a1e45dc6f50e59581863e04274166e23fd8de7015c6d64df7dbeca0787ff6316155ec26325af7e759591bef8fcae416a52cb478d'
7
- data.tar.gz: f44a7b62a10753b8fcb415539b0bb9a79fa5951b11380a9ee99a04a98ca59d67ba5969f0f2a3420cc5b02e021135f2dce59793f71cf013e6df6701a074df9b04
6
+ metadata.gz: d3b86a46b8a3f45e68d9e83bb8162cd3c095cb66f5476cc3e1e9eaac36f19f35578f37ab96fb639d2fa9813bd2d266363e3bed550ac39b1c0e30606e4523c6ce
7
+ data.tar.gz: 163ad114df99b986581f3bf22b6b4a1672b1611fe9cbafec3766fa38122f2607ae9041d5f748d6836279b59a7076366bb8fccb3ec30aa5f239236e1a8795eb9a
@@ -0,0 +1,14 @@
1
+ # http://EditorConfig.org
2
+ root = true
3
+
4
+ # Unix-style newlines with a newline ending every file
5
+ [*]
6
+ end_of_line = lf
7
+ insert_final_newline = true
8
+ trim_trailing_whitespace = true
9
+ indent_style = space
10
+ indent-size = 2
11
+ charset = utf-8
12
+
13
+ [*.md]
14
+ trim_trailing_whitespace = false
@@ -1,16 +1,18 @@
1
- sudo: false
2
1
  env:
3
- - RSPEC_RETRY=true PROTOCOL=json
4
- - RSPEC_RETRY=true PROTOCOL=msgpack
2
+ - RSPEC_RETRY=true PARALLEL_TEST_PROCESSORS=2 PROTOCOL=json
3
+ - RSPEC_RETRY=true PARALLEL_TEST_PROCESSORS=2 PROTOCOL=msgpack
5
4
  language: ruby
6
5
  rvm:
7
6
  - 1.9.3
8
- - 2.0.0
9
7
  - 2.1.10
10
- - 2.2.0
11
- - 2.3.6
12
- - 2.4.1
13
- script: bundle exec rspec
8
+ - 2.2.10
9
+ - 2.3.8
10
+ - 2.5.5
11
+ - 2.6.0
12
+ - 2.6.1
13
+ - 2.6.2
14
+ - 2.6.3
15
+ script: spec/run_parallel_tests
14
16
  notifications:
15
17
  slack:
16
18
  secure: Xe8MwDcV2C8XLGk6O6Co31LpQiRSxsmS7Toy5vM7rHds5fnVRBNn5iX6Q5mXMdLOlnsMhjKLt7zl4fsBOZv+siQ+Us0omZSIYpXCYSCIj8nofReF0Lj8M4oa6lFSL5OuygO7PH+wLKTRxQURGZ6Pi1nHU+RE5izRmsewQHkhtY0=
@@ -1,8 +1,61 @@
1
1
  # Change Log
2
2
 
3
- ## [v1.0.7](https://github.com/ably/ably-ruby/tree/1.0.7)
3
+ ## [v1.1.3](https://github.com/ably/ably-ruby/tree/v1.1.3)
4
4
 
5
- [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.0.6...1.0.7)
5
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.2...v1.1.3)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - RestChannel#publish: implement params (RSL1l) [\#210](https://github.com/ably/ably-ruby/pull/210) ([simonwoolf](https://github.com/simonwoolf))
10
+
11
+ ## [v1.1.2](https://github.com/ably/ably-ruby/tree/v1.1.2)
12
+
13
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.1...v1.1.2)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Remove legacy skipped tests and upgrade MsgPack [\#184](https://github.com/ably/ably-ruby/pull/184) ([mattheworiordan](https://github.com/mattheworiordan))
18
+
19
+ ## [v1.1.1](https://github.com/ably/ably-ruby/tree/v1.1.1) (2019-05-06)
20
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.0...v1.1.1)
21
+
22
+ **Implemented enhancements:**
23
+
24
+ - Support transient publishes as part of 1.1 spec [\#164](https://github.com/ably/ably-ruby/issues/164)
25
+
26
+ **Fixed bugs:**
27
+
28
+ - RTN16b recovery not fully implemented [\#180](https://github.com/ably/ably-ruby/issues/180)
29
+ - Publishing a high number of messages before connected results in lost messages [\#179](https://github.com/ably/ably-ruby/issues/179)
30
+
31
+ **Merged pull requests:**
32
+
33
+ - msgSerial fixes including connection recovery fix [\#181](https://github.com/ably/ably-ruby/pull/181) ([mattheworiordan](https://github.com/mattheworiordan))
34
+ - Known limitations section in README [\#177](https://github.com/ably/ably-ruby/pull/177) ([Srushtika](https://github.com/Srushtika))
35
+
36
+ ## [v1.1.0](https://github.com/ably/ably-ruby/tree/v1.1.0) (2019-02-06)
37
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.0.7...v1.1.0)
38
+
39
+ **Fixed bugs:**
40
+
41
+ - MessagePack::UnknownExtTypeError: unexpected extension type [\#167](https://github.com/ably/ably-ruby/issues/167)
42
+ - Ably::Modules::StateMachine produces confusing error code [\#158](https://github.com/ably/ably-ruby/issues/158)
43
+ - Transition state failure [\#125](https://github.com/ably/ably-ruby/issues/125)
44
+
45
+ **Merged pull requests:**
46
+
47
+ - V1.1 release [\#173](https://github.com/ably/ably-ruby/pull/173) ([mattheworiordan](https://github.com/mattheworiordan))
48
+ - Rsc15f remember fallback [\#172](https://github.com/ably/ably-ruby/pull/172) ([mattheworiordan](https://github.com/mattheworiordan))
49
+ - Generate error codes [\#171](https://github.com/ably/ably-ruby/pull/171) ([mattheworiordan](https://github.com/mattheworiordan))
50
+ - Parallel tests [\#169](https://github.com/ably/ably-ruby/pull/169) ([mattheworiordan](https://github.com/mattheworiordan))
51
+ - Transient publishing for \#164 [\#166](https://github.com/ably/ably-ruby/pull/166) ([mattheworiordan](https://github.com/mattheworiordan))
52
+ - Idempotent publishing [\#165](https://github.com/ably/ably-ruby/pull/165) ([mattheworiordan](https://github.com/mattheworiordan))
53
+ - Release 1.0.7 [\#162](https://github.com/ably/ably-ruby/pull/162) ([funkyboy](https://github.com/funkyboy))
54
+ - Minor test fixes [\#123](https://github.com/ably/ably-ruby/pull/123) ([SimonWoolf](https://github.com/SimonWoolf))
55
+ - Push notifications [\#115](https://github.com/ably/ably-ruby/pull/115) ([mattheworiordan](https://github.com/mattheworiordan))
56
+
57
+ ## [v1.0.7](https://github.com/ably/ably-ruby/tree/v1.0.7) (2018-06-18)
58
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.0.6...v1.0.7)
6
59
 
7
60
  **Implemented enhancements:**
8
61
 
@@ -10,6 +63,7 @@
10
63
 
11
64
  **Fixed bugs:**
12
65
 
66
+ - Is this sequence correct? [\#155](https://github.com/ably/ably-ruby/issues/155)
13
67
  - Documentation for add\_request\_ids [\#152](https://github.com/ably/ably-ruby/issues/152)
14
68
 
15
69
  **Merged pull requests:**
@@ -28,13 +82,13 @@
28
82
  **Closed issues:**
29
83
 
30
84
  - Passing a frozen channel name or name gives an error on the REST client \[Reopen\] [\#145](https://github.com/ably/ably-ruby/issues/145)
31
- - Passing a frozen channel name or name gives an error on the REST client [\#132](https://github.com/ably/ably-ruby/issues/132)
32
85
 
33
86
  **Merged pull requests:**
34
87
 
35
88
  - Add request id fix for bulk publishes [\#154](https://github.com/ably/ably-ruby/pull/154) ([mattheworiordan](https://github.com/mattheworiordan))
36
89
  - Fix race condition in EventMachine [\#153](https://github.com/ably/ably-ruby/pull/153) ([mattheworiordan](https://github.com/mattheworiordan))
37
90
  - Add support for WebSocket native heartbeats [\#151](https://github.com/ably/ably-ruby/pull/151) ([mattheworiordan](https://github.com/mattheworiordan))
91
+ - Add .editorconfig for basic IDE configuration settings [\#150](https://github.com/ably/ably-ruby/pull/150) ([mattheworiordan](https://github.com/mattheworiordan))
38
92
  - RSC15d test fixes; add \(failing\) tests for GET as well as POST [\#148](https://github.com/ably/ably-ruby/pull/148) ([SimonWoolf](https://github.com/SimonWoolf))
39
93
  - Do not encode strings in-place [\#147](https://github.com/ably/ably-ruby/pull/147) ([mattheworiordan](https://github.com/mattheworiordan))
40
94
  - Only resume if connection is fresh \(RTN15g\*\) [\#146](https://github.com/ably/ably-ruby/pull/146) ([mattheworiordan](https://github.com/mattheworiordan))
@@ -83,7 +137,7 @@
83
137
  - Channel name encoding error for REST requests [\#119](https://github.com/ably/ably-ruby/pull/119) ([mattheworiordan](https://github.com/mattheworiordan))
84
138
 
85
139
  ## [v1.0.1](https://github.com/ably/ably-ruby/tree/v1.0.1) (2017-05-11)
86
- [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.0.0...v1.0.1)
140
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.0-beta.push.1...v1.0.1)
87
141
 
88
142
  ## [v1.1.0-beta.push.1](https://github.com/ably/ably-ruby/tree/v1.1.0-beta.push.1) (2017-04-25)
89
143
  [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.0.0...v1.1.0-beta.push.1)
data/LICENSE CHANGED
@@ -1,6 +1,4 @@
1
- Copyright (c) 2015-2017 Ably
2
-
3
- Copyright 2015-2017 Ably Real-time Ltd
1
+ Copyright 2015-2020 Ably Real-time Ltd (ably.com)
4
2
 
5
3
  Licensed under the Apache License, Version 2.0 (the "License");
6
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/ably.svg)](http://badge.fury.io/rb/ably)
4
4
  [![Coverage Status](https://coveralls.io/repos/ably/ably-ruby/badge.svg)](https://coveralls.io/r/ably/ably-ruby)
5
5
 
6
- A Ruby client library for [ably.io](https://www.ably.io), the realtime messaging service.
6
+ A Ruby client library for [ably.io](https://www.ably.io), the realtime messaging service. This library currently targets the [Ably 1.1 client library specification](https://www.ably.io/documentation/client-lib-development-guide/features/). You can jump to the '[Known Limitations](#known-limitations)' section to see the features this client library does not yet support or [view our client library SDKs feature support matrix](https://www.ably.io/download/sdk-feature-support-matrix) to see the list of all the available features.
7
7
 
8
8
  ## Supported platforms
9
9
 
@@ -13,6 +13,14 @@ We regression-test the SDK against a selection of Ruby versions (which we update
13
13
 
14
14
  If you find any compatibility issues, please [do raise an issue](https://github.com/ably/ably-ruby/issues/new) in this repository or [contact Ably customer support](https://support.ably.io/) for advice.
15
15
 
16
+ ## Known Limitations
17
+
18
+ This client library is currently *not compatible* with some of the Ably features:
19
+
20
+ | Feature |
21
+ | :--- |
22
+ | [Custom transportParams](https://www.ably.io/documentation/realtime/connection#client-options) |
23
+
16
24
  ## Documentation
17
25
 
18
26
  Visit https://www.ably.io/documentation for a complete API reference and more examples.
@@ -321,7 +329,3 @@ This library uses [semantic versioning](http://semver.org/). For each release, t
321
329
  * Visit [https://github.com/ably/ably-ruby/tags](https://github.com/ably/ably-ruby/tags) and `Add release notes` for the release including links to the changelog entry.
322
330
  * Run `rake release` to publish the gem to [Rubygems](https://rubygems.org/gems/ably)
323
331
  * Release the [REST-only library `ably-ruby-rest`](https://github.com/ably/ably-ruby-rest#release-process)
324
-
325
- ## License
326
-
327
- Copyright (c) 2017 Ably Real-time Ltd, Licensed under the Apache License, Version 2.0. Refer to [LICENSE](LICENSE) for the license terms.
data/Rakefile CHANGED
@@ -29,6 +29,38 @@ begin
29
29
  Rake::Task[:spec].invoke
30
30
  end
31
31
  end
32
+
33
+ desc 'Generate error code constants from ably-common: https://github.com/ably/ably-common/issues/32'
34
+ task :generate_error_codes do
35
+ errors_json_path = File.join(File.dirname(__FILE__), 'lib/submodules/ably-common/protocol/errors.json')
36
+ module_path = File.join(File.dirname(__FILE__), 'lib/ably/modules/exception_codes.rb')
37
+ max_length = 0
38
+
39
+ errors = JSON.parse(File.read(errors_json_path)).each_with_object({}) do |(key, val), hash|
40
+ hash[key] = val.split(/\s+/).map { |d| d.upcase.gsub(/[^a-zA-Z]+/, '') }.join('_')
41
+ end.each do |code, const_name|
42
+ max_length = [const_name.length, max_length].max
43
+ end.map do |code, const_name|
44
+ " #{const_name.ljust(max_length, ' ')} = #{code}"
45
+ end.join("\n")
46
+ module_content = <<-EOF
47
+ # This file is generated by running `rake :generate_error_codes`
48
+ # Do not manually modify this file
49
+ # Generated at: #{Time.now.utc}
50
+ #
51
+ module Ably
52
+ module Exceptions
53
+ module Codes
54
+ #{errors}
55
+ end
56
+ end
57
+ end
58
+ EOF
59
+ File.open(module_path, 'w') { |file| file.write module_content }
60
+
61
+ puts "Error code constants have been generated into #{module_path}"
62
+ puts "Warning: Search for any constants referenced in this library if their name has changed as a result of this constant generation!"
63
+ end
32
64
  rescue LoadError
33
65
  # RSpec not available
34
66
  end
data/SPEC.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ably Realtime & REST Client Library 1.0.7 Specification
1
+ # Ably Realtime & REST Client Library 1.1.0 Specification
2
2
 
3
3
  ### Ably::Realtime::Auth
4
4
  _(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_spec.rb))_
@@ -55,7 +55,7 @@ _(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_sp
55
55
  * and an incompatible client_id in a TokenDetails object passed to the auth callback
56
56
  * [rejects a TokenDetails object with an incompatible client_id and fails with an exception](./spec/acceptance/realtime/auth_spec.rb#L287)
57
57
  * when already authenticated with a valid token
58
- * [ensures message delivery continuity whilst upgrading (#RTC8a1)](./spec/acceptance/realtime/auth_spec.rb#L700)
58
+ * [ensures message delivery continuity whilst upgrading (#RTC8a1)](./spec/acceptance/realtime/auth_spec.rb#L701)
59
59
  * when INITIALIZED
60
60
  * [obtains a token and connects to Ably (#RTC8c, #RTC8b1)](./spec/acceptance/realtime/auth_spec.rb#L328)
61
61
  * when CONNECTING
@@ -76,99 +76,99 @@ _(see [spec/acceptance/realtime/auth_spec.rb](./spec/acceptance/realtime/auth_sp
76
76
  * when client is identified
77
77
  * [transitions the connection state to FAILED if the client_id changes (#RSA15c, #RTC8a2)](./spec/acceptance/realtime/auth_spec.rb#L596)
78
78
  * when auth fails
79
- * [transitions the connection state to the FAILED state (#RSA15c, #RTC8a2, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L611)
79
+ * [transitions the connection state to the FAILED state (#RSA15c, #RTC8a2, #RTC8a3)](./spec/acceptance/realtime/auth_spec.rb#L612)
80
80
  * when the authCallback fails
81
- * [calls the error callback of authorize and leaves the connection intact (#RSA4c3)](./spec/acceptance/realtime/auth_spec.rb#L639)
81
+ * [calls the error callback of authorize and leaves the connection intact (#RSA4c3)](./spec/acceptance/realtime/auth_spec.rb#L640)
82
82
  * when upgrading capabilities
83
- * [is allowed (#RTC8a1)](./spec/acceptance/realtime/auth_spec.rb#L658)
83
+ * [is allowed (#RTC8a1)](./spec/acceptance/realtime/auth_spec.rb#L659)
84
84
  * when downgrading capabilities (#RTC8a1)
85
- * [is allowed and channels are detached](./spec/acceptance/realtime/auth_spec.rb#L683)
85
+ * [is allowed and channels are detached](./spec/acceptance/realtime/auth_spec.rb#L684)
86
86
  * #authorize_async
87
- * [returns a token synchronously](./spec/acceptance/realtime/auth_spec.rb#L734)
87
+ * [returns a token synchronously](./spec/acceptance/realtime/auth_spec.rb#L735)
88
88
  * server initiated AUTH ProtocolMessage
89
89
  * when received
90
- * [should immediately start a new authentication process (#RTN22)](./spec/acceptance/realtime/auth_spec.rb#L758)
90
+ * [should immediately start a new authentication process (#RTN22)](./spec/acceptance/realtime/auth_spec.rb#L756)
91
91
  * when not received
92
- * [should expect the connection to be disconnected by the server but should resume automatically (#RTN22a)](./spec/acceptance/realtime/auth_spec.rb#L781)
92
+ * [should expect the connection to be disconnected by the server but should resume automatically (#RTN22a)](./spec/acceptance/realtime/auth_spec.rb#L779)
93
93
  * #auth_params
94
- * [returns the auth params asynchronously](./spec/acceptance/realtime/auth_spec.rb#L807)
94
+ * [returns the auth params asynchronously](./spec/acceptance/realtime/auth_spec.rb#L805)
95
95
  * #auth_params_sync
96
- * [returns the auth params synchronously](./spec/acceptance/realtime/auth_spec.rb#L816)
96
+ * [returns the auth params synchronously](./spec/acceptance/realtime/auth_spec.rb#L814)
97
97
  * #auth_header
98
- * [returns an auth header asynchronously](./spec/acceptance/realtime/auth_spec.rb#L823)
98
+ * [returns an auth header asynchronously](./spec/acceptance/realtime/auth_spec.rb#L821)
99
99
  * #auth_header_sync
100
- * [returns an auth header synchronously](./spec/acceptance/realtime/auth_spec.rb#L832)
100
+ * [returns an auth header synchronously](./spec/acceptance/realtime/auth_spec.rb#L830)
101
101
  * #client_id_validated?
102
102
  * when using basic auth
103
103
  * before connected
104
- * [is false as basic auth users do not have an identity](./spec/acceptance/realtime/auth_spec.rb#L845)
104
+ * [is false as basic auth users do not have an identity](./spec/acceptance/realtime/auth_spec.rb#L843)
105
105
  * once connected
106
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L852)
107
- * [contains a validated wildcard client_id](./spec/acceptance/realtime/auth_spec.rb#L859)
106
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L850)
107
+ * [contains a validated wildcard client_id](./spec/acceptance/realtime/auth_spec.rb#L857)
108
108
  * when using a token string
109
109
  * with a valid client_id
110
110
  * before connected
111
- * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L873)
112
- * [#client_id is nil](./spec/acceptance/realtime/auth_spec.rb#L878)
111
+ * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L871)
112
+ * [#client_id is nil](./spec/acceptance/realtime/auth_spec.rb#L876)
113
113
  * once connected
114
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L885)
115
- * [#client_id is populated](./spec/acceptance/realtime/auth_spec.rb#L892)
114
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L883)
115
+ * [#client_id is populated](./spec/acceptance/realtime/auth_spec.rb#L890)
116
116
  * with no client_id (anonymous)
117
117
  * before connected
118
- * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L905)
118
+ * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L903)
119
119
  * once connected
120
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L912)
120
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L910)
121
121
  * with a wildcard client_id (anonymous)
122
122
  * before connected
123
- * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L925)
123
+ * [is false as identification is not possible from an opaque token string](./spec/acceptance/realtime/auth_spec.rb#L923)
124
124
  * once connected
125
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L932)
125
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L930)
126
126
  * when using a token
127
127
  * with a client_id
128
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L946)
128
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L944)
129
129
  * once connected
130
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L952)
130
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L950)
131
131
  * with no client_id (anonymous)
132
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L964)
132
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L962)
133
133
  * once connected
134
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L970)
134
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L968)
135
135
  * with a wildcard client_id (anonymous)
136
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L982)
136
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L980)
137
137
  * once connected
138
- * [is true](./spec/acceptance/realtime/auth_spec.rb#L988)
138
+ * [is true](./spec/acceptance/realtime/auth_spec.rb#L986)
139
139
  * when using a token request with a client_id
140
- * [is not true as identification is not confirmed until authenticated](./spec/acceptance/realtime/auth_spec.rb#L1001)
140
+ * [is not true as identification is not confirmed until authenticated](./spec/acceptance/realtime/auth_spec.rb#L999)
141
141
  * once connected
142
- * [is true as identification is completed following CONNECTED ProtocolMessage](./spec/acceptance/realtime/auth_spec.rb#L1007)
142
+ * [is true as identification is completed following CONNECTED ProtocolMessage](./spec/acceptance/realtime/auth_spec.rb#L1005)
143
143
  * deprecated #authorise
144
- * [logs a deprecation warning (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1021)
145
- * [returns a valid token (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1027)
144
+ * [logs a deprecation warning (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1019)
145
+ * [returns a valid token (#RSA10l)](./spec/acceptance/realtime/auth_spec.rb#L1025)
146
146
  * when using JWT
147
147
  * when using auth_url
148
148
  * when credentials are valid
149
- * [client successfully fetches a channel and publishes a message](./spec/acceptance/realtime/auth_spec.rb#L1046)
149
+ * [client successfully fetches a channel and publishes a message](./spec/acceptance/realtime/auth_spec.rb#L1044)
150
150
  * when credentials are wrong
151
- * [disconnected includes and invalid signature message](./spec/acceptance/realtime/auth_spec.rb#L1059)
151
+ * [disconnected includes and invalid signature message](./spec/acceptance/realtime/auth_spec.rb#L1057)
152
152
  * when token is expired
153
- * [receives a 40142 error from the server](./spec/acceptance/realtime/auth_spec.rb#L1072)
153
+ * [receives a 40142 error from the server](./spec/acceptance/realtime/auth_spec.rb#L1070)
154
154
  * when using auth_callback
155
155
  * when credentials are valid
156
- * [authentication succeeds and client can post a message](./spec/acceptance/realtime/auth_spec.rb#L1097)
156
+ * [authentication succeeds and client can post a message](./spec/acceptance/realtime/auth_spec.rb#L1095)
157
157
  * when credentials are invalid
158
- * [authentication fails and reason for disconnection is invalid signature](./spec/acceptance/realtime/auth_spec.rb#L1112)
158
+ * [authentication fails and reason for disconnection is invalid signature](./spec/acceptance/realtime/auth_spec.rb#L1110)
159
159
  * when the client is initialized with ClientOptions and the token is a JWT token
160
160
  * when credentials are valid
161
- * [posts successfully to a channel](./spec/acceptance/realtime/auth_spec.rb#L1129)
161
+ * [posts successfully to a channel](./spec/acceptance/realtime/auth_spec.rb#L1127)
162
162
  * when credentials are invalid
163
- * [fails with an invalid signature error](./spec/acceptance/realtime/auth_spec.rb#L1143)
163
+ * [fails with an invalid signature error](./spec/acceptance/realtime/auth_spec.rb#L1141)
164
164
  * when JWT token expires
165
- * [client disconnects, a new token is requested via auth_callback and the client gets reconnected](./spec/acceptance/realtime/auth_spec.rb#L1170)
165
+ * [client disconnects, a new token is requested via auth_callback and the client gets reconnected](./spec/acceptance/realtime/auth_spec.rb#L1168)
166
166
  * and an AUTH procol message is received
167
- * [client reauths correctly without going through a disconnection](./spec/acceptance/realtime/auth_spec.rb#L1198)
167
+ * [client reauths correctly without going through a disconnection](./spec/acceptance/realtime/auth_spec.rb#L1196)
168
168
  * when the JWT token request includes a client_id
169
- * [the client_id is the same that was specified in the auth_callback that generated the JWT token](./spec/acceptance/realtime/auth_spec.rb#L1226)
169
+ * [the client_id is the same that was specified in the auth_callback that generated the JWT token](./spec/acceptance/realtime/auth_spec.rb#L1224)
170
170
  * when the JWT token request includes a subscribe-only capability
171
- * [client fails to publish to a channel with subscribe-only capability and publishes successfully on a channel with permissions](./spec/acceptance/realtime/auth_spec.rb#L1244)
171
+ * [client fails to publish to a channel with subscribe-only capability and publishes successfully on a channel with permissions](./spec/acceptance/realtime/auth_spec.rb#L1242)
172
172
 
173
173
  ### Ably::Realtime::Channel#history
174
174
  _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realtime/channel_history_spec.rb))_
@@ -183,8 +183,8 @@ _(see [spec/acceptance/realtime/channel_history_spec.rb](./spec/acceptance/realt
183
183
  * [retrieves history forwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L94)
184
184
  * [retrieves history backwards with pagination through :limit option](./spec/acceptance/realtime/channel_history_spec.rb#L103)
185
185
  * in multiple ProtocolMessages
186
- * [retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L114)
187
- * [retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L125)
186
+ * FAILED: ~~[retrieves limited history forwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L114)~~
187
+ * FAILED: ~~[retrieves limited history backwards with pagination](./spec/acceptance/realtime/channel_history_spec.rb#L125)~~
188
188
  * and REST history
189
189
  * [return the same results with unique matching message IDs](./spec/acceptance/realtime/channel_history_spec.rb#L141)
190
190
  * with option until_attach: true
@@ -198,277 +198,289 @@ _(see [spec/acceptance/realtime/channel_spec.rb](./spec/acceptance/realtime/chan
198
198
  * using JSON protocol
199
199
  * initialization
200
200
  * with :auto_connect option set to false on connection
201
- * [remains initialized when accessing a channel](./spec/acceptance/realtime/channel_spec.rb#L26)
202
- * [opens a connection implicitly on #attach](./spec/acceptance/realtime/channel_spec.rb#L34)
201
+ * [remains initialized when accessing a channel](./spec/acceptance/realtime/channel_spec.rb#L29)
202
+ * [opens a connection implicitly on #attach](./spec/acceptance/realtime/channel_spec.rb#L37)
203
203
  * #attach
204
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L139)
205
- * [calls the SafeDeferrable callback on success (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L144)
204
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L142)
205
+ * [calls the SafeDeferrable callback on success (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L147)
206
206
  * when initialized
207
- * [emits attaching then attached events](./spec/acceptance/realtime/channel_spec.rb#L45)
208
- * [ignores subsequent #attach calls but calls the success callback if provided](./spec/acceptance/realtime/channel_spec.rb#L55)
209
- * [attaches to a channel](./spec/acceptance/realtime/channel_spec.rb#L68)
210
- * [attaches to a channel and calls the provided block (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L76)
211
- * [sends an ATTACH and waits for an ATTACHED (#RTL4c)](./spec/acceptance/realtime/channel_spec.rb#L83)
212
- * [implicitly attaches the channel (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L107)
207
+ * [emits attaching then attached events](./spec/acceptance/realtime/channel_spec.rb#L48)
208
+ * [ignores subsequent #attach calls but calls the success callback if provided](./spec/acceptance/realtime/channel_spec.rb#L58)
209
+ * [attaches to a channel](./spec/acceptance/realtime/channel_spec.rb#L71)
210
+ * [attaches to a channel and calls the provided block (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L79)
211
+ * [sends an ATTACH and waits for an ATTACHED (#RTL4c)](./spec/acceptance/realtime/channel_spec.rb#L86)
212
+ * [implicitly attaches the channel (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L110)
213
213
  * when the implicit channel attach fails
214
- * [registers the listener anyway (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L124)
214
+ * [registers the listener anyway (#RTL7c)](./spec/acceptance/realtime/channel_spec.rb#L127)
215
215
  * when an ATTACHED acknowledge is not received on the current connection
216
- * [sends another ATTACH each time the connection becomes connected](./spec/acceptance/realtime/channel_spec.rb#L155)
216
+ * [sends another ATTACH each time the connection becomes connected](./spec/acceptance/realtime/channel_spec.rb#L158)
217
217
  * when state is :attached
218
- * [does nothing (#RTL4a)](./spec/acceptance/realtime/channel_spec.rb#L193)
218
+ * [does nothing (#RTL4a)](./spec/acceptance/realtime/channel_spec.rb#L196)
219
219
  * when state is :failed
220
- * [reattaches and sets the errorReason to nil (#RTL4g)](./spec/acceptance/realtime/channel_spec.rb#L213)
220
+ * [reattaches and sets the errorReason to nil (#RTL4g)](./spec/acceptance/realtime/channel_spec.rb#L216)
221
221
  * when state is :detaching
222
- * [does the attach operation after the completion of the pending request (#RTL4h)](./spec/acceptance/realtime/channel_spec.rb#L228)
222
+ * [does the attach operation after the completion of the pending request (#RTL4h)](./spec/acceptance/realtime/channel_spec.rb#L231)
223
223
  * with many connections and many channels on each simultaneously
224
- * [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L256)
224
+ * [attaches all channels](./spec/acceptance/realtime/channel_spec.rb#L259)
225
225
  * failure as a result of insufficient key permissions
226
- * [emits failed event (#RTL4e)](./spec/acceptance/realtime/channel_spec.rb#L288)
227
- * [calls the errback of the returned Deferrable (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L297)
228
- * [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L305)
226
+ * [emits failed event (#RTL4e)](./spec/acceptance/realtime/channel_spec.rb#L291)
227
+ * [calls the errback of the returned Deferrable (#RTL4d)](./spec/acceptance/realtime/channel_spec.rb#L300)
228
+ * [updates the error_reason](./spec/acceptance/realtime/channel_spec.rb#L308)
229
229
  * and subsequent authorisation with suitable permissions
230
- * [attaches to the channel successfully and resets the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L314)
230
+ * [attaches to the channel successfully and resets the channel error_reason](./spec/acceptance/realtime/channel_spec.rb#L317)
231
231
  * with connection state
232
- * [is initialized (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L333)
233
- * [is connecting (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L340)
234
- * [is disconnected (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L348)
232
+ * [is initialized (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L336)
233
+ * [is connecting (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L343)
234
+ * [is disconnected (#RTL4i)](./spec/acceptance/realtime/channel_spec.rb#L351)
235
235
  * #detach
236
236
  * when state is :attached
237
- * [it detaches from a channel (#RTL5d)](./spec/acceptance/realtime/channel_spec.rb#L363)
238
- * [detaches from a channel and calls the provided block (#RTL5d, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L373)
239
- * [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L383)
240
- * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L395)
241
- * [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L402)
237
+ * [it detaches from a channel (#RTL5d)](./spec/acceptance/realtime/channel_spec.rb#L366)
238
+ * [detaches from a channel and calls the provided block (#RTL5d, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L376)
239
+ * [emits :detaching then :detached events](./spec/acceptance/realtime/channel_spec.rb#L386)
240
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/channel_spec.rb#L398)
241
+ * [calls the Deferrable callback on success](./spec/acceptance/realtime/channel_spec.rb#L405)
242
242
  * and DETACHED message is not received within realtime request timeout
243
- * [fails the deferrable and returns to the previous state (#RTL5f, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L416)
243
+ * [fails the deferrable and returns to the previous state (#RTL5f, #RTL5e)](./spec/acceptance/realtime/channel_spec.rb#L419)
244
244
  * when state is :failed
245
- * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L436)
245
+ * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L439)
246
246
  * when state is :attaching
247
- * [waits for the attach to complete and then moves to detached](./spec/acceptance/realtime/channel_spec.rb#L449)
247
+ * [waits for the attach to complete and then moves to detached](./spec/acceptance/realtime/channel_spec.rb#L452)
248
248
  * when state is :detaching
249
- * [ignores subsequent #detach calls but calls the callback if provided (#RTL5i)](./spec/acceptance/realtime/channel_spec.rb#L466)
249
+ * [ignores subsequent #detach calls but calls the callback if provided (#RTL5i)](./spec/acceptance/realtime/channel_spec.rb#L469)
250
250
  * when state is :suspended
251
- * [moves the channel state immediately to DETACHED state (#RTL5j)](./spec/acceptance/realtime/channel_spec.rb#L483)
251
+ * [moves the channel state immediately to DETACHED state (#RTL5j)](./spec/acceptance/realtime/channel_spec.rb#L486)
252
252
  * when state is :initialized
253
- * [does nothing as there is no channel to detach (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L503)
254
- * [returns a valid deferrable](./spec/acceptance/realtime/channel_spec.rb#L511)
253
+ * [does nothing as there is no channel to detach (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L506)
254
+ * [returns a valid deferrable](./spec/acceptance/realtime/channel_spec.rb#L514)
255
255
  * when state is :detached
256
- * [does nothing as the channel is detached (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L521)
256
+ * [does nothing as the channel is detached (#RTL5a)](./spec/acceptance/realtime/channel_spec.rb#L524)
257
257
  * when connection state is
258
258
  * closing
259
- * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L538)
259
+ * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L541)
260
260
  * failed and channel is failed
261
- * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L558)
261
+ * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L561)
262
262
  * failed and channel is detached
263
- * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L580)
263
+ * [fails the deferrable (#RTL5b)](./spec/acceptance/realtime/channel_spec.rb#L583)
264
264
  * initialized
265
- * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L600)
265
+ * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L603)
266
266
  * connecting
267
- * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L615)
267
+ * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L618)
268
268
  * disconnected
269
- * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L634)
269
+ * [does the detach operation once the connection state is connected (#RTL5h)](./spec/acceptance/realtime/channel_spec.rb#L637)
270
270
  * automatic channel recovery
271
271
  * when an ATTACH request times out
272
- * [moves to the SUSPENDED state (#RTL4f)](./spec/acceptance/realtime/channel_spec.rb#L661)
272
+ * [moves to the SUSPENDED state (#RTL4f)](./spec/acceptance/realtime/channel_spec.rb#L664)
273
273
  * if a subsequent ATTACHED is received on an ATTACHED channel
274
- * [ignores the additional ATTACHED if resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L675)
275
- * [emits an UPDATE only when resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L689)
276
- * [emits an UPDATE when resumed is true and includes the reason error from the ProtocolMessage (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L705)
274
+ * [ignores the additional ATTACHED if resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L678)
275
+ * [emits an UPDATE only when resumed is true (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L692)
276
+ * [emits an UPDATE when resumed is true and includes the reason error from the ProtocolMessage (#RTL12)](./spec/acceptance/realtime/channel_spec.rb#L708)
277
277
  * #publish
278
- * when attached
279
- * [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L730)
280
- * when not yet attached
281
- * [publishes queued messages once attached](./spec/acceptance/realtime/channel_spec.rb#L742)
282
- * [publishes queued messages within a single protocol message](./spec/acceptance/realtime/channel_spec.rb#L750)
283
- * with :queue_messages client option set to false
284
- * and connection state initialized
285
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L773)
286
- * and connection state connecting
287
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L783)
288
- * and connection state disconnected
289
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L797)
290
- * and connection state connected
291
- * [publishes the message](./spec/acceptance/realtime/channel_spec.rb#L812)
278
+ * when channel is attached (#RTL6c1)
279
+ * [publishes messages](./spec/acceptance/realtime/channel_spec.rb#L733)
280
+ * when channel is not attached in state Initializing (#RTL6c1)
281
+ * [publishes messages immediately and does not implicitly attach (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L745)
282
+ * when channel is Attaching (#RTL6c1)
283
+ * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L762)
284
+ * when channel is Detaching (#RTL6c1)
285
+ * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L787)
286
+ * when channel is Detached (#RTL6c1)
287
+ * [publishes messages immediately (#RTL6c1)](./spec/acceptance/realtime/channel_spec.rb#L814)
288
+ * with :queue_messages client option set to false (#RTL6c4)
289
+ * and connection state connected (#RTL6c4)
290
+ * [publishes the message](./spec/acceptance/realtime/channel_spec.rb#L845)
291
+ * and connection state initialized (#RTL6c4)
292
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L854)
293
+ * and connection state connecting (#RTL6c4)
294
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L864)
295
+ * and connection state disconnected (#RTL6c4)
296
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L879)
297
+ * and connection state suspended (#RTL6c4)
298
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L879)
299
+ * and connection state closing (#RTL6c4)
300
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L879)
301
+ * and connection state closed (#RTL6c4)
302
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L879)
303
+ * and the channel state is failed (#RTL6c4)
304
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L900)
292
305
  * with name and data arguments
293
- * [publishes the message and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L823)
306
+ * [publishes the message and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L918)
294
307
  * and additional attributes
295
- * [publishes the message with the attributes and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L836)
308
+ * [publishes the message with the attributes and return true indicating success](./spec/acceptance/realtime/channel_spec.rb#L931)
296
309
  * and additional invalid attributes
297
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L849)
310
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L944)
298
311
  * with an array of Hash objects with :name and :data attributes
299
- * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L863)
312
+ * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L958)
300
313
  * with an array of Message objects
301
- * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L891)
314
+ * [publishes an array of messages in one ProtocolMessage](./spec/acceptance/realtime/channel_spec.rb#L986)
302
315
  * nil attributes
303
316
  * when name is nil
304
- * [publishes the message without a name attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L915)
317
+ * [publishes the message without a name attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1010)
305
318
  * when data is nil
306
- * [publishes the message without a data attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L938)
319
+ * [publishes the message without a data attribute in the payload](./spec/acceptance/realtime/channel_spec.rb#L1033)
307
320
  * with neither name or data attributes
308
- * [publishes the message without any attributes in the payload](./spec/acceptance/realtime/channel_spec.rb#L961)
321
+ * [publishes the message without any attributes in the payload](./spec/acceptance/realtime/channel_spec.rb#L1056)
309
322
  * with two invalid message out of 12
310
323
  * before client_id is known (validated)
311
- * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L985)
324
+ * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1080)
312
325
  * when client_id is known (validated)
313
- * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1005)
326
+ * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1100)
314
327
  * only invalid messages
315
328
  * before client_id is known (validated)
316
- * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1024)
329
+ * [calls the errback once](./spec/acceptance/realtime/channel_spec.rb#L1119)
317
330
  * when client_id is known (validated)
318
- * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1043)
331
+ * [raises an exception](./spec/acceptance/realtime/channel_spec.rb#L1138)
319
332
  * with many many messages and many connections simultaneously
320
- * [publishes all messages, all success callbacks are called, and a history request confirms all messages were published](./spec/acceptance/realtime/channel_spec.rb#L1057)
333
+ * [publishes all messages, all success callbacks are called, and a history request confirms all messages were published](./spec/acceptance/realtime/channel_spec.rb#L1152)
334
+ * with more than allowed messages in a single publish
335
+ * [rejects the publish](./spec/acceptance/realtime/channel_spec.rb#L1175)
321
336
  * identified clients
322
337
  * when authenticated with a wildcard client_id
323
338
  * with a valid client_id in the message
324
- * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1085)
339
+ * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1195)
325
340
  * with a wildcard client_id in the message
326
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1097)
341
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1207)
327
342
  * with a non-String client_id in the message
328
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1104)
343
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1214)
329
344
  * with an empty client_id in the message
330
- * [succeeds and publishes without a client_id](./spec/acceptance/realtime/channel_spec.rb#L1111)
345
+ * [succeeds and publishes without a client_id](./spec/acceptance/realtime/channel_spec.rb#L1221)
331
346
  * when authenticated with a Token string with an implicit client_id
332
347
  * before the client is CONNECTED and the client's identity has been obtained
333
348
  * with a valid client_id in the message
334
- * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1131)
349
+ * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1241)
335
350
  * with an invalid client_id in the message
336
- * [succeeds in the client library but then fails when delivered to Ably](./spec/acceptance/realtime/channel_spec.rb#L1144)
351
+ * [succeeds in the client library but then fails when delivered to Ably](./spec/acceptance/realtime/channel_spec.rb#L1254)
337
352
  * with an empty client_id in the message
338
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1155)
353
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1265)
339
354
  * after the client is CONNECTED and the client's identity is known
340
355
  * with a valid client_id in the message
341
- * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1169)
356
+ * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1279)
342
357
  * with an invalid client_id in the message
343
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1183)
358
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1293)
344
359
  * with an empty client_id in the message
345
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1192)
360
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1302)
346
361
  * when authenticated with a valid client_id
347
362
  * with a valid client_id
348
- * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1214)
363
+ * [succeeds](./spec/acceptance/realtime/channel_spec.rb#L1324)
349
364
  * with a wildcard client_id in the message
350
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1226)
365
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1336)
351
366
  * with an invalid client_id in the message
352
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1233)
367
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1343)
353
368
  * with an empty client_id in the message
354
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1240)
369
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1350)
355
370
  * when anonymous and no client_id
356
371
  * with a client_id in the message
357
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1259)
372
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1369)
358
373
  * with a wildcard client_id in the message
359
- * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1266)
374
+ * [throws an exception](./spec/acceptance/realtime/channel_spec.rb#L1376)
360
375
  * with an empty client_id in the message
361
- * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1273)
376
+ * [succeeds and publishes with an implicit client_id](./spec/acceptance/realtime/channel_spec.rb#L1383)
362
377
  * #subscribe
363
378
  * with an event argument
364
- * [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1289)
379
+ * [subscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1399)
365
380
  * before attach
366
- * [receives messages as soon as attached](./spec/acceptance/realtime/channel_spec.rb#L1299)
381
+ * [receives messages as soon as attached](./spec/acceptance/realtime/channel_spec.rb#L1409)
367
382
  * with no event argument
368
- * [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L1313)
383
+ * [subscribes for all events](./spec/acceptance/realtime/channel_spec.rb#L1423)
369
384
  * with a callback that raises an exception
370
- * [logs the error and continues](./spec/acceptance/realtime/channel_spec.rb#L1325)
385
+ * [logs the error and continues](./spec/acceptance/realtime/channel_spec.rb#L1435)
371
386
  * many times with different event names
372
- * [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L1344)
387
+ * [filters events accordingly to each callback](./spec/acceptance/realtime/channel_spec.rb#L1454)
373
388
  * #unsubscribe
374
389
  * with an event argument
375
- * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1367)
390
+ * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1477)
376
391
  * with no event argument
377
- * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1380)
392
+ * [unsubscribes for a single event](./spec/acceptance/realtime/channel_spec.rb#L1490)
378
393
  * when connection state changes to
379
394
  * :failed
380
395
  * an :attaching channel
381
- * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1403)
396
+ * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1513)
382
397
  * an :attached channel
383
- * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1420)
384
- * [updates the channel error_reason (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1432)
398
+ * [transitions state to :failed (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1530)
399
+ * [updates the channel error_reason (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1542)
385
400
  * a :detached channel
386
- * [remains in the :detached state (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1446)
401
+ * [remains in the :detached state (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1556)
387
402
  * a :failed channel
388
- * [remains in the :failed state and ignores the failure error (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1465)
403
+ * [remains in the :failed state and ignores the failure error (#RTL3a)](./spec/acceptance/realtime/channel_spec.rb#L1575)
389
404
  * a channel ATTACH request
390
- * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1485)
405
+ * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1595)
391
406
  * :closed
392
407
  * an :attached channel
393
- * [transitions state to :detached (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1501)
408
+ * [transitions state to :detached (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1611)
394
409
  * an :attaching channel (#RTL3b)
395
- * [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L1512)
410
+ * [transitions state to :detached](./spec/acceptance/realtime/channel_spec.rb#L1622)
396
411
  * a :detached channel
397
- * [remains in the :detached state (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1527)
412
+ * [remains in the :detached state (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1637)
398
413
  * a :failed channel
399
- * [remains in the :failed state and retains the error_reason (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1547)
414
+ * [remains in the :failed state and retains the error_reason (#RTL3b)](./spec/acceptance/realtime/channel_spec.rb#L1657)
400
415
  * a channel ATTACH request when connection CLOSED
401
- * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1567)
416
+ * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1677)
402
417
  * a channel ATTACH request when connection CLOSING
403
- * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1581)
418
+ * [fails the deferrable (#RTL4b)](./spec/acceptance/realtime/channel_spec.rb#L1691)
404
419
  * :suspended
405
420
  * an :attaching channel
406
- * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1597)
421
+ * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1707)
407
422
  * an :attached channel
408
- * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1611)
409
- * [transitions state automatically to :attaching once the connection is re-established (#RTN15c3)](./spec/acceptance/realtime/channel_spec.rb#L1620)
423
+ * [transitions state to :suspended (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1721)
424
+ * [transitions state automatically to :attaching once the connection is re-established (#RTN15c3)](./spec/acceptance/realtime/channel_spec.rb#L1730)
410
425
  * a :detached channel
411
- * [remains in the :detached state (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1634)
426
+ * [remains in the :detached state (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1744)
412
427
  * a :failed channel
413
- * [remains in the :failed state and retains the error_reason (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1654)
428
+ * [remains in the :failed state and retains the error_reason (#RTL3c)](./spec/acceptance/realtime/channel_spec.rb#L1764)
414
429
  * a channel ATTACH request when connection SUSPENDED (#RTL4b)
415
- * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1676)
430
+ * [fails the deferrable](./spec/acceptance/realtime/channel_spec.rb#L1786)
416
431
  * :connected
417
432
  * a :suspended channel
418
- * [is automatically reattached (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L1692)
433
+ * [is automatically reattached (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L1802)
419
434
  * when re-attach attempt fails
420
- * [returns to a suspended state (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L1709)
435
+ * [returns to a suspended state (#RTL3d)](./spec/acceptance/realtime/channel_spec.rb#L1819)
421
436
  * :disconnected
422
437
  * with an initialized channel
423
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1735)
438
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1845)
424
439
  * with an attaching channel
425
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1748)
440
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1858)
426
441
  * with an attached channel
427
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1763)
442
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1873)
428
443
  * with a detached channel
429
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1775)
444
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1885)
430
445
  * with a failed channel
431
- * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1797)
446
+ * [has no effect on the channel states (#RTL3e)](./spec/acceptance/realtime/channel_spec.rb#L1907)
432
447
  * #presence
433
- * [returns a Ably::Realtime::Presence object](./spec/acceptance/realtime/channel_spec.rb#L1812)
448
+ * [returns a Ably::Realtime::Presence object](./spec/acceptance/realtime/channel_spec.rb#L1922)
434
449
  * channel state change
435
- * [emits a ChannelStateChange object](./spec/acceptance/realtime/channel_spec.rb#L1819)
450
+ * [emits a ChannelStateChange object](./spec/acceptance/realtime/channel_spec.rb#L1929)
436
451
  * ChannelStateChange object
437
- * [has current state](./spec/acceptance/realtime/channel_spec.rb#L1828)
438
- * [has a previous state](./spec/acceptance/realtime/channel_spec.rb#L1837)
439
- * [has the event that generated the state change (#TA5)](./spec/acceptance/realtime/channel_spec.rb#L1846)
440
- * [has an empty reason when there is no error](./spec/acceptance/realtime/channel_spec.rb#L1864)
452
+ * [has current state](./spec/acceptance/realtime/channel_spec.rb#L1938)
453
+ * [has a previous state](./spec/acceptance/realtime/channel_spec.rb#L1947)
454
+ * [has the event that generated the state change (#TA5)](./spec/acceptance/realtime/channel_spec.rb#L1956)
455
+ * [has an empty reason when there is no error](./spec/acceptance/realtime/channel_spec.rb#L1974)
441
456
  * on failure
442
- * [has a reason Error object when there is an error on the channel](./spec/acceptance/realtime/channel_spec.rb#L1877)
457
+ * [has a reason Error object when there is an error on the channel](./spec/acceptance/realtime/channel_spec.rb#L1987)
443
458
  * #resume (#RTL2f)
444
- * [is false when a channel first attaches](./spec/acceptance/realtime/channel_spec.rb#L1890)
445
- * [is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1898)
446
- * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L1917)
459
+ * [is false when a channel first attaches](./spec/acceptance/realtime/channel_spec.rb#L2000)
460
+ * [is true when a connection is recovered and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2008)
461
+ * [is false when a connection fails to recover and the channel is attached](./spec/acceptance/realtime/channel_spec.rb#L2027)
447
462
  * when a resume fails
448
- * [is false when a resume fails to recover and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L1939)
463
+ * [is false when a resume fails to recover and the channel is automatically re-attached](./spec/acceptance/realtime/channel_spec.rb#L2049)
449
464
  * moves to
450
465
  * suspended
451
- * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958)
452
- * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981)
453
- * detached
454
- * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958)
455
- * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981)
466
+ * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2072)
467
+ * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2095)
456
468
  * failed
457
- * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L1958)
458
- * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L1981)
469
+ * [all queued messages fail with NACK (#RTL11)](./spec/acceptance/realtime/channel_spec.rb#L2072)
470
+ * [all published messages awaiting an ACK do nothing (#RTL11a)](./spec/acceptance/realtime/channel_spec.rb#L2095)
459
471
  * when it receives a server-initiated DETACHED (#RTL13)
460
472
  * and channel is initialized (#RTL13)
461
- * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2015)
473
+ * [does nothing](./spec/acceptance/realtime/channel_spec.rb#L2130)
462
474
  * and channel is failed
463
- * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2036)
475
+ * [does nothing (#RTL13)](./spec/acceptance/realtime/channel_spec.rb#L2151)
464
476
  * and channel is attached
465
- * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2052)
477
+ * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2167)
466
478
  * and channel is suspended
467
- * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2068)
479
+ * [reattaches immediately (#RTL13a)](./spec/acceptance/realtime/channel_spec.rb#L2183)
468
480
  * and channel is attaching
469
- * [will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)](./spec/acceptance/realtime/channel_spec.rb#L2090)
481
+ * [will move to the SUSPENDED state and then attempt to ATTACH with the ATTACHING state (#RTL13b)](./spec/acceptance/realtime/channel_spec.rb#L2205)
470
482
  * when it receives an ERROR ProtocolMessage
471
- * [should transition to the failed state and the error_reason should be set (#RTL14)](./spec/acceptance/realtime/channel_spec.rb#L2138)
483
+ * [should transition to the failed state and the error_reason should be set (#RTL14)](./spec/acceptance/realtime/channel_spec.rb#L2253)
472
484
 
473
485
  ### Ably::Realtime::Channels
474
486
  _(see [spec/acceptance/realtime/channels_spec.rb](./spec/acceptance/realtime/channels_spec.rb))_
@@ -495,58 +507,75 @@ _(see [spec/acceptance/realtime/client_spec.rb](./spec/acceptance/realtime/clien
495
507
  * using JSON protocol
496
508
  * initialization
497
509
  * basic auth
498
- * [is enabled by default with a provided :key option](./spec/acceptance/realtime/client_spec.rb#L18)
510
+ * [is enabled by default with a provided :key option](./spec/acceptance/realtime/client_spec.rb#L19)
511
+ * with an invalid API key
512
+ * [logs an entry with a help href url matching the code #TI5](./spec/acceptance/realtime/client_spec.rb#L32)
499
513
  * :tls option
500
514
  * set to false to force a plain-text connection
501
- * [fails to connect because a private key cannot be sent over a non-secure connection](./spec/acceptance/realtime/client_spec.rb#L31)
515
+ * [fails to connect because a private key cannot be sent over a non-secure connection](./spec/acceptance/realtime/client_spec.rb#L48)
502
516
  * token auth
503
517
  * with TLS enabled
504
518
  * and a pre-generated Token provided with the :token option
505
- * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L52)
519
+ * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L69)
506
520
  * with valid :key and :use_token_auth option set to true
507
- * [automatically authorizes on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L65)
521
+ * [automatically authorizes on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L82)
508
522
  * with client_id
509
- * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L78)
523
+ * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L95)
510
524
  * with TLS disabled
511
525
  * and a pre-generated Token provided with the :token option
512
- * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L52)
526
+ * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L69)
513
527
  * with valid :key and :use_token_auth option set to true
514
- * [automatically authorizes on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L65)
528
+ * [automatically authorizes on connect and generates a token](./spec/acceptance/realtime/client_spec.rb#L82)
515
529
  * with client_id
516
- * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L78)
530
+ * [connects using token auth](./spec/acceptance/realtime/client_spec.rb#L95)
517
531
  * with a Proc for the :auth_callback option
518
- * [calls the Proc](./spec/acceptance/realtime/client_spec.rb#L103)
519
- * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/realtime/client_spec.rb#L110)
532
+ * [calls the Proc](./spec/acceptance/realtime/client_spec.rb#L120)
533
+ * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/realtime/client_spec.rb#L127)
520
534
  * when the returned token has a client_id
521
- * [sets Auth#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L118)
522
- * [sets Client#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L126)
535
+ * [sets Auth#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L135)
536
+ * [sets Client#client_id to the new token's client_id immediately when connecting](./spec/acceptance/realtime/client_spec.rb#L143)
523
537
  * with a wildcard client_id token
524
538
  * and an explicit client_id in ClientOptions
525
- * [allows uses the explicit client_id in the connection](./spec/acceptance/realtime/client_spec.rb#L144)
539
+ * [allows uses the explicit client_id in the connection](./spec/acceptance/realtime/client_spec.rb#L161)
526
540
  * and client_id omitted in ClientOptions
527
- * [uses the token provided clientId in the connection](./spec/acceptance/realtime/client_spec.rb#L160)
541
+ * [uses the token provided clientId in the connection](./spec/acceptance/realtime/client_spec.rb#L177)
528
542
  * with an invalid wildcard "*" :client_id
529
- * [raises an exception](./spec/acceptance/realtime/client_spec.rb#L176)
543
+ * [raises an exception](./spec/acceptance/realtime/client_spec.rb#L193)
530
544
  * realtime connection settings
531
545
  * defaults
532
- * [disconnected_retry_timeout is 15s](./spec/acceptance/realtime/client_spec.rb#L185)
533
- * [suspended_retry_timeout is 30s](./spec/acceptance/realtime/client_spec.rb#L190)
546
+ * [disconnected_retry_timeout is 15s](./spec/acceptance/realtime/client_spec.rb#L202)
547
+ * [suspended_retry_timeout is 30s](./spec/acceptance/realtime/client_spec.rb#L207)
534
548
  * overriden in ClientOptions
535
- * [disconnected_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L199)
536
- * [suspended_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L204)
549
+ * [disconnected_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L216)
550
+ * [suspended_retry_timeout is updated](./spec/acceptance/realtime/client_spec.rb#L221)
537
551
  * #connection
538
- * [provides access to the Connection object](./spec/acceptance/realtime/client_spec.rb#L213)
552
+ * [provides access to the Connection object](./spec/acceptance/realtime/client_spec.rb#L230)
539
553
  * #channels
540
- * [provides access to the Channels collection object](./spec/acceptance/realtime/client_spec.rb#L220)
554
+ * [provides access to the Channels collection object](./spec/acceptance/realtime/client_spec.rb#L237)
541
555
  * #auth
542
- * [provides access to the Realtime::Auth object](./spec/acceptance/realtime/client_spec.rb#L227)
556
+ * [provides access to the Realtime::Auth object](./spec/acceptance/realtime/client_spec.rb#L244)
543
557
  * #request (#RSC19*)
544
558
  * get
545
- * [returns an HttpPaginatedResponse object](./spec/acceptance/realtime/client_spec.rb#L237)
559
+ * [returns an HttpPaginatedResponse object](./spec/acceptance/realtime/client_spec.rb#L254)
546
560
  * 404 request to invalid URL
547
- * [returns an object with 404 status code and error message](./spec/acceptance/realtime/client_spec.rb#L246)
561
+ * [returns an object with 404 status code and error message](./spec/acceptance/realtime/client_spec.rb#L263)
548
562
  * paged results
549
- * [provides paging](./spec/acceptance/realtime/client_spec.rb#L260)
563
+ * [provides paging](./spec/acceptance/realtime/client_spec.rb#L277)
564
+ * #publish (#TBC)
565
+ * [publishing a message implicity connects and publishes the message successfully on the provided channel](./spec/acceptance/realtime/client_spec.rb#L311)
566
+ * [publishing does not result in a channel being created](./spec/acceptance/realtime/client_spec.rb#L322)
567
+ * [publishing supports an array of Message objects](./spec/acceptance/realtime/client_spec.rb#L349)
568
+ * [publishing supports an array of Hash objects](./spec/acceptance/realtime/client_spec.rb#L360)
569
+ * [publishing on a closed connection fails](./spec/acceptance/realtime/client_spec.rb#L371)
570
+ * with extras
571
+ * [publishing supports extras](./spec/acceptance/realtime/client_spec.rb#L338)
572
+ * queue_messages ClientOption
573
+ * when true
574
+ * [will queue messages whilst connecting and publish once connected](./spec/acceptance/realtime/client_spec.rb#L387)
575
+ * when false
576
+ * [will reject messages on an initializing connection](./spec/acceptance/realtime/client_spec.rb#L404)
577
+ * with more than allowed messages in a single publish
578
+ * [rejects the publish](./spec/acceptance/realtime/client_spec.rb#L421)
550
579
 
551
580
  ### Ably::Realtime::Connection failures
552
581
  _(see [spec/acceptance/realtime/connection_failures_spec.rb](./spec/acceptance/realtime/connection_failures_spec.rb))_
@@ -911,13 +940,13 @@ _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/mess
911
940
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/message_spec.rb#L108)
912
941
  * with unsupported data payload content type
913
942
  * Integer
914
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L119)
943
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L119)
915
944
  * Float
916
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L128)
945
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L128)
917
946
  * Boolean
918
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L137)
947
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L137)
919
948
  * False
920
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/message_spec.rb#L146)
949
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/message_spec.rb#L146)
921
950
  * with ASCII_8BIT message name
922
951
  * [is converted into UTF_8](./spec/acceptance/realtime/message_spec.rb#L155)
923
952
  * when the message publisher has a client_id
@@ -945,113 +974,113 @@ _(see [spec/acceptance/realtime/message_spec.rb](./spec/acceptance/realtime/mess
945
974
  * behaves like an Ably encrypter and decrypter
946
975
  * with #publish and #subscribe
947
976
  * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
948
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
977
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L435)
949
978
  * item 1 with encrypted encoding cipher+aes-128-cbc/base64
950
979
  * behaves like an Ably encrypter and decrypter
951
980
  * with #publish and #subscribe
952
981
  * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
953
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
982
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L435)
954
983
  * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
955
984
  * behaves like an Ably encrypter and decrypter
956
985
  * with #publish and #subscribe
957
986
  * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
958
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
987
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L435)
959
988
  * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
960
989
  * behaves like an Ably encrypter and decrypter
961
990
  * with #publish and #subscribe
962
991
  * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
963
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
992
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L435)
964
993
  * with AES-256-CBC using crypto-data-256.json fixtures (#RTL7d)
965
994
  * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
966
995
  * behaves like an Ably encrypter and decrypter
967
996
  * with #publish and #subscribe
968
997
  * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
969
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
998
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L435)
970
999
  * item 1 with encrypted encoding cipher+aes-256-cbc/base64
971
1000
  * behaves like an Ably encrypter and decrypter
972
1001
  * with #publish and #subscribe
973
1002
  * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
974
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
1003
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L435)
975
1004
  * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
976
1005
  * behaves like an Ably encrypter and decrypter
977
1006
  * with #publish and #subscribe
978
1007
  * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
979
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
1008
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L435)
980
1009
  * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
981
1010
  * behaves like an Ably encrypter and decrypter
982
1011
  * with #publish and #subscribe
983
1012
  * [encrypts message automatically before they are pushed to the server (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L415)
984
- * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L433)
1013
+ * [sends and receives messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/realtime/message_spec.rb#L435)
985
1014
  * with multiple sends from one client to another
986
- * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L472)
987
- * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L489)
1015
+ * [encrypts and decrypts all messages](./spec/acceptance/realtime/message_spec.rb#L474)
1016
+ * [receives raw messages with the correct encoding](./spec/acceptance/realtime/message_spec.rb#L491)
988
1017
  * subscribing with a different transport protocol
989
- * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523)
990
- * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523)
991
- * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L523)
1018
+ * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L525)
1019
+ * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L525)
1020
+ * [delivers a Hash payload to the receiver](./spec/acceptance/realtime/message_spec.rb#L525)
992
1021
  * publishing on an unencrypted channel and subscribing on an encrypted channel with another client
993
- * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L544)
1022
+ * [does not attempt to decrypt the message](./spec/acceptance/realtime/message_spec.rb#L546)
994
1023
  * publishing on an encrypted channel and subscribing on an unencrypted channel with another client
995
- * [delivers the message but still encrypted with a value in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L562)
996
- * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L573)
1024
+ * [delivers the message but still encrypted with a value in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L564)
1025
+ * [logs a Cipher error (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L575)
997
1026
  * publishing on an encrypted channel and subscribing with a different algorithm on another client
998
- * [delivers the message but still encrypted with the cipher detials in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L593)
999
- * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L602)
1027
+ * [delivers the message but still encrypted with the cipher detials in the #encoding attribute (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L595)
1028
+ * [emits a Cipher error on the channel (#RTL7e)](./spec/acceptance/realtime/message_spec.rb#L604)
1000
1029
  * publishing on an encrypted channel and subscribing with a different key on another client
1001
- * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L622)
1002
- * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L633)
1030
+ * [delivers the message but still encrypted with the cipher details in the #encoding attribute](./spec/acceptance/realtime/message_spec.rb#L624)
1031
+ * [emits a Cipher error on the channel](./spec/acceptance/realtime/message_spec.rb#L635)
1003
1032
  * when message is published, the connection disconnects before the ACK is received, and the connection is resumed
1004
- * [publishes the message again, later receives the ACK and only one message is ever received from Ably](./spec/acceptance/realtime/message_spec.rb#L652)
1033
+ * [publishes the message again, later receives the ACK and only one message is ever received from Ably](./spec/acceptance/realtime/message_spec.rb#L654)
1005
1034
  * when message is published, the connection disconnects before the ACK is received
1006
1035
  * the connection is not resumed
1007
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L695)
1036
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L697)
1008
1037
  * the connection becomes suspended
1009
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L721)
1038
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L723)
1010
1039
  * the connection becomes failed
1011
- * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L748)
1040
+ * [calls the errback for all messages](./spec/acceptance/realtime/message_spec.rb#L750)
1012
1041
  * message encoding interoperability
1013
1042
  * over a JSON transport
1014
1043
  * when decoding string
1015
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
1044
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1016
1045
  * when encoding string
1017
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
1046
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1018
1047
  * when decoding string
1019
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
1048
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1020
1049
  * when encoding string
1021
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
1050
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1022
1051
  * when decoding jsonObject
1023
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
1052
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1024
1053
  * when encoding jsonObject
1025
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
1054
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1026
1055
  * when decoding jsonArray
1027
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
1056
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1028
1057
  * when encoding jsonArray
1029
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
1058
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1030
1059
  * when decoding binary
1031
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L789)
1060
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L791)
1032
1061
  * when encoding binary
1033
- * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L807)
1062
+ * [ensures that client libraries have compatible encoding and decoding using common fixtures](./spec/acceptance/realtime/message_spec.rb#L809)
1034
1063
  * over a MsgPack transport
1035
1064
  * when publishing a string using JSON protocol
1036
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1065
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1037
1066
  * when retrieving a string using JSON protocol
1038
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1067
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1039
1068
  * when publishing a string using JSON protocol
1040
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1069
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1041
1070
  * when retrieving a string using JSON protocol
1042
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1071
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1043
1072
  * when publishing a jsonObject using JSON protocol
1044
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1073
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1045
1074
  * when retrieving a jsonObject using JSON protocol
1046
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1075
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1047
1076
  * when publishing a jsonArray using JSON protocol
1048
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1077
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1049
1078
  * when retrieving a jsonArray using JSON protocol
1050
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1079
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1051
1080
  * when publishing a binary using JSON protocol
1052
- * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L841)
1081
+ * [receives the message over MsgPack and the data matches](./spec/acceptance/realtime/message_spec.rb#L843)
1053
1082
  * when retrieving a binary using JSON protocol
1054
- * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L869)
1083
+ * [is compatible with a publishes using MsgPack](./spec/acceptance/realtime/message_spec.rb#L871)
1055
1084
 
1056
1085
  ### Ably::Realtime::Presence history
1057
1086
  _(see [spec/acceptance/realtime/presence_history_spec.rb](./spec/acceptance/realtime/presence_history_spec.rb))_
@@ -1130,13 +1159,13 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1130
1159
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239)
1131
1160
  * with unsupported data payload content type
1132
1161
  * Integer
1133
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1162
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1134
1163
  * Float
1135
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1164
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1136
1165
  * Boolean
1137
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1166
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1138
1167
  * False
1139
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1168
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1140
1169
  * if connection fails before success
1141
1170
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1142
1171
  * #update
@@ -1175,13 +1204,13 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1175
1204
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239)
1176
1205
  * with unsupported data payload content type
1177
1206
  * Integer
1178
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1207
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1179
1208
  * Float
1180
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1209
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1181
1210
  * Boolean
1182
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1211
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1183
1212
  * False
1184
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1213
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1185
1214
  * if connection fails before success
1186
1215
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1187
1216
  * #leave
@@ -1211,13 +1240,13 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1211
1240
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239)
1212
1241
  * with unsupported data payload content type
1213
1242
  * Integer
1214
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1243
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1215
1244
  * Float
1216
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1245
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1217
1246
  * Boolean
1218
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1247
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1219
1248
  * False
1220
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1249
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1221
1250
  * if connection fails before success
1222
1251
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1223
1252
  * :left event
@@ -1262,13 +1291,13 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1262
1291
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239)
1263
1292
  * with unsupported data payload content type
1264
1293
  * Integer
1265
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1294
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1266
1295
  * Float
1267
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1296
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1268
1297
  * Boolean
1269
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1298
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1270
1299
  * False
1271
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1300
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1272
1301
  * if connection fails before success
1273
1302
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1274
1303
  * it should behave like a presence on behalf of another client method
@@ -1336,13 +1365,13 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1336
1365
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239)
1337
1366
  * with unsupported data payload content type
1338
1367
  * Integer
1339
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1368
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1340
1369
  * Float
1341
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1370
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1342
1371
  * Boolean
1343
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1372
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1344
1373
  * False
1345
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1374
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1346
1375
  * if connection fails before success
1347
1376
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1348
1377
  * it should behave like a presence on behalf of another client method
@@ -1416,13 +1445,13 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1416
1445
  * [is encoded and decoded to the same Array](./spec/acceptance/realtime/presence_spec.rb#L239)
1417
1446
  * with unsupported data payload content type
1418
1447
  * Integer
1419
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1448
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L259)
1420
1449
  * Float
1421
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1450
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L268)
1422
1451
  * Boolean
1423
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1452
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L277)
1424
1453
  * False
1425
- * [raises an UnsupportedDataType 40011 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1454
+ * [raises an UnsupportedDataType 40013 exception](./spec/acceptance/realtime/presence_spec.rb#L286)
1426
1455
  * if connection fails before success
1427
1456
  * [calls the Deferrable errback if channel is detached](./spec/acceptance/realtime/presence_spec.rb#L331)
1428
1457
  * it should behave like a presence on behalf of another client method
@@ -1554,6 +1583,73 @@ _(see [spec/acceptance/realtime/presence_spec.rb](./spec/acceptance/realtime/pre
1554
1583
  * channel transitions to the SUSPENDED state
1555
1584
  * [maintains the PresenceMap and only publishes presence event changes since the last attached state (#RTP5f)](./spec/acceptance/realtime/presence_spec.rb#L2762)
1556
1585
 
1586
+ ### Ably::Realtime::Push::Admin
1587
+ _(see [spec/acceptance/realtime/push_admin_spec.rb](./spec/acceptance/realtime/push_admin_spec.rb))_
1588
+ * using JSON protocol
1589
+ * #publish
1590
+ * [returns a SafeDeferrable that catches exceptions in callbacks and logs them](./spec/acceptance/realtime/push_admin_spec.rb#L35)
1591
+ * [accepts valid push data and recipient](./spec/acceptance/realtime/push_admin_spec.rb#L139)
1592
+ * invalid arguments
1593
+ * [raises an exception with a nil recipient](./spec/acceptance/realtime/push_admin_spec.rb#L44)
1594
+ * [raises an exception with a empty recipient](./spec/acceptance/realtime/push_admin_spec.rb#L49)
1595
+ * [raises an exception with a nil recipient](./spec/acceptance/realtime/push_admin_spec.rb#L54)
1596
+ * [raises an exception with a empty recipient](./spec/acceptance/realtime/push_admin_spec.rb#L59)
1597
+ * invalid recipient
1598
+ * PENDING: *[raises an error after receiving a 40x realtime response](./spec/acceptance/realtime/push_admin_spec.rb#L66)*
1599
+ * invalid push data
1600
+ * PENDING: *[raises an error after receiving a 40x realtime response](./spec/acceptance/realtime/push_admin_spec.rb#L76)*
1601
+ * recipient variable case
1602
+ * [is converted to snakeCase](./spec/acceptance/realtime/push_admin_spec.rb#L131)
1603
+ * using test environment channel recipient (#RSH1a)
1604
+ * [triggers a push notification](./spec/acceptance/realtime/push_admin_spec.rb#L169)
1605
+ * #device_registrations
1606
+ * without permissions
1607
+ * [raises a permissions not authorized exception](./spec/acceptance/realtime/push_admin_spec.rb#L197)
1608
+ * #list
1609
+ * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/realtime/push_admin_spec.rb#L241)
1610
+ * [supports paging](./spec/acceptance/realtime/push_admin_spec.rb#L249)
1611
+ * [raises an exception if params are invalid](./spec/acceptance/realtime/push_admin_spec.rb#L265)
1612
+ * #get
1613
+ * [returns a DeviceDetails object if a device ID string is provided](./spec/acceptance/realtime/push_admin_spec.rb#L298)
1614
+ * with a failed request
1615
+ * [raises a ResourceMissing exception if device ID does not exist](./spec/acceptance/realtime/push_admin_spec.rb#L315)
1616
+ * #save
1617
+ * [saves the new DeviceDetails Hash object](./spec/acceptance/realtime/push_admin_spec.rb#L358)
1618
+ * with a failed request
1619
+ * [fails if data is invalid](./spec/acceptance/realtime/push_admin_spec.rb#L376)
1620
+ * #remove_where
1621
+ * [removes all matching device registrations by client_id](./spec/acceptance/realtime/push_admin_spec.rb#L408)
1622
+ * #remove
1623
+ * [removes the provided device id string](./spec/acceptance/realtime/push_admin_spec.rb#L441)
1624
+ * #channel_subscriptions
1625
+ * #list
1626
+ * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/realtime/push_admin_spec.rb#L511)
1627
+ * [supports paging](./spec/acceptance/realtime/push_admin_spec.rb#L519)
1628
+ * [raises an exception if none of the required filters are provided](./spec/acceptance/realtime/push_admin_spec.rb#L535)
1629
+ * #list_channels
1630
+ * [returns a PaginatedResult object containing String objects](./spec/acceptance/realtime/push_admin_spec.rb#L560)
1631
+ * #save
1632
+ * [saves the new client_id PushChannelSubscription Hash object](./spec/acceptance/realtime/push_admin_spec.rb#L575)
1633
+ * [raises an exception for invalid params](./spec/acceptance/realtime/push_admin_spec.rb#L586)
1634
+ * failed requests
1635
+ * [fails for invalid requests](./spec/acceptance/realtime/push_admin_spec.rb#L599)
1636
+ * #remove_where
1637
+ * [removes matching client_ids](./spec/acceptance/realtime/push_admin_spec.rb#L626)
1638
+ * [succeeds on no match](./spec/acceptance/realtime/push_admin_spec.rb#L653)
1639
+ * failed requests
1640
+ * [device_id and client_id filters in the same request are not supported](./spec/acceptance/realtime/push_admin_spec.rb#L645)
1641
+ * #remove
1642
+ * [removes match for Hash object by channel and client_id](./spec/acceptance/realtime/push_admin_spec.rb#L673)
1643
+ * [succeeds even if there is no match](./spec/acceptance/realtime/push_admin_spec.rb#L685)
1644
+
1645
+ ### Ably::Realtime::Push
1646
+ _(see [spec/acceptance/realtime/push_spec.rb](./spec/acceptance/realtime/push_spec.rb))_
1647
+ * using JSON protocol
1648
+ * #activate
1649
+ * [raises an unsupported exception](./spec/acceptance/realtime/push_spec.rb#L14)
1650
+ * #deactivate
1651
+ * [raises an unsupported exception](./spec/acceptance/realtime/push_spec.rb#L21)
1652
+
1557
1653
  ### Ably::Realtime::Client#stats
1558
1654
  _(see [spec/acceptance/realtime/stats_spec.rb](./spec/acceptance/realtime/stats_spec.rb))_
1559
1655
  * using JSON protocol
@@ -1677,111 +1773,111 @@ _(see [spec/acceptance/rest/auth_spec.rb](./spec/acceptance/rest/auth_spec.rb))_
1677
1773
  * [requests a new token if token is expired](./spec/acceptance/rest/auth_spec.rb#L743)
1678
1774
  * [issues a new token every time #authorize is called](./spec/acceptance/rest/auth_spec.rb#L749)
1679
1775
  * with a lambda for the :auth_callback option
1680
- * [calls the lambda](./spec/acceptance/rest/auth_spec.rb#L776)
1681
- * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L780)
1776
+ * [calls the lambda](./spec/acceptance/rest/auth_spec.rb#L777)
1777
+ * [uses the token request returned from the callback when requesting a new token](./spec/acceptance/rest/auth_spec.rb#L781)
1682
1778
  * for every subsequent #request_token
1683
1779
  * without a :auth_callback lambda
1684
- * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L786)
1780
+ * [calls the originally provided block](./spec/acceptance/rest/auth_spec.rb#L787)
1685
1781
  * with a provided block
1686
- * [does not call the originally provided lambda and calls the new #request_token :auth_callback lambda](./spec/acceptance/rest/auth_spec.rb#L793)
1782
+ * [does not call the originally provided lambda and calls the new #request_token :auth_callback lambda](./spec/acceptance/rest/auth_spec.rb#L794)
1687
1783
  * with an explicit token string that expires
1688
1784
  * and a lambda for the :auth_callback option to provide a means to renew the token
1689
- * [calls the lambda once the token has expired and the new token is used](./spec/acceptance/rest/auth_spec.rb#L820)
1785
+ * [calls the lambda once the token has expired and the new token is used](./spec/acceptance/rest/auth_spec.rb#L821)
1690
1786
  * with an explicit ClientOptions client_id
1691
1787
  * and an incompatible client_id in a TokenDetails object passed to the auth callback
1692
- * [rejects a TokenDetails object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L838)
1788
+ * [rejects a TokenDetails object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L839)
1693
1789
  * and an incompatible client_id in a TokenRequest object passed to the auth callback and raises an exception
1694
- * [rejects a TokenRequests object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L846)
1790
+ * [rejects a TokenRequests object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L847)
1695
1791
  * and a token string without any retrievable client_id
1696
- * [rejects a TokenRequests object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L854)
1792
+ * [rejects a TokenRequests object with an incompatible client_id and raises an exception](./spec/acceptance/rest/auth_spec.rb#L855)
1697
1793
  * #create_token_request
1698
- * [returns a TokenRequest object](./spec/acceptance/rest/auth_spec.rb#L869)
1699
- * [returns a TokenRequest that can be passed to a client that can use it for authentication without an API key](./spec/acceptance/rest/auth_spec.rb#L873)
1700
- * [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L880)
1701
- * [specifies no TTL (#RSA5)](./spec/acceptance/rest/auth_spec.rb#L884)
1702
- * [specifies no capability (#RSA6)](./spec/acceptance/rest/auth_spec.rb#L898)
1794
+ * [returns a TokenRequest object](./spec/acceptance/rest/auth_spec.rb#L870)
1795
+ * [returns a TokenRequest that can be passed to a client that can use it for authentication without an API key](./spec/acceptance/rest/auth_spec.rb#L874)
1796
+ * [uses the key name from the client](./spec/acceptance/rest/auth_spec.rb#L881)
1797
+ * [specifies no TTL (#RSA5)](./spec/acceptance/rest/auth_spec.rb#L885)
1798
+ * [specifies no capability (#RSA6)](./spec/acceptance/rest/auth_spec.rb#L899)
1703
1799
  * with a :ttl option below the Token expiry buffer that ensures tokens are renewed 15s before they expire as they are considered expired
1704
- * [uses the Token expiry buffer default + 10s to allow for a token request in flight](./spec/acceptance/rest/auth_spec.rb#L892)
1800
+ * [uses the Token expiry buffer default + 10s to allow for a token request in flight](./spec/acceptance/rest/auth_spec.rb#L893)
1705
1801
  * the nonce
1706
- * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L903)
1707
- * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L908)
1802
+ * [is unique for every request](./spec/acceptance/rest/auth_spec.rb#L904)
1803
+ * [is at least 16 characters](./spec/acceptance/rest/auth_spec.rb#L909)
1708
1804
  * with token param :ttl
1709
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919)
1805
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L920)
1710
1806
  * with token param :nonce
1711
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919)
1807
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L920)
1712
1808
  * with token param :client_id
1713
- * [overrides default](./spec/acceptance/rest/auth_spec.rb#L919)
1809
+ * [overrides default](./spec/acceptance/rest/auth_spec.rb#L920)
1714
1810
  * when specifying capability
1715
- * [overrides the default](./spec/acceptance/rest/auth_spec.rb#L930)
1716
- * [uses these capabilities when Ably issues an actual token](./spec/acceptance/rest/auth_spec.rb#L934)
1811
+ * [overrides the default](./spec/acceptance/rest/auth_spec.rb#L931)
1812
+ * [uses these capabilities when Ably issues an actual token](./spec/acceptance/rest/auth_spec.rb#L935)
1717
1813
  * with additional invalid attributes
1718
- * [are ignored](./spec/acceptance/rest/auth_spec.rb#L944)
1814
+ * [are ignored](./spec/acceptance/rest/auth_spec.rb#L945)
1719
1815
  * when required fields are missing
1720
- * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L955)
1721
- * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L959)
1816
+ * [should raise an exception if key secret is missing](./spec/acceptance/rest/auth_spec.rb#L956)
1817
+ * [should raise an exception if key name is missing](./spec/acceptance/rest/auth_spec.rb#L960)
1722
1818
  * timestamp attribute
1723
- * [is a Time object in Ruby and is set to the local time](./spec/acceptance/rest/auth_spec.rb#L986)
1819
+ * [is a Time object in Ruby and is set to the local time](./spec/acceptance/rest/auth_spec.rb#L987)
1724
1820
  * with :query_time auth_option
1725
- * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L971)
1821
+ * [queries the server for the timestamp](./spec/acceptance/rest/auth_spec.rb#L972)
1726
1822
  * with :timestamp option
1727
- * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L981)
1823
+ * [uses the provided timestamp in the token request](./spec/acceptance/rest/auth_spec.rb#L982)
1728
1824
  * signing
1729
- * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L1010)
1825
+ * [generates a valid HMAC](./spec/acceptance/rest/auth_spec.rb#L1011)
1730
1826
  * lexicographic ordering of channels and operations
1731
- * [HMAC is lexicographic ordered and thus the HMAC is identical](./spec/acceptance/rest/auth_spec.rb#L1037)
1732
- * [is valid when used for authentication](./spec/acceptance/rest/auth_spec.rb#L1043)
1827
+ * [HMAC is lexicographic ordered and thus the HMAC is identical](./spec/acceptance/rest/auth_spec.rb#L1038)
1828
+ * [is valid when used for authentication](./spec/acceptance/rest/auth_spec.rb#L1044)
1733
1829
  * using token authentication
1734
1830
  * with :token option
1735
- * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L1070)
1736
- * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L1074)
1737
- * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L1082)
1738
- * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L1090)
1831
+ * [authenticates successfully using the provided :token](./spec/acceptance/rest/auth_spec.rb#L1071)
1832
+ * [disallows publishing on unspecified capability channels](./spec/acceptance/rest/auth_spec.rb#L1075)
1833
+ * [fails if timestamp is invalid](./spec/acceptance/rest/auth_spec.rb#L1083)
1834
+ * [cannot be renewed automatically](./spec/acceptance/rest/auth_spec.rb#L1091)
1739
1835
  * and the token expires
1740
- * [should indicate an error and not retry the request (#RSA4a)](./spec/acceptance/rest/auth_spec.rb#L1124)
1836
+ * [should indicate an error and not retry the request (#RSA4a)](./spec/acceptance/rest/auth_spec.rb#L1125)
1741
1837
  * when implicit as a result of using :client_id
1742
1838
  * and requests to the Ably server are mocked
1743
- * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L1154)
1839
+ * [will send a token request to the server](./spec/acceptance/rest/auth_spec.rb#L1155)
1744
1840
  * a token is created
1745
- * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L1163)
1746
- * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L1167)
1747
- * [with capability and TTL defaults (#TK2a, #TK2b)](./spec/acceptance/rest/auth_spec.rb#L1171)
1748
- * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1182)
1841
+ * [before a request is made](./spec/acceptance/rest/auth_spec.rb#L1164)
1842
+ * [when a message is published](./spec/acceptance/rest/auth_spec.rb#L1168)
1843
+ * [with capability and TTL defaults (#TK2a, #TK2b)](./spec/acceptance/rest/auth_spec.rb#L1172)
1844
+ * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1183)
1749
1845
  * when token expires
1750
- * [automatically renews the token (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1211)
1751
- * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1221)
1846
+ * [automatically renews the token (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1212)
1847
+ * [fails if the token renewal fails (#RSA4b)](./spec/acceptance/rest/auth_spec.rb#L1222)
1752
1848
  * when :client_id is provided in a token
1753
- * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1245)
1849
+ * [#client_id contains the client_id](./spec/acceptance/rest/auth_spec.rb#L1246)
1754
1850
  * #client_id_validated?
1755
1851
  * when using basic auth
1756
- * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1257)
1852
+ * [is false as basic auth users do not have an identity](./spec/acceptance/rest/auth_spec.rb#L1258)
1757
1853
  * when using a token auth string for a token with a client_id
1758
- * [is false as identification is not possible from an opaque token string](./spec/acceptance/rest/auth_spec.rb#L1265)
1854
+ * [is false as identification is not possible from an opaque token string](./spec/acceptance/rest/auth_spec.rb#L1266)
1759
1855
  * when using a token
1760
1856
  * with a client_id
1761
- * [is true](./spec/acceptance/rest/auth_spec.rb#L1274)
1857
+ * [is true](./spec/acceptance/rest/auth_spec.rb#L1275)
1762
1858
  * with no client_id (anonymous)
1763
- * [is true](./spec/acceptance/rest/auth_spec.rb#L1282)
1859
+ * [is true](./spec/acceptance/rest/auth_spec.rb#L1283)
1764
1860
  * with a wildcard client_id (anonymous)
1765
- * [is false](./spec/acceptance/rest/auth_spec.rb#L1290)
1861
+ * [is false](./spec/acceptance/rest/auth_spec.rb#L1291)
1766
1862
  * when using a token request with a client_id
1767
- * [is not true as identification is not confirmed until authenticated](./spec/acceptance/rest/auth_spec.rb#L1299)
1863
+ * [is not true as identification is not confirmed until authenticated](./spec/acceptance/rest/auth_spec.rb#L1300)
1768
1864
  * after authentication
1769
- * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1306)
1865
+ * [is true as identification is completed during implicit authentication](./spec/acceptance/rest/auth_spec.rb#L1307)
1770
1866
  * when using a :key and basic auth
1771
- * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1314)
1772
- * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1318)
1773
- * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1322)
1867
+ * [#using_token_auth? is false](./spec/acceptance/rest/auth_spec.rb#L1315)
1868
+ * [#key attribute contains the key string](./spec/acceptance/rest/auth_spec.rb#L1319)
1869
+ * [#using_basic_auth? is true](./spec/acceptance/rest/auth_spec.rb#L1323)
1774
1870
  * deprecated #authorise
1775
- * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1331)
1776
- * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1336)
1871
+ * [logs a deprecation warning (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1332)
1872
+ * [returns a valid token (#RSA10l)](./spec/acceptance/rest/auth_spec.rb#L1337)
1777
1873
  * when using JWT
1778
- * [authenticates correctly using the JWT token generated by the echo server](./spec/acceptance/rest/auth_spec.rb#L1348)
1874
+ * [authenticates correctly using the JWT token generated by the echo server](./spec/acceptance/rest/auth_spec.rb#L1349)
1779
1875
  * when the JWT embeds an Ably token
1780
- * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1355)
1876
+ * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1356)
1781
1877
  * and the requested token is encrypted
1782
- * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1362)
1878
+ * [authenticates correctly using the embedded token](./spec/acceptance/rest/auth_spec.rb#L1363)
1783
1879
  * when the token requested is returned with application/jwt content type
1784
- * [authenticates correctly and pulls stats](./spec/acceptance/rest/auth_spec.rb#L1373)
1880
+ * [authenticates correctly and pulls stats](./spec/acceptance/rest/auth_spec.rb#L1374)
1785
1881
 
1786
1882
  ### Ably::Rest
1787
1883
  _(see [spec/acceptance/rest/base_spec.rb](./spec/acceptance/rest/base_spec.rb))_
@@ -1924,162 +2020,168 @@ _(see [spec/acceptance/rest/client_spec.rb](./spec/acceptance/rest/client_spec.r
1924
2020
  * #initialize
1925
2021
  * with only an API key
1926
2022
  * [uses basic authentication](./spec/acceptance/rest/client_spec.rb#L25)
2023
+ * with an invalid API key
2024
+ * [logs an entry with a help href url matching the code #TI5](./spec/acceptance/rest/client_spec.rb#L33)
1927
2025
  * with an explicit string :token
1928
- * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L33)
2026
+ * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L46)
1929
2027
  * with :use_token_auth set to true
1930
- * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L41)
2028
+ * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L54)
1931
2029
  * with a :client_id configured
1932
- * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L49)
2030
+ * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L62)
1933
2031
  * with a non string :client_id
1934
- * [raises an ArgumentError](./spec/acceptance/rest/client_spec.rb#L57)
2032
+ * [raises an ArgumentError](./spec/acceptance/rest/client_spec.rb#L70)
1935
2033
  * with an invalid wildcard "*" :client_id
1936
- * [raises an exception](./spec/acceptance/rest/client_spec.rb#L63)
2034
+ * [raises an exception](./spec/acceptance/rest/client_spec.rb#L76)
1937
2035
  * with an :auth_callback lambda
1938
- * [calls the auth lambda to get a new token](./spec/acceptance/rest/client_spec.rb#L71)
1939
- * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L76)
2036
+ * [calls the auth lambda to get a new token](./spec/acceptance/rest/client_spec.rb#L84)
2037
+ * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L89)
1940
2038
  * with :default_token_params
1941
- * [overides the default token params (#TO3j11)](./spec/acceptance/rest/client_spec.rb#L90)
2039
+ * [overides the default token params (#TO3j11)](./spec/acceptance/rest/client_spec.rb#L103)
1942
2040
  * with an :auth_callback lambda (clientId provided in library options instead of as a token_request param)
1943
- * [correctly sets the clientId on the token](./spec/acceptance/rest/client_spec.rb#L100)
2041
+ * [correctly sets the clientId on the token](./spec/acceptance/rest/client_spec.rb#L113)
1944
2042
  * with an auth URL
1945
- * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L110)
2043
+ * [uses token authentication](./spec/acceptance/rest/client_spec.rb#L123)
1946
2044
  * before any REST request
1947
- * [sends an HTTP request to the provided auth URL to get a new token](./spec/acceptance/rest/client_spec.rb#L121)
2045
+ * [sends an HTTP request to the provided auth URL to get a new token](./spec/acceptance/rest/client_spec.rb#L134)
1948
2046
  * auth headers
1949
2047
  * with basic auth
1950
- * [sends the API key in authentication part of the secure URL (the Authorization: Basic header is not used with the Faraday HTTP library by default)](./spec/acceptance/rest/client_spec.rb#L141)
2048
+ * [sends the API key in authentication part of the secure URL (the Authorization: Basic header is not used with the Faraday HTTP library by default)](./spec/acceptance/rest/client_spec.rb#L154)
1951
2049
  * with token auth
1952
2050
  * without specifying protocol
1953
- * [sends the token string over HTTPS in the Authorization Bearer header with Base64 encoding](./spec/acceptance/rest/client_spec.rb#L160)
2051
+ * [sends the token string over HTTPS in the Authorization Bearer header with Base64 encoding](./spec/acceptance/rest/client_spec.rb#L173)
1954
2052
  * when setting constructor ClientOption :tls to false
1955
- * [sends the token string over HTTP in the Authorization Bearer header with Base64 encoding](./spec/acceptance/rest/client_spec.rb#L170)
2053
+ * [sends the token string over HTTP in the Authorization Bearer header with Base64 encoding](./spec/acceptance/rest/client_spec.rb#L183)
1956
2054
  * using tokens
1957
2055
  * when expired
1958
- * [creates a new token automatically when the old token expires](./spec/acceptance/rest/client_spec.rb#L203)
2056
+ * [creates a new token automatically when the old token expires](./spec/acceptance/rest/client_spec.rb#L216)
1959
2057
  * with a different client_id in the subsequent token
1960
- * [fails to authenticate and raises an exception](./spec/acceptance/rest/client_spec.rb#L216)
2058
+ * [fails to authenticate and raises an exception](./spec/acceptance/rest/client_spec.rb#L229)
1961
2059
  * when token has not expired
1962
- * [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#L227)
2060
+ * [reuses the existing token for every request](./spec/acceptance/rest/client_spec.rb#L240)
1963
2061
  * connection transport
1964
2062
  * defaults
1965
2063
  * for default host
1966
- * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L244)
1967
- * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L248)
2064
+ * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L257)
2065
+ * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L261)
1968
2066
  * for the fallback hosts
1969
- * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L254)
1970
- * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L258)
2067
+ * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L267)
2068
+ * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L271)
1971
2069
  * with custom http_open_timeout and http_request_timeout options
1972
2070
  * for default host
1973
- * [is configured to use custom open timeout](./spec/acceptance/rest/client_spec.rb#L270)
1974
- * [is configured to use custom request timeout](./spec/acceptance/rest/client_spec.rb#L274)
2071
+ * [is configured to use custom open timeout](./spec/acceptance/rest/client_spec.rb#L283)
2072
+ * [is configured to use custom request timeout](./spec/acceptance/rest/client_spec.rb#L287)
1975
2073
  * for the fallback hosts
1976
- * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L280)
1977
- * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L284)
2074
+ * [is configured to timeout connection opening in 4 seconds](./spec/acceptance/rest/client_spec.rb#L293)
2075
+ * [is configured to timeout connection requests in 10 seconds](./spec/acceptance/rest/client_spec.rb#L297)
1978
2076
  * fallback hosts
1979
2077
  * configured
1980
- * [should make connection attempts to A.ably-realtime.com, B.ably-realtime.com, C.ably-realtime.com, D.ably-realtime.com, E.ably-realtime.com (#RSC15a)](./spec/acceptance/rest/client_spec.rb#L298)
2078
+ * [should make connection attempts to A.ably-realtime.com, B.ably-realtime.com, C.ably-realtime.com, D.ably-realtime.com, E.ably-realtime.com (#RSC15a)](./spec/acceptance/rest/client_spec.rb#L311)
1981
2079
  * when environment is NOT production (#RSC15b)
1982
- * [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#L315)
2080
+ * [does not retry failed requests with fallback hosts when there is a connection error](./spec/acceptance/rest/client_spec.rb#L328)
1983
2081
  * when environment is production
1984
2082
  * and connection times out
1985
- * [tries fallback hosts 3 times (#RSC15b, #RSC15b)](./spec/acceptance/rest/client_spec.rb#L354)
2083
+ * [tries fallback hosts 3 times (#RSC15b, #RSC15b)](./spec/acceptance/rest/client_spec.rb#L367)
1986
2084
  * and the total request time exeeds 15 seconds
1987
- * [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L369)
2085
+ * [makes no further attempts to any fallback hosts](./spec/acceptance/rest/client_spec.rb#L382)
1988
2086
  * and connection fails
1989
- * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L385)
2087
+ * [tries fallback hosts 3 times](./spec/acceptance/rest/client_spec.rb#L398)
1990
2088
  * and first request to primary endpoint fails
1991
- * [tries a fallback host, and for the next request tries the primary endpoint again (#RSC15e)](./spec/acceptance/rest/client_spec.rb#L419)
2089
+ * [tries a fallback host, and for the next request tries the primary endpoint again (#RSC15e)](./spec/acceptance/rest/client_spec.rb#L432)
1992
2090
  * and basic authentication fails
1993
- * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L446)
2091
+ * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L459)
1994
2092
  * and server returns a 50x error
1995
- * [attempts the fallback hosts as this is an authentication failure (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L468)
2093
+ * [attempts the fallback hosts as this is an authentication failure (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L481)
1996
2094
  * when environment is production and server returns a 50x error
1997
2095
  * with custom fallback hosts provided
1998
- * [attempts the fallback hosts as this is an authentication failure (#RSC15b, #RSC15a, #TO3k6)](./spec/acceptance/rest/client_spec.rb#L517)
2096
+ * [attempts the fallback hosts as this is an authentication failure (#RSC15b, #RSC15a, #TO3k6)](./spec/acceptance/rest/client_spec.rb#L530)
1999
2097
  * with an empty array of fallback hosts provided (#RSC15b, #RSC15a, #TO3k6)
2000
- * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L530)
2098
+ * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L543)
2001
2099
  * using a local web-server
2002
2100
  * and timing out the primary host
2003
2101
  * POST with request timeout less than max_retry_duration
2004
- * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L594)
2102
+ * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L607)
2005
2103
  * GET with request timeout less than max_retry_duration
2006
- * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L617)
2104
+ * [tries the primary host, then both fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L630)
2007
2105
  * POST with request timeout more than max_retry_duration
2008
- * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L640)
2106
+ * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L653)
2009
2107
  * GET with request timeout more than max_retry_duration
2010
- * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L662)
2108
+ * [does not try any fallback hosts (#RSC15d)](./spec/acceptance/rest/client_spec.rb#L675)
2011
2109
  * and failing the primary host
2012
- * [tries one of the fallback hosts](./spec/acceptance/rest/client_spec.rb#L707)
2110
+ * [tries one of the fallback hosts](./spec/acceptance/rest/client_spec.rb#L720)
2111
+ * to fail the primary host, allow a fallback to succeed, then later trigger a fallback to the primary host (#RSC15f)
2112
+ * [succeeds and remembers fallback host preferences across requests](./spec/acceptance/rest/client_spec.rb#L776)
2113
+ * with custom :fallback_retry_timeout
2114
+ * [stops using the preferred fallback after this time](./spec/acceptance/rest/client_spec.rb#L813)
2013
2115
  * when environment is not production and server returns a 50x error
2014
2116
  * with custom fallback hosts provided (#RSC15b, #TO3k6)
2015
- * [attempts the fallback hosts as this is not an authentication failure](./spec/acceptance/rest/client_spec.rb#L757)
2117
+ * [attempts the fallback hosts as this is not an authentication failure](./spec/acceptance/rest/client_spec.rb#L874)
2016
2118
  * with an empty array of fallback hosts provided (#RSC15b, #TO3k6)
2017
- * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L770)
2119
+ * [does not attempt the fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L887)
2018
2120
  * with fallback_hosts_use_default: true (#RSC15b, #TO3k7)
2019
- * [attempts the default fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L795)
2121
+ * [attempts the default fallback hosts as this is an authentication failure](./spec/acceptance/rest/client_spec.rb#L912)
2020
2122
  * with a custom host
2021
2123
  * that does not exist
2022
- * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L811)
2124
+ * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L928)
2023
2125
  * fallback hosts
2024
- * [are never used](./spec/acceptance/rest/client_spec.rb#L832)
2126
+ * [are never used](./spec/acceptance/rest/client_spec.rb#L949)
2025
2127
  * that times out
2026
- * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L847)
2128
+ * [fails immediately and raises a Faraday Error](./spec/acceptance/rest/client_spec.rb#L964)
2027
2129
  * fallback hosts
2028
- * [are never used](./spec/acceptance/rest/client_spec.rb#L860)
2130
+ * [are never used](./spec/acceptance/rest/client_spec.rb#L977)
2029
2131
  * HTTP configuration options
2030
- * [is frozen](./spec/acceptance/rest/client_spec.rb#L917)
2132
+ * [is frozen](./spec/acceptance/rest/client_spec.rb#L1034)
2031
2133
  * defaults
2032
- * [#http_open_timeout is 4s](./spec/acceptance/rest/client_spec.rb#L872)
2033
- * [#http_request_timeout is 10s](./spec/acceptance/rest/client_spec.rb#L876)
2034
- * [#http_max_retry_count is 3](./spec/acceptance/rest/client_spec.rb#L880)
2035
- * [#http_max_retry_duration is 15s](./spec/acceptance/rest/client_spec.rb#L884)
2134
+ * [#http_open_timeout is 4s](./spec/acceptance/rest/client_spec.rb#L989)
2135
+ * [#http_request_timeout is 10s](./spec/acceptance/rest/client_spec.rb#L993)
2136
+ * [#http_max_retry_count is 3](./spec/acceptance/rest/client_spec.rb#L997)
2137
+ * [#http_max_retry_duration is 15s](./spec/acceptance/rest/client_spec.rb#L1001)
2036
2138
  * configured
2037
- * [#http_open_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L900)
2038
- * [#http_request_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L904)
2039
- * [#http_max_retry_count uses provided value](./spec/acceptance/rest/client_spec.rb#L908)
2040
- * [#http_max_retry_duration uses provided value](./spec/acceptance/rest/client_spec.rb#L912)
2139
+ * [#http_open_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L1017)
2140
+ * [#http_request_timeout uses provided value](./spec/acceptance/rest/client_spec.rb#L1021)
2141
+ * [#http_max_retry_count uses provided value](./spec/acceptance/rest/client_spec.rb#L1025)
2142
+ * [#http_max_retry_duration uses provided value](./spec/acceptance/rest/client_spec.rb#L1029)
2041
2143
  * #auth
2042
- * [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L928)
2043
- * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L932)
2144
+ * [is provides access to the Auth object](./spec/acceptance/rest/client_spec.rb#L1045)
2145
+ * [configures the Auth object with all ClientOptions passed to client in the initializer](./spec/acceptance/rest/client_spec.rb#L1049)
2044
2146
  * version headers
2045
2147
  * with variant none
2046
- * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L966)
2148
+ * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L1083)
2047
2149
  * with variant foo
2048
- * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L966)
2150
+ * [sends a protocol version and lib version header (#G4, #RSC7a, #RSC7b)](./spec/acceptance/rest/client_spec.rb#L1083)
2049
2151
  * #request (#RSC19*)
2050
2152
  * get
2051
- * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L979)
2153
+ * [returns an HttpPaginatedResponse object](./spec/acceptance/rest/client_spec.rb#L1096)
2052
2154
  * 404 request to invalid URL
2053
- * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L986)
2155
+ * [returns an object with 404 status code and error message](./spec/acceptance/rest/client_spec.rb#L1103)
2054
2156
  * paged results
2055
- * [provides paging](./spec/acceptance/rest/client_spec.rb#L998)
2157
+ * [provides paging](./spec/acceptance/rest/client_spec.rb#L1115)
2056
2158
  * request_id generation
2057
2159
  * Timeout error
2058
2160
  * with option add_request_ids: true
2059
- * [has an error with the same request_id of the request](./spec/acceptance/rest/client_spec.rb#L1033)
2161
+ * [has an error with the same request_id of the request](./spec/acceptance/rest/client_spec.rb#L1150)
2060
2162
  * with option add_request_ids: true and REST operations with a message body
2061
2163
  * with mocks to inspect the params
2062
2164
  * with a single publish
2063
- * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1055)
2165
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1172)
2064
2166
  * with an array publish
2065
- * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1062)
2167
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1179)
2066
2168
  * without mocks to ensure the requests are accepted
2067
2169
  * with a single publish
2068
- * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1071)
2170
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1188)
2069
2171
  * with an array publish
2070
- * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1078)
2172
+ * [succeeds and sends the request_id as a param](./spec/acceptance/rest/client_spec.rb#L1195)
2071
2173
  * option add_request_ids: true and specified fallback hosts
2072
- * [request_id is the same across retries](./spec/acceptance/rest/client_spec.rb#L1103)
2174
+ * [request_id is the same across retries](./spec/acceptance/rest/client_spec.rb#L1220)
2073
2175
  * without request_id
2074
- * [does not include request_id in ConnectionTimeout error](./spec/acceptance/rest/client_spec.rb#L1115)
2176
+ * [does not include request_id in ConnectionTimeout error](./spec/acceptance/rest/client_spec.rb#L1232)
2075
2177
  * UnauthorizedRequest nonce error
2076
- * [includes request_id in UnauthorizedRequest error due to replayed nonce](./spec/acceptance/rest/client_spec.rb#L1128)
2178
+ * [includes request_id in UnauthorizedRequest error due to replayed nonce](./spec/acceptance/rest/client_spec.rb#L1245)
2077
2179
  * failed request logging
2078
- * [is absent when requests do not fail](./spec/acceptance/rest/client_spec.rb#L1145)
2180
+ * [is absent when requests do not fail](./spec/acceptance/rest/client_spec.rb#L1262)
2079
2181
  * with the first request failing
2080
- * [is present with success message when requests do not actually fail](./spec/acceptance/rest/client_spec.rb#L1159)
2182
+ * [is present with success message when requests do not actually fail](./spec/acceptance/rest/client_spec.rb#L1277)
2081
2183
  * with all requests failing
2082
- * [is present when all requests fail](./spec/acceptance/rest/client_spec.rb#L1175)
2184
+ * [is present when all requests fail](./spec/acceptance/rest/client_spec.rb#L1294)
2083
2185
 
2084
2186
  ### Ably::Models::MessageEncoders
2085
2187
  _(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_spec.rb))_
@@ -2118,85 +2220,113 @@ _(see [spec/acceptance/rest/encoders_spec.rb](./spec/acceptance/rest/encoders_sp
2118
2220
  _(see [spec/acceptance/rest/message_spec.rb](./spec/acceptance/rest/message_spec.rb))_
2119
2221
  * using JSON protocol
2120
2222
  * publishing with an ASCII_8BIT message name
2121
- * [is converted into UTF_8](./spec/acceptance/rest/message_spec.rb#L18)
2223
+ * [is converted into UTF_8](./spec/acceptance/rest/message_spec.rb#L19)
2122
2224
  * with supported data payload content type
2123
2225
  * JSON Object (Hash)
2124
- * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L30)
2226
+ * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L31)
2125
2227
  * JSON Array
2126
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L39)
2228
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L40)
2127
2229
  * String
2128
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L48)
2230
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L49)
2129
2231
  * Binary
2130
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L57)
2232
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L58)
2131
2233
  * with supported extra payload content type (#RSL1h, #RSL6a2)
2132
2234
  * JSON Object (Hash)
2133
- * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L70)
2235
+ * [is encoded and decoded to the same hash](./spec/acceptance/rest/message_spec.rb#L71)
2134
2236
  * JSON Array
2135
- * [is encoded and decoded to the same deep multi-type object](./spec/acceptance/rest/message_spec.rb#L80)
2237
+ * [is encoded and decoded to the same deep multi-type object](./spec/acceptance/rest/message_spec.rb#L81)
2136
2238
  * nil
2137
- * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L87)
2239
+ * [is encoded and decoded to the same Array](./spec/acceptance/rest/message_spec.rb#L88)
2240
+ * idempotency (#RSL1k)
2241
+ * [idempotent publishing is disabled by default with 1.1 (#TO3n)](./spec/acceptance/rest/message_spec.rb#L165)
2242
+ * [idempotent publishing is enabled by default with 1.2 (#TO3n)](./spec/acceptance/rest/message_spec.rb#L170)
2243
+ * when ID is not included (#RSL1k2)
2244
+ * with Message object
2245
+ * [publishes the same message three times](./spec/acceptance/rest/message_spec.rb#L104)
2246
+ * with #publish arguments only
2247
+ * [publishes the same message three times](./spec/acceptance/rest/message_spec.rb#L111)
2248
+ * when ID is included (#RSL1k2, #RSL1k5)
2249
+ * [the ID provided is used for the published messages](./spec/acceptance/rest/message_spec.rb#L140)
2250
+ * PENDING: *[for multiple messages in one publish operation (#RSL1k3)](./spec/acceptance/rest/message_spec.rb#L145)*
2251
+ * PENDING: *[for multiple messages in one publish operation with IDs following the required format described in RSL1k1 (#RSL1k3)](./spec/acceptance/rest/message_spec.rb#L154)*
2252
+ * with Message object
2253
+ * PENDING: *[three REST publishes result in only one message being published](./spec/acceptance/rest/message_spec.rb#L122)*
2254
+ * with #publish arguments only
2255
+ * PENDING: *[three REST publishes result in only one message being published](./spec/acceptance/rest/message_spec.rb#L132)*
2256
+ * when idempotent publishing is enabled in the client library ClientOptions (#TO3n)
2257
+ * [the ID is populated with a random ID and serial 0 from this lib (#RSL1k1)](./spec/acceptance/rest/message_spec.rb#L242)
2258
+ * when there is a network failure triggering an automatic retry (#RSL1k4)
2259
+ * PENDING: *[for multiple messages in one publish operation](./spec/acceptance/rest/message_spec.rb#L233)*
2260
+ * with Message object
2261
+ * PENDING: *[two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L197)*
2262
+ * with #publish arguments only
2263
+ * PENDING: *[two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L209)*
2264
+ * with explicitly provided message ID
2265
+ * PENDING: *[two REST publish retries result in only one message being published](./spec/acceptance/rest/message_spec.rb#L223)*
2266
+ * when publishing a batch of messages
2267
+ * PENDING: *[the ID is populated with a single random ID and sequence of serials from this lib (#RSL1k1)](./spec/acceptance/rest/message_spec.rb#L250)*
2138
2268
  * with unsupported data payload content type
2139
2269
  * Integer
2140
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L98)
2270
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L269)
2141
2271
  * Float
2142
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L106)
2272
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L277)
2143
2273
  * Boolean
2144
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L114)
2274
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L285)
2145
2275
  * False
2146
- * [is raises an UnsupportedDataType 40011 exception](./spec/acceptance/rest/message_spec.rb#L122)
2276
+ * [is raises an UnsupportedDataType 40013 exception](./spec/acceptance/rest/message_spec.rb#L293)
2147
2277
  * encryption and encoding
2148
2278
  * with #publish and #history
2149
2279
  * with AES-128-CBC using crypto-data-128.json fixtures (#RTL7d)
2150
2280
  * item 0 with encrypted encoding utf-8/cipher+aes-128-cbc/base64
2151
2281
  * behaves like an Ably encrypter and decrypter
2152
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2153
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2282
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L338)
2283
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L353)
2154
2284
  * item 1 with encrypted encoding cipher+aes-128-cbc/base64
2155
2285
  * behaves like an Ably encrypter and decrypter
2156
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2157
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2286
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L338)
2287
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L353)
2158
2288
  * item 2 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
2159
2289
  * behaves like an Ably encrypter and decrypter
2160
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2161
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2290
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L338)
2291
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L353)
2162
2292
  * item 3 with encrypted encoding json/utf-8/cipher+aes-128-cbc/base64
2163
2293
  * behaves like an Ably encrypter and decrypter
2164
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2165
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2294
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L338)
2295
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L353)
2166
2296
  * with AES-256-CBC using crypto-data-256.json fixtures (#RTL7d)
2167
2297
  * item 0 with encrypted encoding utf-8/cipher+aes-256-cbc/base64
2168
2298
  * behaves like an Ably encrypter and decrypter
2169
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2170
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2299
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L338)
2300
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L353)
2171
2301
  * item 1 with encrypted encoding cipher+aes-256-cbc/base64
2172
2302
  * behaves like an Ably encrypter and decrypter
2173
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2174
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2303
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L338)
2304
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L353)
2175
2305
  * item 2 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
2176
2306
  * behaves like an Ably encrypter and decrypter
2177
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2178
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2307
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L338)
2308
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L353)
2179
2309
  * item 3 with encrypted encoding json/utf-8/cipher+aes-256-cbc/base64
2180
2310
  * behaves like an Ably encrypter and decrypter
2181
- * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L167)
2182
- * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L182)
2311
+ * [encrypts message automatically when published (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L338)
2312
+ * [sends and retrieves messages that are encrypted & decrypted by the Ably library (#RTL7d)](./spec/acceptance/rest/message_spec.rb#L353)
2183
2313
  * when publishing lots of messages
2184
- * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L215)
2314
+ * [encrypts on #publish and decrypts on #history](./spec/acceptance/rest/message_spec.rb#L386)
2185
2315
  * when retrieving #history with a different protocol
2186
- * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242)
2187
- * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242)
2188
- * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L242)
2316
+ * [delivers a String ASCII-8BIT payload to the receiver](./spec/acceptance/rest/message_spec.rb#L413)
2317
+ * [delivers a String UTF-8 payload to the receiver](./spec/acceptance/rest/message_spec.rb#L413)
2318
+ * [delivers a Hash payload to the receiver](./spec/acceptance/rest/message_spec.rb#L413)
2189
2319
  * when publishing on an unencrypted channel and retrieving with #history on an encrypted channel
2190
- * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L258)
2320
+ * [does not attempt to decrypt the message](./spec/acceptance/rest/message_spec.rb#L429)
2191
2321
  * when publishing on an encrypted channel and retrieving with #history on an unencrypted channel
2192
- * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L279)
2193
- * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L285)
2322
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L450)
2323
+ * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L456)
2194
2324
  * publishing on an encrypted channel and retrieving #history with a different algorithm on another client (#RTL7e)
2195
- * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L306)
2196
- * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L312)
2325
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L477)
2326
+ * [logs a Cipher exception (#RTL7e)](./spec/acceptance/rest/message_spec.rb#L483)
2197
2327
  * publishing on an encrypted channel and subscribing with a different key on another client
2198
- * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L333)
2199
- * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L339)
2328
+ * [retrieves the message that remains encrypted with an encrypted encoding attribute](./spec/acceptance/rest/message_spec.rb#L504)
2329
+ * [logs a Cipher exception](./spec/acceptance/rest/message_spec.rb#L510)
2200
2330
 
2201
2331
  ### Ably::Rest::Presence
2202
2332
  _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_spec.rb))_
@@ -2265,6 +2395,97 @@ _(see [spec/acceptance/rest/presence_spec.rb](./spec/acceptance/rest/presence_sp
2265
2395
  * [returns the messages still encoded](./spec/acceptance/rest/presence_spec.rb#L440)
2266
2396
  * [logs a cipher error](./spec/acceptance/rest/presence_spec.rb#L444)
2267
2397
 
2398
+ ### Ably::Rest::Push::Admin
2399
+ _(see [spec/acceptance/rest/push_admin_spec.rb](./spec/acceptance/rest/push_admin_spec.rb))_
2400
+ * using JSON protocol
2401
+ * #publish
2402
+ * [accepts valid push data and recipient (#RSH1a)](./spec/acceptance/rest/push_admin_spec.rb#L127)
2403
+ * without publish permissions
2404
+ * [raises a permissions issue exception](./spec/acceptance/rest/push_admin_spec.rb#L40)
2405
+ * invalid arguments (#RHS1a)
2406
+ * [raises an exception with a nil recipient](./spec/acceptance/rest/push_admin_spec.rb#L46)
2407
+ * [raises an exception with a empty recipient](./spec/acceptance/rest/push_admin_spec.rb#L50)
2408
+ * [raises an exception with a nil recipient](./spec/acceptance/rest/push_admin_spec.rb#L54)
2409
+ * [raises an exception with a empty recipient](./spec/acceptance/rest/push_admin_spec.rb#L58)
2410
+ * invalid recipient (#RSH1a)
2411
+ * [raises an error after receiving a 40x realtime response](./spec/acceptance/rest/push_admin_spec.rb#L64)
2412
+ * invalid push data (#RSH1a)
2413
+ * [raises an error after receiving a 40x realtime response](./spec/acceptance/rest/push_admin_spec.rb#L70)
2414
+ * recipient variable case
2415
+ * [is converted to snakeCase](./spec/acceptance/rest/push_admin_spec.rb#L121)
2416
+ * using test environment channel recipient (#RSH1a)
2417
+ * [triggers a push notification](./spec/acceptance/rest/push_admin_spec.rb#L152)
2418
+ * #device_registrations (#RSH1b)
2419
+ * without permissions
2420
+ * [raises a permissions not authorized exception](./spec/acceptance/rest/push_admin_spec.rb#L172)
2421
+ * #list (#RSH1b2)
2422
+ * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/rest/push_admin_spec.rb#L207)
2423
+ * [returns an empty PaginatedResult if not params match](./spec/acceptance/rest/push_admin_spec.rb#L213)
2424
+ * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L219)
2425
+ * [provides filtering](./spec/acceptance/rest/push_admin_spec.rb#L231)
2426
+ * #get (#RSH1b1)
2427
+ * [returns a DeviceDetails object if a device ID string is provided](./spec/acceptance/rest/push_admin_spec.rb#L270)
2428
+ * [returns a DeviceDetails object if a DeviceDetails object is provided](./spec/acceptance/rest/push_admin_spec.rb#L278)
2429
+ * [raises a ResourceMissing exception if device ID does not exist](./spec/acceptance/rest/push_admin_spec.rb#L286)
2430
+ * #save (#RSH1b3)
2431
+ * [saves the new DeviceDetails Hash object](./spec/acceptance/rest/push_admin_spec.rb#L325)
2432
+ * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L340)
2433
+ * [does not allow some fields to be configured](./spec/acceptance/rest/push_admin_spec.rb#L394)
2434
+ * [allows device_secret to be configured](./spec/acceptance/rest/push_admin_spec.rb#L407)
2435
+ * [saves the new DeviceDetails object](./spec/acceptance/rest/push_admin_spec.rb#L416)
2436
+ * [allows arbitrary number of subsequent saves](./spec/acceptance/rest/push_admin_spec.rb#L425)
2437
+ * [fails if data is invalid](./spec/acceptance/rest/push_admin_spec.rb#L438)
2438
+ * with GCM target
2439
+ * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L354)
2440
+ * with web target
2441
+ * [saves the associated DevicePushDetails](./spec/acceptance/rest/push_admin_spec.rb#L375)
2442
+ * #remove_where (#RSH1b5)
2443
+ * [removes all matching device registrations by client_id](./spec/acceptance/rest/push_admin_spec.rb#L484)
2444
+ * [removes device by device_id](./spec/acceptance/rest/push_admin_spec.rb#L489)
2445
+ * [succeeds even if there is no match](./spec/acceptance/rest/push_admin_spec.rb#L494)
2446
+ * #remove (#RSH1b4)
2447
+ * [removes the provided device id string](./spec/acceptance/rest/push_admin_spec.rb#L541)
2448
+ * [removes the provided DeviceDetails](./spec/acceptance/rest/push_admin_spec.rb#L546)
2449
+ * [succeeds if the item does not exist](./spec/acceptance/rest/push_admin_spec.rb#L551)
2450
+ * #channel_subscriptions (#RSH1c)
2451
+ * #list (#RSH1c1)
2452
+ * [returns a PaginatedResult object containing DeviceDetails objects](./spec/acceptance/rest/push_admin_spec.rb#L613)
2453
+ * [returns an empty PaginatedResult if params do not match](./spec/acceptance/rest/push_admin_spec.rb#L619)
2454
+ * [supports paging](./spec/acceptance/rest/push_admin_spec.rb#L625)
2455
+ * [provides filtering](./spec/acceptance/rest/push_admin_spec.rb#L637)
2456
+ * [raises an exception if none of the required filters are provided](./spec/acceptance/rest/push_admin_spec.rb#L665)
2457
+ * #list_channels (#RSH1c2)
2458
+ * [returns a PaginatedResult object containing String objects](./spec/acceptance/rest/push_admin_spec.rb#L689)
2459
+ * PENDING: *[supports paging](./spec/acceptance/rest/push_admin_spec.rb#L696)*
2460
+ * [returns an accurate number of channels after devices are deleted](./spec/acceptance/rest/push_admin_spec.rb#L714)
2461
+ * #save (#RSH1c3)
2462
+ * [saves the new client_id PushChannelSubscription Hash object](./spec/acceptance/rest/push_admin_spec.rb#L733)
2463
+ * [saves the new device_id PushChannelSubscription Hash object](./spec/acceptance/rest/push_admin_spec.rb#L744)
2464
+ * [saves the client_id PushChannelSubscription object](./spec/acceptance/rest/push_admin_spec.rb#L755)
2465
+ * [saves the device_id PushChannelSubscription object](./spec/acceptance/rest/push_admin_spec.rb#L766)
2466
+ * [allows arbitrary number of subsequent saves](./spec/acceptance/rest/push_admin_spec.rb#L777)
2467
+ * [fails if data is invalid](./spec/acceptance/rest/push_admin_spec.rb#L790)
2468
+ * #remove_where (#RSH1c5)
2469
+ * PENDING: *[removes matching channels](./spec/acceptance/rest/push_admin_spec.rb#L817)*
2470
+ * [removes matching client_ids](./spec/acceptance/rest/push_admin_spec.rb#L825)
2471
+ * [removes matching device_ids](./spec/acceptance/rest/push_admin_spec.rb#L831)
2472
+ * [device_id and client_id filters in the same request are not suppoorted](./spec/acceptance/rest/push_admin_spec.rb#L837)
2473
+ * [succeeds on no match](./spec/acceptance/rest/push_admin_spec.rb#L841)
2474
+ * #remove (#RSH1c4)
2475
+ * [removes match for Hash object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L865)
2476
+ * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L870)
2477
+ * [removes match for Hash object by channel and device_id](./spec/acceptance/rest/push_admin_spec.rb#L877)
2478
+ * [removes match for PushChannelSubscription object by channel and client_id](./spec/acceptance/rest/push_admin_spec.rb#L882)
2479
+ * [succeeds even if there is no match](./spec/acceptance/rest/push_admin_spec.rb#L889)
2480
+
2481
+ ### Ably::Rest::Push
2482
+ _(see [spec/acceptance/rest/push_spec.rb](./spec/acceptance/rest/push_spec.rb))_
2483
+ * using JSON protocol
2484
+ * #activate
2485
+ * [raises an unsupported exception](./spec/acceptance/rest/push_spec.rb#L14)
2486
+ * #deactivate
2487
+ * [raises an unsupported exception](./spec/acceptance/rest/push_spec.rb#L20)
2488
+
2268
2489
  ### Ably::Rest::Client#stats
2269
2490
  _(see [spec/acceptance/rest/stats_spec.rb](./spec/acceptance/rest/stats_spec.rb))_
2270
2491
  * using JSON protocol
@@ -2342,13 +2563,13 @@ _(see [spec/unit/logger_spec.rb](./spec/unit/logger_spec.rb))_
2342
2563
  * [uses the language provided Logger by default](./spec/unit/logger_spec.rb#L15)
2343
2564
  * with a custom Logger
2344
2565
  * with an invalid interface
2345
- * [raises an exception](./spec/unit/logger_spec.rb#L118)
2566
+ * [raises an exception](./spec/unit/logger_spec.rb#L122)
2346
2567
  * with a valid interface
2347
- * [is used](./spec/unit/logger_spec.rb#L129)
2568
+ * [is used](./spec/unit/logger_spec.rb#L133)
2348
2569
  * with blocks
2349
- * [does not call the block unless the log level is met](./spec/unit/logger_spec.rb#L144)
2570
+ * [does not call the block unless the log level is met](./spec/unit/logger_spec.rb#L151)
2350
2571
  * with an exception in the logger block
2351
- * [catches the error and continues](./spec/unit/logger_spec.rb#L159)
2572
+ * [catches the error and continues](./spec/unit/logger_spec.rb#L166)
2352
2573
 
2353
2574
  ### Ably::Models::AuthDetails
2354
2575
  _(see [spec/unit/models/auth_details_spec.rb](./spec/unit/models/auth_details_spec.rb))_
@@ -2478,25 +2699,93 @@ _(see [spec/unit/models/connection_state_change_spec.rb](./spec/unit/models/conn
2478
2699
  * invalid attributes
2479
2700
  * [raises an argument error](./spec/unit/models/connection_state_change_spec.rb#L61)
2480
2701
 
2702
+ ### Ably::Models::DeviceDetails
2703
+ _(see [spec/unit/models/device_details_spec.rb](./spec/unit/models/device_details_spec.rb))_
2704
+ * #id and #id=
2705
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/device_details_spec.rb#L16)
2706
+ * [setter accepts nil](./spec/unit/models/device_details_spec.rb#L22)
2707
+ * [rejects non string or nil values](./spec/unit/models/device_details_spec.rb#L29)
2708
+ * #platform and #platform=
2709
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/device_details_spec.rb#L16)
2710
+ * [setter accepts nil](./spec/unit/models/device_details_spec.rb#L22)
2711
+ * [rejects non string or nil values](./spec/unit/models/device_details_spec.rb#L29)
2712
+ * #form_factor and #form_factor=
2713
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/device_details_spec.rb#L16)
2714
+ * [setter accepts nil](./spec/unit/models/device_details_spec.rb#L22)
2715
+ * [rejects non string or nil values](./spec/unit/models/device_details_spec.rb#L29)
2716
+ * #client_id and #client_id=
2717
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/device_details_spec.rb#L16)
2718
+ * [setter accepts nil](./spec/unit/models/device_details_spec.rb#L22)
2719
+ * [rejects non string or nil values](./spec/unit/models/device_details_spec.rb#L29)
2720
+ * #device_secret and #device_secret=
2721
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/device_details_spec.rb#L16)
2722
+ * [setter accepts nil](./spec/unit/models/device_details_spec.rb#L22)
2723
+ * [rejects non string or nil values](./spec/unit/models/device_details_spec.rb#L29)
2724
+ * camelCase constructor attributes
2725
+ * [are rubyfied and exposed as underscore case](./spec/unit/models/device_details_spec.rb#L39)
2726
+ * [are generated when the object is serialised to JSON](./spec/unit/models/device_details_spec.rb#L43)
2727
+ * #metadata and #metadata=
2728
+ * [setter accepts a Hash value and getter returns the new value](./spec/unit/models/device_details_spec.rb#L51)
2729
+ * [setter accepts nil but always returns an empty hash](./spec/unit/models/device_details_spec.rb#L57)
2730
+ * [rejects non Hash or nil values](./spec/unit/models/device_details_spec.rb#L64)
2731
+ * #push and #push=
2732
+ * [setter accepts a DevicePushDetails object and getter returns a DevicePushDetails object](./spec/unit/models/device_details_spec.rb#L74)
2733
+ * [setter accepts a Hash value and getter returns a DevicePushDetails object](./spec/unit/models/device_details_spec.rb#L82)
2734
+ * [setter accepts nil but always returns a DevicePushDetails object](./spec/unit/models/device_details_spec.rb#L90)
2735
+ * [rejects non Hash, DevicePushDetails or nil values](./spec/unit/models/device_details_spec.rb#L98)
2736
+
2737
+ ### Ably::Models::DevicePushDetails
2738
+ _(see [spec/unit/models/device_push_details_spec.rb](./spec/unit/models/device_push_details_spec.rb))_
2739
+ * #state and #state=
2740
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/device_push_details_spec.rb#L16)
2741
+ * [setter accepts nil](./spec/unit/models/device_push_details_spec.rb#L22)
2742
+ * [rejects non string or nil values](./spec/unit/models/device_push_details_spec.rb#L29)
2743
+ * camelCase constructor attributes
2744
+ * [are rubyfied and exposed as underscore case](./spec/unit/models/device_push_details_spec.rb#L39)
2745
+ * [are generated when the object is serialised to JSON](./spec/unit/models/device_push_details_spec.rb#L44)
2746
+ * #recipient and #recipient=
2747
+ * [setter accepts a Hash value and getter returns the new value](./spec/unit/models/device_push_details_spec.rb#L52)
2748
+ * [setter accepts nil but always returns an empty hash](./spec/unit/models/device_push_details_spec.rb#L58)
2749
+ * [rejects non Hash or nil values](./spec/unit/models/device_push_details_spec.rb#L65)
2750
+ * #error_reason and #error_reason=
2751
+ * [setter accepts a ErrorInfo object and getter returns a ErrorInfo object](./spec/unit/models/device_push_details_spec.rb#L74)
2752
+ * [setter accepts a Hash value and getter returns a ErrorInfo object](./spec/unit/models/device_push_details_spec.rb#L82)
2753
+ * [setter accepts nil values](./spec/unit/models/device_push_details_spec.rb#L90)
2754
+ * [rejects non Hash, ErrorInfo or nil values](./spec/unit/models/device_push_details_spec.rb#L97)
2755
+
2481
2756
  ### Ably::Models::ErrorInfo
2482
2757
  _(see [spec/unit/models/error_info_spec.rb](./spec/unit/models/error_info_spec.rb))_
2483
- * behaves like a model
2484
- * attributes
2485
- * #code
2486
- * [retrieves attribute :code](./spec/shared/model_behaviour.rb#L15)
2487
- * #status_code
2488
- * [retrieves attribute :status_code](./spec/shared/model_behaviour.rb#L15)
2489
- * #message
2490
- * [retrieves attribute :message](./spec/shared/model_behaviour.rb#L15)
2491
- * #==
2492
- * [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
2493
- * [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
2494
- * [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
2495
- * is immutable
2496
- * [prevents changes](./spec/shared/model_behaviour.rb#L76)
2497
- * [dups options](./spec/shared/model_behaviour.rb#L80)
2498
- * #status
2499
- * [is an alias for #status_code](./spec/unit/models/error_info_spec.rb#L13)
2758
+ * #TI1, #TI4
2759
+ * behaves like a model
2760
+ * attributes
2761
+ * #code
2762
+ * [retrieves attribute :code](./spec/shared/model_behaviour.rb#L15)
2763
+ * #status_code
2764
+ * [retrieves attribute :status_code](./spec/shared/model_behaviour.rb#L15)
2765
+ * #href
2766
+ * [retrieves attribute :href](./spec/shared/model_behaviour.rb#L15)
2767
+ * #message
2768
+ * [retrieves attribute :message](./spec/shared/model_behaviour.rb#L15)
2769
+ * #==
2770
+ * [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
2771
+ * [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
2772
+ * [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
2773
+ * is immutable
2774
+ * [prevents changes](./spec/shared/model_behaviour.rb#L76)
2775
+ * [dups options](./spec/shared/model_behaviour.rb#L80)
2776
+ * #status #TI1, #TI2
2777
+ * [is an alias for #status_code](./spec/unit/models/error_info_spec.rb#L15)
2778
+ * log entries container help link #TI5
2779
+ * without an error code
2780
+ * [does not include the help URL](./spec/unit/models/error_info_spec.rb#L25)
2781
+ * with a specified error code
2782
+ * [includes https://help.ably.io/error/[CODE] in the stringified object](./spec/unit/models/error_info_spec.rb#L33)
2783
+ * with an error code and an href attribute
2784
+ * [includes the specified href in the stringified object](./spec/unit/models/error_info_spec.rb#L41)
2785
+ * with an error code and a message with the same error URL
2786
+ * [includes the specified error URL only once in the stringified object](./spec/unit/models/error_info_spec.rb#L50)
2787
+ * with an error code and a message with a different error URL
2788
+ * [includes the specified error URL from the message and the error code URL in the stringified object](./spec/unit/models/error_info_spec.rb#L58)
2500
2789
 
2501
2790
  ### Ably::Models::HttpPaginatedResponse: #HP1 -> #HP8
2502
2791
  _(see [spec/unit/models/http_paginated_result_spec.rb](./spec/unit/models/http_paginated_result_spec.rb))_
@@ -2708,109 +2997,113 @@ _(see [spec/unit/models/message_encoders/utf8_spec.rb](./spec/unit/models/messag
2708
2997
 
2709
2998
  ### Ably::Models::Message
2710
2999
  _(see [spec/unit/models/message_spec.rb](./spec/unit/models/message_spec.rb))_
2711
- * behaves like a model
2712
- * attributes
2713
- * #id
2714
- * [retrieves attribute :id](./spec/shared/model_behaviour.rb#L15)
2715
- * #name
2716
- * [retrieves attribute :name](./spec/shared/model_behaviour.rb#L15)
2717
- * #client_id
2718
- * [retrieves attribute :client_id](./spec/shared/model_behaviour.rb#L15)
2719
- * #data
2720
- * [retrieves attribute :data](./spec/shared/model_behaviour.rb#L15)
2721
- * #encoding
2722
- * [retrieves attribute :encoding](./spec/shared/model_behaviour.rb#L15)
2723
- * #==
2724
- * [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
2725
- * [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
2726
- * [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
2727
- * is immutable
2728
- * [prevents changes](./spec/shared/model_behaviour.rb#L76)
2729
- * [dups options](./spec/shared/model_behaviour.rb#L80)
3000
+ * serialization of the Message object (#RSL1j)
3001
+ * behaves like a model
3002
+ * attributes
3003
+ * #id
3004
+ * [retrieves attribute :id](./spec/shared/model_behaviour.rb#L15)
3005
+ * #name
3006
+ * [retrieves attribute :name](./spec/shared/model_behaviour.rb#L15)
3007
+ * #client_id
3008
+ * [retrieves attribute :client_id](./spec/shared/model_behaviour.rb#L15)
3009
+ * #data
3010
+ * [retrieves attribute :data](./spec/shared/model_behaviour.rb#L15)
3011
+ * #encoding
3012
+ * [retrieves attribute :encoding](./spec/shared/model_behaviour.rb#L15)
3013
+ * #==
3014
+ * [is true when attributes are the same](./spec/shared/model_behaviour.rb#L41)
3015
+ * [is false when attributes are not the same](./spec/shared/model_behaviour.rb#L46)
3016
+ * [is false when class type differs](./spec/shared/model_behaviour.rb#L50)
3017
+ * is immutable
3018
+ * [prevents changes](./spec/shared/model_behaviour.rb#L76)
3019
+ * [dups options](./spec/shared/model_behaviour.rb#L80)
3020
+ * #id (#RSL1j)
3021
+ * [exposes the #id attribute](./spec/unit/models/message_spec.rb#L25)
3022
+ * [#as_json exposes the #id attribute](./spec/unit/models/message_spec.rb#L29)
2730
3023
  * #timestamp
2731
- * [retrieves attribute :timestamp as Time object from ProtocolMessage](./spec/unit/models/message_spec.rb#L22)
3024
+ * [retrieves attribute :timestamp as Time object from ProtocolMessage](./spec/unit/models/message_spec.rb#L37)
2732
3025
  * #extras (#TM2i)
2733
3026
  * when missing
2734
- * [is nil](./spec/unit/models/message_spec.rb#L33)
3027
+ * [is nil](./spec/unit/models/message_spec.rb#L48)
2735
3028
  * when a string
2736
- * [raises an exception](./spec/unit/models/message_spec.rb#L40)
3029
+ * [raises an exception](./spec/unit/models/message_spec.rb#L55)
2737
3030
  * when a Hash
2738
- * [contains a Hash Json object](./spec/unit/models/message_spec.rb#L47)
3031
+ * [contains a Hash Json object](./spec/unit/models/message_spec.rb#L62)
2739
3032
  * when a Json Array
2740
- * [contains a Json Array object](./spec/unit/models/message_spec.rb#L54)
3033
+ * [contains a Json Array object](./spec/unit/models/message_spec.rb#L69)
2741
3034
  * #connection_id attribute
2742
3035
  * when this model has a connectionId attribute
2743
3036
  * but no protocol message
2744
- * [uses the model value](./spec/unit/models/message_spec.rb#L69)
3037
+ * [uses the model value](./spec/unit/models/message_spec.rb#L84)
2745
3038
  * with a protocol message with a different connectionId
2746
- * [uses the model value](./spec/unit/models/message_spec.rb#L77)
3039
+ * [uses the model value](./spec/unit/models/message_spec.rb#L92)
2747
3040
  * when this model has no connectionId attribute
2748
3041
  * and no protocol message
2749
- * [uses the model value](./spec/unit/models/message_spec.rb#L87)
3042
+ * [uses the model value](./spec/unit/models/message_spec.rb#L102)
2750
3043
  * with a protocol message with a connectionId
2751
- * [uses the model value](./spec/unit/models/message_spec.rb#L95)
3044
+ * [uses the model value](./spec/unit/models/message_spec.rb#L110)
2752
3045
  * initialized with
2753
3046
  * :name
2754
3047
  * as UTF_8 string
2755
- * [is permitted](./spec/unit/models/message_spec.rb#L122)
2756
- * [remains as UTF-8](./spec/unit/models/message_spec.rb#L126)
3048
+ * [is permitted](./spec/unit/models/message_spec.rb#L137)
3049
+ * [remains as UTF-8](./spec/unit/models/message_spec.rb#L141)
2757
3050
  * as SHIFT_JIS string
2758
- * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L134)
2759
- * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L138)
3051
+ * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L149)
3052
+ * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L153)
2760
3053
  * as ASCII_8BIT string
2761
- * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L146)
2762
- * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L150)
3054
+ * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L161)
3055
+ * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L165)
2763
3056
  * as Integer
2764
- * [raises an argument error](./spec/unit/models/message_spec.rb#L158)
3057
+ * [raises an argument error](./spec/unit/models/message_spec.rb#L173)
2765
3058
  * as Nil
2766
- * [is permitted](./spec/unit/models/message_spec.rb#L166)
3059
+ * [is permitted](./spec/unit/models/message_spec.rb#L181)
2767
3060
  * :client_id
2768
3061
  * as UTF_8 string
2769
- * [is permitted](./spec/unit/models/message_spec.rb#L122)
2770
- * [remains as UTF-8](./spec/unit/models/message_spec.rb#L126)
3062
+ * [is permitted](./spec/unit/models/message_spec.rb#L137)
3063
+ * [remains as UTF-8](./spec/unit/models/message_spec.rb#L141)
2771
3064
  * as SHIFT_JIS string
2772
- * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L134)
2773
- * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L138)
3065
+ * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L149)
3066
+ * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L153)
2774
3067
  * as ASCII_8BIT string
2775
- * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L146)
2776
- * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L150)
3068
+ * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L161)
3069
+ * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L165)
2777
3070
  * as Integer
2778
- * [raises an argument error](./spec/unit/models/message_spec.rb#L158)
3071
+ * [raises an argument error](./spec/unit/models/message_spec.rb#L173)
2779
3072
  * as Nil
2780
- * [is permitted](./spec/unit/models/message_spec.rb#L166)
3073
+ * [is permitted](./spec/unit/models/message_spec.rb#L181)
2781
3074
  * :encoding
2782
3075
  * as UTF_8 string
2783
- * [is permitted](./spec/unit/models/message_spec.rb#L122)
2784
- * [remains as UTF-8](./spec/unit/models/message_spec.rb#L126)
3076
+ * [is permitted](./spec/unit/models/message_spec.rb#L137)
3077
+ * [remains as UTF-8](./spec/unit/models/message_spec.rb#L141)
2785
3078
  * as SHIFT_JIS string
2786
- * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L134)
2787
- * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L138)
3079
+ * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L149)
3080
+ * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L153)
2788
3081
  * as ASCII_8BIT string
2789
- * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L146)
2790
- * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L150)
3082
+ * [gets converted to UTF-8](./spec/unit/models/message_spec.rb#L161)
3083
+ * [is compatible with original encoding](./spec/unit/models/message_spec.rb#L165)
2791
3084
  * as Integer
2792
- * [raises an argument error](./spec/unit/models/message_spec.rb#L158)
3085
+ * [raises an argument error](./spec/unit/models/message_spec.rb#L173)
2793
3086
  * as Nil
2794
- * [is permitted](./spec/unit/models/message_spec.rb#L166)
3087
+ * [is permitted](./spec/unit/models/message_spec.rb#L181)
2795
3088
  * #from_encoded (#TM3)
2796
3089
  * with no encoding
2797
- * [returns a message object](./spec/unit/models/message_spec.rb#L422)
3090
+ * [returns a message object](./spec/unit/models/message_spec.rb#L437)
2798
3091
  * with a block
2799
- * [does not call the block](./spec/unit/models/message_spec.rb#L430)
3092
+ * [does not call the block](./spec/unit/models/message_spec.rb#L445)
2800
3093
  * with an encoding
2801
- * [returns a message object](./spec/unit/models/message_spec.rb#L447)
3094
+ * [returns a message object](./spec/unit/models/message_spec.rb#L462)
2802
3095
  * with a custom encoding
2803
- * [returns a message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/message_spec.rb#L462)
3096
+ * [returns a message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/message_spec.rb#L477)
2804
3097
  * with a Cipher encoding
2805
- * [returns a message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/message_spec.rb#L481)
3098
+ * [returns a message object with the residual incompatible transforms left in the encoding property](./spec/unit/models/message_spec.rb#L496)
2806
3099
  * with invalid Cipher encoding
2807
3100
  * without a block
2808
- * [raises an exception](./spec/unit/models/message_spec.rb#L499)
3101
+ * [raises an exception](./spec/unit/models/message_spec.rb#L514)
2809
3102
  * with a block
2810
- * [calls the block with the exception](./spec/unit/models/message_spec.rb#L505)
3103
+ * [calls the block with the exception](./spec/unit/models/message_spec.rb#L520)
2811
3104
  * #from_encoded_array (#TM3)
2812
3105
  * with no encoding
2813
- * [returns an Array of message objects](./spec/unit/models/message_spec.rb#L524)
3106
+ * [returns an Array of message objects](./spec/unit/models/message_spec.rb#L539)
2814
3107
 
2815
3108
  ### Ably::Models::PaginatedResult
2816
3109
  _(see [spec/unit/models/paginated_result_spec.rb](./spec/unit/models/paginated_result_spec.rb))_
@@ -3061,6 +3354,31 @@ _(see [spec/unit/models/protocol_message_spec.rb](./spec/unit/models/protocol_me
3061
3354
  * existing in both #connection_key and #connection_details.connection_key
3062
3355
  * [returns #connection_details.connection_key as #connection_key will be deprecated > 0.8](./spec/unit/models/protocol_message_spec.rb#L385)
3063
3356
 
3357
+ ### Ably::Models::PushChannelSubscription
3358
+ _(see [spec/unit/models/push_channel_subscription_spec.rb](./spec/unit/models/push_channel_subscription_spec.rb))_
3359
+ * #channel and #channel=
3360
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/push_channel_subscription_spec.rb#L21)
3361
+ * [setter accepts nil](./spec/unit/models/push_channel_subscription_spec.rb#L27)
3362
+ * [rejects non string or nil values](./spec/unit/models/push_channel_subscription_spec.rb#L34)
3363
+ * #client_id and #client_id=
3364
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/push_channel_subscription_spec.rb#L21)
3365
+ * [setter accepts nil](./spec/unit/models/push_channel_subscription_spec.rb#L27)
3366
+ * [rejects non string or nil values](./spec/unit/models/push_channel_subscription_spec.rb#L34)
3367
+ * #device_id and #device_id=
3368
+ * [setter accepts a string value and getter returns the new value](./spec/unit/models/push_channel_subscription_spec.rb#L21)
3369
+ * [setter accepts nil](./spec/unit/models/push_channel_subscription_spec.rb#L27)
3370
+ * [rejects non string or nil values](./spec/unit/models/push_channel_subscription_spec.rb#L34)
3371
+ * camelCase constructor attributes
3372
+ * [are rubyfied and exposed as underscore case](./spec/unit/models/push_channel_subscription_spec.rb#L44)
3373
+ * [are generated when the object is serialised to JSON](./spec/unit/models/push_channel_subscription_spec.rb#L48)
3374
+ * conversion method PushChannelSubscription
3375
+ * [accepts a PushChannelSubscription object](./spec/unit/models/push_channel_subscription_spec.rb#L57)
3376
+ * #for_client_id constructor
3377
+ * with a valid object
3378
+ * [accepts a Hash object](./spec/unit/models/push_channel_subscription_spec.rb#L70)
3379
+ * with an invalid valid object
3380
+ * [accepts a Hash object](./spec/unit/models/push_channel_subscription_spec.rb#L81)
3381
+
3064
3382
  ### Ably::Models::Stats
3065
3383
  _(see [spec/unit/models/stats_spec.rb](./spec/unit/models/stats_spec.rb))_
3066
3384
  * #all stats
@@ -3509,6 +3827,9 @@ _(see [spec/unit/realtime/client_spec.rb](./spec/unit/realtime/client_spec.rb))_
3509
3827
  * [#use_tls?](./spec/unit/realtime/client_spec.rb#L23)
3510
3828
  * [#log_level](./spec/unit/realtime/client_spec.rb#L23)
3511
3829
  * [#custom_host](./spec/unit/realtime/client_spec.rb#L23)
3830
+ * push
3831
+ * [#device is not supported and raises an exception](./spec/unit/realtime/client_spec.rb#L34)
3832
+ * [#push returns a Push object](./spec/unit/realtime/client_spec.rb#L38)
3512
3833
 
3513
3834
  ### Ably::Realtime::Connection
3514
3835
  _(see [spec/unit/realtime/connection_spec.rb](./spec/unit/realtime/connection_spec.rb))_
@@ -3535,6 +3856,19 @@ _(see [spec/unit/realtime/presence_spec.rb](./spec/unit/realtime/presence_spec.r
3535
3856
  * [with a non-matching action argument has no effect](./spec/unit/realtime/presence_spec.rb#L125)
3536
3857
  * [with no block argument unsubscribes all blocks for the action argument](./spec/unit/realtime/presence_spec.rb#L131)
3537
3858
 
3859
+ ### Ably::Realtime::Channel::PushChannel
3860
+ _(see [spec/unit/realtime/push_channel_spec.rb](./spec/unit/realtime/push_channel_spec.rb))_
3861
+ * [is constructed with a channel](./spec/unit/realtime/push_channel_spec.rb#L10)
3862
+ * [raises an exception if constructed with an invalid type](./spec/unit/realtime/push_channel_spec.rb#L14)
3863
+ * [exposes the channel as attribute #channel](./spec/unit/realtime/push_channel_spec.rb#L18)
3864
+ * [is available in the #push attribute of the channel](./spec/unit/realtime/push_channel_spec.rb#L22)
3865
+ * methods not implemented as push notifications
3866
+ * [#subscribe_device raises an unsupported exception](./spec/unit/realtime/push_channel_spec.rb#L31)
3867
+ * [#subscribe_client_id raises an unsupported exception](./spec/unit/realtime/push_channel_spec.rb#L31)
3868
+ * [#unsubscribe_device raises an unsupported exception](./spec/unit/realtime/push_channel_spec.rb#L31)
3869
+ * [#unsubscribe_client_id raises an unsupported exception](./spec/unit/realtime/push_channel_spec.rb#L31)
3870
+ * [#get_subscriptions raises an unsupported exception](./spec/unit/realtime/push_channel_spec.rb#L31)
3871
+
3538
3872
  ### Ably::Realtime
3539
3873
  _(see [spec/unit/realtime/realtime_spec.rb](./spec/unit/realtime/realtime_spec.rb))_
3540
3874
  * [constructor returns an Ably::Realtime::Client](./spec/unit/realtime/realtime_spec.rb#L6)
@@ -3585,32 +3919,32 @@ _(see [spec/unit/realtime/safe_deferrable_spec.rb](./spec/unit/realtime/safe_def
3585
3919
  _(see [spec/unit/rest/channel_spec.rb](./spec/unit/rest/channel_spec.rb))_
3586
3920
  * #initializer
3587
3921
  * as UTF_8 string
3588
- * [is permitted](./spec/unit/rest/channel_spec.rb#L16)
3589
- * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L20)
3922
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L23)
3923
+ * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L27)
3590
3924
  * as frozen UTF_8 string
3591
- * [is permitted](./spec/unit/rest/channel_spec.rb#L29)
3592
- * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L33)
3925
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L36)
3926
+ * [remains as UTF-8](./spec/unit/rest/channel_spec.rb#L40)
3593
3927
  * as SHIFT_JIS string
3594
- * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L41)
3595
- * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L45)
3928
+ * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L48)
3929
+ * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L52)
3596
3930
  * as ASCII_8BIT string
3597
- * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L53)
3598
- * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L57)
3931
+ * [gets converted to UTF-8](./spec/unit/rest/channel_spec.rb#L60)
3932
+ * [is compatible with original encoding](./spec/unit/rest/channel_spec.rb#L64)
3599
3933
  * as Integer
3600
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L65)
3934
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L72)
3601
3935
  * as Nil
3602
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L73)
3936
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L80)
3603
3937
  * #publish name argument
3604
3938
  * as UTF_8 string
3605
- * [is permitted](./spec/unit/rest/channel_spec.rb#L85)
3939
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L92)
3606
3940
  * as frozen UTF_8 string
3607
- * [is permitted](./spec/unit/rest/channel_spec.rb#L94)
3941
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L101)
3608
3942
  * as SHIFT_JIS string
3609
- * [is permitted](./spec/unit/rest/channel_spec.rb#L102)
3943
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L109)
3610
3944
  * as ASCII_8BIT string
3611
- * [is permitted](./spec/unit/rest/channel_spec.rb#L110)
3945
+ * [is permitted](./spec/unit/rest/channel_spec.rb#L117)
3612
3946
  * as Integer
3613
- * [raises an argument error](./spec/unit/rest/channel_spec.rb#L118)
3947
+ * [raises an argument error](./spec/unit/rest/channel_spec.rb#L125)
3614
3948
 
3615
3949
  ### Ably::Rest::Channels
3616
3950
  _(see [spec/unit/rest/channels_spec.rb](./spec/unit/rest/channels_spec.rb))_
@@ -3698,17 +4032,38 @@ _(see [spec/unit/rest/client_spec.rb](./spec/unit/rest/client_spec.rb))_
3698
4032
  * TLS
3699
4033
  * disabled
3700
4034
  * [fails for any operation with basic auth and attempting to send an API key over a non-secure connection (#RSA1)](./spec/unit/rest/client_spec.rb#L17)
4035
+ * fallback_retry_timeout (#RSC15f)
4036
+ * default
4037
+ * [is set to 10 minutes](./spec/unit/rest/client_spec.rb#L27)
4038
+ * when provided
4039
+ * [configures a new timeout](./spec/unit/rest/client_spec.rb#L35)
3701
4040
  * :use_token_auth
3702
4041
  * set to false
3703
4042
  * with a key and :tls => false
3704
- * [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./spec/unit/rest/client_spec.rb#L28)
4043
+ * [fails for any operation with basic auth and attempting to send an API key over a non-secure connection](./spec/unit/rest/client_spec.rb#L46)
3705
4044
  * without a key
3706
- * [fails as a key is required if not using token auth](./spec/unit/rest/client_spec.rb#L36)
4045
+ * [fails as a key is required if not using token auth](./spec/unit/rest/client_spec.rb#L54)
3707
4046
  * set to true
3708
4047
  * without a key or token
3709
- * [fails as a key is required to issue tokens](./spec/unit/rest/client_spec.rb#L46)
4048
+ * [fails as a key is required to issue tokens](./spec/unit/rest/client_spec.rb#L64)
3710
4049
  * request_id generation
3711
- * [includes request_id in URL](./spec/unit/rest/client_spec.rb#L56)
4050
+ * [includes request_id in URL](./spec/unit/rest/client_spec.rb#L74)
4051
+ * push
4052
+ * [#device is not supported and raises an exception](./spec/unit/rest/client_spec.rb#L82)
4053
+ * [#push returns a Push object](./spec/unit/rest/client_spec.rb#L86)
4054
+
4055
+ ### Ably::Rest::Channel::PushChannel
4056
+ _(see [spec/unit/rest/push_channel_spec.rb](./spec/unit/rest/push_channel_spec.rb))_
4057
+ * [is constructed with a channel](./spec/unit/rest/push_channel_spec.rb#L10)
4058
+ * [raises an exception if constructed with an invalid type](./spec/unit/rest/push_channel_spec.rb#L14)
4059
+ * [exposes the channel as attribute #channel](./spec/unit/rest/push_channel_spec.rb#L18)
4060
+ * [is available in the #push attribute of the channel](./spec/unit/rest/push_channel_spec.rb#L22)
4061
+ * methods not implemented as push notifications
4062
+ * [#subscribe_device raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31)
4063
+ * [#subscribe_client_id raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31)
4064
+ * [#unsubscribe_device raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31)
4065
+ * [#unsubscribe_client_id raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31)
4066
+ * [#get_subscriptions raises an unsupported exception](./spec/unit/rest/push_channel_spec.rb#L31)
3712
4067
 
3713
4068
  ### Ably::Rest
3714
4069
  _(see [spec/unit/rest/rest_spec.rb](./spec/unit/rest/rest_spec.rb))_
@@ -3760,6 +4115,6 @@ _(see [spec/unit/util/pub_sub_spec.rb](./spec/unit/util/pub_sub_spec.rb))_
3760
4115
 
3761
4116
  ## Test summary
3762
4117
 
3763
- * Passing tests: 1852
3764
- * Pending tests: 6
3765
- * Failing tests: 0
4118
+ * Passing tests: 2045
4119
+ * Pending tests: 19
4120
+ * Failing tests: 2