Skip to content

Commit 65de271

Browse files
authored
Merge pull request #87 from tomburns/deprecations
Resolve deprecations related to `bindTo` and update Action's API to match
2 parents 24b40d3 + 8971834 commit 65de271

File tree

16 files changed

+53
-47
lines changed

16 files changed

+53
-47
lines changed

Action.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Action"
3-
s.version = "2.2.2"
3+
s.version = "3.0.0"
44
s.summary = "Abstracts actions to be performed in RxSwift."
55
s.description = <<-DESC
66
Encapsulates an action to be performed, usually by a UIButton press.
@@ -21,8 +21,8 @@ Pod::Spec.new do |s|
2121
s.source_files = "Sources/**/*.{swift}"
2222

2323
s.frameworks = "Foundation"
24-
s.dependency "RxSwift", "~> 3.0"
25-
s.dependency "RxCocoa", "~> 3.0"
24+
s.dependency "RxSwift", "~> 3.4.0"
25+
s.dependency "RxCocoa", "~> 3.4.0"
2626

2727
s.watchos.exclude_files = "UIButton+Rx.swift", "UIBarButtonItem+Action.swift", "AlertAction.swift"
2828
s.osx.exclude_files = "UIButton+Rx.swift", "UIBarButtonItem+Action.swift", "AlertAction.swift"

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "ReactiveX/RxSwift" ~> 3.3.0
1+
github "ReactiveX/RxSwift" ~> 3.4.0

Cartfile.resolved

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github "Quick/Nimble" "v5.1.1"
2-
github "Quick/Quick" "v1.0.0"
3-
github "ReactiveX/RxSwift" "3.3.0"
1+
github "Quick/Nimble" "v6.1.0"
2+
github "Quick/Quick" "v1.1.0"
3+
github "ReactiveX/RxSwift" "3.4.0"

Carthage/Checkouts/Nimble

Submodule Nimble updated 101 files

Carthage/Checkouts/Quick

Submodule Quick updated 52 files

Carthage/Checkouts/RxSwift

Submodule RxSwift updated 152 files

Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Changelog
44
Current master
55
--------------
66

7+
3.0.0
8+
-----
9+
10+
- Change `bindTo([...])` methods to `bind(to: [...])` to better align with the revised Rx API
11+
- Update Rx invocations to resolve deprecation warnings related to same
12+
713
2.2.2
814
-----
915

Demo/ViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ class ViewController: UIViewController {
8383
})
8484
.addDisposableTo(self.disposableBag)
8585

86-
button1.rx.bindTo(action: sharedAction, input: .button("Button 1"))
86+
button1.rx.bind(to: action: sharedAction, input: .button("Button 1"))
8787

88-
button2.rx.bindTo(action: sharedAction) { _ in
88+
button2.rx.bind(to: action: sharedAction) { _ in
8989
return .button("Button 2")
9090
}
91-
self.navigationItem.leftBarButtonItem?.rx.bindTo(action: sharedAction, input: .barButton)
91+
self.navigationItem.leftBarButtonItem?.rx.bind(to: action: sharedAction, input: .barButton)
9292

9393
sharedAction.executing.debounce(0, scheduler: MainScheduler.instance).subscribe(onNext: { [weak self] executing in
9494
if (executing) {

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let package = Package(
44
name: "Action",
55
targets: [],
66
dependencies: [
7-
.Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3, minor: 3)
7+
.Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3, minor: 4)
88
]
99
)
1010

Sources/Action/Action.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public final class Action<Input, Element> {
9797

9898
Observable
9999
.combineLatest(executing, enabledIf) { !$0 && $1 }
100-
.bindTo(enabledSubject)
100+
.bind(to: enabledSubject)
101101
.addDisposableTo(disposeBag)
102102
}
103103

0 commit comments

Comments
 (0)