ably-rest 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22f8f4f948fb0b7370cc162712522b01c1befdda518dc903a11f6c456ce2cf6d
4
- data.tar.gz: 93bdb666a8bd03813873c6a633b40ccef20fc10168d5cfd8b0ee635458762ec8
3
+ metadata.gz: f18051ab71848bfca14ce1fdde6b281ff6b4f1aa251d4a932f321de2b0ed3e00
4
+ data.tar.gz: d166a634e5f0b55a9be8474dc91a5785dd8f71e2dcbd86b105219a3f16e1813f
5
5
  SHA512:
6
- metadata.gz: 17fa88c19274cd7520f0d60c20f8fc19473dcb717b99b4e0db6ae0dff20542cc087d26321ee6f70b80861dd0ca4f448406364c86c2b9ef7a211c8a27493ab8ba
7
- data.tar.gz: 0f9a67b99ee0badb279c2a62bc648aa2e1403cbe7d8c357ef2b9c88e89a9a2fdf059b71ff86c2f44aa14ba2653d94ec165efce5b4070d739775f9c9556e2183d
6
+ metadata.gz: 8b040d73ddb0978ad5b9a53dc33dded9ce51355781c82aebe5b9a380bac46229f71161cf5561a8eb806b5425574b95c6ac189a3116d9a4f0ad28332dc372ca07
7
+ data.tar.gz: 328492908a17a0d6c45f37a2de66cf3851a89ddeaa898a6e22d87b6e0c98df8ea888c3834ebc491e68f97502471205af747a63e5c991197de72d9a6ce48d6708
data/ably-rest.gemspec CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_runtime_dependency 'faraday-typhoeus', '~> 0.2.0'
38
38
 
39
39
  spec.add_runtime_dependency 'json'
40
- spec.add_runtime_dependency 'msgpack', '=1.5.2'
40
+ spec.add_runtime_dependency 'msgpack', '>= 1.5.2', '< 2.0'
41
41
  spec.add_runtime_dependency 'addressable', '>= 2.0.0'
42
42
 
43
43
  spec.add_development_dependency 'bundler', '>= 1.3.0'
@@ -0,0 +1,112 @@
1
+ %YAML 1.2
2
+ ---
3
+ common-version: 1.2.0
4
+ compliance:
5
+ Agent Identifier:
6
+ Agents:
7
+ Runtime:
8
+ Authentication:
9
+ API Key:
10
+ Token:
11
+ Callback:
12
+ Literal:
13
+ URL:
14
+ Query Time:
15
+ Debugging:
16
+ Error Information:
17
+ Logs:
18
+ Protocol:
19
+ JSON:
20
+ Maximum Message Size:
21
+ MessagePack:
22
+ Realtime:
23
+ Channel:
24
+ Attach:
25
+
26
+ # setOptions on existing channel instance is missing (i.e. it works but is inelegant, requiring soft-deprecated mechanism)
27
+ # see:
28
+ # - https://sdk.ably.com/builds/ably/specification/main/features/#RSN3c
29
+ # - https://sdk.ably.com/builds/ably/specification/main/features/#RTS3c
30
+ Encryption:
31
+
32
+ History:
33
+ Presence:
34
+ Enter:
35
+ Client:
36
+ Get:
37
+ History:
38
+ Subscribe:
39
+ Update:
40
+ Client:
41
+ Publish:
42
+ Retry Timeout:
43
+ State Events:
44
+ Subscribe:
45
+ Rewind:
46
+ Connection:
47
+ Disconnected Retry Timeout:
48
+ Get Identifier:
49
+ Lifecycle Control:
50
+ Ping:
51
+ Recovery:
52
+ State Events:
53
+ Suspended Retry Timeout:
54
+ Message Echoes:
55
+ Message Queuing:
56
+ Transport Parameters:
57
+ REST:
58
+ Authentication:
59
+ Authorize:
60
+ Create Token Request:
61
+ Get Client Identifier:
62
+ Request Token:
63
+ Channel:
64
+ Existence Check:
65
+ Get:
66
+ History:
67
+ Iterate:
68
+ Name:
69
+ Presence:
70
+ History:
71
+ Member List:
72
+ Publish:
73
+ Idempotence:
74
+ Release:
75
+ Status:
76
+ Channel Details: # https://github.com/ably/ably-ruby/pull/365
77
+ Opaque Request:
78
+ Push Notifications Administration:
79
+ Channel Subscription:
80
+ List:
81
+ List Channels:
82
+ Remove:
83
+ Save:
84
+ Device Registration:
85
+ Get:
86
+ List:
87
+ Remove:
88
+ Save:
89
+ Publish:
90
+ Request Identifiers:
91
+ Request Timeout:
92
+ Service:
93
+ Get Time:
94
+ Statistics:
95
+ Query:
96
+ Service:
97
+ Environment:
98
+ Fallbacks:
99
+ Hosts:
100
+ Internet Up Check:
101
+ Retry Count:
102
+ Retry Duration:
103
+ Retry Timeout:
104
+ Host:
105
+ Testing:
106
+ Disable TLS:
107
+ TCP Insecure Port:
108
+ TCP Secure Port:
109
+ Transport:
110
+ Connection Open Timeout:
111
+ HTTP/2: # https://github.com/ably/ably-ruby/pull/197
112
+ Maximum Frame Size:
@@ -7,8 +7,8 @@ on:
7
7
  jobs:
8
8
  check:
9
9
  runs-on: ubuntu-latest
10
- continue-on-error: true
11
10
  strategy:
11
+ fail-fast: false
12
12
  matrix:
13
13
  ruby: [ '2.7', '3.0', '3.1' ]
14
14
  protocol: [ 'json', 'msgpack' ]
@@ -29,7 +29,6 @@ jobs:
29
29
  TEST_TYPE: ${{ matrix.type }}
30
30
  RUBY_VERSION: ${{ matrix.ruby }}
31
31
  run: |
32
- cp .github/workflows/.rspec_parallel .rspec_parallel
33
32
  mkdir junit
34
33
  bundle exec parallel_rspec --prefix-output-with-test-env-number --first-is-1 -- spec/${{ matrix.type }}
35
34
  - uses: actions/upload-artifact@v3
@@ -40,7 +39,7 @@ jobs:
40
39
  retention-days: 7
41
40
  - name: Upload test results
42
41
  if: always()
43
- uses: ably-labs/test-observability-action@main
42
+ uses: ably/test-observability-action@v1
44
43
  with:
45
44
  server-url: 'https://test-observability.herokuapp.com'
46
45
  server-auth: ${{ secrets.TEST_OBSERVABILITY_SERVER_AUTH_KEY }}
@@ -0,0 +1,14 @@
1
+ name: Features
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ build:
11
+ uses: ably/features/.github/workflows/sdk-features.yml@main
12
+ with:
13
+ repository-name: ably-ruby
14
+ secrets: inherit
@@ -1,5 +1,23 @@
1
1
  # Change Log
2
2
 
3
+ ## [v1.2.5](https://github.com/ably/ably-ruby/tree/v1.2.5)
4
+
5
+ This contains an important fix for a TLS certificate validation bug which prevented the library from being able to use Realtime fallback hosts.
6
+
7
+ [Full changelog](https://github.com/ably/ably-ruby/compare/v1.2.4...v1.2.5)
8
+
9
+ **Fixed bugs:**
10
+
11
+ - Fix server certificate validation for HTTP in Realtime [\#397](https://github.com/ably/ably-ruby/pull/397)
12
+
13
+ ## [v1.2.4](https://github.com/ably/ably-ruby/tree/v1.2.4)
14
+
15
+ [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.2.3...v1.2.4)
16
+
17
+ **Merged pull requests:**
18
+
19
+ - fix: unpin msgpack dependency minor/patch version [\#382](https://github.com/ably/ably-ruby-rest/pull/29)
20
+
3
21
  ## [v1.2.3](https://github.com/ably/ably-ruby/tree/v1.2.3)
4
22
 
5
23
  [Full Changelog](https://github.com/ably/ably-ruby/compare/v1.2.2...v1.2.3)
@@ -1,5 +1,7 @@
1
1
  # [Ably](https://ably.com)
2
2
 
3
+ [![Features](https://github.com/ably/ably-ruby/actions/workflows/features.yml/badge.svg)](https://github.com/ably/ably-ruby/actions/workflows/features.yml)
4
+
3
5
  [![Gem Version](https://img.shields.io/gem/v/ably?style=flat)](https://img.shields.io/gem/v/ably?style=flat)
4
6
  [![Coverage Status](https://coveralls.io/repos/ably/ably-ruby/badge.svg)](https://coveralls.io/r/ably/ably-ruby)
5
7
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_runtime_dependency 'eventmachine', '~> 1.2.6'
22
- spec.add_runtime_dependency 'em-http-request', '~> 1.1'
22
+ spec.add_runtime_dependency 'ably-em-http-request', '~> 1.1.8'
23
23
  spec.add_runtime_dependency 'statesman', '~> 9.0'
24
24
  spec.add_runtime_dependency 'faraday', '~> 2.2'
25
25
  spec.add_runtime_dependency 'faraday-typhoeus', '~> 0.2.0'
@@ -327,7 +327,7 @@ module Ably
327
327
  def internet_up?
328
328
  url = "http#{'s' if client.use_tls?}:#{Ably::INTERNET_CHECK.fetch(:url)}"
329
329
  EventMachine::DefaultDeferrable.new.tap do |deferrable|
330
- EventMachine::HttpRequest.new(url, tls: { verify_peer: true }).get.tap do |http|
330
+ EventMachine::AblyHttpRequest::HttpRequest.new(url, tls: { verify_peer: true }).get.tap do |http|
331
331
  http.errback do
332
332
  yield false if block_given?
333
333
  deferrable.fail Ably::Exceptions::ConnectionFailed.new("Unable to connect to #{url}", nil, Ably::Exceptions::Codes::CONNECTION_FAILED)
@@ -1,5 +1,5 @@
1
1
  module Ably
2
- VERSION = '1.2.3'
2
+ VERSION = '1.2.5'
3
3
  PROTOCOL_VERSION = '1.2'
4
4
 
5
5
  # @api private
@@ -1702,13 +1702,13 @@ describe Ably::Realtime::Connection, :event_machine do
1702
1702
  end
1703
1703
 
1704
1704
  context 'internet up URL protocol' do
1705
- let(:http_request) { double('EventMachine::HttpRequest', get: EventMachine::DefaultDeferrable.new) }
1705
+ let(:http_request) { double('EventMachine::AblyHttpRequest::HttpRequest', get: EventMachine::DefaultDeferrable.new) }
1706
1706
 
1707
1707
  context 'when using TLS for the connection' do
1708
1708
  let(:client_options) { default_options.merge(tls: true) }
1709
1709
 
1710
1710
  it 'uses TLS for the Internet check to https://internet-up.ably-realtime.com/is-the-internet-up.txt' do
1711
- expect(EventMachine::HttpRequest).to receive(:new).with('https://internet-up.ably-realtime.com/is-the-internet-up.txt', { tls: { verify_peer: true } }).and_return(http_request)
1711
+ expect(EventMachine::AblyHttpRequest::HttpRequest).to receive(:new).with('https://internet-up.ably-realtime.com/is-the-internet-up.txt', { tls: { verify_peer: true } }).and_return(http_request)
1712
1712
  connection.internet_up?
1713
1713
  stop_reactor
1714
1714
  end
@@ -1718,7 +1718,7 @@ describe Ably::Realtime::Connection, :event_machine do
1718
1718
  let(:client_options) { default_options.merge(tls: false, use_token_auth: true) }
1719
1719
 
1720
1720
  it 'uses TLS for the Internet check to http://internet-up.ably-realtime.com/is-the-internet-up.txt' do
1721
- expect(EventMachine::HttpRequest).to receive(:new).with('http://internet-up.ably-realtime.com/is-the-internet-up.txt', { tls: { verify_peer: true } }).and_return(http_request)
1721
+ expect(EventMachine::AblyHttpRequest::HttpRequest).to receive(:new).with('http://internet-up.ably-realtime.com/is-the-internet-up.txt', { tls: { verify_peer: true } }).and_return(http_request)
1722
1722
  connection.internet_up?
1723
1723
  stop_reactor
1724
1724
  end
@@ -1732,7 +1732,7 @@ describe Ably::Realtime::Connection, :event_machine do
1732
1732
  let(:client_options) { default_options.merge(tls: true) }
1733
1733
 
1734
1734
  it 'checks the Internet up URL over TLS' do
1735
- expect(EventMachine::HttpRequest).to receive(:new).with("https:#{Ably::INTERNET_CHECK.fetch(:url)}", { tls: { verify_peer: true } }).and_return(double('request', get: EventMachine::DefaultDeferrable.new))
1735
+ expect(EventMachine::AblyHttpRequest::HttpRequest).to receive(:new).with("https:#{Ably::INTERNET_CHECK.fetch(:url)}", { tls: { verify_peer: true } }).and_return(double('request', get: EventMachine::DefaultDeferrable.new))
1736
1736
  connection.internet_up?
1737
1737
  stop_reactor
1738
1738
  end
@@ -1742,7 +1742,7 @@ describe Ably::Realtime::Connection, :event_machine do
1742
1742
  let(:client_options) { default_options.merge(tls: false, use_token_auth: true) }
1743
1743
 
1744
1744
  it 'checks the Internet up URL over TLS' do
1745
- expect(EventMachine::HttpRequest).to receive(:new).with("http:#{Ably::INTERNET_CHECK.fetch(:url)}", { tls: { verify_peer: true } }).and_return(double('request', get: EventMachine::DefaultDeferrable.new))
1745
+ expect(EventMachine::AblyHttpRequest::HttpRequest).to receive(:new).with("http:#{Ably::INTERNET_CHECK.fetch(:url)}", { tls: { verify_peer: true } }).and_return(double('request', get: EventMachine::DefaultDeferrable.new))
1746
1746
  connection.internet_up?
1747
1747
  stop_reactor
1748
1748
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ably-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew O'Riordan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-04 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -84,16 +84,22 @@ dependencies:
84
84
  name: msgpack
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.5.2
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: '2.0'
90
93
  type: :runtime
91
94
  prerelease: false
92
95
  version_requirements: !ruby/object:Gem::Requirement
93
96
  requirements:
94
- - - '='
97
+ - - ">="
95
98
  - !ruby/object:Gem::Version
96
99
  version: 1.5.2
100
+ - - "<"
101
+ - !ruby/object:Gem::Version
102
+ version: '2.0'
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: addressable
99
105
  requirement: !ruby/object:Gem::Requirement
@@ -284,13 +290,15 @@ files:
284
290
  - ably-rest.gemspec
285
291
  - lib/ably-rest.rb
286
292
  - lib/ably-rest/modules/eventmachine_deferrable.rb
293
+ - lib/submodules/ably-ruby/.ably/capabilities.yaml
287
294
  - lib/submodules/ably-ruby/.editorconfig
288
- - lib/submodules/ably-ruby/.github/workflows/.rspec_parallel
289
295
  - lib/submodules/ably-ruby/.github/workflows/check.yml
290
296
  - lib/submodules/ably-ruby/.github/workflows/docs.yml
297
+ - lib/submodules/ably-ruby/.github/workflows/features.yml
291
298
  - lib/submodules/ably-ruby/.gitignore
292
299
  - lib/submodules/ably-ruby/.gitmodules
293
300
  - lib/submodules/ably-ruby/.rspec
301
+ - lib/submodules/ably-ruby/.rspec_parallel
294
302
  - lib/submodules/ably-ruby/CHANGELOG.md
295
303
  - lib/submodules/ably-ruby/COPYRIGHT
296
304
  - lib/submodules/ably-ruby/Gemfile
@@ -527,7 +535,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
527
535
  - !ruby/object:Gem::Version
528
536
  version: '0'
529
537
  requirements: []
530
- rubygems_version: 3.2.32
538
+ rubygems_version: 3.3.7
531
539
  signing_key:
532
540
  specification_version: 4
533
541
  summary: A Ruby REST only client library for ably.io realtime messaging