Skip to content

Commit

Permalink
Merge pull request #25 from vadymmarkov/swift4
Browse files Browse the repository at this point in the history
Update project and source code to Swift 4
  • Loading branch information
vadymmarkov authored Sep 19, 2017
2 parents 20b7f7f + 7270936 commit 79c6f58
Show file tree
Hide file tree
Showing 18 changed files with 148 additions and 100 deletions.
4 changes: 0 additions & 4 deletions .slather.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1
4.0
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode8.3
osx_image: xcode9
language: swift

before_install:
Expand All @@ -11,3 +11,8 @@ script:
- xcodebuild test -project When.xcodeproj -scheme "When-Mac" -sdk macosx | xcpretty
- xcodebuild clean build -project When.xcodeproj -scheme "When-iOS" -sdk iphonesimulator | xcpretty
- xcodebuild test -project When.xcodeproj -scheme "When-iOS" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.0' | xcpretty
- xcodebuild clean build -project When.xcodeproj -scheme "When-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' | xcpretty
- xcodebuild test -project When.xcodeproj -scheme "When-tvOS" -destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' | xcpretty && exit ${PIPESTATUS[0]}

notifications:
email: false
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.0"
github "ReactiveX/RxSwift" "3.6.1"
1 change: 0 additions & 1 deletion Sources/RxWhen/Promise+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import RxSwift
// MARK: - Observable

extension Promise: ObservableConvertibleType {

public func asObservable() -> Observable<T> {
return Observable.create({ observer in
self
Expand Down
161 changes: 89 additions & 72 deletions When.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion When.xcodeproj/xcshareddata/xcschemes/RxWhen-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -16,7 +16,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D58B2C4F1E4130710099F6D7"
BuildableName = "RxWhen.framework"
BlueprintName = "RxWhen-Mac"
BlueprintName = "RxWhen-macOS"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -47,7 +49,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D58B2C4F1E4130710099F6D7"
BuildableName = "RxWhen.framework"
BlueprintName = "RxWhen-Mac"
BlueprintName = "RxWhen-macOS"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -65,7 +67,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D58B2C4F1E4130710099F6D7"
BuildableName = "RxWhen.framework"
BlueprintName = "RxWhen-Mac"
BlueprintName = "RxWhen-macOS"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand Down
4 changes: 3 additions & 1 deletion When.xcodeproj/xcshareddata/xcschemes/RxWhen-tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
4 changes: 3 additions & 1 deletion When.xcodeproj/xcshareddata/xcschemes/When-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -16,7 +16,21 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5C6293F1C3A7FAA007F7B7C"
BuildableName = "When.framework"
BlueprintName = "When-Mac"
BlueprintName = "When-macOS"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5C629481C3A7FAA007F7B7C"
BuildableName = "When-macOS-Tests.xctest"
BlueprintName = "When-macOS-Tests"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -26,15 +40,16 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5C629481C3A7FAA007F7B7C"
BuildableName = "When-Mac-Tests.xctest"
BlueprintName = "When-Mac-Tests"
BuildableName = "When-macOS-Tests.xctest"
BlueprintName = "When-macOS-Tests"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</TestableReference>
Expand All @@ -44,7 +59,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5C6293F1C3A7FAA007F7B7C"
BuildableName = "When.framework"
BlueprintName = "When-Mac"
BlueprintName = "When-macOS"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -55,6 +70,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -66,7 +82,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5C6293F1C3A7FAA007F7B7C"
BuildableName = "When.framework"
BlueprintName = "When-Mac"
BlueprintName = "When-macOS"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -84,7 +100,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "D5C6293F1C3A7FAA007F7B7C"
BuildableName = "When.framework"
BlueprintName = "When-Mac"
BlueprintName = "When-macOS"
ReferencedContainer = "container:When.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand Down
4 changes: 3 additions & 1 deletion When.xcodeproj/xcshareddata/xcschemes/When-tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
1 change: 0 additions & 1 deletion WhenTests/Shared/FunctionsSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Nimble
@testable import When

class FunctionsSpec: QuickSpec {

override func spec() {
describe("Functions") {
describe("#then") {
Expand Down
1 change: 0 additions & 1 deletion WhenTests/Shared/PromiseSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Nimble
@testable import When

class PromiseSpec: QuickSpec {

override func spec() {
describe("Promise") {
var promise: Promise<String>!
Expand Down
1 change: 0 additions & 1 deletion WhenTests/Shared/ResultSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Nimble
@testable import When

class ResultSpec: QuickSpec {

override func spec() {
describe("Result") {
var result: Result<String>!
Expand Down
1 change: 0 additions & 1 deletion WhenTests/Shared/StateSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Nimble
@testable import When

class StateSpec: QuickSpec {

override func spec() {
describe("State") {
var state: State<String>!
Expand Down
4 changes: 4 additions & 0 deletions bin/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

carthage bootstrap
cp Cartfile.resolved Carthage
5 changes: 5 additions & 0 deletions bin/bootstrap-if-needed
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

if ! cmp -s Cartfile.resolved Carthage/Cartfile.resolved; then
bin/bootstrap
fi

0 comments on commit 79c6f58

Please sign in to comment.