Skip to content

Commit 5844672

Browse files
committed
- Public constructors for UnsuccessfulResponseError and MessageEvent to allow consumers of the library to use them for unit tests.
1 parent e47291d commit 5844672

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to the LaunchDarkly Swift EventSource library will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [0.2.0] - 2020-05-21
6+
### Added
7+
- Public constructors for `UnsuccessfulResponseError` and `MessageEvent` to allow consumers of the library to use them for unit tests.
8+
59
## [0.1.0] - 2020-05-09
610
### Added
711
- Initial implementation for internal alpha testing.

LDSwiftEventSource.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "LDSwiftEventSource"
3-
s.version = "0.1.0"
3+
s.version = "0.2.0"
44
s.summary = "Swift EventSource library"
55
s.homepage = "https://github.com/launchdarkly/swift-eventsource"
66
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE.txt" }

Source/LDSwiftEventSource.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class UnsuccessfulResponseError: Error {
66
/// The HTTP response code received
77
public let responseCode: Int
88

9-
init(responseCode: Int) {
9+
public init(responseCode: Int) {
1010
self.responseCode = responseCode
1111
}
1212
}
@@ -66,7 +66,7 @@ public struct MessageEvent: Equatable, Hashable {
6666
/// The last seen event id, or the event id set in the Config if none have been received.
6767
public let lastEventId: String?
6868

69-
init(data: String, lastEventId: String? = nil) {
69+
public init(data: String, lastEventId: String? = nil) {
7070
self.data = data
7171
self.lastEventId = lastEventId
7272
}

0 commit comments

Comments
 (0)