Skip to content

Commit

Permalink
Merge pull request #37 from ragzy15/hotfix/matches
Browse files Browse the repository at this point in the history
Hotfix/matches
  • Loading branch information
ragzy15 committed Apr 18, 2020
2 parents c95c462 + db59a4d commit 43344f2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion PublisherKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = "PublisherKit"
spec.version = "4.0.0"
spec.version = "4.0.1"
spec.summary = "An open source implementation of Apple's Combine framework for processing asynchronous events over time"

spec.homepage = "https://github.com/ragzy15/PublisherKit"
Expand Down
13 changes: 6 additions & 7 deletions PublisherKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@
path = Decoder;
sourceTree = "<group>";
};
OBJ_5 /* */ = {
OBJ_5 = {
isa = PBXGroup;
children = (
OBJ_6 /* Package.swift */,
Expand All @@ -1137,7 +1137,6 @@
OBJ_266 /* README.md */,
OBJ_267 /* PublisherKit.podspec */,
);
name = "";
sourceTree = "<group>";
};
OBJ_50 /* Encoder */ = {
Expand Down Expand Up @@ -1548,7 +1547,7 @@
knownRegions = (
en,
);
mainGroup = OBJ_5 /* */;
mainGroup = OBJ_5;
productRefGroup = OBJ_260 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -1772,7 +1771,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.0.1;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
Expand Down Expand Up @@ -1804,7 +1803,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.0.1;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
Expand Down Expand Up @@ -1890,7 +1889,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.0.1;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
Expand Down Expand Up @@ -1924,7 +1923,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.0.1;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ let package = Package(
targets: ["YourPackage"]),
],
dependencies: [
.package(url: "https://github.com/ragzy15/PublisherKit.git", from: "4.0.0"),
.package(url: "https://github.com/ragzy15/PublisherKit.git", from: "4.0.1"),
],
targets: [
.target(
Expand Down Expand Up @@ -80,7 +80,7 @@ source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

pod 'PublisherKit', '~> 4.0.0'
pod 'PublisherKit', '~> 4.0.1'
```

Then, run the following command:
Expand Down
3 changes: 3 additions & 0 deletions Sources/PublisherKit/Publishers/Matches/First Match.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ extension Publishers.FirstMatch {
guard status == .awaiting else { lock.unlock(); return }
status = .subscribed(to: subscription)
lock.unlock()

downstream?.receive(subscription: self)
}

func receive(_ input: String) -> Subscribers.Demand {
Expand Down Expand Up @@ -114,6 +116,7 @@ extension Publishers.FirstMatch {
guard status.isSubscribed else { lock.unlock(); return }
status = .terminated
lock.unlock()

downstream?.receive(completion: completion.eraseError())
}

Expand Down
3 changes: 3 additions & 0 deletions Sources/PublisherKit/Publishers/Matches/Matches.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ extension Publishers.Matches {
guard status == .awaiting else { lock.unlock(); return }
status = .subscribed(to: subscription)
lock.unlock()

downstream?.receive(subscription: self)
}

func receive(_ input: String) -> Subscribers.Demand {
Expand Down Expand Up @@ -114,6 +116,7 @@ extension Publishers.Matches {
guard status.isSubscribed else { lock.unlock(); return }
status = .terminated
lock.unlock()

downstream?.receive(completion: completion.eraseError())
}

Expand Down

0 comments on commit 43344f2

Please sign in to comment.