ably-pubsub-server 0.0.1.pre → 2.0.0

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: ad6b933bae9be99149ec75b5a4925fb23b3da6376ac216d04201d138238dfeea
4
- data.tar.gz: d5c972097fc66b5433a8439de8f8489b2fbb56a42930cd7cc9b56aaf7e657c91
3
+ metadata.gz: 6e3fa81f26756e074238bdf824745846f0573e1dfba3baec097f63a51d68128f
4
+ data.tar.gz: 1c19771e02b4a261e3ccd631cdabda8a3dc96cb04b201338dc03a9f7309b25d7
5
5
  SHA512:
6
- metadata.gz: e608ed19fb0ca50835a40b5dbdff61a61b367d2026853ccb4026c390f8b0017f152a6affba33efa2c06252616e5c37b4c029ade7494ad803d5d0715260ee5a44
7
- data.tar.gz: a575114f1cd9570ec969eea1a52a829771cb3d4625efd0453006d67e0b701613938f3f10a6711b26ebe7ec72c1a9288cf79f72a515a8325d3980246df13a2039
6
+ metadata.gz: fcfe71f310b430264d3e69c7626723b2ab1ffca3a2f5eb0d5f8e7de6f27a1e5a68ed21a6a70a9800eea954019fb459937fd4d0e1e47f44dbbd8ffd95647af18f
7
+ data.tar.gz: 72fa578bc1ac78b35fe0d7455b3aedb8b6d007168fbb4bd31ba5e8475c46660eb25025fa0c3e039708e44b46ef4a257538404ce513f9ddc66add70ec5d6a18df
data/README.md CHANGED
@@ -13,7 +13,10 @@ gem 'ably-pubsub-server'
13
13
 
14
14
  ## Usage
15
15
 
16
- The factory functions are the only recommended entry points:
16
+ The factory functions are the only entry points. The client classes refuse direct
17
+ construction — `Ably::PubSub::Http::Client.new` and `Ably::PubSub::Realtime::Client.new` raise
18
+ `Ably::Exceptions::DirectConstructionNotSupported` — because the package a client is
19
+ created from is what declares its side, and a directly constructed client declares none.
17
20
 
18
21
  ```ruby
19
22
  require 'ably/pubsub/server'
@@ -3,7 +3,7 @@ module Ably
3
3
  module Server
4
4
  # Must match Ably::VERSION in ably-pubsub-core: core and server are released in
5
5
  # lockstep at the same version (PDR-091b). The release workflow and a spec assert this.
6
- VERSION = '0.0.1.pre'
6
+ VERSION = '2.0.0'
7
7
  end
8
8
  end
9
9
  end
@@ -3,8 +3,9 @@ require 'ably/pubsub/server/version'
3
3
 
4
4
  module Ably
5
5
  module PubSub
6
- # The Ably Pub/Sub SDK for servers. The factory functions here are the only
7
- # recommended entry points of the +ably-pubsub-server+ gem.
6
+ # The Ably Pub/Sub SDK for servers. The factory functions here are the only entry
7
+ # points of the +ably-pubsub-server+ gem: the client classes refuse direct construction
8
+ # (see {Ably::Internal}), so a client always carries the side its package declares.
8
9
  module Server
9
10
  # The agent identifier declaring the server side.
10
11
  #
@@ -24,22 +25,22 @@ module Ably
24
25
  class << self
25
26
  # Creates a stateless HTTP (REST) client declaring the server side.
26
27
  #
27
- # Accepts everything {Ably::Rest::Client#initialize} accepts: an options Hash,
28
+ # Accepts everything {Ably::PubSub::Http::Client#initialize} accepts: an options Hash,
28
29
  # an API key String, or a token String.
29
30
  #
30
- # @return [Ably::Rest::Client]
31
+ # @return [Ably::PubSub::Http::Client]
31
32
  def create_http_client(options)
32
- Ably::Rest::Client.new(options_with_side_agent(options))
33
+ Ably::Internal.create_http_client(options_with_side_agent(options))
33
34
  end
34
35
 
35
36
  # Creates a stateful realtime client declaring the server side.
36
37
  #
37
- # Accepts everything {Ably::Realtime::Client#initialize} accepts: an options Hash,
38
+ # Accepts everything {Ably::PubSub::Realtime::Client#initialize} accepts: an options Hash,
38
39
  # an API key String, or a token String.
39
40
  #
40
- # @return [Ably::Realtime::Client]
41
+ # @return [Ably::PubSub::Realtime::Client]
41
42
  def create_realtime_client(options)
42
- Ably::Realtime::Client.new(options_with_side_agent(options))
43
+ Ably::Internal.create_realtime_client(options_with_side_agent(options))
43
44
  end
44
45
 
45
46
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ably-pubsub-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ably
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-03 00:00:00.000000000 Z
11
+ date: 2026-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ably-pubsub-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.1.pre
19
+ version: 2.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.1.pre
26
+ version: 2.0.0
27
27
  description: 'Ably Pub/Sub client for servers: backend services and other trusted
28
28
  runtimes. Construct clients with Ably::PubSub::Server.create_http_client or Ably::PubSub::Server.create_realtime_client.'
29
29
  email: