Split SDK into server and device gems - #452
Open
ttypic wants to merge 1 commit into
Open
Conversation
Add ably-pubsub-server and ably-pubsub-device, two thin gems that add Ably::PubSub::Server and Ably::PubSub::Device to the namespace the ably gem provides, so that the gem an application installs names the side it runs on. Their factories return the core's clients unchanged, and they pin the core exactly, releasing in lockstep with it. Mirrors the split made in ably-python (ably/ably-python#681). Constructing Ably::Rest::Client or Ably::Realtime::Client directly now warns, naming the factory to migrate to. Ruby has no equivalent of Python's DeprecationWarning filtering, so Ably::Util::Deprecation warns once per call site and attributes the warning to the first frame outside the SDK; the factories suppress it, their callers having nothing to migrate. Neither Pub/Sub gem may define lib/ably/pubsub.rb: both would ship it and the load path would pick one, hiding the other's. Specs cover that, what each gem ships, that the three versions stay in lockstep, and the factory and deprecation behaviour. A new CI job builds all three gems. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces two new gems,
ably-pubsub-serverandably-pubsub-device, which separate the SDK into server-side and device-side components. This reflects a similar split implemented in ably-python. Each gem includes specific factories for creating appropriate core clients while ensuring strict version compatibility across the gems.Key changes:
Ably::PubSub::ServerandAbly::PubSub::Devicenamespaces for cleaner application-side usage.Ably::Rest::ClientorAbly::Realtime::Clientto guide the migration process.This change maintains functionality while improving code organization and developer experience.