diff --git a/.slather.yml b/.slather.yml deleted file mode 100644 index 9b4928f..0000000 --- a/.slather.yml +++ /dev/null @@ -1,4 +0,0 @@ -ci_service: travis_ci -coverage_service: coveralls -xcodeproj: When.xcodeproj -source_directory: Sources diff --git a/.swift-version b/.swift-version index 8c50098..5186d07 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.1 +4.0 diff --git a/.travis.yml b/.travis.yml index 6a897e3..484e0b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode8.3 +osx_image: xcode9 language: swift before_install: @@ -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 diff --git a/Cartfile.resolved b/Cartfile.resolved index a7535f0..57b2c44 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -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" diff --git a/Sources/RxWhen/Promise+Rx.swift b/Sources/RxWhen/Promise+Rx.swift index 351aa32..8c28e25 100644 --- a/Sources/RxWhen/Promise+Rx.swift +++ b/Sources/RxWhen/Promise+Rx.swift @@ -6,7 +6,6 @@ import RxSwift // MARK: - Observable extension Promise: ObservableConvertibleType { - public func asObservable() -> Observable<T> { return Observable.create({ observer in self diff --git a/When.xcodeproj/project.pbxproj b/When.xcodeproj/project.pbxproj index 1ea24e2..126cbdf 100644 --- a/When.xcodeproj/project.pbxproj +++ b/When.xcodeproj/project.pbxproj @@ -18,8 +18,6 @@ D582E5831ED9AD9400D0E21B /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = D582E5821ED9AD9400D0E21B /* Error.swift */; }; D582E5841ED9AD9400D0E21B /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = D582E5821ED9AD9400D0E21B /* Error.swift */; }; D582E5851ED9AD9400D0E21B /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = D582E5821ED9AD9400D0E21B /* Error.swift */; }; - D582E5861EDB17A400D0E21B /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = D582E5821ED9AD9400D0E21B /* Error.swift */; }; - D582E5871EDB17A500D0E21B /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = D582E5821ED9AD9400D0E21B /* Error.swift */; }; D58B2C281E412E7D0099F6D7 /* Functions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C231E412E7D0099F6D7 /* Functions.swift */; }; D58B2C291E412E7D0099F6D7 /* Observer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C241E412E7D0099F6D7 /* Observer.swift */; }; D58B2C2A1E412E7D0099F6D7 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C251E412E7D0099F6D7 /* Promise.swift */; }; @@ -35,25 +33,14 @@ D58B2C341E412E820099F6D7 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C251E412E7D0099F6D7 /* Promise.swift */; }; D58B2C351E412E820099F6D7 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C261E412E7D0099F6D7 /* Result.swift */; }; D58B2C361E412E820099F6D7 /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C271E412E7D0099F6D7 /* State.swift */; }; - D58B2C391E412EEE0099F6D7 /* Functions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C231E412E7D0099F6D7 /* Functions.swift */; }; - D58B2C3A1E412EEE0099F6D7 /* Observer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C241E412E7D0099F6D7 /* Observer.swift */; }; - D58B2C3B1E412EEE0099F6D7 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C261E412E7D0099F6D7 /* Result.swift */; }; - D58B2C3C1E412EEE0099F6D7 /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C271E412E7D0099F6D7 /* State.swift */; }; - D58B2C3D1E412EEE0099F6D7 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C251E412E7D0099F6D7 /* Promise.swift */; }; D58B2C4A1E412F7C0099F6D7 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D58B2C491E412F7C0099F6D7 /* RxSwift.framework */; }; - D58B2C4B1E412F940099F6D7 /* When.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5B2E89F1C3A780C00C0327D /* When.framework */; }; D58B2C4E1E412FDC0099F6D7 /* Promise+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C4D1E412FDC0099F6D7 /* Promise+Rx.swift */; }; - D58B2C511E4130710099F6D7 /* Functions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C231E412E7D0099F6D7 /* Functions.swift */; }; - D58B2C521E4130710099F6D7 /* Observer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C241E412E7D0099F6D7 /* Observer.swift */; }; - D58B2C531E4130710099F6D7 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C261E412E7D0099F6D7 /* Result.swift */; }; - D58B2C541E4130710099F6D7 /* State.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C271E412E7D0099F6D7 /* State.swift */; }; - D58B2C551E4130710099F6D7 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C251E412E7D0099F6D7 /* Promise.swift */; }; - D58B2C5E1E4130920099F6D7 /* When.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5C629401C3A7FAA007F7B7C /* When.framework */; }; D58B2C601E4130A30099F6D7 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D58B2C5F1E4130A30099F6D7 /* RxSwift.framework */; }; D58B2C631E4130FD0099F6D7 /* Promise+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C4D1E412FDC0099F6D7 /* Promise+Rx.swift */; }; D58B2C751E4131800099F6D7 /* Promise+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58B2C4D1E412FDC0099F6D7 /* Promise+Rx.swift */; }; - D58B2C761E4131940099F6D7 /* When.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5E4D5E21D98399C003770B2 /* When.framework */; }; D58B2C781E4131A00099F6D7 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D58B2C771E4131A00099F6D7 /* RxSwift.framework */; }; + D58CF69E1F7173C600EB104A /* When.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5B2E89F1C3A780C00C0327D /* When.framework */; }; + D58CF69F1F71741500EB104A /* When.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5C629401C3A7FAA007F7B7C /* When.framework */; }; D5B2E8AA1C3A780C00C0327D /* When.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5B2E89F1C3A780C00C0327D /* When.framework */; }; D5C6294A1C3A7FAA007F7B7C /* When.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D5C629401C3A7FAA007F7B7C /* When.framework */; }; D5C6299C1C3A8BDA007F7B7C /* StateSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5C629971C3A8BDA007F7B7C /* StateSpec.swift */; }; @@ -115,7 +102,7 @@ D5C190091C69D9D700ECCB66 /* ResultSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResultSpec.swift; sourceTree = "<group>"; }; D5C1900B1C69D9E300ECCB66 /* PromiseSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseSpec.swift; sourceTree = "<group>"; }; D5C629401C3A7FAA007F7B7C /* When.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = When.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D5C629491C3A7FAA007F7B7C /* When-Mac-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "When-Mac-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + D5C629491C3A7FAA007F7B7C /* When-macOS-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "When-macOS-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; D5C6298B1C3A8BBD007F7B7C /* Info-iOS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = "<group>"; }; D5C6298C1C3A8BBD007F7B7C /* Info-Mac.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-Mac.plist"; sourceTree = "<group>"; }; D5C629901C3A8BDA007F7B7C /* Info-iOS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = "<group>"; }; @@ -131,7 +118,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D58B2C4B1E412F940099F6D7 /* When.framework in Frameworks */, + D58CF69E1F7173C600EB104A /* When.framework in Frameworks */, D58B2C4A1E412F7C0099F6D7 /* RxSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -140,8 +127,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D58CF69F1F71741500EB104A /* When.framework in Frameworks */, D58B2C601E4130A30099F6D7 /* RxSwift.framework in Frameworks */, - D58B2C5E1E4130920099F6D7 /* When.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -150,7 +137,6 @@ buildActionMask = 2147483647; files = ( D58B2C781E4131A00099F6D7 /* RxSwift.framework in Frameworks */, - D58B2C761E4131940099F6D7 /* When.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -259,7 +245,7 @@ D5B2E89F1C3A780C00C0327D /* When.framework */, D5B2E8A91C3A780C00C0327D /* When-iOS-Tests.xctest */, D5C629401C3A7FAA007F7B7C /* When.framework */, - D5C629491C3A7FAA007F7B7C /* When-Mac-Tests.xctest */, + D5C629491C3A7FAA007F7B7C /* When-macOS-Tests.xctest */, D5E4D5E21D98399C003770B2 /* When.framework */, D5E4D5EA1D98399C003770B2 /* When-tvOS-Tests.xctest */, D58B2C441E412EEE0099F6D7 /* RxWhen.framework */, @@ -379,9 +365,9 @@ productReference = D58B2C441E412EEE0099F6D7 /* RxWhen.framework */; productType = "com.apple.product-type.framework"; }; - D58B2C4F1E4130710099F6D7 /* RxWhen-Mac */ = { + D58B2C4F1E4130710099F6D7 /* RxWhen-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = D58B2C591E4130710099F6D7 /* Build configuration list for PBXNativeTarget "RxWhen-Mac" */; + buildConfigurationList = D58B2C591E4130710099F6D7 /* Build configuration list for PBXNativeTarget "RxWhen-macOS" */; buildPhases = ( D58B2C501E4130710099F6D7 /* Sources */, D58B2C561E4130710099F6D7 /* Frameworks */, @@ -392,7 +378,7 @@ ); dependencies = ( ); - name = "RxWhen-Mac"; + name = "RxWhen-macOS"; productName = "When-Mac"; productReference = D58B2C5C1E4130710099F6D7 /* RxWhen.framework */; productType = "com.apple.product-type.framework"; @@ -452,9 +438,9 @@ productReference = D5B2E8A91C3A780C00C0327D /* When-iOS-Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - D5C6293F1C3A7FAA007F7B7C /* When-Mac */ = { + D5C6293F1C3A7FAA007F7B7C /* When-macOS */ = { isa = PBXNativeTarget; - buildConfigurationList = D5C629511C3A7FAA007F7B7C /* Build configuration list for PBXNativeTarget "When-Mac" */; + buildConfigurationList = D5C629511C3A7FAA007F7B7C /* Build configuration list for PBXNativeTarget "When-macOS" */; buildPhases = ( D5C6293B1C3A7FAA007F7B7C /* Sources */, D5C6293C1C3A7FAA007F7B7C /* Frameworks */, @@ -465,14 +451,14 @@ ); dependencies = ( ); - name = "When-Mac"; + name = "When-macOS"; productName = "When-Mac"; productReference = D5C629401C3A7FAA007F7B7C /* When.framework */; productType = "com.apple.product-type.framework"; }; - D5C629481C3A7FAA007F7B7C /* When-Mac-Tests */ = { + D5C629481C3A7FAA007F7B7C /* When-macOS-Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = D5C629541C3A7FAA007F7B7C /* Build configuration list for PBXNativeTarget "When-Mac-Tests" */; + buildConfigurationList = D5C629541C3A7FAA007F7B7C /* Build configuration list for PBXNativeTarget "When-macOS-Tests" */; buildPhases = ( D5C629451C3A7FAA007F7B7C /* Sources */, D5C629461C3A7FAA007F7B7C /* Frameworks */, @@ -484,9 +470,9 @@ dependencies = ( D5C6294C1C3A7FAA007F7B7C /* PBXTargetDependency */, ); - name = "When-Mac-Tests"; + name = "When-macOS-Tests"; productName = "When-MacTests"; - productReference = D5C629491C3A7FAA007F7B7C /* When-Mac-Tests.xctest */; + productReference = D5C629491C3A7FAA007F7B7C /* When-macOS-Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; D5E4D5E11D98399C003770B2 /* When-tvOS */ = { @@ -533,29 +519,42 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Hyper Interaktiv AS"; TargetAttributes = { + D58B2C371E412EEE0099F6D7 = { + LastSwiftMigration = 0900; + }; + D58B2C4F1E4130710099F6D7 = { + LastSwiftMigration = 0900; + }; + D58B2C641E4131100099F6D7 = { + LastSwiftMigration = 0900; + }; D5B2E89E1C3A780C00C0327D = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; D5B2E8A81C3A780C00C0327D = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; D5C6293F1C3A7FAA007F7B7C = { CreatedOnToolsVersion = 7.2; + LastSwiftMigration = 0900; }; D5C629481C3A7FAA007F7B7C = { CreatedOnToolsVersion = 7.2; + LastSwiftMigration = 0900; }; D5E4D5E11D98399C003770B2 = { CreatedOnToolsVersion = 8.0; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; D5E4D5E91D98399C003770B2 = { CreatedOnToolsVersion = 8.0; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; }; @@ -573,13 +572,13 @@ projectRoot = ""; targets = ( D5B2E89E1C3A780C00C0327D /* When-iOS */, - D5C6293F1C3A7FAA007F7B7C /* When-Mac */, + D5C6293F1C3A7FAA007F7B7C /* When-macOS */, D5E4D5E11D98399C003770B2 /* When-tvOS */, D5B2E8A81C3A780C00C0327D /* When-iOS-Tests */, - D5C629481C3A7FAA007F7B7C /* When-Mac-Tests */, + D5C629481C3A7FAA007F7B7C /* When-macOS-Tests */, D5E4D5E91D98399C003770B2 /* When-tvOS-Tests */, D58B2C371E412EEE0099F6D7 /* RxWhen-iOS */, - D58B2C4F1E4130710099F6D7 /* RxWhen-Mac */, + D58B2C4F1E4130710099F6D7 /* RxWhen-macOS */, D58B2C641E4131100099F6D7 /* RxWhen-tvOS */, ); }; @@ -707,13 +706,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D58B2C391E412EEE0099F6D7 /* Functions.swift in Sources */, - D58B2C3A1E412EEE0099F6D7 /* Observer.swift in Sources */, - D58B2C3B1E412EEE0099F6D7 /* Result.swift in Sources */, - D58B2C3C1E412EEE0099F6D7 /* State.swift in Sources */, D58B2C4E1E412FDC0099F6D7 /* Promise+Rx.swift in Sources */, - D582E5861EDB17A400D0E21B /* Error.swift in Sources */, - D58B2C3D1E412EEE0099F6D7 /* Promise.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -721,12 +714,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D58B2C511E4130710099F6D7 /* Functions.swift in Sources */, - D58B2C521E4130710099F6D7 /* Observer.swift in Sources */, - D58B2C531E4130710099F6D7 /* Result.swift in Sources */, - D58B2C541E4130710099F6D7 /* State.swift in Sources */, - D58B2C551E4130710099F6D7 /* Promise.swift in Sources */, - D582E5871EDB17A500D0E21B /* Error.swift in Sources */, D58B2C631E4130FD0099F6D7 /* Promise+Rx.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -824,7 +811,7 @@ }; D5C6294C1C3A7FAA007F7B7C /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = D5C6293F1C3A7FAA007F7B7C /* When-Mac */; + target = D5C6293F1C3A7FAA007F7B7C /* When-macOS */; targetProxy = D5C6294B1C3A7FAA007F7B7C /* PBXContainerItemProxy */; }; D5E4D5ED1D98399C003770B2 /* PBXTargetDependency */ = { @@ -856,7 +843,8 @@ PRODUCT_NAME = RxWhen; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -880,7 +868,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.vadymmarkov.When-iOS"; PRODUCT_NAME = RxWhen; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -908,7 +897,8 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -935,7 +925,8 @@ PRODUCT_NAME = RxWhen; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -962,7 +953,8 @@ SDKROOT = appletvos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; USE_HEADERMAP = YES; @@ -991,7 +983,8 @@ PRODUCT_NAME = RxWhen; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; USE_HEADERMAP = YES; @@ -1006,14 +999,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -1056,14 +1055,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -1113,7 +1118,8 @@ PRODUCT_NAME = When; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -1137,7 +1143,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.vadymmarkov.When-iOS"; PRODUCT_NAME = When; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -1155,7 +1162,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.vadymmarkov.WhenTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -1172,7 +1180,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.vadymmarkov.WhenTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -1191,12 +1200,13 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_BUNDLE_IDENTIFIER = "com.vadymmarkov.When-Mac"; + PRODUCT_BUNDLE_IDENTIFIER = "com.vadymmarkov.When-macOS"; PRODUCT_NAME = When; SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -1215,11 +1225,12 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_BUNDLE_IDENTIFIER = "com.vadymmarkov.When-Mac"; + PRODUCT_BUNDLE_IDENTIFIER = "com.vadymmarkov.When-macOS"; PRODUCT_NAME = When; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -1239,7 +1250,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.vadymmarkov.When-MacTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -1259,7 +1271,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.vadymmarkov.When-MacTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -1286,7 +1299,8 @@ SDKROOT = appletvos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; USE_HEADERMAP = YES; @@ -1315,7 +1329,8 @@ PRODUCT_NAME = When; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; USE_HEADERMAP = YES; @@ -1339,7 +1354,8 @@ PRODUCT_NAME = "When-tvOS-Tests"; SDKROOT = appletvos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Debug; @@ -1360,7 +1376,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.vadymmarkov.WhenTests; PRODUCT_NAME = "When-tvOS-Tests"; SDKROOT = appletvos; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Release; @@ -1377,7 +1394,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D58B2C591E4130710099F6D7 /* Build configuration list for PBXNativeTarget "RxWhen-Mac" */ = { + D58B2C591E4130710099F6D7 /* Build configuration list for PBXNativeTarget "RxWhen-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( D58B2C5A1E4130710099F6D7 /* Debug */, @@ -1422,7 +1439,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D5C629511C3A7FAA007F7B7C /* Build configuration list for PBXNativeTarget "When-Mac" */ = { + D5C629511C3A7FAA007F7B7C /* Build configuration list for PBXNativeTarget "When-macOS" */ = { isa = XCConfigurationList; buildConfigurations = ( D5C629521C3A7FAA007F7B7C /* Debug */, @@ -1431,7 +1448,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D5C629541C3A7FAA007F7B7C /* Build configuration list for PBXNativeTarget "When-Mac-Tests" */ = { + D5C629541C3A7FAA007F7B7C /* Build configuration list for PBXNativeTarget "When-macOS-Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( D5C629551C3A7FAA007F7B7C /* Debug */, diff --git a/When.xcodeproj/xcshareddata/xcschemes/RxWhen-iOS.xcscheme b/When.xcodeproj/xcshareddata/xcschemes/RxWhen-iOS.xcscheme index 88d1d46..8ceae34 100644 --- a/When.xcodeproj/xcshareddata/xcschemes/RxWhen-iOS.xcscheme +++ b/When.xcodeproj/xcshareddata/xcschemes/RxWhen-iOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0820" + LastUpgradeVersion = "0900" version = "1.3"> <BuildAction parallelizeBuildables = "YES" @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> <Testables> </Testables> @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/When.xcodeproj/xcshareddata/xcschemes/RxWhen-Mac.xcscheme b/When.xcodeproj/xcshareddata/xcschemes/RxWhen-macOS.xcscheme similarity index 92% rename from When.xcodeproj/xcshareddata/xcschemes/RxWhen-Mac.xcscheme rename to When.xcodeproj/xcshareddata/xcschemes/RxWhen-macOS.xcscheme index b8ff3e9..4ce778a 100644 --- a/When.xcodeproj/xcshareddata/xcschemes/RxWhen-Mac.xcscheme +++ b/When.xcodeproj/xcshareddata/xcschemes/RxWhen-macOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0820" + LastUpgradeVersion = "0900" version = "1.3"> <BuildAction parallelizeBuildables = "YES" @@ -16,7 +16,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D58B2C4F1E4130710099F6D7" BuildableName = "RxWhen.framework" - BlueprintName = "RxWhen-Mac" + BlueprintName = "RxWhen-macOS" ReferencedContainer = "container:When.xcodeproj"> </BuildableReference> </BuildActionEntry> @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> <Testables> </Testables> @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" @@ -47,7 +49,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D58B2C4F1E4130710099F6D7" BuildableName = "RxWhen.framework" - BlueprintName = "RxWhen-Mac" + BlueprintName = "RxWhen-macOS" ReferencedContainer = "container:When.xcodeproj"> </BuildableReference> </MacroExpansion> @@ -65,7 +67,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D58B2C4F1E4130710099F6D7" BuildableName = "RxWhen.framework" - BlueprintName = "RxWhen-Mac" + BlueprintName = "RxWhen-macOS" ReferencedContainer = "container:When.xcodeproj"> </BuildableReference> </MacroExpansion> diff --git a/When.xcodeproj/xcshareddata/xcschemes/RxWhen-tvOS.xcscheme b/When.xcodeproj/xcshareddata/xcschemes/RxWhen-tvOS.xcscheme index a1a5528..22d0ae8 100644 --- a/When.xcodeproj/xcshareddata/xcschemes/RxWhen-tvOS.xcscheme +++ b/When.xcodeproj/xcshareddata/xcschemes/RxWhen-tvOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0820" + LastUpgradeVersion = "0900" version = "1.3"> <BuildAction parallelizeBuildables = "YES" @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> <Testables> </Testables> @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/When.xcodeproj/xcshareddata/xcschemes/When-iOS.xcscheme b/When.xcodeproj/xcshareddata/xcschemes/When-iOS.xcscheme index a412a15..4228fa0 100644 --- a/When.xcodeproj/xcshareddata/xcschemes/When-iOS.xcscheme +++ b/When.xcodeproj/xcshareddata/xcschemes/When-iOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0800" + LastUpgradeVersion = "0900" version = "1.3"> <BuildAction parallelizeBuildables = "YES" @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> <Testables> <TestableReference @@ -55,6 +56,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/When.xcodeproj/xcshareddata/xcschemes/When-Mac.xcscheme b/When.xcodeproj/xcshareddata/xcschemes/When-macOS.xcscheme similarity index 78% rename from When.xcodeproj/xcshareddata/xcschemes/When-Mac.xcscheme rename to When.xcodeproj/xcshareddata/xcschemes/When-macOS.xcscheme index ad51320..25b29cb 100644 --- a/When.xcodeproj/xcshareddata/xcschemes/When-Mac.xcscheme +++ b/When.xcodeproj/xcshareddata/xcschemes/When-macOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0800" + LastUpgradeVersion = "0900" version = "1.3"> <BuildAction parallelizeBuildables = "YES" @@ -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> @@ -26,6 +40,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> <Testables> <TestableReference @@ -33,8 +48,8 @@ <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> @@ -44,7 +59,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D5C6293F1C3A7FAA007F7B7C" BuildableName = "When.framework" - BlueprintName = "When-Mac" + BlueprintName = "When-macOS" ReferencedContainer = "container:When.xcodeproj"> </BuildableReference> </MacroExpansion> @@ -55,6 +70,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" @@ -66,7 +82,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D5C6293F1C3A7FAA007F7B7C" BuildableName = "When.framework" - BlueprintName = "When-Mac" + BlueprintName = "When-macOS" ReferencedContainer = "container:When.xcodeproj"> </BuildableReference> </MacroExpansion> @@ -84,7 +100,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D5C6293F1C3A7FAA007F7B7C" BuildableName = "When.framework" - BlueprintName = "When-Mac" + BlueprintName = "When-macOS" ReferencedContainer = "container:When.xcodeproj"> </BuildableReference> </MacroExpansion> diff --git a/When.xcodeproj/xcshareddata/xcschemes/When-tvOS.xcscheme b/When.xcodeproj/xcshareddata/xcschemes/When-tvOS.xcscheme index 563a2b8..f132d37 100644 --- a/When.xcodeproj/xcshareddata/xcschemes/When-tvOS.xcscheme +++ b/When.xcodeproj/xcshareddata/xcschemes/When-tvOS.xcscheme @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <Scheme - LastUpgradeVersion = "0800" + LastUpgradeVersion = "0900" version = "1.3"> <BuildAction parallelizeBuildables = "YES" @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> <Testables> <TestableReference @@ -55,6 +56,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/WhenTests/Shared/FunctionsSpec.swift b/WhenTests/Shared/FunctionsSpec.swift index 2f223c1..c2b3732 100644 --- a/WhenTests/Shared/FunctionsSpec.swift +++ b/WhenTests/Shared/FunctionsSpec.swift @@ -3,7 +3,6 @@ import Nimble @testable import When class FunctionsSpec: QuickSpec { - override func spec() { describe("Functions") { describe("#then") { diff --git a/WhenTests/Shared/PromiseSpec.swift b/WhenTests/Shared/PromiseSpec.swift index 9577a13..b38a902 100644 --- a/WhenTests/Shared/PromiseSpec.swift +++ b/WhenTests/Shared/PromiseSpec.swift @@ -3,7 +3,6 @@ import Nimble @testable import When class PromiseSpec: QuickSpec { - override func spec() { describe("Promise") { var promise: Promise<String>! diff --git a/WhenTests/Shared/ResultSpec.swift b/WhenTests/Shared/ResultSpec.swift index 48c6857..692718e 100644 --- a/WhenTests/Shared/ResultSpec.swift +++ b/WhenTests/Shared/ResultSpec.swift @@ -3,7 +3,6 @@ import Nimble @testable import When class ResultSpec: QuickSpec { - override func spec() { describe("Result") { var result: Result<String>! diff --git a/WhenTests/Shared/StateSpec.swift b/WhenTests/Shared/StateSpec.swift index 5cdaa6e..3dde9b5 100644 --- a/WhenTests/Shared/StateSpec.swift +++ b/WhenTests/Shared/StateSpec.swift @@ -3,7 +3,6 @@ import Nimble @testable import When class StateSpec: QuickSpec { - override func spec() { describe("State") { var state: State<String>! diff --git a/bin/bootstrap b/bin/bootstrap new file mode 100644 index 0000000..d08c0b5 --- /dev/null +++ b/bin/bootstrap @@ -0,0 +1,4 @@ +#!/bin/sh + +carthage bootstrap +cp Cartfile.resolved Carthage diff --git a/bin/bootstrap-if-needed b/bin/bootstrap-if-needed new file mode 100644 index 0000000..c49a31d --- /dev/null +++ b/bin/bootstrap-if-needed @@ -0,0 +1,5 @@ +#!/bin/sh + +if ! cmp -s Cartfile.resolved Carthage/Cartfile.resolved; then + bin/bootstrap +fi