ably-rest 1.1.4.rc → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -0
  3. data/MAINTAINERS.md +1 -0
  4. data/README.md +3 -1
  5. data/ably-rest.gemspec +10 -4
  6. data/lib/ably-rest.rb +2 -0
  7. data/lib/submodules/ably-ruby/.github/workflows/check.yml +41 -0
  8. data/lib/submodules/ably-ruby/CHANGELOG.md +85 -0
  9. data/lib/submodules/ably-ruby/COPYRIGHT +1 -0
  10. data/lib/submodules/ably-ruby/LICENSE +173 -10
  11. data/lib/submodules/ably-ruby/MAINTAINERS.md +1 -0
  12. data/lib/submodules/ably-ruby/README.md +24 -18
  13. data/lib/submodules/ably-ruby/SPEC.md +1020 -922
  14. data/lib/submodules/ably-ruby/ably.gemspec +12 -7
  15. data/lib/submodules/ably-ruby/lib/ably.rb +1 -0
  16. data/lib/submodules/ably-ruby/lib/ably/agent.rb +3 -0
  17. data/lib/submodules/ably-ruby/lib/ably/auth.rb +12 -2
  18. data/lib/submodules/ably-ruby/lib/ably/exceptions.rb +6 -0
  19. data/lib/submodules/ably-ruby/lib/ably/models/connection_details.rb +2 -0
  20. data/lib/submodules/ably-ruby/lib/ably/models/message.rb +14 -0
  21. data/lib/submodules/ably-ruby/lib/ably/models/presence_message.rb +14 -0
  22. data/lib/submodules/ably-ruby/lib/ably/models/protocol_message.rb +8 -0
  23. data/lib/submodules/ably-ruby/lib/ably/modules/ably.rb +11 -1
  24. data/lib/submodules/ably-ruby/lib/ably/realtime/channel.rb +7 -11
  25. data/lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_manager.rb +3 -3
  26. data/lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_properties.rb +24 -0
  27. data/lib/submodules/ably-ruby/lib/ably/realtime/channel/publisher.rb +5 -0
  28. data/lib/submodules/ably-ruby/lib/ably/realtime/client.rb +9 -0
  29. data/lib/submodules/ably-ruby/lib/ably/realtime/client/incoming_message_dispatcher.rb +14 -6
  30. data/lib/submodules/ably-ruby/lib/ably/realtime/connection.rb +9 -5
  31. data/lib/submodules/ably-ruby/lib/ably/realtime/connection/websocket_transport.rb +67 -1
  32. data/lib/submodules/ably-ruby/lib/ably/realtime/presence.rb +0 -14
  33. data/lib/submodules/ably-ruby/lib/ably/rest/channel.rb +10 -3
  34. data/lib/submodules/ably-ruby/lib/ably/rest/client.rb +22 -21
  35. data/lib/submodules/ably-ruby/lib/ably/version.rb +1 -13
  36. data/lib/submodules/ably-ruby/spec/acceptance/realtime/auth_spec.rb +1 -1
  37. data/lib/submodules/ably-ruby/spec/acceptance/realtime/channel_history_spec.rb +25 -0
  38. data/lib/submodules/ably-ruby/spec/acceptance/realtime/channel_spec.rb +24 -0
  39. data/lib/submodules/ably-ruby/spec/acceptance/realtime/client_spec.rb +72 -16
  40. data/lib/submodules/ably-ruby/spec/acceptance/realtime/connection_failures_spec.rb +29 -12
  41. data/lib/submodules/ably-ruby/spec/acceptance/realtime/connection_spec.rb +31 -33
  42. data/lib/submodules/ably-ruby/spec/acceptance/realtime/presence_history_spec.rb +3 -59
  43. data/lib/submodules/ably-ruby/spec/acceptance/realtime/presence_spec.rb +66 -157
  44. data/lib/submodules/ably-ruby/spec/acceptance/realtime/push_admin_spec.rb +3 -19
  45. data/lib/submodules/ably-ruby/spec/acceptance/rest/auth_spec.rb +6 -75
  46. data/lib/submodules/ably-ruby/spec/acceptance/rest/base_spec.rb +8 -4
  47. data/lib/submodules/ably-ruby/spec/acceptance/rest/channel_spec.rb +13 -0
  48. data/lib/submodules/ably-ruby/spec/acceptance/rest/client_spec.rb +144 -45
  49. data/lib/submodules/ably-ruby/spec/acceptance/rest/push_admin_spec.rb +3 -19
  50. data/lib/submodules/ably-ruby/spec/shared/client_initializer_behaviour.rb +131 -8
  51. data/lib/submodules/ably-ruby/spec/shared/model_behaviour.rb +1 -1
  52. data/lib/submodules/ably-ruby/spec/spec_helper.rb +12 -2
  53. data/lib/submodules/ably-ruby/spec/support/serialization_helper.rb +21 -0
  54. data/lib/submodules/ably-ruby/spec/unit/models/message_spec.rb +59 -0
  55. data/lib/submodules/ably-ruby/spec/unit/models/presence_message_spec.rb +49 -0
  56. data/lib/submodules/ably-ruby/spec/unit/models/protocol_message_spec.rb +48 -0
  57. data/lib/submodules/ably-ruby/spec/unit/realtime/channel_spec.rb +1 -1
  58. data/lib/submodules/ably-ruby/spec/unit/realtime/client_spec.rb +19 -6
  59. data/lib/submodules/ably-ruby/spec/unit/realtime/incoming_message_dispatcher_spec.rb +38 -0
  60. data/lib/submodules/ably-ruby/spec/unit/rest/channel_spec.rb +10 -0
  61. data/lib/submodules/ably-ruby/spec/unit/rest/client_spec.rb +20 -0
  62. data/spec/spec_helper.rb +5 -0
  63. data/spec/unit/client_spec.rb +30 -0
  64. metadata +56 -20
  65. data/lib/submodules/ably-ruby/.travis.yml +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12d0c3187eec6e03160420f9266a02e4b57017c45cc9792cb701644bd594b8f6
4
- data.tar.gz: c5c0a1da2d5f750452b3693ea616c58ddb9bf925afc7a6766859668293241adb
3
+ metadata.gz: 7659b0cedefa5a7fc2fac80943180fd2481d3d77009e2af3f0f1fbadc29d8836
4
+ data.tar.gz: 06f38a1702296b58f954a42a5e4529218ec7c56c739853ae999df3027799f775
5
5
  SHA512:
6
- metadata.gz: f321aa69c45f938136ab02c5fd466cc33b661a6481b5244edf8d4eca1090879c9bb1b568d181794a88df623bb971ac3fd5da879b9df012a110a247ae86807eed
7
- data.tar.gz: b4df91228d73641db9ce8b9ed3e98420c0ada82cd657d0122dacc471307104932c13be50938d0f8b14b5a68b51e12ae475f962235d5e05097aad811388cb5c3d
6
+ metadata.gz: 3d18d6cd5713ca720e1b9d46f128839a5cd170a123e617cf4f59151bd1e813b115d65131ad96b9253c97e6291f077d7c61a8028f730fd954f92c5322f032d912
7
+ data.tar.gz: ea915f9b62a67534222a3342ef8e80a5c7da6aa6c3ccc4e253cfa30c1317aa06909918a8b700fc2671119e4d667a0d9727158c1a8281a44bae940ccb32684269
data/.travis.yml CHANGED
@@ -8,6 +8,9 @@ rvm:
8
8
  - 2.2.0
9
9
  - 2.3.6
10
10
  - 2.4.1
11
+ - 2.6.7
12
+ - 2.7.3
13
+ - 3.0.0
11
14
  before_install:
12
15
  - git submodule update --init --recursive
13
16
  script: bundle exec rspec
data/MAINTAINERS.md ADDED
@@ -0,0 +1 @@
1
+ This repository is owned by the Ably SDK team.
data/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/ably-rest.svg)](http://badge.fury.io/rb/ably-rest)
4
4
 
5
- A Ruby REST client library for [www.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.
5
+ _[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)._
6
+
7
+ This is a Ruby REST client library for Ably. The 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.
6
8
 
7
9
  ## Documentation
8
10
 
data/ably-rest.gemspec CHANGED
@@ -32,6 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.require_paths = ['lib']
33
33
 
34
34
  spec.add_runtime_dependency 'faraday', '~> 1.0'
35
+ spec.add_runtime_dependency 'excon', '~> 0.55'
35
36
  spec.add_runtime_dependency 'typhoeus', '~> 1.4'
36
37
 
37
38
  if RUBY_VERSION.match(/^1/)
@@ -42,11 +43,12 @@ Gem::Specification.new do |spec|
42
43
  spec.add_runtime_dependency 'msgpack', '>= 0.6.2'
43
44
  spec.add_runtime_dependency 'addressable', '>= 2.0.0'
44
45
 
45
- spec.add_development_dependency 'rake', '~> 13.0'
46
- spec.add_development_dependency 'bundler', '~> 2.2.1'
46
+ spec.add_development_dependency 'bundler', '>= 1.3.0'
47
+ spec.add_development_dependency 'rake', '~> 11.3'
47
48
  spec.add_development_dependency 'redcarpet', '~> 3.3'
48
- spec.add_development_dependency 'rspec', '~> 3.10.0'
49
- spec.add_development_dependency 'rspec-retry', '~> 0.6'
49
+ spec.add_development_dependency 'rspec', '~> 3.2.0'
50
+ spec.add_development_dependency 'rspec-retry', '~> 0.4'
51
+ spec.add_development_dependency 'webrick'
50
52
  spec.add_development_dependency 'yard', '~> 0.9'
51
53
 
52
54
  if RUBY_VERSION.match(/^1/)
@@ -58,4 +60,8 @@ Gem::Specification.new do |spec|
58
60
  spec.add_development_dependency 'pry'
59
61
  spec.add_development_dependency 'pry-byebug'
60
62
  end
63
+
64
+ if RUBY_VERSION.match(/^3\./)
65
+ spec.add_development_dependency 'webrick'
66
+ end
61
67
  end
data/lib/ably-rest.rb CHANGED
@@ -31,4 +31,6 @@ require 'ably/rest'
31
31
  module Ably
32
32
  # Used to alter the user agent to ably-rest-[VERSION]
33
33
  configure_lib_variant = 'rest'
34
+
35
+ AGENT = "ably-ruby/#{Ably::VERSION} ruby/#{RUBY_VERSION} ably-ruby-rest"
34
36
  end
@@ -0,0 +1,41 @@
1
+ on:
2
+ pull_request:
3
+ push:
4
+ branches:
5
+ - main
6
+
7
+ jobs:
8
+ check:
9
+ runs-on: ubuntu-latest
10
+ continue-on-error: true
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.5', '2.6', '2.7', '3.0' ]
14
+ protocol: [ 'json', 'msgpack' ]
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ with:
18
+ submodules: 'recursive'
19
+ - uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ bundler-cache: true
23
+ - env:
24
+ RSPEC_RETRY: true
25
+ PARALLEL_TEST_PROCESSORS: 2
26
+ PROTOCOL: ${{ matrix.protocol }}
27
+ run: ./spec/run_parallel_tests
28
+ - uses: coverallsapp/github-action@1.1.3
29
+ with:
30
+ github-token: ${{ secrets.GITHUB_TOKEN }}
31
+ flag-name: run-ruby_${{ matrix.ruby }}-${{ matrix.protocol }}_protocol
32
+ parallel: true
33
+ finish:
34
+ needs: check
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - name: Coveralls Finished
38
+ uses: coverallsapp/github-action@1.1.3
39
+ with:
40
+ github-token: ${{ secrets.github_token }}
41
+ parallel-finished: true
@@ -1,5 +1,90 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.1.7](https://github.com/ably/ably-ruby/tree/v1.1.7)
4
+
5
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.6...v1.1.7)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Implement RSC7d \(Ably-Agent header\) [\#230](https://github.com/ably/ably-ruby/issues/230)
10
+ - Support Ruby 3.x [\#220](https://github.com/ably/ably-ruby/issues/220)
11
+
12
+ **Closed issues:**
13
+
14
+ - Create code snippets for homepage \(ruby\) [\#249](https://github.com/ably/ably-ruby/issues/249)
15
+ - Update client options support to 1.1 spec level \(maxMessageSize\) [\#247](https://github.com/ably/ably-ruby/issues/247)
16
+ - Update client options support to 1.1 spec level \(maxFrameSize\) [\#245](https://github.com/ably/ably-ruby/issues/245)
17
+
18
+ **Merged pull requests:**
19
+
20
+ - Enabled TLS hostname validation CVE-2020-13482 [\#263](https://github.com/ably/ably-ruby/pull/263) ([lukaszsliwa](https://github.com/lukaszsliwa))
21
+ - Ruby 3.0 support [\#260](https://github.com/ably/ably-ruby/pull/260) ([lukaszsliwa](https://github.com/lukaszsliwa))
22
+ - TO3l9 Max frame size [\#259](https://github.com/ably/ably-ruby/pull/259) ([lukaszsliwa](https://github.com/lukaszsliwa))
23
+ - Update client options support to 1.1 spec level \(maxMessageSize\) [\#252](https://github.com/ably/ably-ruby/pull/252) ([lukaszsliwa](https://github.com/lukaszsliwa))
24
+ - Update ably-common to latest main [\#251](https://github.com/ably/ably-ruby/pull/251) ([owenpearson](https://github.com/owenpearson))
25
+ - Implement RSC7d \(Ably-Agent header\) [\#248](https://github.com/ably/ably-ruby/pull/248) ([lukaszsliwa](https://github.com/lukaszsliwa))
26
+ - Upgrade statesman to ~\> 8.0 [\#237](https://github.com/ably/ably-ruby/pull/237) ([darkhelmet](https://github.com/darkhelmet))
27
+ - Update attach\_serial before emiting UPDATE event [\#228](https://github.com/ably/ably-ruby/pull/228) ([TheSmartnik](https://github.com/TheSmartnik))
28
+
29
+ ## [v1.1.6](https://github.com/ably/ably-ruby/tree/v1.1.6)
30
+
31
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.5...v1.1.6)
32
+
33
+ This release will have no effect for users of the realtime `ably-ruby` client, however for users of `ably-ruby-rest` it will update the `faraday` dependency to 1.x (this change was already made for `ably-ruby` in `v1.1.5`).
34
+
35
+ **Merged pull requests:**
36
+
37
+ - Document libcurl requirement [\#243](https://github.com/ably/ably-ruby/pull/243) ([owenpearson](https://github.com/owenpearson))
38
+ - Fix broken markdown hyperlink in readme [\#242](https://github.com/ably/ably-ruby/pull/242) ([owenpearson](https://github.com/owenpearson))
39
+ - Update README with new Ably links [\#239](https://github.com/ably/ably-ruby/pull/239) ([mattheworiordan](https://github.com/mattheworiordan))
40
+ - Fix documentation for Channel\#publish [\#183](https://github.com/ably/ably-ruby/pull/183) ([zreisman](https://github.com/zreisman))
41
+
42
+ ## [v1.1.5](https://github.com/ably/ably-ruby/tree/v1.1.5)
43
+
44
+ Please note: this library now depends on `libcurl` as a system dependency. On most systems this is already installed but in rare cases where it isn't (for example debian-slim Docker images such as ruby-slim) you will need to install it yourself. On debian you can install it with the command `sudo apt-get install libcurl4`.
45
+
46
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.4...v.1.1.5)
47
+
48
+ **Implemented enhancements:**
49
+
50
+ - Upgrade to support HTTP/2 [\#192](https://github.com/ably/ably-ruby/issues/192), fixed in [\#197](https://github.com/ably/ably-ruby/pull/197) ([mattheworiordan](https://github.com/mattheworiordan))
51
+ - Default fallback hosts for custom environments [\#232](https://github.com/ably/ably-ruby/issues/232), fixed in [\#196](https://github.com/ably/ably-ruby/pull/196) ([mattheworiordan](https://github.com/mattheworiordan), [owenpearson](https://github.com/owenpearson), [lmars](https://github.com/lmars))
52
+
53
+ ## [v1.1.4](https://github.com/ably/ably-ruby/tree/v1.1.4)
54
+
55
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.3...v1.1.4)
56
+
57
+ **Implemented enhancements:**
58
+
59
+ - statesman dependency very outdated [\#199](https://github.com/ably/ably-ruby/issues/199)
60
+ - Add support for custom transportParams [\#176](https://github.com/ably/ably-ruby/issues/176)
61
+ - Re-enable imempotency tests as part of 1.1 release [\#174](https://github.com/ably/ably-ruby/issues/174)
62
+ - Ensure request method accepts UPDATE, PATCH & DELETE verbs [\#168](https://github.com/ably/ably-ruby/issues/168)
63
+ - my-members presenceMap requirement change for 1.1 [\#163](https://github.com/ably/ably-ruby/issues/163)
64
+ - Add ChannelProperties as part of 1.0 spec \(RTL15\) [\#112](https://github.com/ably/ably-ruby/issues/112)
65
+
66
+ **Fixed bugs:**
67
+
68
+ - client\_id should be passed as clientId [\#159](https://github.com/ably/ably-ruby/issues/159)
69
+ - Error in the HTTP2 framing layer issue before heroku-20 [\#215](https://github.com/ably/ably-ruby/issues/215)
70
+ - Using a clientId should no longer be forcing token auth in the 1.1 spec [\#182](https://github.com/ably/ably-ruby/issues/182)
71
+
72
+ **Merged pull requests:**
73
+
74
+ - Continue running all workflow jobs when one fails [\#235](https://github.com/ably/ably-ruby/pull/235) ([owenpearson](https://github.com/owenpearson))
75
+ - Set SNI hostname and verify peer certificates when using TLS [\#234](https://github.com/ably/ably-ruby/pull/234) ([lmars](https://github.com/lmars))
76
+ - Validate that members presenceMap does not change on synthesized leave [\#231](https://github.com/ably/ably-ruby/pull/231) ([TheSmartnik](https://github.com/TheSmartnik))
77
+ - Conform license and copyright [\#229](https://github.com/ably/ably-ruby/pull/229) ([QuintinWillison](https://github.com/QuintinWillison))
78
+ - Add ChannelProperties \(RTL15\) [\#227](https://github.com/ably/ably-ruby/pull/227) ([TheSmartnik](https://github.com/TheSmartnik))
79
+ - Replace fury badges with shields.io [\#226](https://github.com/ably/ably-ruby/pull/226) ([owenpearson](https://github.com/owenpearson))
80
+ - Add transport\_params option to realtime client \(RTC1f1\) [\#224](https://github.com/ably/ably-ruby/pull/224) ([TheSmartnik](https://github.com/TheSmartnik))
81
+ - Use GitHub actions [\#223](https://github.com/ably/ably-ruby/pull/223) ([owenpearson](https://github.com/owenpearson))
82
+ - Add support for delete, patch, put method in \#request [\#218](https://github.com/ably/ably-ruby/pull/218) ([TheSmartnik](https://github.com/TheSmartnik))
83
+ - Upgrade statesman [\#217](https://github.com/ably/ably-ruby/pull/217) ([TheSmartnik](https://github.com/TheSmartnik))
84
+ - Remove until\_attach option for presence history [\#216](https://github.com/ably/ably-ruby/pull/216) ([TheSmartnik](https://github.com/TheSmartnik))
85
+ - Update Travis CI versions [\#214](https://github.com/ably/ably-ruby/pull/214) ([TheSmartnik](https://github.com/TheSmartnik))
86
+ - Add maintainers file [\#213](https://github.com/ably/ably-ruby/pull/213) ([niksilver](https://github.com/niksilver))
87
+
3
88
  ## [v1.1.3](https://github.com/ably/ably-ruby/tree/v1.1.3)
4
89
 
5
90
  [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.1.2...v1.1.3)
@@ -0,0 +1 @@
1
+ Copyright 2015-2021 Ably Real-time Ltd (ably.com)
@@ -1,13 +1,176 @@
1
- Copyright 2015-2020 Ably Real-time Ltd (ably.com)
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
2
4
 
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
6
 
7
- http://www.apache.org/licenses/LICENSE-2.0
7
+ 1. Definitions.
8
8
 
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1 @@
1
+ This repository is owned by the Ably SDK team.
@@ -1,29 +1,25 @@
1
- # [Ably](https://www.ably.io)
1
+ # [Ably](https://ably.com)
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/ably.svg)](http://badge.fury.io/rb/ably)
3
+ [![Gem Version](https://img.shields.io/gem/v/ably?style=flat)](https://img.shields.io/gem/v/ably?style=flat)
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. 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.
6
+ _[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)._
7
7
 
8
- ## Supported platforms
9
-
10
- This SDK supports Ruby 1.9.3+.
8
+ This is a Ruby client library for Ably. The library currently targets the [Ably 1.1 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
9
 
12
- We regression-test the SDK against a selection of Ruby versions (which we update over time, but usually consists of mainstream and widely used versions). Please refer to [.travis.yml](./.travis.yml) for the set of versions that currently undergo CI testing.
10
+ ## Supported platforms
13
11
 
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.
12
+ This SDK supports Ruby 1.9.3+. For eventmachine and Ruby 3.0 note please visit [Ruby 3.0 support](#ruby-30-support) section.
15
13
 
16
- ## Known Limitations
14
+ As of v1.1.5 this library requires `libcurl` as a system dependency. On most systems this is already installed but in rare cases where it isn't (for example debian-slim Docker images such as ruby-slim) you will need to install it yourself. On debian you can install it with the command `sudo apt-get install libcurl4`.
17
15
 
18
- This client library is currently *not compatible* with some of the Ably features:
16
+ We regression-test the SDK against a selection of Ruby versions (which we update over time, but usually consists of mainstream and widely used versions). Please refer to [.github/workflows/check.yml](./.github/workflows/check.yml) for the set of versions that currently undergo CI testing.
19
17
 
20
- | Feature |
21
- | :--- |
22
- | [Custom transportParams](https://www.ably.io/documentation/realtime/connection#client-options) |
18
+ 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://ably.com/support/) for advice.
23
19
 
24
20
  ## Documentation
25
21
 
26
- Visit https://www.ably.io/documentation for a complete API reference and more examples.
22
+ Visit https://ably.com/documentation for a complete API reference and code examples.
27
23
 
28
24
  ## Installation
29
25
 
@@ -43,7 +39,7 @@ Or install it yourself as:
43
39
 
44
40
  ### Using with Rails or Sinatra
45
41
 
46
- This `ably` gem provides both a [Realtime](http://www.ably.io/documentation/realtime/usage) and [REST](http://www.ably.io/documentation/rest/usage) version of the Ably library. Realtime depends on EventMachine to provide an asynchronous evented framework to run the library in, whereas the REST library depends only on synchronous libraries such as Faraday.
42
+ This `ably` gem provides both a [Realtime](https://ably.com/documentation/realtime/usage) and [REST](https://ably.com/documentation/rest/usage) version of the Ably library. Realtime depends on EventMachine to provide an asynchronous evented framework to run the library in, whereas the REST library depends only on synchronous libraries such as Faraday.
47
43
 
48
44
  If you are using Ably within your Rails or Sinatra apps, more often than not, you probably want to use the REST only version of the library that has no dependency on EventMachine and provides a synchronous API that you will be used to using within Rails and Sinatra. [See the REST only Ruby version of the Ably library](https://github.com/ably/ably-ruby-rest).
49
45
 
@@ -69,7 +65,7 @@ client = Ably::Realtime.new(key: 'xxxxx')
69
65
  client = Ably::Realtime.new(token: 'xxxxx')
70
66
  ```
71
67
 
72
- If you do not have an API key, [sign up for a free API key now](https://www.ably.io/signup)
68
+ If you do not have an API key, [sign up for a free API key now](https://ably.com/signup)
73
69
 
74
70
  ### Connection
75
71
 
@@ -195,7 +191,7 @@ channel.publish "name (not encrypted)", "sensitive data (encrypted before being
195
191
 
196
192
  ### Introduction
197
193
 
198
- Unlike the Realtime API, all calls are synchronous and are not run within an [EventMachine](https://github.com/eventmachine/eventmachine) [reactor](https://github.com/eventmachine/eventmachine/wiki/General-Introduction).
194
+ Unlike the Realtime API, all calls are synchronous and are not run within [EventMachine](https://github.com/eventmachine/eventmachine).
199
195
 
200
196
  All examples assume a client and/or channel has been created as follows:
201
197
 
@@ -293,6 +289,16 @@ stats_page.next # retrieves the next page => #<Ably::Models::PaginatedResult ...
293
289
  client.time #=> 2013-12-12 14:23:34 +0000
294
290
  ```
295
291
 
292
+ ## Ruby 3.0 support
293
+
294
+ If you cannot install ably realtime gem because of eventmachine openssl problems, please try to set your `openssl-dir`, i.e.:
295
+
296
+ ```ruby
297
+ gem install eventmachine -- --with-openssl-dir=/usr/local/opt/openssl@1.1
298
+ ```
299
+
300
+ More about eventmachine and ruby 3.0 support here https://github.com/eventmachine/eventmachine/issues/932
301
+
296
302
  ## Dependencies
297
303
 
298
304
  If you only need to use the REST features of this library and do not want EventMachine as a dependency, then you should consider using the [Ably Ruby REST gem](https://rubygems.org/gems/ably-rest).
@@ -303,7 +309,7 @@ If you only need to use the REST features of this library and do not want EventM
303
309
 
304
310
  ## Support, feedback and troubleshooting
305
311
 
306
- Please visit http://support.ably.io/ for access to our knowledgebase and to ask for any assistance.
312
+ Please visit https://ably.com/support for access to our knowledgebase and to ask for any assistance.
307
313
 
308
314
  You can also view the [community reported Github issues](https://github.com/ably/ably-ruby/issues).
309
315