ably-rest 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -8
  3. data/lib/submodules/ably-ruby/.github/workflows/check.yml +1 -1
  4. data/lib/submodules/ably-ruby/CHANGELOG.md +17 -0
  5. data/lib/submodules/ably-ruby/README.md +24 -7
  6. data/lib/submodules/ably-ruby/SPEC.md +1722 -853
  7. data/lib/submodules/ably-ruby/ably.gemspec +1 -1
  8. data/lib/submodules/ably-ruby/lib/ably/auth.rb +19 -11
  9. data/lib/submodules/ably-ruby/lib/ably/models/protocol_message.rb +5 -26
  10. data/lib/submodules/ably-ruby/lib/ably/modules/safe_deferrable.rb +2 -2
  11. data/lib/submodules/ably-ruby/lib/ably/modules/state_emitter.rb +1 -1
  12. data/lib/submodules/ably-ruby/lib/ably/realtime/auth.rb +4 -0
  13. data/lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_manager.rb +51 -48
  14. data/lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_properties.rb +9 -0
  15. data/lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_state_machine.rb +2 -0
  16. data/lib/submodules/ably-ruby/lib/ably/realtime/channel.rb +4 -3
  17. data/lib/submodules/ably-ruby/lib/ably/realtime/channels.rb +20 -0
  18. data/lib/submodules/ably-ruby/lib/ably/realtime/client/incoming_message_dispatcher.rb +14 -13
  19. data/lib/submodules/ably-ruby/lib/ably/realtime/client.rb +14 -6
  20. data/lib/submodules/ably-ruby/lib/ably/realtime/connection/connection_manager.rb +21 -22
  21. data/lib/submodules/ably-ruby/lib/ably/realtime/connection.rb +77 -109
  22. data/lib/submodules/ably-ruby/lib/ably/realtime/presence/members_map.rb +41 -92
  23. data/lib/submodules/ably-ruby/lib/ably/realtime/presence/presence_manager.rb +12 -17
  24. data/lib/submodules/ably-ruby/lib/ably/realtime/presence.rb +15 -6
  25. data/lib/submodules/ably-ruby/lib/ably/realtime/push.rb +0 -27
  26. data/lib/submodules/ably-ruby/lib/ably/realtime/recovery_key_context.rb +36 -0
  27. data/lib/submodules/ably-ruby/lib/ably/rest/client.rb +4 -6
  28. data/lib/submodules/ably-ruby/lib/ably/rest/push/admin.rb +1 -1
  29. data/lib/submodules/ably-ruby/lib/ably/rest/push.rb +0 -19
  30. data/lib/submodules/ably-ruby/lib/ably/util/ably_extensions.rb +29 -0
  31. data/lib/submodules/ably-ruby/lib/ably/util/crypto.rb +2 -2
  32. data/lib/submodules/ably-ruby/lib/ably/util/safe_deferrable.rb +1 -1
  33. data/lib/submodules/ably-ruby/lib/ably/version.rb +5 -7
  34. data/lib/submodules/ably-ruby/spec/acceptance/realtime/channel_history_spec.rb +8 -12
  35. data/lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb +474 -300
  36. data/lib/submodules/ably-ruby/spec/acceptance/realtime/client_spec.rb +1 -1
  37. data/lib/submodules/ably-ruby/spec/acceptance/realtime/connection_failures_spec.rb +8 -25
  38. data/lib/submodules/ably-ruby/spec/acceptance/realtime/connection_spec.rb +28 -120
  39. data/lib/submodules/ably-ruby/spec/acceptance/realtime/message_spec.rb +23 -52
  40. data/lib/submodules/ably-ruby/spec/acceptance/realtime/presence_spec.rb +123 -92
  41. data/lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb +2 -2
  42. data/lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb +9 -2
  43. data/lib/submodules/ably-ruby/spec/acceptance/rest/message_spec.rb +8 -11
  44. data/lib/submodules/ably-ruby/spec/acceptance/rest/push_admin_spec.rb +20 -15
  45. data/lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb +1 -1
  46. data/lib/submodules/ably-ruby/spec/support/markdown_spec_formatter.rb +1 -1
  47. data/lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb +0 -78
  48. data/lib/submodules/ably-ruby/spec/unit/models/token_details_spec.rb +4 -2
  49. data/lib/submodules/ably-ruby/spec/unit/realtime/channels_spec.rb +1 -1
  50. data/lib/submodules/ably-ruby/spec/unit/realtime/connection_spec.rb +0 -30
  51. data/lib/submodules/ably-ruby/spec/unit/realtime/recovery_key_context_spec.rb +36 -0
  52. data/lib/submodules/ably-ruby/spec/unit/util/crypto_spec.rb +15 -15
  53. metadata +6 -5
  54. data/lib/submodules/ably-ruby/spec/acceptance/realtime/push_spec.rb +0 -27
  55. data/lib/submodules/ably-ruby/spec/acceptance/rest/push_spec.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f18051ab71848bfca14ce1fdde6b281ff6b4f1aa251d4a932f321de2b0ed3e00
4
- data.tar.gz: d166a634e5f0b55a9be8474dc91a5785dd8f71e2dcbd86b105219a3f16e1813f
3
+ metadata.gz: 62c1883b254f4b60fa3068a2f8a168720400a27226f469ef82c432aecf0ebbfe
4
+ data.tar.gz: be4d77bc5b690059bd84114760dbd92099ff30a9cf584a20ff059e6dfc52747b
5
5
  SHA512:
6
- metadata.gz: 8b040d73ddb0978ad5b9a53dc33dded9ce51355781c82aebe5b9a380bac46229f71161cf5561a8eb806b5425574b95c6ac189a3116d9a4f0ad28332dc372ca07
7
- data.tar.gz: 328492908a17a0d6c45f37a2de66cf3851a89ddeaa898a6e22d87b6e0c98df8ea888c3834ebc491e68f97502471205af747a63e5c991197de72d9a6ce48d6708
6
+ metadata.gz: d1f6797287a76123ff62183b501e534c348052885c5c78da9352c66322a40a1c1eb406f1e55e1cc07deec10c6fbef6e255bb103a48b35041a107b909ba900690
7
+ data.tar.gz: 2d890d7652099fbab87f9b674dbb5bcc04d314826ed3407a29b6049cc1791a0e00c162df499cd5e910aed625df88007b90f11a8a794414ffbb90ef791884ac2f
data/README.md CHANGED
@@ -161,14 +161,17 @@ Please note that the bulk of this repo is in fact a submodule of the [Ably Ruby
161
161
 
162
162
  ## Release Process
163
163
 
164
- 1. From the `main` branch, `cd lib/submodules/ably-ruby`
165
- 2. `git fetch origin && git fetch --tags`
166
- 3. Reset to the tagged version released in ably-ruby, e.g. `git reset v1.0.5 --hard`
167
- 4. Ensure submodules of this submodule are up to date (`git submodule update`)
168
- 5. cd to `ably-ruby-rest`
169
- 6. Stage changes `git add .`
170
- 7. Commit version upgrade (`git commit -m "Version upgrade to v1.0.5"`)
171
- 8. Run `rake release`
164
+ 1. Create a branch for the release, named like `release/1.2.3` (where `1.2.3` is the new version number)
165
+ 2. Change dir to `cd lib/submodules/ably-ruby` and `git fetch origin && git fetch --tags`
166
+ 3. Reset to the tagged version released in ably-ruby, e.g. `git reset v1.2.3 --hard`
167
+ 4. Ensure submodules of this submodule are up to date using `git submodule update`
168
+ 5. Change dir back to root / `ably-ruby-rest`
169
+ 6. Stage changes made at submodule file `git add lib/submodules/ably-ruby`
170
+ 7. Commit the change `git commit -m "Version upgrade to v1.2.3"` and push the changes.
171
+ 8. Make a PR against `main`. Once the PR is approved, merge it into `main`
172
+ 9. Add a tag to the new `main` head commit and push to origin such as `git tag v1.2.3 && git push origin v1.2.3`
173
+ 10. 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.
174
+ 11. Run `rake release` to publish the gem to [Rubygems](https://rubygems.org/gems/ably-rest)
172
175
 
173
176
  See the [Ably Ruby release process notes](https://github.com/ably/ably-ruby#release-process).
174
177
 
@@ -10,7 +10,7 @@ jobs:
10
10
  strategy:
11
11
  fail-fast: false
12
12
  matrix:
13
- ruby: [ '2.7', '3.0', '3.1' ]
13
+ ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ]
14
14
  protocol: [ 'json', 'msgpack' ]
15
15
  type: [ 'unit', 'acceptance' ]
16
16
  steps:
@@ -1,5 +1,22 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.2.6](https://github.com/ably/ably-ruby/tree/v1.2.6)
4
+
5
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.2.5...v1.2.6)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - [ably-ruby][no-connection-serial] Implement connection resume/recover [\#393](https://github.com/ably/ably-ruby/issues/393)
10
+ - [ably-ruby][no-connection-serial] Implement missing internal presence [\#392](https://github.com/ably/ably-ruby/issues/392)
11
+ - [ably-ruby][no-connection-serial] Implement code + tests for no-connection-serial [\#378](https://github.com/ably/ably-ruby/issues/378)
12
+
13
+ **Closed issues:**
14
+
15
+ - Remove unimplemented push activation methods [\#417](https://github.com/ably/ably-ruby/issues/417)
16
+ - Failing Test - updates attach\_serial [\#415](https://github.com/ably/ably-ruby/issues/415)
17
+ - Failing Test - retrieves two pages of messages before channel was attached [\#414](https://github.com/ably/ably-ruby/issues/414)
18
+ - [ably-ruby] Fix failing tests [\#394](https://github.com/ably/ably-ruby/issues/394)
19
+
3
20
  ## [v1.2.5](https://github.com/ably/ably-ruby/tree/v1.2.5)
4
21
 
5
22
  This contains an important fix for a TLS certificate validation bug which prevented the library from being able to use Realtime fallback hosts.
@@ -7,7 +7,7 @@
7
7
 
8
8
  _[Ably](https://ably.com) is the platform that powers synchronized digital experiences in realtime. Whether attending an event in a virtual venue, receiving realtime financial information, or monitoring live car performance data – consumers simply expect realtime digital experiences as standard. Ably provides a suite of APIs to build, extend, and deliver powerful digital experiences in realtime for more than 250 million devices across 80 countries each month. Organizations like Bloomberg, HubSpot, Verizon, and Hopin depend on Ably’s platform to offload the growing complexity of business-critical realtime data synchronization at global scale. For more information, see the [Ably documentation](https://ably.com/documentation)._
9
9
 
10
- This is a Ruby client library for Ably. The library currently targets the [Ably 1.2 client library specification](https://ably.com/documentation/client-lib-development-guide/features/). You can see the complete list of features this client library supports in [our client library SDKs feature support matrix](https://ably.com/download/sdk-feature-support-matrix).
10
+ This is a Ruby client library for Ably. The library currently targets the [Ably 2.0.0 client library specification](https://ably.com/documentation/client-lib-development-guide/features/). You can see the complete list of features this client library supports in [our client library SDKs feature support matrix](https://ably.com/download/sdk-feature-support-matrix).
11
11
 
12
12
  ## Supported platforms
13
13
 
@@ -97,6 +97,14 @@ client.connection.on do |state_change|
97
97
  end
98
98
  ```
99
99
 
100
+ Retrieve connection id, state etc
101
+
102
+ ```ruby
103
+ connection_id = client.connection.id
104
+ state = client.connection.state
105
+ recovery_key = client.connection.create_recovery_key # https://ably.com/docs/connect/states?q=recovery#connection-state-recover-options
106
+ ```
107
+
100
108
  ### Subscribing to a channel
101
109
 
102
110
  Given a channel is created as follows:
@@ -331,9 +339,18 @@ To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANG
331
339
 
332
340
  This library uses [semantic versioning](http://semver.org/). For each release, the following needs to be done:
333
341
 
334
- * Update the version number in [version.rb](./lib/ably/version.rb) and commit the change.
335
- * Run [`github_changelog_generator`](https://github.com/skywinder/Github-Changelog-Generator) to automate the update of the [CHANGELOG](./CHANGELOG.md). Once the `CHANGELOG` update has completed, manually change the `Unreleased` heading and link with the current version number such as `v1.0.0`. Also ensure that the `Full Changelog` link points to the new version tag instead of the `HEAD`. Ideally, run `rake doc:spec` to generate a new [spec file](./SPEC.md). Then commit these changes.
336
- * Add a tag and push to origin such as `git tag v1.0.0 && git push origin v1.0.0`
337
- * 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.
338
- * Run `rake release` to publish the gem to [Rubygems](https://rubygems.org/gems/ably)
339
- * Release the [REST-only library `ably-ruby-rest`](https://github.com/ably/ably-ruby-rest#release-process)
342
+ 1. Create a branch for the release, named like `release/1.2.3` (where `1.2.3` is the new version number)
343
+ 2. Update the version number in [version.rb](./lib/ably/version.rb) and commit the change.
344
+ 3. Run [`github_changelog_generator`](https://github.com/github-changelog-generator/github-changelog-generator) to automate the update of the [CHANGELOG](./CHANGELOG.md). This may require some manual intervention, both in terms of how the command is run and how the change log file is modified. Your mileage may vary:
345
+ - The command you will need to run will look something like this: `github_changelog_generator -u ably -p ably-ruby --since-tag v1.2.3 --output delta.md --token $GITHUB_TOKEN_WITH_REPO_ACCESS`. Generate token [here](https://github.com/settings/tokens/new?description=GitHub%20Changelog%20Generator%20token).
346
+ - Using the command above, `--output delta.md` writes changes made after `--since-tag` to a new file
347
+ - The contents of that new file (`delta.md`) then need to be manually inserted at the top of the `CHANGELOG.md`, changing the "Unreleased" heading and linking with the current version numbers
348
+ - Also ensure that the "Full Changelog" link points to the new version tag instead of the `HEAD`
349
+ 4. Commit this change: `git add CHANGELOG.md && git commit -m "Update change log."`
350
+ 5. Ideally, run `rake doc:spec` to generate a new [spec file](./SPEC.md). Then commit these changes.
351
+ 6. Make a PR against `main`. Once the PR is approved, merge it into `main`.
352
+ 7. Add a tag to the new `main` head commit and push to origin such as `git tag v1.0.3 && git push origin v1.0.3`.
353
+ 8. 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.
354
+ 9. Run `rake release` to publish the gem to [Rubygems](https://rubygems.org/gems/ably).
355
+ 10. Release the [REST-only library `ably-ruby-rest`](https://github.com/ably/ably-ruby-rest#release-process).
356
+ 11. Create the entry on the [Ably Changelog](https://changelog.ably.com/) (via [headwayapp](https://headwayapp.co/)).