Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
publish:
environment:
name: 'pub.dev'
url: 'https://pub.dev/packages/ably'
url: 'https://pub.dev/packages/ably_pubsub_device'
permissions:
contents: read
id-token: write # This is required for requesting the JWT
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Changelog

## [0.2.0](https://github.com/ably/ably-flutter/tree/v0.2.0)
## [0.2.0](https://github.com/ably/ably-pubsub-dart/tree/v0.2.0)

[Full Changelog](https://github.com/ably/ably-flutter/compare/v0.1.0...v0.2.0)
[Full Changelog](https://github.com/ably/ably-pubsub-dart/compare/v0.1.0...v0.2.0)

- Refine heartbeat handling logic and improve logging for protocol message sending [#10](https://github.com/ably/ably-flutter/pull/10)
- Refine heartbeat handling logic and improve logging for protocol message sending [#10](https://github.com/ably/ably-pubsub-dart/pull/10)

## [0.1.0](https://github.com/ably/ably-dart/tree/v0.1.0)
## [0.1.0](https://github.com/ably/ably-pubsub-dart/tree/v0.1.0)

Initial release of the Ably Pub/Sub Dart SDK.

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![pub package](https://img.shields.io/pub/v/ably.svg)](https://pub.dev/packages/ably)
[![pub package](https://img.shields.io/pub/v/ably_pubsub_device.svg)](https://pub.dev/packages/ably_pubsub_device)
[![License](https://img.shields.io/github/license/ably/ably-pubsub-dart)](https://github.com/ably/ably-pubsub-dart/blob/main/LICENSE)

---
Expand Down Expand Up @@ -38,11 +38,11 @@ This is a pure Dart package with no platform-specific dependencies. It runs anyw

## Installation

The Dart SDK is available as a [pub.dev package](https://pub.dev/packages/ably). Add it to your `pubspec.yaml`:
The Dart SDK is available as a [pub.dev package](https://pub.dev/packages/ably_pubsub_device). Add it to your `pubspec.yaml`:

```yaml
dependencies:
ably: ^0.2.0
ably_pubsub_device: ^0.2.0
```

Then run:
Expand All @@ -58,7 +58,7 @@ dart pub get
Use the REST client for stateless operations like publishing messages and querying history:

```dart
import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';

// Create a REST client
final rest = RestClient(options: ClientOptions(key: 'your-ably-api-key'));
Expand All @@ -81,7 +81,7 @@ for (final message in history.items) {
Use the Realtime client for persistent connections with live message delivery:

```dart
import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';

// Create a Realtime client
final realtime = RealtimeClient(
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ably Dart SDK — Example App

A Flutter application demonstrating the [ably](https://pub.dev/packages/ably) Dart SDK. Runs on macOS, Linux, Windows, Web, Android, and iOS.
A Flutter application demonstrating the [ably_pubsub_device](https://pub.dev/packages/ably_pubsub_device) Dart SDK. Runs on macOS, Linux, Windows, Web, Android, and iOS.

## What it demonstrates

Expand Down
2 changes: 1 addition & 1 deletion example/lib/nested_realtime_events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import 'dart:async';

import 'package:ably/ably.dart' as ably;
import 'package:ably_pubsub_device/ably_pubsub_device.dart' as ably;

/// This method is a demonstration on how to use multiple listeners
/// with realtime connection state change listeners as an example
Expand Down
2 changes: 1 addition & 1 deletion example/lib/ui/ably_service.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:ably/ably.dart' as ably;
import 'package:ably_pubsub_device/ably_pubsub_device.dart' as ably;
import 'package:ably_example/constants.dart';
import 'package:ably_example/ui/api_key_service.dart';

Expand Down
2 changes: 1 addition & 1 deletion example/lib/ui/paginated_result_viewer.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:ably/ably.dart' as ably;
import 'package:ably_pubsub_device/ably_pubsub_device.dart' as ably;
import 'package:ably_example/ui/text_row.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
Expand Down
2 changes: 1 addition & 1 deletion example/lib/ui/realtime_presence_sliver.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:ably/ably.dart' as ably;
import 'package:ably_pubsub_device/ably_pubsub_device.dart' as ably;
import 'package:ably_example/constants.dart';
import 'package:ably_example/ui/paginated_result_viewer.dart';
import 'package:ably_example/ui/text_row.dart';
Expand Down
2 changes: 1 addition & 1 deletion example/lib/ui/realtime_sliver.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:ably/ably.dart' as ably;
import 'package:ably_pubsub_device/ably_pubsub_device.dart' as ably;
import 'package:ably_example/constants.dart';
import 'package:ably_example/ui/ably_service.dart';
import 'package:ably_example/ui/paginated_result_viewer.dart';
Expand Down
2 changes: 1 addition & 1 deletion example/lib/ui/rest_sliver.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:ably/ably.dart' as ably;
import 'package:ably_pubsub_device/ably_pubsub_device.dart' as ably;
import 'package:ably_example/constants.dart';
import 'package:ably_example/ui/paginated_result_viewer.dart';
import 'package:ably_example/ui/text_row.dart';
Expand Down
2 changes: 1 addition & 1 deletion example/lib/ui/utilities.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'dart:typed_data';

import 'package:ably/ably.dart' as ably;
import 'package:ably_pubsub_device/ably_pubsub_device.dart' as ably;
import 'package:crypto/crypto.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ably_example
description: Example Flutter app for the ably Dart SDK.
description: Example Flutter app for the ably_pubsub_device Dart SDK.
publish_to: none

environment:
Expand All @@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
ably:
ably_pubsub_device:
path: ../
http: ^1.2.0
retry: ^3.1.2
Expand Down
2 changes: 1 addition & 1 deletion lib/ably.dart → lib/ably_pubsub_device.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Ably SDK for Dart.
///
/// This library provides a pure Dart implementation of the Ably REST and Realtime APIs.
library ably;
library ably_pubsub_device;

// Authentication
export 'src/auth/auth.dart';
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ably
description: Ably REST SDK for Dart - A pure Dart implementation of the Ably REST API.
name: ably_pubsub_device
description: Ably PubSub device SDK for Dart - A pure Dart implementation of the Ably API.
version: 0.2.0
homepage: https://github.com/ably/ably-pubsub-dart
repository: https://github.com/ably/ably-pubsub-dart
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/fake_timer_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:async';

import 'package:clock/clock.dart';

import 'package:ably/src/realtime/timer_manager.dart';
import 'package:ably_pubsub_device/src/realtime/timer_manager.dart';

/// A controllable fake clock for testing.
///
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/mock_vcdiff.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'dart:typed_data';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';

/// Mock VCDiff encoder for constructing test delta payloads.
///
Expand Down
6 changes: 3 additions & 3 deletions test/helpers/mock_websocket_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';

import 'package:ably/src/error/error_info.dart';
import 'package:ably/src/realtime/protocol_message.dart';
import 'package:ably/src/realtime/websocket_client.dart';
import 'package:ably_pubsub_device/src/error/error_info.dart';
import 'package:ably_pubsub_device/src/realtime/protocol_message.dart';
import 'package:ably_pubsub_device/src/realtime/websocket_client.dart';

/// Callback for handling connection attempts in the mock WebSocket client.
typedef ConnectionAttemptHandler = void Function(
Expand Down
6 changes: 3 additions & 3 deletions test/helpers/mock_websocket_client_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:ably/src/error/error_info.dart';
import 'package:ably/src/realtime/protocol_message.dart';
import 'package:ably/src/realtime/websocket_client.dart';
import 'package:ably_pubsub_device/src/error/error_info.dart';
import 'package:ably_pubsub_device/src/realtime/protocol_message.dart';
import 'package:ably_pubsub_device/src/realtime/websocket_client.dart';
import 'package:test/test.dart';
import 'mock_websocket_client.dart';
import 'protocol_message_helpers.dart';
Expand Down
8 changes: 4 additions & 4 deletions test/helpers/protocol_message_helpers.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:ably/src/error/error_info.dart';
import 'package:ably/src/realtime/protocol_message.dart';
import 'package:ably/src/realtime/publish_result.dart';
import 'package:ably/src/message/message.dart';
import 'package:ably_pubsub_device/src/error/error_info.dart';
import 'package:ably_pubsub_device/src/realtime/protocol_message.dart';
import 'package:ably_pubsub_device/src/realtime/publish_result.dart';
import 'package:ably_pubsub_device/src/message/message.dart';

/// Helper functions for creating common protocol messages in tests.
class ProtocolMessageHelpers {
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/test_client.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:ably/src/impl/base_client_impl.dart';
import 'package:ably_pubsub_device/src/impl/base_client_impl.dart';

/// A minimal client for testing shared BaseClientImpl functionality
/// (time, stats, request, etc.) without needing a full Rest or Realtime client.
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/vcdiff_adapter.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:typed_data';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:vcdiff_decoder/vcdiff_decoder.dart' as vcdiff;

/// Adapter wrapping `package:vcdiff` for the Ably VCDiffDecoder interface.
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/wait_for_state.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';

/// Waits for a connection to reach [target] state.
///
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/auth_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Tags(['integration'])
library;

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../helpers/jwt_helper.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/channel_history_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Tags(['integration'])
library;

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../helpers/poll_until.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/connection_lifecycle_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Tags(['integration'])
library;

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../helpers/test_app_helper.dart';
Expand Down
4 changes: 2 additions & 2 deletions test/realtime/integration/delta_decoding_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'dart:async';
import 'dart:math';
import 'dart:typed_data';

import 'package:ably/ably.dart';
import 'package:ably/src/impl/realtime_channel_impl.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:ably_pubsub_device/src/impl/realtime_channel_impl.dart';
import 'package:test/test.dart';

import '../../helpers/poll_until.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/mutable_messages_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library;
import 'dart:math';

import 'package:test/test.dart';
import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';

import '../../helpers/protocol_variants.dart';
import '../../helpers/test_app_helper.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/presence_lifecycle_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library;
import 'dart:math';

import 'package:test/test.dart';
import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';

import '../../helpers/protocol_variants.dart';
import '../../helpers/test_app_helper.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/proxy/auth_reauth_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Tags(['integration', 'proxy'])
library;

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/jwt_helper.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/proxy/channel_faults_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Tags(['integration', 'proxy'])
library;

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/jwt_helper.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ library;

import 'dart:async';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/jwt_helper.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ library;

import 'dart:async';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/jwt_helper.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/proxy/heartbeat_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ library;

import 'dart:async';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/jwt_helper.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/proxy/presence_reentry_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Tags(['integration', 'proxy'])
library;

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/jwt_helper.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/integration/proxy/rest_faults_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Tags(['integration', 'proxy'])
library;

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/jwt_helper.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/unit/auth/auth_callback_errors_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:clock/clock.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 1 addition & 1 deletion test/realtime/unit/auth/connection_auth_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:test/test.dart';
import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import '../../../helpers/mock_websocket_client.dart';
import '../../../helpers/protocol_message_helpers.dart';

Expand Down
2 changes: 1 addition & 1 deletion test/realtime/unit/auth/realtime_authorize_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/mock_websocket_client.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/mock_websocket_client.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import 'package:test/test.dart';

import '../../../helpers/mock_websocket_client.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/realtime/unit/channels/channel_annotations_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:async';
import 'dart:convert';

import 'package:test/test.dart';
import 'package:ably/ably.dart';
import 'package:ably_pubsub_device/ably_pubsub_device.dart';
import '../../../helpers/mock_http_client.dart';
import '../../../helpers/mock_websocket_client.dart';
import '../../../helpers/protocol_message_helpers.dart';
Expand Down
Loading