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 .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.1
4.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
os: osx
language: objective-c
osx_image: xcode8
osx_image: xcode9

script:
- set -o pipefail
Expand Down
8 changes: 4 additions & 4 deletions Action.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Action"
s.version = "3.2.0"
s.version = "3.3.0-alpha.1"
s.summary = "Abstracts actions to be performed in RxSwift."
s.description = <<-DESC
Encapsulates an action to be performed, usually by a button press, but also useful to pass actions to execute later
Expand All @@ -16,12 +16,12 @@ Pod::Spec.new do |s|
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'

s.source = { :git => "https://github.com/RxSwiftCommunity/Action.git", :tag => s.version }
s.source = { :git => "https://github.com/RxSwiftCommunity/Action.git", :tag => s.version.to_s }
s.source_files = "Sources/**/*.{swift}"

s.frameworks = "Foundation"
s.dependency "RxSwift", "~> 3.4"
s.dependency "RxCocoa", "~> 3.4"
s.dependency "RxSwift", "~> 4.0.0-alpha.1"
s.dependency "RxCocoa", "~> 4.0.0-alpha.1"

s.watchos.exclude_files = "Control+Action.swift", "Button+Action.swift", "UIBarButtonItem+Action.swift", "UIAlertAction+Action.swift"
s.osx.exclude_files = "UIBarButtonItem+Action.swift", "UIAlertAction+Action.swift"
Expand Down
4 changes: 2 additions & 2 deletions Action.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -1134,7 +1134,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand Down
93 changes: 93 additions & 0 deletions Action.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7F612ACB1D7F13B800B93BC5"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Action.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7F612ACB1D7F13B800B93BC5"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Action.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7F612ACB1D7F13B800B93BC5"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Action.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "7F612ACB1D7F13B800B93BC5"
BuildableName = "Demo.app"
BlueprintName = "Demo"
ReferencedContainer = "container:Action.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" ~> 3.4
github "ReactiveX/RxSwift" "4.0.0-alpha.1"
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Quick/Nimble" "v6.1.0"
github "Quick/Nimble" "v7.0.1"
github "Quick/Quick" "v1.1.0"
github "ReactiveX/RxSwift" "3.4"
github "ReactiveX/RxSwift" "4.0.0-alpha.1"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Nimble
Submodule Nimble updated 66 files
+1 −1 .travis.yml
+1 −1 Nimble.podspec
+40 −6 Nimble.xcodeproj/project.pbxproj
+5 −3 Package.swift
+490 −178 README.md
+1 −1 Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift
+80 −28 Sources/Nimble/Adapters/NMBExpectation.swift
+1 −1 Sources/Nimble/Adapters/NimbleEnvironment.swift
+1 −1 Sources/Nimble/DSL+Wait.swift
+65 −5 Sources/Nimble/Expectation.swift
+261 −0 Sources/Nimble/ExpectationMessage.swift
+27 −0 Sources/Nimble/FailureMessage.swift
+74 −48 Sources/Nimble/Matchers/AllPass.swift
+89 −4 Sources/Nimble/Matchers/AsyncMatcherWrapper.swift
+38 −18 Sources/Nimble/Matchers/BeAKindOf.swift
+27 −21 Sources/Nimble/Matchers/BeAnInstanceOf.swift
+23 −19 Sources/Nimble/Matchers/BeCloseTo.swift
+34 −33 Sources/Nimble/Matchers/BeEmpty.swift
+8 −8 Sources/Nimble/Matchers/BeGreaterThan.swift
+6 −6 Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift
+4 −4 Sources/Nimble/Matchers/BeIdenticalTo.swift
+6 −6 Sources/Nimble/Matchers/BeLessThan.swift
+6 −6 Sources/Nimble/Matchers/BeLessThanOrEqual.swift
+19 −25 Sources/Nimble/Matchers/BeLogical.swift
+3 −4 Sources/Nimble/Matchers/BeNil.swift
+2 −2 Sources/Nimble/Matchers/BeVoid.swift
+15 −18 Sources/Nimble/Matchers/BeginWith.swift
+16 −16 Sources/Nimble/Matchers/Contain.swift
+4 −4 Sources/Nimble/Matchers/ContainElementSatisfying.swift
+10 −10 Sources/Nimble/Matchers/EndWith.swift
+83 −44 Sources/Nimble/Matchers/Equal.swift
+5 −5 Sources/Nimble/Matchers/HaveCount.swift
+3 −3 Sources/Nimble/Matchers/Match.swift
+35 −8 Sources/Nimble/Matchers/MatchError.swift
+19 −3 Sources/Nimble/Matchers/MatcherFunc.swift
+17 −0 Sources/Nimble/Matchers/MatcherProtocols.swift
+3 −3 Sources/Nimble/Matchers/PostNotification.swift
+348 −0 Sources/Nimble/Matchers/Predicate.swift
+3 −3 Sources/Nimble/Matchers/RaisesException.swift
+73 −28 Sources/Nimble/Matchers/SatisfyAnyOf.swift
+2 −2 Sources/Nimble/Matchers/ThrowAssertion.swift
+211 −24 Sources/Nimble/Matchers/ThrowError.swift
+37 −0 Sources/Nimble/Matchers/ToSucceed.swift
+16 −17 Sources/Nimble/Utils/Async.swift
+2 −80 Sources/Nimble/Utils/Errors.swift
+1 −1 Sources/NimbleObjectiveC/NMBStringify.h
+7 −9 Tests/NimbleTests/AsynchronousTest.swift
+11 −11 Tests/NimbleTests/Helpers/utils.swift
+2 −2 Tests/NimbleTests/Matchers/BeAnInstanceOfTest.swift
+14 −14 Tests/NimbleTests/Matchers/BeCloseToTest.swift
+3 −3 Tests/NimbleTests/Matchers/BeIdenticalToTest.swift
+4 −4 Tests/NimbleTests/Matchers/ContainTest.swift
+4 −2 Tests/NimbleTests/Matchers/EqualTest.swift
+1 −0 Tests/NimbleTests/Matchers/MatchErrorTest.swift
+1 −0 Tests/NimbleTests/Matchers/ThrowErrorTest.swift
+36 −0 Tests/NimbleTests/Matchers/ToSucceedTest.swift
+2 −2 Tests/NimbleTests/SynchronousTests.swift
+7 −7 Tests/NimbleTests/objc/ObjCAllPassTest.m
+4 −4 Tests/NimbleTests/objc/ObjCBeEmptyTest.m
+4 −4 Tests/NimbleTests/objc/ObjCBeGreaterThanTest.m
+4 −4 Tests/NimbleTests/objc/ObjCBeLessThanTest.m
+2 −2 Tests/NimbleTests/objc/ObjCContainTest.m
+2 −2 Tests/NimbleTests/objc/ObjCEqualTest.m
+1 −1 Tests/NimbleTests/objc/ObjCRaiseExceptionTest.m
+2 −1 script/release
+2 −1 test
2 changes: 1 addition & 1 deletion Carthage/Checkouts/RxSwift
Submodule RxSwift updated 553 files
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ let package = Package(
name: "Action",
targets: [],
dependencies: [
.Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3, minor: 4)
]
.Package(url: "https://github.com/ReactiveX/RxSwift.git", Version(4, 0, 0, prereleaseIdentifiers: ["alpha.1"]))
],
exclude: ["Tests/"]
)

2 changes: 1 addition & 1 deletion Sources/Action/Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public final class Action<Input, Element> {
errors = errorsSubject.asObservable()

executionObservables = inputs
.withLatestFrom(enabled) { $0 }
.withLatestFrom(enabled) { input, enabled in (input, enabled) }
.flatMap { input, enabled -> Observable<Observable<Element>> in
if enabled {
return Observable.of(workFactory(input)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Action/UIKitExtensions/UIAlertAction+Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public extension UIAlertAction {

public static func Action(_ title: String?, style: UIAlertActionStyle) -> UIAlertAction {
return UIAlertAction(title: title, style: style, handler: { action in
action.rx.action?.execute()
action.rx.action?.execute(())
return
})
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Action/UIKitExtensions/UIBarButtonItem+Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public extension Reactive where Base: UIBarButtonItem {
.bind(to: self.isEnabled)
.disposed(by: self.base.actionDisposeBag)

self.tap.subscribe(onNext: { (_) in
action.execute()
self.tap.subscribe(onNext: {
action.execute(())
})
.disposed(by: self.base.actionDisposeBag)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/iOS-Tests/AlertActionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AlertActionTests: QuickSpec {

subject.rx.action = action

action.execute()
action.execute(())
expect(subject.isEnabled).toEventually( beFalse() )

observer.onCompleted()
Expand Down
2 changes: 1 addition & 1 deletion Tests/iOS-Tests/BarButtonTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class BarButtonTests: QuickSpec {

subject.rx.action = action

action.execute()
action.execute(())
expect(subject.isEnabled).toEventually( beFalse() )

observer.onCompleted()
Expand Down
4 changes: 2 additions & 2 deletions Tests/iOS-Tests/ButtonTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ButtonTests: QuickSpec {

subject.rx.action = action

action.execute()
action.execute(())
expect(subject.isEnabled).toEventually( beFalse() )

observer.onCompleted()
Expand Down Expand Up @@ -123,7 +123,7 @@ class ButtonTests: QuickSpec {
}

subject.rx.action = action
subject.rx.action?.execute()
subject.rx.action?.execute(())
}
}

Expand Down