ably 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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/check.yml +1 -1
  3. data/CHANGELOG.md +17 -0
  4. data/README.md +24 -7
  5. data/SPEC.md +1722 -853
  6. data/ably.gemspec +1 -1
  7. data/lib/ably/auth.rb +19 -11
  8. data/lib/ably/models/protocol_message.rb +5 -26
  9. data/lib/ably/modules/safe_deferrable.rb +2 -2
  10. data/lib/ably/modules/state_emitter.rb +1 -1
  11. data/lib/ably/realtime/auth.rb +4 -0
  12. data/lib/ably/realtime/channel/channel_manager.rb +51 -48
  13. data/lib/ably/realtime/channel/channel_properties.rb +9 -0
  14. data/lib/ably/realtime/channel/channel_state_machine.rb +2 -0
  15. data/lib/ably/realtime/channel.rb +4 -3
  16. data/lib/ably/realtime/channels.rb +20 -0
  17. data/lib/ably/realtime/client/incoming_message_dispatcher.rb +14 -13
  18. data/lib/ably/realtime/client.rb +14 -6
  19. data/lib/ably/realtime/connection/connection_manager.rb +21 -22
  20. data/lib/ably/realtime/connection.rb +77 -109
  21. data/lib/ably/realtime/presence/members_map.rb +41 -92
  22. data/lib/ably/realtime/presence/presence_manager.rb +12 -17
  23. data/lib/ably/realtime/presence.rb +15 -6
  24. data/lib/ably/realtime/push.rb +0 -27
  25. data/lib/ably/realtime/recovery_key_context.rb +36 -0
  26. data/lib/ably/rest/client.rb +4 -6
  27. data/lib/ably/rest/push/admin.rb +1 -1
  28. data/lib/ably/rest/push.rb +0 -19
  29. data/lib/ably/util/ably_extensions.rb +29 -0
  30. data/lib/ably/util/crypto.rb +2 -2
  31. data/lib/ably/util/safe_deferrable.rb +1 -1
  32. data/lib/ably/version.rb +5 -7
  33. data/spec/acceptance/realtime/channel_history_spec.rb +8 -12
  34. data/spec/acceptance/realtime/channel_spec.rb +474 -300
  35. data/spec/acceptance/realtime/client_spec.rb +1 -1
  36. data/spec/acceptance/realtime/connection_failures_spec.rb +8 -25
  37. data/spec/acceptance/realtime/connection_spec.rb +28 -120
  38. data/spec/acceptance/realtime/message_spec.rb +23 -52
  39. data/spec/acceptance/realtime/presence_spec.rb +123 -92
  40. data/spec/acceptance/rest/channel_spec.rb +2 -2
  41. data/spec/acceptance/rest/client_spec.rb +9 -2
  42. data/spec/acceptance/rest/message_spec.rb +8 -11
  43. data/spec/acceptance/rest/push_admin_spec.rb +20 -15
  44. data/spec/shared/client_initializer_behaviour.rb +1 -1
  45. data/spec/support/markdown_spec_formatter.rb +1 -1
  46. data/spec/unit/models/protocol_message_spec.rb +0 -78
  47. data/spec/unit/models/token_details_spec.rb +4 -2
  48. data/spec/unit/realtime/channels_spec.rb +1 -1
  49. data/spec/unit/realtime/connection_spec.rb +0 -30
  50. data/spec/unit/realtime/recovery_key_context_spec.rb +36 -0
  51. data/spec/unit/util/crypto_spec.rb +15 -15
  52. metadata +9 -9
  53. data/spec/acceptance/realtime/push_spec.rb +0 -27
  54. data/spec/acceptance/rest/push_spec.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68b52bb2a88536595ffc25c954a5592281d13b6a3278851556da70355f009112
4
- data.tar.gz: 14eb5c1912b5c70b50f261dca05a1f4abc04aaa990aced7e6af2e11f77c28738
3
+ metadata.gz: e5e951e6d3d76d3abcf7d95bf3ffb24b0ef5a351f6862d8fe6e777971185a2ac
4
+ data.tar.gz: a548e729e3f25562630cb28ba0f57e6aba2d58525235553831b83411c08c2f12
5
5
  SHA512:
6
- metadata.gz: 875e862321b2be88fc635a8e3b93d86dff5508389814a5c1e0794b19dbf7568e93bc3a6f70749ae1c61a16d3c1b6a14cbb358dca24965fe4416408dd772ec85f
7
- data.tar.gz: ada18acd3a5cd6a709fc363b9b58366482b737584c53e0638e4d825930558916edf19f7ea72f880f67612301a49eb4178af0b66c9ae7b6fe0301fd42ea150508
6
+ metadata.gz: 78d23f620fe230ef257fa7ab9042c88479494e91f4d0ad10a07f154d79432e0b3487cc0719f5262867649bce3d874a1a2ab8a8193b7448f9700d08b28770c0a0
7
+ data.tar.gz: aaa979842c38dbfd4b65b177bee657c6278de4fa8091799259c1adad61ebf410516dc20458b2b561d4b0c7b6b20d3ba4b9b31b93c2a9c32548a000243099bd68
@@ -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:
data/CHANGELOG.md CHANGED
@@ -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.
data/README.md CHANGED
@@ -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/)).