diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..a557a40 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,45 @@ +version: 2 +jobs: + build-and-test: + macos: + xcode: "10.2.0" + + steps: + - checkout + - restore_cache: + keys: + - v2-dep-{{ .Branch }}- + - v2-dep-master- + - v2-dep- + + - run: + name: Update ruby and cocoapods + command: | + sudo gem install cocoapods + sudo gem cleanup + curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf + + - run: + name: Carthage + command: carthage update + + - run: + name: Test + command: | + cd Demo + pod install + xcodebuild -workspace 'Demo.xcworkspace' -scheme 'Demo' -configuration 'Debug' -sdk iphonesimulator -destination 'name=iPhone Xs' build test | xcpretty -c + + - run: + name: Pod lib lint + command: pod lib lint --allow-warnings + + - save_cache: + key: v2-dep-{{ .Branch }}-{{ epoch }} + paths: + - Carthage +workflows: + version: 2 + build-and-test: + jobs: + - build-and-test diff --git a/.gitignore b/.gitignore index 13d6044..a0e4ea2 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,24 @@ Carthage/ fastlane/README.md fastlane/report.xml + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +screenshots diff --git a/Changelog.md b/Changelog.md index a913c5f..78a38a1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,8 @@ Current master 5.0.0 ----- - Update to Swift 5.0 and Xcode 10.2 See [#59](https://github.com/RxSwiftCommunity/NSObject-Rx/pull/67) - [@fassko](https://github.com/fassko) +- Build in Circle CI 2.0 and remove Pods from repo. See [#59](https://github.com/RxSwiftCommunity/NSObject-Rx/pull/68) - [@fassko](https://github.com/fassko) +- Increase watchOS minimum version. See [#59](https://github.com/RxSwiftCommunity/NSObject-Rx/pull/68) - [@fassko](https://github.com/fassko) 4.4.1 ----- diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj index 4e57d46..3df524f 100644 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ b/Demo/Demo.xcodeproj/project.pbxproj @@ -273,7 +273,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-DemoTests/Pods-DemoTests-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-DemoTests/Pods-DemoTests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/NSObject+Rx/NSObject_Rx.framework", "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework", @@ -288,7 +288,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoTests/Pods-DemoTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DemoTests/Pods-DemoTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Demo/Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Demo/Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Demo/Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Demo/Podfile.lock b/Demo/Podfile.lock index 3d2bac8..de7978c 100644 --- a/Demo/Podfile.lock +++ b/Demo/Podfile.lock @@ -1,9 +1,9 @@ PODS: - - Nimble (7.3.1) - - "NSObject+Rx (4.4.0)": - - RxSwift (~> 4.3) - - Quick (1.3.1) - - RxSwift (4.3.1) + - Nimble (8.0.1) + - "NSObject+Rx (5.0.0)": + - RxSwift (~> 5.0) + - Quick (2.1.0) + - RxSwift (5.0.0) DEPENDENCIES: - Nimble @@ -22,11 +22,11 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Nimble: 04f732da099ea4d153122aec8c2a88fd0c7219ae - "NSObject+Rx": e9d2b56cd4bf13a42f4ee326b638c49c84bf4707 - Quick: d17304d58d0d169dd0bd1c6e5c28e3318de32a1a - RxSwift: fe0fd770a43acdb7d0a53da411c9b892e69bb6e4 + Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0 + "NSObject+Rx": 8ecb1e4714f3d35ac91485d2a769b7ab4b62e697 + Quick: 4be43f6634acfa727dd106bdf3929ce125ffa79d + RxSwift: 8b0671caa829a763bbce7271095859121cbd895f PODFILE CHECKSUM: 4f420ecd33a82075e360098bbed0ccaadfeb1728 -COCOAPODS: 1.5.3 +COCOAPODS: 1.6.1 diff --git a/Demo/Pods/Local Podspecs/NSObject+Rx.podspec.json b/Demo/Pods/Local Podspecs/NSObject+Rx.podspec.json deleted file mode 100644 index 9a04215..0000000 --- a/Demo/Pods/Local Podspecs/NSObject+Rx.podspec.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "NSObject+Rx", - "version": "4.4.0", - "summary": "Handy RxSwift extensions on NSObject.", - "description": "Right now, we just have a `rx_disposeBag` property, but we're open to PRs!", - "homepage": "https://github.com/RxSwiftCommunity/NSObject-Rx", - "license": { - "type": "MIT", - "file": "LICENSE" - }, - "authors": { - "Ash Furrow": "ash@ashfurrow.com" - }, - "social_media_url": "http://twitter.com/ashfurrow", - "platforms": { - "ios": "8.0", - "osx": "10.10", - "watchos": "2.0", - "tvos": "9.0" - }, - "source": { - "git": "https://github.com/RxSwiftCommunity/NSObject-Rx.git", - "tag": "4.4.0" - }, - "source_files": "*.swift", - "frameworks": "Foundation", - "dependencies": { - "RxSwift": [ - "~> 4.3" - ] - } -} diff --git a/Demo/Pods/Manifest.lock b/Demo/Pods/Manifest.lock deleted file mode 100644 index 3d2bac8..0000000 --- a/Demo/Pods/Manifest.lock +++ /dev/null @@ -1,32 +0,0 @@ -PODS: - - Nimble (7.3.1) - - "NSObject+Rx (4.4.0)": - - RxSwift (~> 4.3) - - Quick (1.3.1) - - RxSwift (4.3.1) - -DEPENDENCIES: - - Nimble - - "NSObject+Rx (from `../`)" - - Quick - - RxSwift - -SPEC REPOS: - https://github.com/cocoapods/specs.git: - - Nimble - - Quick - - RxSwift - -EXTERNAL SOURCES: - "NSObject+Rx": - :path: "../" - -SPEC CHECKSUMS: - Nimble: 04f732da099ea4d153122aec8c2a88fd0c7219ae - "NSObject+Rx": e9d2b56cd4bf13a42f4ee326b638c49c84bf4707 - Quick: d17304d58d0d169dd0bd1c6e5c28e3318de32a1a - RxSwift: fe0fd770a43acdb7d0a53da411c9b892e69bb6e4 - -PODFILE CHECKSUM: 4f420ecd33a82075e360098bbed0ccaadfeb1728 - -COCOAPODS: 1.5.3 diff --git a/Demo/Pods/Nimble/LICENSE b/Demo/Pods/Nimble/LICENSE deleted file mode 100644 index 82b84bf..0000000 --- a/Demo/Pods/Nimble/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Demo/Pods/Nimble/README.md b/Demo/Pods/Nimble/README.md deleted file mode 100644 index 19c562f..0000000 --- a/Demo/Pods/Nimble/README.md +++ /dev/null @@ -1,1764 +0,0 @@ -# Nimble - -[![Build Status](https://travis-ci.org/Quick/Nimble.svg?branch=master)](https://travis-ci.org/Quick/Nimble) -[![CocoaPods](https://img.shields.io/cocoapods/v/Nimble.svg)](https://cocoapods.org/pods/Nimble) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platforms](https://img.shields.io/cocoapods/p/Nimble.svg)](https://cocoapods.org/pods/Nimble) - -Use Nimble to express the expected outcomes of Swift -or Objective-C expressions. Inspired by -[Cedar](https://github.com/pivotal/cedar). - -```swift -// Swift -expect(1 + 1).to(equal(2)) -expect(1.2).to(beCloseTo(1.1, within: 0.1)) -expect(3) > 2 -expect("seahorse").to(contain("sea")) -expect(["Atlantic", "Pacific"]).toNot(contain("Mississippi")) -expect(ocean.isClean).toEventually(beTruthy()) -``` - -# How to Use Nimble - - - -**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - -- [Some Background: Expressing Outcomes Using Assertions in XCTest](#some-background-expressing-outcomes-using-assertions-in-xctest) -- [Nimble: Expectations Using `expect(...).to`](#nimble-expectations-using-expectto) - - [Custom Failure Messages](#custom-failure-messages) - - [Type Safety](#type-safety) - - [Operator Overloads](#operator-overloads) - - [Lazily Computed Values](#lazily-computed-values) - - [C Primitives](#c-primitives) - - [Asynchronous Expectations](#asynchronous-expectations) - - [Objective-C Support](#objective-c-support) - - [Disabling Objective-C Shorthand](#disabling-objective-c-shorthand) -- [Built-in Matcher Functions](#built-in-matcher-functions) - - [Type Checking](#type-checking) - - [Equivalence](#equivalence) - - [Identity](#identity) - - [Comparisons](#comparisons) - - [Types/Classes](#typesclasses) - - [Truthiness](#truthiness) - - [Swift Assertions](#swift-assertions) - - [Swift Error Handling](#swift-error-handling) - - [Exceptions](#exceptions) - - [Collection Membership](#collection-membership) - - [Strings](#strings) - - [Collection Elements](#collection-elements) - - [Collection Count](#collection-count) - - [Notifications](#notifications) - - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) - - [Custom Validation](#custom-validation) -- [Writing Your Own Matchers](#writing-your-own-matchers) - - [PredicateResult](#predicateresult) - - [Lazy Evaluation](#lazy-evaluation) - - [Type Checking via Swift Generics](#type-checking-via-swift-generics) - - [Customizing Failure Messages](#customizing-failure-messages) - - [Basic Customization](#basic-customization) - - [Full Customization](#full-customization) - - [Supporting Objective-C](#supporting-objective-c) - - [Properly Handling `nil` in Objective-C Matchers](#properly-handling-nil-in-objective-c-matchers) - - [Migrating from the Old Matcher API](#migrating-from-the-old-matcher-api) - - [Minimal Step - Use `.predicate`](#minimal-step---use-predicate) - - [Convert to use `Predicate` Type with Old Matcher Constructor](#convert-to-use-predicate-type-with-old-matcher-constructor) - - [Convert to `Predicate` Type with Preferred Constructor](#convert-to-predicate-type-with-preferred-constructor) - - [Deprecation Roadmap](#deprecation-roadmap) -- [Installing Nimble](#installing-nimble) - - [Installing Nimble as a Submodule](#installing-nimble-as-a-submodule) - - [Installing Nimble via CocoaPods](#installing-nimble-via-cocoapods) - - [Using Nimble without XCTest](#using-nimble-without-xctest) - - - -# Some Background: Expressing Outcomes Using Assertions in XCTest - -Apple's Xcode includes the XCTest framework, which provides -assertion macros to test whether code behaves properly. -For example, to assert that `1 + 1 = 2`, XCTest has you write: - -```swift -// Swift - -XCTAssertEqual(1 + 1, 2, "expected one plus one to equal two") -``` - -Or, in Objective-C: - -```objc -// Objective-C - -XCTAssertEqual(1 + 1, 2, @"expected one plus one to equal two"); -``` - -XCTest assertions have a couple of drawbacks: - -1. **Not enough macros.** There's no easy way to assert that a string - contains a particular substring, or that a number is less than or - equal to another. -2. **It's hard to write asynchronous tests.** XCTest forces you to write - a lot of boilerplate code. - -Nimble addresses these concerns. - -# Nimble: Expectations Using `expect(...).to` - -Nimble allows you to express expectations using a natural, -easily understood language: - -```swift -// Swift - -import Nimble - -expect(seagull.squawk).to(equal("Squee!")) -``` - -```objc -// Objective-C - -@import Nimble; - -expect(seagull.squawk).to(equal(@"Squee!")); -``` - -> The `expect` function autocompletes to include `file:` and `line:`, - but these parameters are optional. Use the default values to have - Xcode highlight the correct line when an expectation is not met. - -To perform the opposite expectation--to assert something is *not* -equal--use `toNot` or `notTo`: - -```swift -// Swift - -import Nimble - -expect(seagull.squawk).toNot(equal("Oh, hello there!")) -expect(seagull.squawk).notTo(equal("Oh, hello there!")) -``` - -```objc -// Objective-C - -@import Nimble; - -expect(seagull.squawk).toNot(equal(@"Oh, hello there!")); -expect(seagull.squawk).notTo(equal(@"Oh, hello there!")); -``` - -## Custom Failure Messages - -Would you like to add more information to the test's failure messages? Use the `description` optional argument to add your own text: - -```swift -// Swift - -expect(1 + 1).to(equal(3)) -// failed - expected to equal <3>, got <2> - -expect(1 + 1).to(equal(3), description: "Make sure libKindergartenMath is loaded") -// failed - Make sure libKindergartenMath is loaded -// expected to equal <3>, got <2> -``` - -Or the *WithDescription version in Objective-C: - -```objc -// Objective-C - -@import Nimble; - -expect(@(1+1)).to(equal(@3)); -// failed - expected to equal <3.0000>, got <2.0000> - -expect(@(1+1)).toWithDescription(equal(@3), @"Make sure libKindergartenMath is loaded"); -// failed - Make sure libKindergartenMath is loaded -// expected to equal <3.0000>, got <2.0000> -``` - -## Type Safety - -Nimble makes sure you don't compare two types that don't match: - -```swift -// Swift - -// Does not compile: -expect(1 + 1).to(equal("Squee!")) -``` - -> Nimble uses generics--only available in Swift--to ensure - type correctness. That means type checking is - not available when using Nimble in Objective-C. :sob: - -## Operator Overloads - -Tired of so much typing? With Nimble, you can use overloaded operators -like `==` for equivalence, or `>` for comparisons: - -```swift -// Swift - -// Passes if squawk does not equal "Hi!": -expect(seagull.squawk) != "Hi!" - -// Passes if 10 is greater than 2: -expect(10) > 2 -``` - -> Operator overloads are only available in Swift, so you won't be able - to use this syntax in Objective-C. :broken_heart: - -## Lazily Computed Values - -The `expect` function doesn't evaluate the value it's given until it's -time to match. So Nimble can test whether an expression raises an -exception once evaluated: - -```swift -// Swift - -// Note: Swift currently doesn't have exceptions. -// Only Objective-C code can raise exceptions -// that Nimble will catch. -// (see https://github.com/Quick/Nimble/issues/220#issuecomment-172667064) -let exception = NSException( - name: NSInternalInconsistencyException, - reason: "Not enough fish in the sea.", - userInfo: ["something": "is fishy"]) -expect { exception.raise() }.to(raiseException()) - -// Also, you can customize raiseException to be more specific -expect { exception.raise() }.to(raiseException(named: NSInternalInconsistencyException)) -expect { exception.raise() }.to(raiseException( - named: NSInternalInconsistencyException, - reason: "Not enough fish in the sea")) -expect { exception.raise() }.to(raiseException( - named: NSInternalInconsistencyException, - reason: "Not enough fish in the sea", - userInfo: ["something": "is fishy"])) -``` - -Objective-C works the same way, but you must use the `expectAction` -macro when making an expectation on an expression that has no return -value: - -```objc -// Objective-C - -NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"Not enough fish in the sea." - userInfo:nil]; -expectAction(^{ [exception raise]; }).to(raiseException()); - -// Use the property-block syntax to be more specific. -expectAction(^{ [exception raise]; }).to(raiseException().named(NSInternalInconsistencyException)); -expectAction(^{ [exception raise]; }).to(raiseException(). - named(NSInternalInconsistencyException). - reason("Not enough fish in the sea")); -expectAction(^{ [exception raise]; }).to(raiseException(). - named(NSInternalInconsistencyException). - reason("Not enough fish in the sea"). - userInfo(@{@"something": @"is fishy"})); - -// You can also pass a block for custom matching of the raised exception -expectAction(exception.raise()).to(raiseException().satisfyingBlock(^(NSException *exception) { - expect(exception.name).to(beginWith(NSInternalInconsistencyException)); -})); -``` - -## C Primitives - -Some testing frameworks make it hard to test primitive C values. -In Nimble, it just works: - -```swift -// Swift - -let actual: CInt = 1 -let expectedValue: CInt = 1 -expect(actual).to(equal(expectedValue)) -``` - -In fact, Nimble uses type inference, so you can write the above -without explicitly specifying both types: - -```swift -// Swift - -expect(1 as CInt).to(equal(1)) -``` - -> In Objective-C, Nimble only supports Objective-C objects. To - make expectations on primitive C values, wrap then in an object - literal: - -```objc -expect(@(1 + 1)).to(equal(@2)); -``` - -## Asynchronous Expectations - -In Nimble, it's easy to make expectations on values that are updated -asynchronously. Just use `toEventually` or `toEventuallyNot`: - -```swift -// Swift 3.0 and later - -DispatchQueue.main.async { - ocean.add("dolphins") - ocean.add("whales") -} -expect(ocean).toEventually(contain("dolphins", "whales")) -``` - - -```swift -// Swift 2.3 and earlier - -dispatch_async(dispatch_get_main_queue()) { - ocean.add("dolphins") - ocean.add("whales") -} -expect(ocean).toEventually(contain("dolphins", "whales")) -``` - - -```objc -// Objective-C - -dispatch_async(dispatch_get_main_queue(), ^{ - [ocean add:@"dolphins"]; - [ocean add:@"whales"]; -}); -expect(ocean).toEventually(contain(@"dolphins", @"whales")); -``` - -Note: toEventually triggers its polls on the main thread. Blocking the main -thread will cause Nimble to stop the run loop. This can cause test pollution -for whatever incomplete code that was running on the main thread. Blocking the -main thread can be caused by blocking IO, calls to sleep(), deadlocks, and -synchronous IPC. - -In the above example, `ocean` is constantly re-evaluated. If it ever -contains dolphins and whales, the expectation passes. If `ocean` still -doesn't contain them, even after being continuously re-evaluated for one -whole second, the expectation fails. - -Sometimes it takes more than a second for a value to update. In those -cases, use the `timeout` parameter: - -```swift -// Swift - -// Waits three seconds for ocean to contain "starfish": -expect(ocean).toEventually(contain("starfish"), timeout: 3) - -// Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds. -expect(someValue).toEventually(equal(100), timeout: 5.5, pollInterval: 0.2) -``` - -```objc -// Objective-C - -// Waits three seconds for ocean to contain "starfish": -expect(ocean).withTimeout(3).toEventually(contain(@"starfish")); -``` - -You can also provide a callback by using the `waitUntil` function: - -```swift -// Swift - -waitUntil { done in - ocean.goFish { success in - expect(success).to(beTrue()) - done() - } -} -``` - -```objc -// Objective-C - -waitUntil(^(void (^done)(void)){ - [ocean goFishWithHandler:^(BOOL success){ - expect(success).to(beTrue()); - done(); - }]; -}); -``` - -`waitUntil` also optionally takes a timeout parameter: - -```swift -// Swift - -waitUntil(timeout: 10) { done in - ocean.goFish { success in - expect(success).to(beTrue()) - done() - } -} -``` - -```objc -// Objective-C - -waitUntilTimeout(10, ^(void (^done)(void)){ - [ocean goFishWithHandler:^(BOOL success){ - expect(success).to(beTrue()); - done(); - }]; -}); -``` - -Note: `waitUntil` triggers its timeout code on the main thread. Blocking the main -thread will cause Nimble to stop the run loop to continue. This can cause test -pollution for whatever incomplete code that was running on the main thread. -Blocking the main thread can be caused by blocking IO, calls to sleep(), -deadlocks, and synchronous IPC. - -In some cases (e.g. when running on slower machines) it can be useful to modify -the default timeout and poll interval values. This can be done as follows: - -```swift -// Swift - -// Increase the global timeout to 5 seconds: -Nimble.AsyncDefaults.Timeout = 5 - -// Slow the polling interval to 0.1 seconds: -Nimble.AsyncDefaults.PollInterval = 0.1 -``` - -## Objective-C Support - -Nimble has full support for Objective-C. However, there are two things -to keep in mind when using Nimble in Objective-C: - -1. All parameters passed to the `expect` function, as well as matcher - functions like `equal`, must be Objective-C objects or can be converted into - an `NSObject` equivalent: - - ```objc - // Objective-C - - @import Nimble; - - expect(@(1 + 1)).to(equal(@2)); - expect(@"Hello world").to(contain(@"world")); - - // Boxed as NSNumber * - expect(2).to(equal(2)); - expect(1.2).to(beLessThan(2.0)); - expect(true).to(beTruthy()); - - // Boxed as NSString * - expect("Hello world").to(equal("Hello world")); - - // Boxed as NSRange - expect(NSMakeRange(1, 10)).to(equal(NSMakeRange(1, 10))); - ``` - -2. To make an expectation on an expression that does not return a value, - such as `-[NSException raise]`, use `expectAction` instead of - `expect`: - - ```objc - // Objective-C - - expectAction(^{ [exception raise]; }).to(raiseException()); - ``` - -The following types are currently converted to an `NSObject` type: - - - **C Numeric types** are converted to `NSNumber *` - - `NSRange` is converted to `NSValue *` - - `char *` is converted to `NSString *` - -For the following matchers: - -- `equal` -- `beGreaterThan` -- `beGreaterThanOrEqual` -- `beLessThan` -- `beLessThanOrEqual` -- `beCloseTo` -- `beTrue` -- `beFalse` -- `beTruthy` -- `beFalsy` -- `haveCount` - -If you would like to see more, [file an issue](https://github.com/Quick/Nimble/issues). - -## Disabling Objective-C Shorthand - -Nimble provides a shorthand for expressing expectations using the -`expect` function. To disable this shorthand in Objective-C, define the -`NIMBLE_DISABLE_SHORT_SYNTAX` macro somewhere in your code before -importing Nimble: - -```objc -#define NIMBLE_DISABLE_SHORT_SYNTAX 1 - -@import Nimble; - -NMB_expect(^{ return seagull.squawk; }, __FILE__, __LINE__).to(NMB_equal(@"Squee!")); -``` - -> Disabling the shorthand is useful if you're testing functions with - names that conflict with Nimble functions, such as `expect` or - `equal`. If that's not the case, there's no point in disabling the - shorthand. - -# Built-in Matcher Functions - -Nimble includes a wide variety of matcher functions. - -## Type Checking - -Nimble supports checking the type membership of any kind of object, whether -Objective-C conformant or not: - -```swift -// Swift - -protocol SomeProtocol{} -class SomeClassConformingToProtocol: SomeProtocol{} -struct SomeStructConformingToProtocol: SomeProtocol{} - -// The following tests pass -expect(1).to(beAKindOf(Int.self)) -expect("turtle").to(beAKindOf(String.self)) - -let classObject = SomeClassConformingToProtocol() -expect(classObject).to(beAKindOf(SomeProtocol.self)) -expect(classObject).to(beAKindOf(SomeClassConformingToProtocol.self)) -expect(classObject).toNot(beAKindOf(SomeStructConformingToProtocol.self)) - -let structObject = SomeStructConformingToProtocol() -expect(structObject).to(beAKindOf(SomeProtocol.self)) -expect(structObject).to(beAKindOf(SomeStructConformingToProtocol.self)) -expect(structObject).toNot(beAKindOf(SomeClassConformingToProtocol.self)) -``` - -```objc -// Objective-C - -// The following tests pass -NSMutableArray *array = [NSMutableArray array]; -expect(array).to(beAKindOf([NSArray class])); -expect(@1).toNot(beAKindOf([NSNull class])); -``` - -Objects can be tested for their exact types using the `beAnInstanceOf` matcher: - -```swift -// Swift - -protocol SomeProtocol{} -class SomeClassConformingToProtocol: SomeProtocol{} -struct SomeStructConformingToProtocol: SomeProtocol{} - -// Unlike the 'beKindOf' matcher, the 'beAnInstanceOf' matcher only -// passes if the object is the EXACT type requested. The following -// tests pass -- note its behavior when working in an inheritance hierarchy. -expect(1).to(beAnInstanceOf(Int.self)) -expect("turtle").to(beAnInstanceOf(String.self)) - -let classObject = SomeClassConformingToProtocol() -expect(classObject).toNot(beAnInstanceOf(SomeProtocol.self)) -expect(classObject).to(beAnInstanceOf(SomeClassConformingToProtocol.self)) -expect(classObject).toNot(beAnInstanceOf(SomeStructConformingToProtocol.self)) - -let structObject = SomeStructConformingToProtocol() -expect(structObject).toNot(beAnInstanceOf(SomeProtocol.self)) -expect(structObject).to(beAnInstanceOf(SomeStructConformingToProtocol.self)) -expect(structObject).toNot(beAnInstanceOf(SomeClassConformingToProtocol.self)) -``` - -## Equivalence - -```swift -// Swift - -// Passes if 'actual' is equivalent to 'expected': -expect(actual).to(equal(expected)) -expect(actual) == expected - -// Passes if 'actual' is not equivalent to 'expected': -expect(actual).toNot(equal(expected)) -expect(actual) != expected -``` - -```objc -// Objective-C - -// Passes if 'actual' is equivalent to 'expected': -expect(actual).to(equal(expected)) - -// Passes if 'actual' is not equivalent to 'expected': -expect(actual).toNot(equal(expected)) -``` - -Values must be `Equatable`, `Comparable`, or subclasses of `NSObject`. -`equal` will always fail when used to compare one or more `nil` values. - -## Identity - -```swift -// Swift - -// Passes if 'actual' has the same pointer address as 'expected': -expect(actual).to(beIdenticalTo(expected)) -expect(actual) === expected - -// Passes if 'actual' does not have the same pointer address as 'expected': -expect(actual).toNot(beIdenticalTo(expected)) -expect(actual) !== expected -``` - -It is important to remember that `beIdenticalTo` only makes sense when comparing -types with reference semantics, which have a notion of identity. In Swift, -that means types that are defined as a `class`. - -This matcher will not work when comparing types with value semantics such as -those defined as a `struct` or `enum`. If you need to compare two value types, -consider what it means for instances of your type to be identical. This may mean -comparing individual properties or, if it makes sense to do so, conforming your type -to `Equatable` and using Nimble's equivalence matchers instead. - - -```objc -// Objective-C - -// Passes if 'actual' has the same pointer address as 'expected': -expect(actual).to(beIdenticalTo(expected)); - -// Passes if 'actual' does not have the same pointer address as 'expected': -expect(actual).toNot(beIdenticalTo(expected)); -``` - -## Comparisons - -```swift -// Swift - -expect(actual).to(beLessThan(expected)) -expect(actual) < expected - -expect(actual).to(beLessThanOrEqualTo(expected)) -expect(actual) <= expected - -expect(actual).to(beGreaterThan(expected)) -expect(actual) > expected - -expect(actual).to(beGreaterThanOrEqualTo(expected)) -expect(actual) >= expected -``` - -```objc -// Objective-C - -expect(actual).to(beLessThan(expected)); -expect(actual).to(beLessThanOrEqualTo(expected)); -expect(actual).to(beGreaterThan(expected)); -expect(actual).to(beGreaterThanOrEqualTo(expected)); -``` - -> Values given to the comparison matchers above must implement - `Comparable`. - -Because of how computers represent floating point numbers, assertions -that two floating point numbers be equal will sometimes fail. To express -that two numbers should be close to one another within a certain margin -of error, use `beCloseTo`: - -```swift -// Swift - -expect(actual).to(beCloseTo(expected, within: delta)) -``` - -```objc -// Objective-C - -expect(actual).to(beCloseTo(expected).within(delta)); -``` - -For example, to assert that `10.01` is close to `10`, you can write: - -```swift -// Swift - -expect(10.01).to(beCloseTo(10, within: 0.1)) -``` - -```objc -// Objective-C - -expect(@(10.01)).to(beCloseTo(@10).within(0.1)); -``` - -There is also an operator shortcut available in Swift: - -```swift -// Swift - -expect(actual) ≈ expected -expect(actual) ≈ (expected, delta) - -``` -(Type option+x to get `≈` on a U.S. keyboard) - -The former version uses the default delta of 0.0001. Here is yet another way to do this: - -```swift -// Swift - -expect(actual) ≈ expected ± delta -expect(actual) == expected ± delta - -``` -(Type option+shift+= to get `±` on a U.S. keyboard) - -If you are comparing arrays of floating point numbers, you'll find the following useful: - -```swift -// Swift - -expect([0.0, 2.0]) ≈ [0.0001, 2.0001] -expect([0.0, 2.0]).to(beCloseTo([0.1, 2.1], within: 0.1)) - -``` - -> Values given to the `beCloseTo` matcher must be coercable into a - `Double`. - -## Types/Classes - -```swift -// Swift - -// Passes if 'instance' is an instance of 'aClass': -expect(instance).to(beAnInstanceOf(aClass)) - -// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: -expect(instance).to(beAKindOf(aClass)) -``` - -```objc -// Objective-C - -// Passes if 'instance' is an instance of 'aClass': -expect(instance).to(beAnInstanceOf(aClass)); - -// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: -expect(instance).to(beAKindOf(aClass)); -``` - -> Instances must be Objective-C objects: subclasses of `NSObject`, - or Swift objects bridged to Objective-C with the `@objc` prefix. - -For example, to assert that `dolphin` is a kind of `Mammal`: - -```swift -// Swift - -expect(dolphin).to(beAKindOf(Mammal)) -``` - -```objc -// Objective-C - -expect(dolphin).to(beAKindOf([Mammal class])); -``` - -> `beAnInstanceOf` uses the `-[NSObject isMemberOfClass:]` method to - test membership. `beAKindOf` uses `-[NSObject isKindOfClass:]`. - -## Truthiness - -```swift -// Passes if 'actual' is not nil, true, or an object with a boolean value of true: -expect(actual).to(beTruthy()) - -// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): -expect(actual).to(beTrue()) - -// Passes if 'actual' is nil, false, or an object with a boolean value of false: -expect(actual).to(beFalsy()) - -// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): -expect(actual).to(beFalse()) - -// Passes if 'actual' is nil: -expect(actual).to(beNil()) -``` - -```objc -// Objective-C - -// Passes if 'actual' is not nil, true, or an object with a boolean value of true: -expect(actual).to(beTruthy()); - -// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): -expect(actual).to(beTrue()); - -// Passes if 'actual' is nil, false, or an object with a boolean value of false: -expect(actual).to(beFalsy()); - -// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): -expect(actual).to(beFalse()); - -// Passes if 'actual' is nil: -expect(actual).to(beNil()); -``` - -## Swift Assertions - -If you're using Swift, you can use the `throwAssertion` matcher to check if an assertion is thrown (e.g. `fatalError()`). This is made possible by [@mattgallagher](https://github.com/mattgallagher)'s [CwlPreconditionTesting](https://github.com/mattgallagher/CwlPreconditionTesting) library. - -```swift -// Swift - -// Passes if 'somethingThatThrows()' throws an assertion, -// such as by calling 'fatalError()' or if a precondition fails: -expect { try somethingThatThrows() }.to(throwAssertion()) -expect { () -> Void in fatalError() }.to(throwAssertion()) -expect { precondition(false) }.to(throwAssertion()) - -// Passes if throwing an NSError is not equal to throwing an assertion: -expect { throw NSError(domain: "test", code: 0, userInfo: nil) }.toNot(throwAssertion()) - -// Passes if the code after the precondition check is not run: -var reachedPoint1 = false -var reachedPoint2 = false -expect { - reachedPoint1 = true - precondition(false, "condition message") - reachedPoint2 = true -}.to(throwAssertion()) - -expect(reachedPoint1) == true -expect(reachedPoint2) == false -``` - -Notes: - -* This feature is only available in Swift. -* It is only supported for `x86_64` binaries, meaning _you cannot run this matcher on iOS devices, only simulators_. -* The tvOS simulator is supported, but using a different mechanism, requiring you to turn off the `Debug executable` scheme setting for your tvOS scheme's Test configuration. - -## Swift Error Handling - -If you're using Swift 2.0 or newer, you can use the `throwError` matcher to check if an error is thrown. - -Note: -The following code sample references the `Swift.Error` protocol. -This is `Swift.ErrorProtocol` in versions of Swift prior to version 3.0. - -```swift -// Swift - -// Passes if 'somethingThatThrows()' throws an 'Error': -expect { try somethingThatThrows() }.to(throwError()) - -// Passes if 'somethingThatThrows()' throws an error within a particular domain: -expect { try somethingThatThrows() }.to(throwError { (error: Error) in - expect(error._domain).to(equal(NSCocoaErrorDomain)) -}) - -// Passes if 'somethingThatThrows()' throws a particular error enum case: -expect { try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) - -// Passes if 'somethingThatThrows()' throws an error of a particular type: -expect { try somethingThatThrows() }.to(throwError(errorType: NimbleError.self)) -``` - -When working directly with `Error` values, using the `matchError` matcher -allows you to perform certain checks on the error itself without having to -explicitly cast the error. - -The `matchError` matcher allows you to check whether or not the error: - -- is the same _type_ of error you are expecting. -- represents a particular error value that you are expecting. - -This can be useful when using `Result` or `Promise` types, for example. - -```swift -// Swift - -let actual: Error = ... - -// Passes if 'actual' represents any error value from the NimbleErrorEnum type: -expect(actual).to(matchError(NimbleErrorEnum.self)) - -// Passes if 'actual' represents the case 'timeout' from the NimbleErrorEnum type: -expect(actual).to(matchError(NimbleErrorEnum.timeout)) - -// Passes if 'actual' contains an NSError equal to the one provided: -expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil))) -``` - -Note: This feature is only available in Swift. - -## Exceptions - -```swift -// Swift - -// Passes if 'actual', when evaluated, raises an exception: -expect(actual).to(raiseException()) - -// Passes if 'actual' raises an exception with the given name: -expect(actual).to(raiseException(named: name)) - -// Passes if 'actual' raises an exception with the given name and reason: -expect(actual).to(raiseException(named: name, reason: reason)) - -// Passes if 'actual' raises an exception which passes expectations defined in the given closure: -// (in this case, if the exception's name begins with "a r") -expect { exception.raise() }.to(raiseException { (exception: NSException) in - expect(exception.name).to(beginWith("a r")) -}) -``` - -```objc -// Objective-C - -// Passes if 'actual', when evaluated, raises an exception: -expect(actual).to(raiseException()) - -// Passes if 'actual' raises an exception with the given name -expect(actual).to(raiseException().named(name)) - -// Passes if 'actual' raises an exception with the given name and reason: -expect(actual).to(raiseException().named(name).reason(reason)) - -// Passes if 'actual' raises an exception and it passes expectations defined in the given block: -// (in this case, if name begins with "a r") -expect(actual).to(raiseException().satisfyingBlock(^(NSException *exception) { - expect(exception.name).to(beginWith(@"a r")); -})); -``` - -Note: Swift currently doesn't have exceptions (see [#220](https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)). -Only Objective-C code can raise exceptions that Nimble will catch. - -## Collection Membership - -```swift -// Swift - -// Passes if all of the expected values are members of 'actual': -expect(actual).to(contain(expected...)) - -// Passes if 'actual' is empty (i.e. it contains no elements): -expect(actual).to(beEmpty()) -``` - -```objc -// Objective-C - -// Passes if expected is a member of 'actual': -expect(actual).to(contain(expected)); - -// Passes if 'actual' is empty (i.e. it contains no elements): -expect(actual).to(beEmpty()); -``` - -> In Swift `contain` takes any number of arguments. The expectation - passes if all of them are members of the collection. In Objective-C, - `contain` only takes one argument [for now](https://github.com/Quick/Nimble/issues/27). - -For example, to assert that a list of sea creature names contains -"dolphin" and "starfish": - -```swift -// Swift - -expect(["whale", "dolphin", "starfish"]).to(contain("dolphin", "starfish")) -``` - -```objc -// Objective-C - -expect(@[@"whale", @"dolphin", @"starfish"]).to(contain(@"dolphin")); -expect(@[@"whale", @"dolphin", @"starfish"]).to(contain(@"starfish")); -``` - -> `contain` and `beEmpty` expect collections to be instances of - `NSArray`, `NSSet`, or a Swift collection composed of `Equatable` elements. - -To test whether a set of elements is present at the beginning or end of -an ordered collection, use `beginWith` and `endWith`: - -```swift -// Swift - -// Passes if the elements in expected appear at the beginning of 'actual': -expect(actual).to(beginWith(expected...)) - -// Passes if the the elements in expected come at the end of 'actual': -expect(actual).to(endWith(expected...)) -``` - -```objc -// Objective-C - -// Passes if the elements in expected appear at the beginning of 'actual': -expect(actual).to(beginWith(expected)); - -// Passes if the the elements in expected come at the end of 'actual': -expect(actual).to(endWith(expected)); -``` - -> `beginWith` and `endWith` expect collections to be instances of - `NSArray`, or ordered Swift collections composed of `Equatable` - elements. - - Like `contain`, in Objective-C `beginWith` and `endWith` only support - a single argument [for now](https://github.com/Quick/Nimble/issues/27). - -For code that returns collections of complex objects without a strict -ordering, there is the `containElementSatisfying` matcher: - -```swift -// Swift - -struct Turtle { - let color: String -} - -let turtles: [Turtle] = functionThatReturnsSomeTurtlesInAnyOrder() - -// This set of matchers passes regardless of whether the array is -// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: - -expect(turtles).to(containElementSatisfying({ turtle in - return turtle.color == "green" -})) -expect(turtles).to(containElementSatisfying({ turtle in - return turtle.color == "blue" -}, "that is a turtle with color 'blue'")) - -// The second matcher will incorporate the provided string in the error message -// should it fail -``` - -```objc -// Objective-C - -@interface Turtle : NSObject -@property (nonatomic, readonly, nonnull) NSString *color; -@end - -@implementation Turtle -@end - -NSArray * __nonnull turtles = functionThatReturnsSomeTurtlesInAnyOrder(); - -// This set of matchers passes regardless of whether the array is -// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: - -expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { - return [[turtle color] isEqualToString:@"green"]; -})); -expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { - return [[turtle color] isEqualToString:@"blue"]; -})); -``` - -## Strings - -```swift -// Swift - -// Passes if 'actual' contains 'substring': -expect(actual).to(contain(substring)) - -// Passes if 'actual' begins with 'prefix': -expect(actual).to(beginWith(prefix)) - -// Passes if 'actual' ends with 'suffix': -expect(actual).to(endWith(suffix)) - -// Passes if 'actual' represents the empty string, "": -expect(actual).to(beEmpty()) - -// Passes if 'actual' matches the regular expression defined in 'expected': -expect(actual).to(match(expected)) -``` - -```objc -// Objective-C - -// Passes if 'actual' contains 'substring': -expect(actual).to(contain(expected)); - -// Passes if 'actual' begins with 'prefix': -expect(actual).to(beginWith(prefix)); - -// Passes if 'actual' ends with 'suffix': -expect(actual).to(endWith(suffix)); - -// Passes if 'actual' represents the empty string, "": -expect(actual).to(beEmpty()); - -// Passes if 'actual' matches the regular expression defined in 'expected': -expect(actual).to(match(expected)) -``` - -## Collection Elements - -Nimble provides a means to check that all elements of a collection pass a given expectation. - -### Swift - -In Swift, the collection must be an instance of a type conforming to -`Sequence`. - -```swift -// Swift - -// Providing a custom function: -expect([1, 2, 3, 4]).to(allPass { $0! < 5 }) - -// Composing the expectation with another matcher: -expect([1, 2, 3, 4]).to(allPass(beLessThan(5))) -``` - -### Objective-C - -In Objective-C, the collection must be an instance of a type which implements -the `NSFastEnumeration` protocol, and whose elements are instances of a type -which subclasses `NSObject`. - -Additionally, unlike in Swift, there is no override to specify a custom -matcher function. - -```objc -// Objective-C - -expect(@[@1, @2, @3, @4]).to(allPass(beLessThan(@5))); -``` - -## Collection Count - -```swift -// Swift - -// Passes if 'actual' contains the 'expected' number of elements: -expect(actual).to(haveCount(expected)) - -// Passes if 'actual' does _not_ contain the 'expected' number of elements: -expect(actual).notTo(haveCount(expected)) -``` - -```objc -// Objective-C - -// Passes if 'actual' contains the 'expected' number of elements: -expect(actual).to(haveCount(expected)) - -// Passes if 'actual' does _not_ contain the 'expected' number of elements: -expect(actual).notTo(haveCount(expected)) -``` - -For Swift, the actual value must be an instance of a type conforming to `Collection`. -For example, instances of `Array`, `Dictionary`, or `Set`. - -For Objective-C, the actual value must be one of the following classes, or their subclasses: - - - `NSArray`, - - `NSDictionary`, - - `NSSet`, or - - `NSHashTable`. - -## Notifications - -```swift -// Swift -let testNotification = Notification(name: "Foo", object: nil) - -// passes if the closure in expect { ... } posts a notification to the default -// notification center. -expect { - NotificationCenter.default.postNotification(testNotification) -}.to(postNotifications(equal([testNotification])) - -// passes if the closure in expect { ... } posts a notification to a given -// notification center -let notificationCenter = NotificationCenter() -expect { - notificationCenter.postNotification(testNotification) -}.to(postNotifications(equal([testNotification]), fromNotificationCenter: notificationCenter)) -``` - -> This matcher is only available in Swift. - -## Matching a value to any of a group of matchers - -```swift -// Swift - -// passes if actual is either less than 10 or greater than 20 -expect(actual).to(satisfyAnyOf(beLessThan(10), beGreaterThan(20))) - -// can include any number of matchers -- the following will pass -// **be careful** -- too many matchers can be the sign of an unfocused test -expect(6).to(satisfyAnyOf(equal(2), equal(3), equal(4), equal(5), equal(6), equal(7))) - -// in Swift you also have the option to use the || operator to achieve a similar function -expect(82).to(beLessThan(50) || beGreaterThan(80)) -``` - -```objc -// Objective-C - -// passes if actual is either less than 10 or greater than 20 -expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20))) - -// can include any number of matchers -- the following will pass -// **be careful** -- too many matchers can be the sign of an unfocused test -expect(@6).to(satisfyAnyOf(equal(@2), equal(@3), equal(@4), equal(@5), equal(@6), equal(@7))) -``` - -Note: This matcher allows you to chain any number of matchers together. This provides flexibility, - but if you find yourself chaining many matchers together in one test, consider whether you - could instead refactor that single test into multiple, more precisely focused tests for - better coverage. - -## Custom Validation - -```swift -// Swift - -// passes if .succeeded is returned from the closure -expect({ - guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { - return .failed(reason: "wrong enum case") - } - - return .succeeded -}).to(succeed()) - -// passes if .failed is returned from the closure -expect({ - guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { - return .failed(reason: "wrong enum case") - } - - return .succeeded -}).notTo(succeed()) -``` - -The `String` provided with `.failed()` is shown when the test fails. - -When using `toEventually()` be careful not to make state changes or run process intensive code since this closure will be ran many times. - -# Writing Your Own Matchers - -In Nimble, matchers are Swift functions that take an expected -value and return a `Predicate` closure. Take `equal`, for example: - -```swift -// Swift - -public func equal(expectedValue: T?) -> Predicate { - // Can be shortened to: - // Predicate { actual in ... } - // - // But shown with types here for clarity. - return Predicate { (actual: Expression) throws -> PredicateResult in - let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>") - if let actualValue = try actualExpression.evaluate() { - return PredicateResult( - bool: actualValue == expectedValue!, - message: msg - ) - } else { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - } -} -``` - -The return value of a `Predicate` closure is a `PredicateResult` that indicates -whether the actual value matches the expectation and what error message to -display on failure. - -> The actual `equal` matcher function does not match when - `expected` are nil; the example above has been edited for brevity. - -Since matchers are just Swift functions, you can define them anywhere: -at the top of your test file, in a file shared by all of your tests, or -in an Xcode project you distribute to others. - -> If you write a matcher you think everyone can use, consider adding it - to Nimble's built-in set of matchers by sending a pull request! Or - distribute it yourself via GitHub. - -For examples of how to write your own matchers, just check out the -[`Matchers` directory](https://github.com/Quick/Nimble/tree/master/Sources/Nimble/Matchers) -to see how Nimble's built-in set of matchers are implemented. You can -also check out the tips below. - -## PredicateResult - -`PredicateResult` is the return struct that `Predicate` return to indicate -success and failure. A `PredicateResult` is made up of two values: -`PredicateStatus` and `ExpectationMessage`. - -Instead of a boolean, `PredicateStatus` captures a trinary set of values: - -```swift -// Swift - -public enum PredicateStatus { -// The predicate "passes" with the given expression -// eg - expect(1).to(equal(1)) -case matches - -// The predicate "fails" with the given expression -// eg - expect(1).toNot(equal(1)) -case doesNotMatch - -// The predicate never "passes" with the given expression, even if negated -// eg - expect(nil as Int?).toNot(equal(1)) -case fail - -// ... -} -``` - -Meanwhile, `ExpectationMessage` provides messaging semantics for error reporting. - -```swift -// Swift - -public indirect enum ExpectationMessage { -// Emits standard error message: -// eg - "expected to , got " -case expectedActualValueTo(/* message: */ String) - -// Allows any free-form message -// eg - "" -case fail(/* message: */ String) - -// ... -} -``` - -Predicates should usually depend on either `.expectedActualValueTo(..)` or -`.fail(..)` when reporting errors. Special cases can be used for the other enum -cases. - -Finally, if your Predicate utilizes other Predicates, you can utilize -`.appended(details:)` and `.appended(message:)` methods to annotate an existing -error with more details. - -A common message to append is failing on nils. For that, `.appendedBeNilHint()` -can be used. - -## Lazy Evaluation - -`actualExpression` is a lazy, memoized closure around the value provided to the -`expect` function. The expression can either be a closure or a value directly -passed to `expect(...)`. In order to determine whether that value matches, -custom matchers should call `actualExpression.evaluate()`: - -```swift -// Swift - -public func beNil() -> Predicate { - // Predicate.simpleNilable(..) automatically generates ExpectationMessage for - // us based on the string we provide to it. Also, the 'Nilable' postfix indicates - // that this Predicate supports matching against nil actualExpressions, instead of - // always resulting in a PredicateStatus.fail result -- which is true for - // Predicate.simple(..) - return Predicate.simpleNilable("be nil") { actualExpression in - let actualValue = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue == nil) - } -} -``` - -In the above example, `actualExpression` is not `nil` -- it is a closure -that returns a value. The value it returns, which is accessed via the -`evaluate()` method, may be `nil`. If that value is `nil`, the `beNil` -matcher function returns `true`, indicating that the expectation passed. - -## Type Checking via Swift Generics - -Using Swift's generics, matchers can constrain the type of the actual value -passed to the `expect` function by modifying the return type. - -For example, the following matcher, `haveDescription`, only accepts actual -values that implement the `Printable` protocol. It checks their `description` -against the one provided to the matcher function, and passes if they are the same: - -```swift -// Swift - -public func haveDescription(description: String) -> Predicate { - return Predicate.simple("have description") { actual in - return PredicateStatus(bool: actual.evaluate().description == description) - } -} -``` - -## Customizing Failure Messages - -When using `Predicate.simple(..)` or `Predicate.simpleNilable(..)`, Nimble -outputs the following failure message when an expectation fails: - -```swift -// where `message` is the first string argument and -// `actual` is the actual value received in `expect(..)` -"expected to \(message), got <\(actual)>" -``` - -You can customize this message by modifying the way you create a `Predicate`. - -### Basic Customization - -For slightly more complex error messaging, receive the created failure message -with `Predicate.define(..)`: - -```swift -// Swift - -public func equal(_ expectedValue: T?) -> Predicate { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in - let actualValue = try actualExpression.evaluate() - let matches = actualValue == expectedValue && expectedValue != nil - if expectedValue == nil || actualValue == nil { - if expectedValue == nil && actualValue != nil { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - return PredicateResult(status: .fail, message: msg) - } - return PredicateResult(bool: matches, message: msg) - } -} -``` - -In the example above, `msg` is defined based on the string given to -`Predicate.define`. The code looks akin to: - -```swift -// Swift - -let msg = ExpectationMessage.expectedActualValueTo("equal <\(stringify(expectedValue))>") -``` - -### Full Customization - -To fully customize the behavior of the Predicate, use the overload that expects -a `PredicateResult` to be returned. - -Along with `PredicateResult`, there are other `ExpectationMessage` enum values you can use: - -```swift -public indirect enum ExpectationMessage { -// Emits standard error message: -// eg - "expected to , got " -case expectedActualValueTo(/* message: */ String) - -// Allows any free-form message -// eg - "" -case fail(/* message: */ String) - -// Emits standard error message with a custom actual value instead of the default. -// eg - "expected to , got " -case expectedCustomValueTo(/* message: */ String, /* actual: */ String) - -// Emits standard error message without mentioning the actual value -// eg - "expected to " -case expectedTo(/* message: */ String) - -// ... -} -``` - -For matchers that compose other matchers, there are a handful of helper -functions to annotate messages. - -`appended(message: String)` is used to append to the original failure message: - -```swift -// produces "expected to be true, got (use beFalse() for inverse)" -// appended message do show up inline in Xcode. -.expectedActualValueTo("be true").appended(message: " (use beFalse() for inverse)") -``` - -For a more comprehensive message that spans multiple lines, use -`appended(details: String)` instead: - -```swift -// produces "expected to be true, got \n\nuse beFalse() for inverse\nor use beNil()" -// details do not show inline in Xcode, but do show up in test logs. -.expectedActualValueTo("be true").appended(details: "use beFalse() for inverse\nor use beNil()") -``` - -## Supporting Objective-C - -To use a custom matcher written in Swift from Objective-C, you'll have -to extend the `NMBObjCMatcher` class, adding a new class method for your -custom matcher. The example below defines the class method -`+[NMBObjCMatcher beNilMatcher]`: - -```swift -// Swift - -extension NMBObjCMatcher { - public class func beNilMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualBlock, failureMessage, location in - let block = ({ actualBlock() as NSObject? }) - let expr = Expression(expression: block, location: location) - return beNil().matches(expr, failureMessage: failureMessage) - } - } -} -``` - -The above allows you to use the matcher from Objective-C: - -```objc -// Objective-C - -expect(actual).to([NMBObjCMatcher beNilMatcher]()); -``` - -To make the syntax easier to use, define a C function that calls the -class method: - -```objc -// Objective-C - -FOUNDATION_EXPORT id beNil() { - return [NMBObjCMatcher beNilMatcher]; -} -``` - -### Properly Handling `nil` in Objective-C Matchers - -When supporting Objective-C, make sure you handle `nil` appropriately. -Like [Cedar](https://github.com/pivotal/cedar/issues/100), -**most matchers do not match with nil**. This is to bring prevent test -writers from being surprised by `nil` values where they did not expect -them. - -Nimble provides the `beNil` matcher function for test writer that want -to make expectations on `nil` objects: - -```objc -// Objective-C - -expect(nil).to(equal(nil)); // fails -expect(nil).to(beNil()); // passes -``` - -If your matcher does not want to match with nil, you use `NonNilMatcherFunc` -and the `canMatchNil` constructor on `NMBObjCMatcher`. Using both types will -automatically generate expected value failure messages when they're nil. - -```swift - -public func beginWith(startingElement: T) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement - } - return false - } -} - -extension NMBObjCMatcher { - public class func beginWithMatcher(expected: AnyObject) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = actualExpression.evaluate() - let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return beginWith(expected).matches(expr, failureMessage: failureMessage) - } - } -} -``` - -## Migrating from the Old Matcher API - -Previously (`<7.0.0`), Nimble supported matchers via the following types: - -- `Matcher` -- `NonNilMatcherFunc` -- `MatcherFunc` - -All of those types have been replaced by `Predicate`. While migrating can be a -lot of work, Nimble currently provides several steps to aid migration of your -custom matchers: - -### Minimal Step - Use `.predicate` - -Nimble provides an extension to the old types that automatically naively -converts those types to the newer `Predicate`. - -```swift -// Swift -public func beginWith(startingElement: T) -> Predicate { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement - } - return false - }.predicate -} -``` - -This is the simpliest way to externally support `Predicate` which allows easier -composition than the old Nimble matcher interface, with minimal effort to change. - -### Convert to use `Predicate` Type with Old Matcher Constructor - -The second most convenient step is to utilize special constructors that -`Predicate` supports that closely align to the constructors of the old Nimble -matcher types. - -```swift -// Swift -public func beginWith(startingElement: T) -> Predicate { - return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement - } - return false - } -} -``` - -This allows you to completely drop the old types from your code, although the -intended behavior may alter slightly to what is desired. - -### Convert to `Predicate` Type with Preferred Constructor - -Finally, you can convert to the native `Predicate` format using one of the -constructors not used to assist in the migration. - -### Deprecation Roadmap - -Nimble 7 introduces `Predicate` but will support the old types with warning -deprecations. A couple major releases of Nimble will remain backwards -compatible with the old matcher api, although new features may not be -backported. - -The deprecating plan is a 3 major versions removal. Which is as follows: - - 1. Introduce new `Predicate` API, deprecation warning for old matcher APIs. - (Nimble `v7.x.x`) - 2. Introduce warnings on migration-path features (`.predicate`, - `Predicate`-constructors with similar arguments to old API). (Nimble - `v8.x.x`) - 3. Remove old API. (Nimble `v9.x.x`) - - -# Installing Nimble - -> Nimble can be used on its own, or in conjunction with its sister - project, [Quick](https://github.com/Quick/Quick). To install both - Quick and Nimble, follow [the installation instructions in the Quick - Documentation](https://github.com/Quick/Quick/blob/master/Documentation/en-us/InstallingQuick.md). - -Nimble can currently be installed in one of two ways: using CocoaPods, or with -git submodules. - -## Installing Nimble as a Submodule - -To use Nimble as a submodule to test your macOS, iOS or tvOS applications, follow -these 4 easy steps: - -1. Clone the Nimble repository -2. Add Nimble.xcodeproj to the Xcode workspace for your project -3. Link Nimble.framework to your test target -4. Start writing expectations! - -For more detailed instructions on each of these steps, -read [How to Install Quick](https://github.com/Quick/Quick#how-to-install-quick). -Ignore the steps involving adding Quick to your project in order to -install just Nimble. - -## Installing Nimble via CocoaPods - -To use Nimble in CocoaPods to test your macOS, iOS or tvOS applications, add -Nimble to your podfile and add the ```use_frameworks!``` line to enable Swift -support for CocoaPods. - -```ruby -platform :ios, '8.0' - -source 'https://github.com/CocoaPods/Specs.git' - -# Whatever pods you need for your app go here - -target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do - use_frameworks! - pod 'Nimble', '~> 6.0.0' -end -``` - -Finally run `pod install`. - -## Using Nimble without XCTest - -Nimble is integrated with XCTest to allow it work well when used in Xcode test -bundles, however it can also be used in a standalone app. After installing -Nimble using one of the above methods, there are two additional steps required -to make this work. - -1. Create a custom assertion handler and assign an instance of it to the - global `NimbleAssertionHandler` variable. For example: - -```swift -class MyAssertionHandler : AssertionHandler { - func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { - if (!assertion) { - print("Expectation failed: \(message.stringValue)") - } - } -} -``` -```swift -// Somewhere before you use any assertions -NimbleAssertionHandler = MyAssertionHandler() -``` - -2. Add a post-build action to fix an issue with the Swift XCTest support - library being unnecessarily copied into your app - * Edit your scheme in Xcode, and navigate to Build -> Post-actions - * Click the "+" icon and select "New Run Script Action" - * Open the "Provide build settings from" dropdown and select your target - * Enter the following script contents: -``` -rm "${SWIFT_STDLIB_TOOL_DESTINATION_DIR}/libswiftXCTest.dylib" -``` - -You can now use Nimble assertions in your code and handle failures as you see -fit. diff --git a/Demo/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift b/Demo/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift deleted file mode 100644 index 2e58fdf..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift +++ /dev/null @@ -1,17 +0,0 @@ -import Foundation - -/// Protocol for the assertion handler that Nimble uses for all expectations. -public protocol AssertionHandler { - func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) -} - -/// Global backing interface for assertions that Nimble creates. -/// Defaults to a private test handler that passes through to XCTest. -/// -/// If XCTest is not available, you must assign your own assertion handler -/// before using any matchers, otherwise Nimble will abort the program. -/// -/// @see AssertionHandler -public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in - return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() -}() diff --git a/Demo/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift b/Demo/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift deleted file mode 100644 index 94a9030..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift +++ /dev/null @@ -1,19 +0,0 @@ -/// AssertionDispatcher allows multiple AssertionHandlers to receive -/// assertion messages. -/// -/// @warning Does not fully dispatch if one of the handlers raises an exception. -/// This is possible with XCTest-based assertion handlers. -/// -public class AssertionDispatcher: AssertionHandler { - let handlers: [AssertionHandler] - - public init(handlers: [AssertionHandler]) { - self.handlers = handlers - } - - public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - for handler in handlers { - handler.assert(assertion, message: message, location: location) - } - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift b/Demo/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift deleted file mode 100644 index cc39636..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift +++ /dev/null @@ -1,100 +0,0 @@ -import Foundation - -/// A data structure that stores information about an assertion when -/// AssertionRecorder is set as the Nimble assertion handler. -/// -/// @see AssertionRecorder -/// @see AssertionHandler -public struct AssertionRecord: CustomStringConvertible { - /// Whether the assertion succeeded or failed - public let success: Bool - /// The failure message the assertion would display on failure. - public let message: FailureMessage - /// The source location the expectation occurred on. - public let location: SourceLocation - - public var description: String { - return "AssertionRecord { success=\(success), message='\(message.stringValue)', location=\(location) }" - } -} - -/// An AssertionHandler that silently records assertions that Nimble makes. -/// This is useful for testing failure messages for matchers. -/// -/// @see AssertionHandler -public class AssertionRecorder: AssertionHandler { - /// All the assertions that were captured by this recorder - public var assertions = [AssertionRecord]() - - public init() {} - - public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - assertions.append( - AssertionRecord( - success: assertion, - message: message, - location: location)) - } -} - -/// Allows you to temporarily replace the current Nimble assertion handler with -/// the one provided for the scope of the closure. -/// -/// Once the closure finishes, then the original Nimble assertion handler is restored. -/// -/// @see AssertionHandler -public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, closure: () throws -> Void) { - let environment = NimbleEnvironment.activeInstance - let oldRecorder = environment.assertionHandler - let capturer = NMBExceptionCapture(handler: nil, finally: ({ - environment.assertionHandler = oldRecorder - })) - environment.assertionHandler = tempAssertionHandler - capturer.tryBlock { - try! closure() - } -} - -/// Captures expectations that occur in the given closure. Note that all -/// expectations will still go through to the default Nimble handler. -/// -/// This can be useful if you want to gather information about expectations -/// that occur within a closure. -/// -/// @param silently expectations are no longer send to the default Nimble -/// assertion handler when this is true. Defaults to false. -/// -/// @see gatherFailingExpectations -public func gatherExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { - let previousRecorder = NimbleEnvironment.activeInstance.assertionHandler - let recorder = AssertionRecorder() - let handlers: [AssertionHandler] - - if silently { - handlers = [recorder] - } else { - handlers = [recorder, previousRecorder] - } - - let dispatcher = AssertionDispatcher(handlers: handlers) - withAssertionHandler(dispatcher, closure: closure) - return recorder.assertions -} - -/// Captures failed expectations that occur in the given closure. Note that all -/// expectations will still go through to the default Nimble handler. -/// -/// This can be useful if you want to gather information about failed -/// expectations that occur within a closure. -/// -/// @param silently expectations are no longer send to the default Nimble -/// assertion handler when this is true. Defaults to false. -/// -/// @see gatherExpectations -/// @see raiseException source for an example use case. -public func gatherFailingExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { - let assertions = gatherExpectations(silently: silently, closure: closure) - return assertions.filter { assertion in - !assertion.success - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift b/Demo/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift deleted file mode 100644 index add7d3f..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift +++ /dev/null @@ -1,187 +0,0 @@ -import Foundation - -#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - -private func from(objcPredicate: NMBPredicate) -> Predicate { - return Predicate { actualExpression in - let result = objcPredicate.satisfies(({ try actualExpression.evaluate() }), - location: actualExpression.location) - return result.toSwift() - } -} - -internal struct ObjCMatcherWrapper: Matcher { - let matcher: NMBMatcher - - func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - return matcher.matches( - ({ try! actualExpression.evaluate() }), - failureMessage: failureMessage, - location: actualExpression.location) - } - - func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - return matcher.doesNotMatch( - ({ try! actualExpression.evaluate() }), - failureMessage: failureMessage, - location: actualExpression.location) - } -} - -// Equivalent to Expectation, but for Nimble's Objective-C interface -public class NMBExpectation: NSObject { - internal let _actualBlock: () -> NSObject? - internal var _negative: Bool - internal let _file: FileString - internal let _line: UInt - internal var _timeout: TimeInterval = 1.0 - - @objc public init(actualBlock: @escaping () -> NSObject?, negative: Bool, file: FileString, line: UInt) { - self._actualBlock = actualBlock - self._negative = negative - self._file = file - self._line = line - } - - private var expectValue: Expectation { - return expect(_file, line: _line) { - self._actualBlock() as NSObject? - } - } - - @objc public var withTimeout: (TimeInterval) -> NMBExpectation { - return ({ timeout in self._timeout = timeout - return self - }) - } - - @objc public var to: (NMBMatcher) -> Void { - return ({ matcher in - if let pred = matcher as? NMBPredicate { - self.expectValue.to(from(objcPredicate: pred)) - } else { - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher)) - } - }) - } - - @objc public var toWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - if let pred = matcher as? NMBPredicate { - self.expectValue.to(from(objcPredicate: pred), description: description) - } else { - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher), description: description) - } - }) - } - - @objc public var toNot: (NMBMatcher) -> Void { - return ({ matcher in - if let pred = matcher as? NMBPredicate { - self.expectValue.toNot(from(objcPredicate: pred)) - } else { - self.expectValue.toNot(ObjCMatcherWrapper(matcher: matcher)) - } - }) - } - - @objc public var toNotWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - if let pred = matcher as? NMBPredicate { - self.expectValue.toNot(from(objcPredicate: pred), description: description) - } else { - self.expectValue.toNot(ObjCMatcherWrapper(matcher: matcher), description: description) - } - }) - } - - @objc public var notTo: (NMBMatcher) -> Void { return toNot } - - @objc public var notToWithDescription: (NMBMatcher, String) -> Void { return toNotWithDescription } - - @objc public var toEventually: (NMBMatcher) -> Void { - return ({ matcher in - if let pred = matcher as? NMBPredicate { - self.expectValue.toEventually( - from(objcPredicate: pred), - timeout: self._timeout, - description: nil - ) - } else { - self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: nil - ) - } - }) - } - - @objc public var toEventuallyWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - if let pred = matcher as? NMBPredicate { - self.expectValue.toEventually( - from(objcPredicate: pred), - timeout: self._timeout, - description: description - ) - } else { - self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: description - ) - } - }) - } - - @objc public var toEventuallyNot: (NMBMatcher) -> Void { - return ({ matcher in - if let pred = matcher as? NMBPredicate { - self.expectValue.toEventuallyNot( - from(objcPredicate: pred), - timeout: self._timeout, - description: nil - ) - } else { - self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: nil - ) - } - }) - } - - @objc public var toEventuallyNotWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - if let pred = matcher as? NMBPredicate { - self.expectValue.toEventuallyNot( - from(objcPredicate: pred), - timeout: self._timeout, - description: description - ) - } else { - self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: description - ) - } - }) - } - - @objc public var toNotEventually: (NMBMatcher) -> Void { - return toEventuallyNot - } - - @objc public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { - return toEventuallyNotWithDescription - } - - @objc public class func failWithMessage(_ message: String, file: FileString, line: UInt) { - fail(message, location: SourceLocation(file: file, line: line)) - } -} - -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift b/Demo/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift deleted file mode 100644 index a114dff..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift +++ /dev/null @@ -1,93 +0,0 @@ -import Foundation - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - -// swiftlint:disable line_length -public typealias MatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage) throws -> Bool -public typealias FullMatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage, _ shouldNotMatch: Bool) throws -> Bool -// swiftlint:enable line_length - -public class NMBObjCMatcher: NSObject, NMBMatcher { - let _match: MatcherBlock - let _doesNotMatch: MatcherBlock - let canMatchNil: Bool - - public init(canMatchNil: Bool, matcher: @escaping MatcherBlock, notMatcher: @escaping MatcherBlock) { - self.canMatchNil = canMatchNil - self._match = matcher - self._doesNotMatch = notMatcher - } - - public convenience init(matcher: @escaping MatcherBlock) { - self.init(canMatchNil: true, matcher: matcher) - } - - public convenience init(canMatchNil: Bool, matcher: @escaping MatcherBlock) { - self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage in - return try !matcher(actualExpression, failureMessage) - })) - } - - public convenience init(matcher: @escaping FullMatcherBlock) { - self.init(canMatchNil: true, matcher: matcher) - } - - public convenience init(canMatchNil: Bool, matcher: @escaping FullMatcherBlock) { - self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage in - return try matcher(actualExpression, failureMessage, false) - }), notMatcher: ({ actualExpression, failureMessage in - return try matcher(actualExpression, failureMessage, true) - })) - } - - private func canMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - do { - if !canMatchNil { - if try actualExpression.evaluate() == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - return false - } - } - } catch let error { - failureMessage.actualValue = "an unexpected error thrown: \(error)" - return false - } - return true - } - - public func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let expr = Expression(expression: actualBlock, location: location) - let result: Bool - do { - result = try _match(expr, failureMessage) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - - if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { - return result - } else { - return false - } - } - - public func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let expr = Expression(expression: actualBlock, location: location) - let result: Bool - do { - result = try _doesNotMatch(expr, failureMessage) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - - if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { - return result - } else { - return false - } - } -} - -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift b/Demo/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift deleted file mode 100644 index e1b5432..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift +++ /dev/null @@ -1,45 +0,0 @@ -import Dispatch -import Foundation - -/// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this -/// class' existence -internal class NimbleEnvironment { - static var activeInstance: NimbleEnvironment { - get { - let env = Thread.current.threadDictionary["NimbleEnvironment"] - if let env = env as? NimbleEnvironment { - return env - } else { - let newEnv = NimbleEnvironment() - self.activeInstance = newEnv - return newEnv - } - } - set { - Thread.current.threadDictionary["NimbleEnvironment"] = newValue - } - } - - // TODO: eventually migrate the global to this environment value - var assertionHandler: AssertionHandler { - get { return NimbleAssertionHandler } - set { NimbleAssertionHandler = newValue } - } - - var suppressTVOSAssertionWarning: Bool = false - var awaiter: Awaiter - - init() { - let timeoutQueue: DispatchQueue - if #available(OSX 10.10, *) { - timeoutQueue = DispatchQueue.global(qos: .userInitiated) - } else { - timeoutQueue = DispatchQueue.global(priority: .high) - } - - awaiter = Awaiter( - waitLock: AssertionWaitLock(), - asyncQueue: .main, - timeoutQueue: timeoutQueue) - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Demo/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift deleted file mode 100644 index 14bb045..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ /dev/null @@ -1,92 +0,0 @@ -import Foundation -import XCTest - -/// Default handler for Nimble. This assertion handler passes failures along to -/// XCTest. -public class NimbleXCTestHandler: AssertionHandler { - public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - if !assertion { - recordFailure("\(message.stringValue)\n", location: location) - } - } -} - -/// Alternative handler for Nimble. This assertion handler passes failures along -/// to XCTest by attempting to reduce the failure message size. -public class NimbleShortXCTestHandler: AssertionHandler { - public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - if !assertion { - let msg: String - if let actual = message.actualValue { - msg = "got: \(actual) \(message.postfixActual)" - } else { - msg = "expected \(message.to) \(message.postfixMessage)" - } - recordFailure("\(msg)\n", location: location) - } - } -} - -/// Fallback handler in case XCTest is unavailable. This assertion handler will abort -/// the program if it is invoked. -class NimbleXCTestUnavailableHandler: AssertionHandler { - func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { - fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") - } -} - -#if !SWIFT_PACKAGE -/// Helper class providing access to the currently executing XCTestCase instance, if any -@objc final internal class CurrentTestCaseTracker: NSObject, XCTestObservation { - @objc static let sharedInstance = CurrentTestCaseTracker() - - private(set) var currentTestCase: XCTestCase? - - private var stashed_swift_reportFatalErrorsToDebugger: Bool = false - - @objc func testCaseWillStart(_ testCase: XCTestCase) { - #if swift(>=3.2) - stashed_swift_reportFatalErrorsToDebugger = _swift_reportFatalErrorsToDebugger - _swift_reportFatalErrorsToDebugger = false - #endif - - currentTestCase = testCase - } - - @objc func testCaseDidFinish(_ testCase: XCTestCase) { - currentTestCase = nil - - #if swift(>=3.2) - _swift_reportFatalErrorsToDebugger = stashed_swift_reportFatalErrorsToDebugger - #endif - } -} -#endif - -func isXCTestAvailable() -> Bool { -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - // XCTest is weakly linked and so may not be present - return NSClassFromString("XCTestCase") != nil -#else - return true -#endif -} - -public func recordFailure(_ message: String, location: SourceLocation) { -#if SWIFT_PACKAGE - XCTFail("\(message)", file: location.file, line: location.line) -#else - if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { - #if swift(>=4) - let line = Int(location.line) - #else - let line = location.line - #endif - testCase.recordFailure(withDescription: message, inFile: location.file, atLine: line, expected: true) - } else { - let msg = "Attempted to report a test failure to XCTest while no test case was running. " + - "The failure was:\n\"\(message)\"\nIt occurred at: \(location.file):\(location.line)" - NSException(name: .internalInconsistencyException, reason: msg, userInfo: nil).raise() - } -#endif -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Demo/Pods/Nimble/Sources/Nimble/DSL+Wait.swift deleted file mode 100644 index e874136..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/DSL+Wait.swift +++ /dev/null @@ -1,116 +0,0 @@ -import Dispatch -import Foundation - -private enum ErrorResult { - case exception(NSException) - case error(Error) - case none -} - -/// Only classes, protocols, methods, properties, and subscript declarations can be -/// bridges to Objective-C via the @objc keyword. This class encapsulates callback-style -/// asynchronous waiting logic so that it may be called from Objective-C and Swift. -internal class NMBWait: NSObject { -// About these kind of lines, `@objc` attributes are only required for Objective-C -// support, so that should be conditional on Darwin platforms and normal Xcode builds -// (non-SwiftPM builds). -#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objc - internal class func until( - timeout: TimeInterval, - file: FileString = #file, - line: UInt = #line, - action: @escaping (@escaping () -> Void) -> Void) { - return throwableUntil(timeout: timeout, file: file, line: line) { done in - action(done) - } - } -#else - internal class func until( - timeout: TimeInterval, - file: FileString = #file, - line: UInt = #line, - action: @escaping (@escaping () -> Void) -> Void) { - return throwableUntil(timeout: timeout, file: file, line: line) { done in - action(done) - } - } -#endif - - // Using a throwable closure makes this method not objc compatible. - internal class func throwableUntil( - timeout: TimeInterval, - file: FileString = #file, - line: UInt = #line, - action: @escaping (@escaping () -> Void) throws -> Void) { - let awaiter = NimbleEnvironment.activeInstance.awaiter - let leeway = timeout / 2.0 - // swiftlint:disable:next line_length - let result = awaiter.performBlock(file: file, line: line) { (done: @escaping (ErrorResult) -> Void) throws -> Void in - DispatchQueue.main.async { - let capture = NMBExceptionCapture( - handler: ({ exception in - done(.exception(exception)) - }), - finally: ({ }) - ) - capture.tryBlock { - do { - try action { - done(.none) - } - } catch let e { - done(.error(e)) - } - } - } - }.timeout(timeout, forcefullyAbortTimeout: leeway).wait("waitUntil(...)", file: file, line: line) - - switch result { - case .incomplete: internalError("Reached .incomplete state for waitUntil(...).") - case .blockedRunLoop: - fail(blockedRunLoopErrorMessageFor("-waitUntil()", leeway: leeway), - file: file, line: line) - case .timedOut: - let pluralize = (timeout == 1 ? "" : "s") - fail("Waited more than \(timeout) second\(pluralize)", file: file, line: line) - case let .raisedException(exception): - fail("Unexpected exception raised: \(exception)") - case let .errorThrown(error): - fail("Unexpected error thrown: \(error)") - case .completed(.exception(let exception)): - fail("Unexpected exception raised: \(exception)") - case .completed(.error(let error)): - fail("Unexpected error thrown: \(error)") - case .completed(.none): // success - break - } - } - -#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objc(untilFile:line:action:) - internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) { - until(timeout: 1, file: file, line: line, action: action) - } -#else - internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) { - until(timeout: 1, file: file, line: line, action: action) - } -#endif -} - -internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: TimeInterval) -> String { - // swiftlint:disable:next line_length - return "\(fnName) timed out but was unable to run the timeout handler because the main thread is unresponsive (\(leeway) seconds is allow after the wait times out). Conditions that may cause this include processing blocking IO on the main thread, calls to sleep(), deadlocks, and synchronous IPC. Nimble forcefully stopped run loop which may cause future failures in test run." -} - -/// Wait asynchronously until the done closure is called or the timeout has been reached. -/// -/// @discussion -/// Call the done() closure to indicate the waiting has completed. -/// -/// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function -/// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. -public func waitUntil(timeout: TimeInterval = AsyncDefaults.Timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { - NMBWait.until(timeout: timeout, file: file, line: line, action: action) -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/DSL.swift b/Demo/Pods/Nimble/Sources/Nimble/DSL.swift deleted file mode 100644 index e49bb0c..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/DSL.swift +++ /dev/null @@ -1,64 +0,0 @@ -import Foundation - -/// Make an expectation on a given actual value. The value given is lazily evaluated. -public func expect(_ expression: @autoclosure @escaping () throws -> T?, file: FileString = #file, line: UInt = #line) -> Expectation { - return Expectation( - expression: Expression( - expression: expression, - location: SourceLocation(file: file, line: line), - isClosure: true)) -} - -/// Make an expectation on a given actual value. The closure is lazily invoked. -public func expect(_ file: FileString = #file, line: UInt = #line, expression: @escaping () throws -> T?) -> Expectation { - return Expectation( - expression: Expression( - expression: expression, - location: SourceLocation(file: file, line: line), - isClosure: true)) -} - -/// Always fails the test with a message and a specified location. -public func fail(_ message: String, location: SourceLocation) { - let handler = NimbleEnvironment.activeInstance.assertionHandler - handler.assert(false, message: FailureMessage(stringValue: message), location: location) -} - -/// Always fails the test with a message. -public func fail(_ message: String, file: FileString = #file, line: UInt = #line) { - fail(message, location: SourceLocation(file: file, line: line)) -} - -/// Always fails the test. -public func fail(_ file: FileString = #file, line: UInt = #line) { - fail("fail() always fails", file: file, line: line) -} - -/// Like Swift's precondition(), but raises NSExceptions instead of sigaborts -internal func nimblePrecondition( - _ expr: @autoclosure() -> Bool, - _ name: @autoclosure() -> String, - _ message: @autoclosure() -> String, - file: StaticString = #file, - line: UInt = #line) { - let result = expr() - if !result { -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - let e = NSException( - name: NSExceptionName(name()), - reason: message(), - userInfo: nil) - e.raise() -#else - preconditionFailure("\(name()) - \(message())", file: file, line: line) -#endif - } -} - -internal func internalError(_ msg: String, file: FileString = #file, line: UInt = #line) -> Never { - fatalError( - "Nimble Bug Found: \(msg) at \(file):\(line).\n" + - "Please file a bug to Nimble: https://github.com/Quick/Nimble/issues with the " + - "code snippet that caused this error." - ) -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Expectation.swift b/Demo/Pods/Nimble/Sources/Nimble/Expectation.swift deleted file mode 100644 index 41625a1..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Expectation.swift +++ /dev/null @@ -1,125 +0,0 @@ -import Foundation - -// Deprecated -internal func expressionDoesNotMatch(_ expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) - where U: Matcher, U.ValueType == T { - let msg = FailureMessage() - msg.userDescription = description - msg.to = toNot - do { - let pass = try matcher.doesNotMatch(expression, failureMessage: msg) - if msg.actualValue == "" { - msg.actualValue = "<\(stringify(try expression.evaluate()))>" - } - return (pass, msg) - } catch let error { - msg.stringValue = "unexpected error thrown: <\(error)>" - return (false, msg) - } -} - -internal func execute(_ expression: Expression, _ style: ExpectationStyle, _ predicate: Predicate, to: String, description: String?, captureExceptions: Bool = true) -> (Bool, FailureMessage) { - func run() -> (Bool, FailureMessage) { - let msg = FailureMessage() - msg.userDescription = description - msg.to = to - do { - let result = try predicate.satisfies(expression) - result.message.update(failureMessage: msg) - if msg.actualValue == "" { - msg.actualValue = "<\(stringify(try expression.evaluate()))>" - } - return (result.toBoolean(expectation: style), msg) - } catch let error { - msg.stringValue = "unexpected error thrown: <\(error)>" - return (false, msg) - } - } - - var result: (Bool, FailureMessage) = (false, FailureMessage()) - if captureExceptions { - let capture = NMBExceptionCapture(handler: ({ exception -> Void in - let msg = FailureMessage() - msg.stringValue = "unexpected exception raised: \(exception)" - result = (false, msg) - }), finally: nil) - capture.tryBlock { - result = run() - } - } else { - result = run() - } - - return result -} - -public struct Expectation { - - public let expression: Expression - - public init(expression: Expression) { - self.expression = expression - } - - public func verify(_ pass: Bool, _ message: FailureMessage) { - let handler = NimbleEnvironment.activeInstance.assertionHandler - handler.assert(pass, message: message, location: expression.location) - } - - ////////////////// OLD API ///////////////////// - - /// DEPRECATED: Tests the actual value using a matcher to match. - public func to(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T { - let (pass, msg) = execute( - expression, - .toMatch, - matcher.predicate, - to: "to", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// DEPRECATED: Tests the actual value using a matcher to not match. - public func toNot(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T { - // swiftlint:disable:next line_length - let (pass, msg) = expressionDoesNotMatch(expression, matcher: matcher, toNot: "to not", description: description) - verify(pass, msg) - } - - /// DEPRECATED: Tests the actual value using a matcher to not match. - /// - /// Alias to toNot(). - public func notTo(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T { - toNot(matcher, description: description) - } - - ////////////////// NEW API ///////////////////// - - /// Tests the actual value using a matcher to match. - public func to(_ predicate: Predicate, description: String? = nil) { - let (pass, msg) = execute(expression, .toMatch, predicate, to: "to", description: description) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match. - public func toNot(_ predicate: Predicate, description: String? = nil) { - let (pass, msg) = execute(expression, .toNotMatch, predicate, to: "to not", description: description) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match. - /// - /// Alias to toNot(). - public func notTo(_ predicate: Predicate, description: String? = nil) { - toNot(predicate, description: description) - } - - // see: - // - `async` for extension - // - NMBExpectation for Objective-C interface -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift b/Demo/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift deleted file mode 100644 index 7aae341..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift +++ /dev/null @@ -1,264 +0,0 @@ -import Foundation - -public indirect enum ExpectationMessage { - // --- Primary Expectations --- - /// includes actual value in output ("expected to , got ") - case expectedActualValueTo(/* message: */ String) - /// uses a custom actual value string in output ("expected to , got ") - case expectedCustomValueTo(/* message: */ String, /* actual: */ String) - /// excludes actual value in output ("expected to ") - case expectedTo(/* message: */ String) - /// allows any free-form message ("") - case fail(/* message: */ String) - - // --- Composite Expectations --- - // Generally, you'll want the methods, appended(message:) and appended(details:) instead. - - /// Not Fully Implemented Yet. - case prepends(/* Prepended Message */ String, ExpectationMessage) - - /// appends after an existing message (" (use beNil() to match nils)") - case appends(ExpectationMessage, /* Appended Message */ String) - - /// provides long-form multi-line explainations ("\n\n") - case details(ExpectationMessage, String) - - internal var sampleMessage: String { - let asStr = toString(actual: "", expected: "expected", to: "to") - let asFailureMessage = FailureMessage() - update(failureMessage: asFailureMessage) - // swiftlint:disable:next line_length - return "(toString(actual:expected:to:) -> \(asStr) || update(failureMessage:) -> \(asFailureMessage.stringValue))" - } - - /// Returns the smallest message after the "expected to" string that summarizes the error. - /// - /// Returns the message part from ExpectationMessage, ignoring all .appends and .details. - public var expectedMessage: String { - switch self { - case let .fail(msg): - return msg - case let .expectedTo(msg): - return msg - case let .expectedActualValueTo(msg): - return msg - case let .expectedCustomValueTo(msg, _): - return msg - case let .prepends(_, expectation): - return expectation.expectedMessage - case let .appends(expectation, msg): - return "\(expectation.expectedMessage)\(msg)" - case let .details(expectation, _): - return expectation.expectedMessage - } - } - - /// Appends a message after the primary expectation message - public func appended(message: String) -> ExpectationMessage { - switch self { - case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo, .appends, .prepends: - return .appends(self, message) - case let .details(expectation, msg): - return .details(expectation.appended(message: message), msg) - } - } - - /// Appends a message hinting to use beNil() for when the actual value given was nil. - public func appendedBeNilHint() -> ExpectationMessage { - return appended(message: " (use beNil() to match nils)") - } - - /// Appends a detailed (aka - multiline) message after the primary expectation message - /// Detailed messages will be placed after .appended(message:) calls. - public func appended(details: String) -> ExpectationMessage { - return .details(self, details) - } - - internal func visitLeafs(_ f: (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { - switch self { - case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: - return f(self) - case let .prepends(msg, expectation): - return .prepends(msg, expectation.visitLeafs(f)) - case let .appends(expectation, msg): - return .appends(expectation.visitLeafs(f), msg) - case let .details(expectation, msg): - return .details(expectation.visitLeafs(f), msg) - } - } - - /// Replaces a primary expectation with one returned by f. Preserves all composite expectations - /// that were built upon it (aka - all appended(message:) and appended(details:). - public func replacedExpectation(_ f: @escaping (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { - func walk(_ msg: ExpectationMessage) -> ExpectationMessage { - switch msg { - case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: - return f(msg) - default: - return msg - } - } - return visitLeafs(walk) - } - - /// Wraps a primary expectation with text before and after it. - /// Alias to prepended(message: before).appended(message: after) - public func wrappedExpectation(before: String, after: String) -> ExpectationMessage { - return prepended(expectation: before).appended(message: after) - } - - /// Prepends a message by modifying the primary expectation - public func prepended(expectation message: String) -> ExpectationMessage { - func walk(_ msg: ExpectationMessage) -> ExpectationMessage { - switch msg { - case let .expectedTo(msg): - return .expectedTo(message + msg) - case let .expectedActualValueTo(msg): - return .expectedActualValueTo(message + msg) - case let .expectedCustomValueTo(msg, actual): - return .expectedCustomValueTo(message + msg, actual) - default: - return msg.visitLeafs(walk) - } - } - return visitLeafs(walk) - } - - // TODO: test & verify correct behavior - internal func prepended(message: String) -> ExpectationMessage { - return .prepends(message, self) - } - - /// Converts the tree of ExpectationMessages into a final built string. - public func toString(actual: String, expected: String = "expected", to: String = "to") -> String { - switch self { - case let .fail(msg): - return msg - case let .expectedTo(msg): - return "\(expected) \(to) \(msg)" - case let .expectedActualValueTo(msg): - return "\(expected) \(to) \(msg), got \(actual)" - case let .expectedCustomValueTo(msg, actual): - return "\(expected) \(to) \(msg), got \(actual)" - case let .prepends(msg, expectation): - return "\(msg)\(expectation.toString(actual: actual, expected: expected, to: to))" - case let .appends(expectation, msg): - return "\(expectation.toString(actual: actual, expected: expected, to: to))\(msg)" - case let .details(expectation, msg): - return "\(expectation.toString(actual: actual, expected: expected, to: to))\n\n\(msg)" - } - } - - // Backwards compatibility: converts ExpectationMessage tree to FailureMessage - internal func update(failureMessage: FailureMessage) { - switch self { - case let .fail(msg) where !msg.isEmpty: - failureMessage.stringValue = msg - case .fail: - break - case let .expectedTo(msg): - failureMessage.actualValue = nil - failureMessage.postfixMessage = msg - case let .expectedActualValueTo(msg): - failureMessage.postfixMessage = msg - case let .expectedCustomValueTo(msg, actual): - failureMessage.postfixMessage = msg - failureMessage.actualValue = actual - case let .prepends(msg, expectation): - expectation.update(failureMessage: failureMessage) - if let desc = failureMessage.userDescription { - failureMessage.userDescription = "\(msg)\(desc)" - } else { - failureMessage.userDescription = msg - } - case let .appends(expectation, msg): - expectation.update(failureMessage: failureMessage) - failureMessage.appendMessage(msg) - case let .details(expectation, msg): - expectation.update(failureMessage: failureMessage) - failureMessage.appendDetails(msg) - } - } -} - -extension FailureMessage { - internal func toExpectationMessage() -> ExpectationMessage { - let defaultMsg = FailureMessage() - if expected != defaultMsg.expected || _stringValueOverride != nil { - return .fail(stringValue) - } - - var msg: ExpectationMessage = .fail(userDescription ?? "") - if actualValue != "" && actualValue != nil { - msg = .expectedCustomValueTo(postfixMessage, actualValue ?? "") - } else if postfixMessage != defaultMsg.postfixMessage { - if actualValue == nil { - msg = .expectedTo(postfixMessage) - } else { - msg = .expectedActualValueTo(postfixMessage) - } - } - if postfixActual != defaultMsg.postfixActual { - msg = .appends(msg, postfixActual) - } - if let m = extendedMessage { - msg = .details(msg, m) - } - return msg - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - -public class NMBExpectationMessage: NSObject { - private let msg: ExpectationMessage - - internal init(swift msg: ExpectationMessage) { - self.msg = msg - } - - public init(expectedTo message: String) { - self.msg = .expectedTo(message) - } - public init(expectedActualValueTo message: String) { - self.msg = .expectedActualValueTo(message) - } - - public init(expectedActualValueTo message: String, customActualValue actual: String) { - self.msg = .expectedCustomValueTo(message, actual) - } - - public init(fail message: String) { - self.msg = .fail(message) - } - - public init(prepend message: String, child: NMBExpectationMessage) { - self.msg = .prepends(message, child.msg) - } - - public init(appendedMessage message: String, child: NMBExpectationMessage) { - self.msg = .appends(child.msg, message) - } - - public init(prependedMessage message: String, child: NMBExpectationMessage) { - self.msg = .prepends(message, child.msg) - } - - public init(details message: String, child: NMBExpectationMessage) { - self.msg = .details(child.msg, message) - } - - public func appendedBeNilHint() -> NMBExpectationMessage { - return NMBExpectationMessage(swift: msg.appendedBeNilHint()) - } - - public func toSwift() -> ExpectationMessage { return self.msg } -} - -extension ExpectationMessage { - func toObjectiveC() -> NMBExpectationMessage { - return NMBExpectationMessage(swift: self) - } -} - -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Expression.swift b/Demo/Pods/Nimble/Sources/Nimble/Expression.swift deleted file mode 100644 index 5a233fd..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Expression.swift +++ /dev/null @@ -1,99 +0,0 @@ -import Foundation - -// Memoizes the given closure, only calling the passed -// closure once; even if repeat calls to the returned closure -internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { - var cache: T? - return ({ withoutCaching in - if withoutCaching || cache == nil { - cache = try closure() - } - return cache! - }) -} - -/// Expression represents the closure of the value inside expect(...). -/// Expressions are memoized by default. This makes them safe to call -/// evaluate() multiple times without causing a re-evaluation of the underlying -/// closure. -/// -/// @warning Since the closure can be any code, Objective-C code may choose -/// to raise an exception. Currently, Expression does not memoize -/// exception raising. -/// -/// This provides a common consumable API for matchers to utilize to allow -/// Nimble to change internals to how the captured closure is managed. -public struct Expression { - internal let _expression: (Bool) throws -> T? - internal let _withoutCaching: Bool - public let location: SourceLocation - public let isClosure: Bool - - /// Creates a new expression struct. Normally, expect(...) will manage this - /// creation process. The expression is memoized. - /// - /// @param expression The closure that produces a given value. - /// @param location The source location that this closure originates from. - /// @param isClosure A bool indicating if the captured expression is a - /// closure or internally produced closure. Some matchers - /// may require closures. For example, toEventually() - /// requires an explicit closure. This gives Nimble - /// flexibility if @autoclosure behavior changes between - /// Swift versions. Nimble internals always sets this true. - public init(expression: @escaping () throws -> T?, location: SourceLocation, isClosure: Bool = true) { - self._expression = memoizedClosure(expression) - self.location = location - self._withoutCaching = false - self.isClosure = isClosure - } - - /// Creates a new expression struct. Normally, expect(...) will manage this - /// creation process. - /// - /// @param expression The closure that produces a given value. - /// @param location The source location that this closure originates from. - /// @param withoutCaching Indicates if the struct should memoize the given - /// closure's result. Subsequent evaluate() calls will - /// not call the given closure if this is true. - /// @param isClosure A bool indicating if the captured expression is a - /// closure or internally produced closure. Some matchers - /// may require closures. For example, toEventually() - /// requires an explicit closure. This gives Nimble - /// flexibility if @autoclosure behavior changes between - /// Swift versions. Nimble internals always sets this true. - public init(memoizedExpression: @escaping (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { - self._expression = memoizedExpression - self.location = location - self._withoutCaching = withoutCaching - self.isClosure = isClosure - } - - /// Returns a new Expression from the given expression. Identical to a map() - /// on this type. This should be used only to typecast the Expression's - /// closure value. - /// - /// The returned expression will preserve location and isClosure. - /// - /// @param block The block that can cast the current Expression value to a - /// new type. - public func cast(_ block: @escaping (T?) throws -> U?) -> Expression { - return Expression( - expression: ({ try block(self.evaluate()) }), - location: self.location, - isClosure: self.isClosure - ) - } - - public func evaluate() throws -> T? { - return try self._expression(_withoutCaching) - } - - public func withoutCaching() -> Expression { - return Expression( - memoizedExpression: self._expression, - location: location, - withoutCaching: true, - isClosure: isClosure - ) - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/FailureMessage.swift b/Demo/Pods/Nimble/Sources/Nimble/FailureMessage.swift deleted file mode 100644 index 2bc57eb..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/FailureMessage.swift +++ /dev/null @@ -1,92 +0,0 @@ -import Foundation - -/// Encapsulates the failure message that matchers can report to the end user. -/// -/// This is shared state between Nimble and matchers that mutate this value. -public class FailureMessage: NSObject { - public var expected: String = "expected" - public var actualValue: String? = "" // empty string -> use default; nil -> exclude - public var to: String = "to" - public var postfixMessage: String = "match" - public var postfixActual: String = "" - /// An optional message that will be appended as a new line and provides additional details - /// about the failure. This message will only be visible in the issue navigator / in logs but - /// not directly in the source editor since only a single line is presented there. - public var extendedMessage: String? - public var userDescription: String? - - public var stringValue: String { - get { - if let value = _stringValueOverride { - return value - } else { - return computeStringValue() - } - } - set { - _stringValueOverride = newValue - } - } - - internal var _stringValueOverride: String? - internal var hasOverriddenStringValue: Bool { - return _stringValueOverride != nil - } - - public override init() { - } - - public init(stringValue: String) { - _stringValueOverride = stringValue - } - - internal func stripNewlines(_ str: String) -> String { - let whitespaces = CharacterSet.whitespacesAndNewlines - return str - .components(separatedBy: "\n") - .map { line in line.trimmingCharacters(in: whitespaces) } - .joined(separator: "") - } - - internal func computeStringValue() -> String { - var value = "\(expected) \(to) \(postfixMessage)" - if let actualValue = actualValue { - value = "\(expected) \(to) \(postfixMessage), got \(actualValue)\(postfixActual)" - } - value = stripNewlines(value) - - if let extendedMessage = extendedMessage { - value += "\n\(stripNewlines(extendedMessage))" - } - - if let userDescription = userDescription { - return "\(userDescription)\n\(value)" - } - - return value - } - - internal func appendMessage(_ msg: String) { - if hasOverriddenStringValue { - stringValue += "\(msg)" - } else if actualValue != nil { - postfixActual += msg - } else { - postfixMessage += msg - } - } - - internal func appendDetails(_ msg: String) { - if hasOverriddenStringValue { - if let desc = userDescription { - stringValue = "\(desc)\n\(stringValue)" - } - stringValue += "\n\(msg)" - } else { - if let desc = userDescription { - userDescription = desc - } - extendedMessage = msg - } - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift deleted file mode 100644 index cc6c24f..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift +++ /dev/null @@ -1,121 +0,0 @@ -import Foundation - -public func allPass - (_ passFunc: @escaping (T?) throws -> Bool) -> Predicate - where U: Sequence, T == U.Iterator.Element { - let matcher = Predicate.simpleNilable("pass a condition") { actualExpression in - return PredicateStatus(bool: try passFunc(try actualExpression.evaluate())) - } - return createPredicate(matcher) -} - -public func allPass - (_ passName: String, _ passFunc: @escaping (T?) throws -> Bool) -> Predicate - where U: Sequence, T == U.Iterator.Element { - let matcher = Predicate.simpleNilable(passName) { actualExpression in - return PredicateStatus(bool: try passFunc(try actualExpression.evaluate())) - } - return createPredicate(matcher) -} - -public func allPass(_ elementMatcher: M) -> Predicate - where S: Sequence, M: Matcher, S.Iterator.Element == M.ValueType { - return createPredicate(elementMatcher.predicate) -} - -public func allPass(_ elementPredicate: Predicate) -> Predicate - where S: Sequence { - return createPredicate(elementPredicate) -} - -private func createPredicate(_ elementMatcher: Predicate) -> Predicate - where S: Sequence { - return Predicate { actualExpression in - guard let actualValue = try actualExpression.evaluate() else { - return PredicateResult( - status: .fail, - message: .appends(.expectedTo("all pass"), " (use beNil() to match nils)") - ) - } - - var failure: ExpectationMessage = .expectedTo("all pass") - for currentElement in actualValue { - let exp = Expression( - expression: {currentElement}, location: actualExpression.location) - let predicateResult = try elementMatcher.satisfies(exp) - if predicateResult.status == .matches { - failure = predicateResult.message.prepended(expectation: "all ") - } else { - failure = predicateResult.message - .replacedExpectation({ .expectedTo($0.expectedMessage) }) - .wrappedExpectation( - before: "all ", - after: ", but failed first at element <\(stringify(currentElement))>" - + " in <\(stringify(actualValue))>" - ) - return PredicateResult(status: .doesNotMatch, message: failure) - } - } - failure = failure.replacedExpectation({ expectation in - return .expectedTo(expectation.expectedMessage) - }) - return PredicateResult(status: .matches, message: failure) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func allPassMatcher(_ matcher: NMBMatcher) -> NMBPredicate { - return NMBPredicate { actualExpression in - let location = actualExpression.location - let actualValue = try actualExpression.evaluate() - var nsObjects = [NSObject]() - - var collectionIsUsable = true - if let value = actualValue as? NSFastEnumeration { - var generator = NSFastEnumerationIterator(value) - while let obj = generator.next() { - if let nsObject = obj as? NSObject { - nsObjects.append(nsObject) - } else { - collectionIsUsable = false - break - } - } - } else { - collectionIsUsable = false - } - - if !collectionIsUsable { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage( - // swiftlint:disable:next line_length - fail: "allPass can only be used with types which implement NSFastEnumeration (NSArray, NSSet, ...), and whose elements subclass NSObject, got <\(actualValue?.description ?? "nil")>" - ) - ) - } - - let expr = Expression(expression: ({ nsObjects }), location: location) - let pred: Predicate<[NSObject]> = createPredicate(Predicate { expr in - if let predicate = matcher as? NMBPredicate { - return predicate.satisfies(({ try expr.evaluate() }), location: expr.location).toSwift() - } else { - let failureMessage = FailureMessage() - let result = matcher.matches( - ({ try! expr.evaluate() }), - failureMessage: failureMessage, - location: expr.location - ) - let expectationMsg = failureMessage.toExpectationMessage() - return PredicateResult( - bool: result, - message: expectationMsg - ) - } - }) - return try pred.satisfies(expr).toObjectiveC() - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Async.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/Async.swift deleted file mode 100644 index 63e863e..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Async.swift +++ /dev/null @@ -1,175 +0,0 @@ -import Foundation - -/// If you are running on a slower machine, it could be useful to increase the default timeout value -/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. -public struct AsyncDefaults { - public static var Timeout: TimeInterval = 1 - public static var PollInterval: TimeInterval = 0.01 -} - -private func async(style: ExpectationStyle, predicate: Predicate, timeout: TimeInterval, poll: TimeInterval, fnName: String) -> Predicate { - return Predicate { actualExpression in - let uncachedExpression = actualExpression.withoutCaching() - let fnName = "expect(...).\(fnName)(...)" - var lastPredicateResult: PredicateResult? - let result = pollBlock( - pollInterval: poll, - timeoutInterval: timeout, - file: actualExpression.location.file, - line: actualExpression.location.line, - fnName: fnName) { - lastPredicateResult = try predicate.satisfies(uncachedExpression) - return lastPredicateResult!.toBoolean(expectation: style) - } - switch result { - case .completed: return lastPredicateResult! - case .timedOut: return PredicateResult(status: .fail, message: lastPredicateResult!.message) - case let .errorThrown(error): - return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) - case let .raisedException(exception): - return PredicateResult(status: .fail, message: .fail("unexpected exception raised: \(exception)")) - case .blockedRunLoop: - // swiftlint:disable:next line_length - return PredicateResult(status: .fail, message: lastPredicateResult!.message.appended(message: " (timed out, but main thread was unresponsive).")) - case .incomplete: - internalError("Reached .incomplete state for \(fnName)(...).") - } - } -} - -private let toEventuallyRequiresClosureError = FailureMessage( - // swiftlint:disable:next line_length - stringValue: "expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) )\nSwift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function" -) - -extension Expectation { - /// Tests the actual value using a matcher to match by checking continuously - /// at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventually(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) - - let (pass, msg) = execute( - expression, - .toMatch, - async(style: .toMatch, predicate: predicate, timeout: timeout, poll: pollInterval, fnName: "toEventually"), - to: "to eventually", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventuallyNot(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) - - let (pass, msg) = execute( - expression, - .toNotMatch, - async( - style: .toNotMatch, - predicate: predicate, - timeout: timeout, - poll: pollInterval, - fnName: "toEventuallyNot" - ), - to: "to eventually not", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// Alias of toEventuallyNot() - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toNotEventually(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { - return toEventuallyNot(predicate, timeout: timeout, pollInterval: pollInterval, description: description) - } -} - -// Deprecated -extension Expectation { - /// Tests the actual value using a matcher to match by checking continuously - /// at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T { - if expression.isClosure { - let (pass, msg) = execute( - expression, - .toMatch, - async( - style: .toMatch, - predicate: matcher.predicate, - timeout: timeout, - poll: pollInterval, - fnName: "toEventually" - ), - to: "to eventually", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } else { - verify(false, toEventuallyRequiresClosureError) - } - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventuallyNot(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T { - if expression.isClosure { - let (pass, msg) = expressionDoesNotMatch( - expression, - matcher: async( - style: .toNotMatch, - predicate: matcher.predicate, - timeout: timeout, - poll: pollInterval, - fnName: "toEventuallyNot" - ), - toNot: "to eventually not", - description: description - ) - verify(pass, msg) - } else { - verify(false, toEventuallyRequiresClosureError) - } - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// Alias of toEventuallyNot() - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toNotEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T { - return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift deleted file mode 100644 index 5d0f5a1..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift +++ /dev/null @@ -1,68 +0,0 @@ -import Foundation - -private func matcherMessage(forType expectedType: T.Type) -> String { - return "be a kind of \(String(describing: expectedType))" -} -private func matcherMessage(forClass expectedClass: AnyClass) -> String { - return "be a kind of \(String(describing: expectedClass))" -} - -/// A Nimble matcher that succeeds when the actual value is an instance of the given class. -public func beAKindOf(_ expectedType: T.Type) -> Predicate { - return Predicate.define { actualExpression in - let message: ExpectationMessage - - let instance = try actualExpression.evaluate() - guard let validInstance = instance else { - message = .expectedCustomValueTo(matcherMessage(forType: expectedType), "") - return PredicateResult(status: .fail, message: message) - } - message = .expectedCustomValueTo( - "be a kind of \(String(describing: expectedType))", - "<\(String(describing: type(of: validInstance))) instance>" - ) - - return PredicateResult( - bool: validInstance is T, - message: message - ) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - -/// A Nimble matcher that succeeds when the actual value is an instance of the given class. -/// @see beAnInstanceOf if you want to match against the exact class -public func beAKindOf(_ expectedClass: AnyClass) -> Predicate { - return Predicate.define { actualExpression in - let message: ExpectationMessage - let status: PredicateStatus - - let instance = try actualExpression.evaluate() - if let validInstance = instance { - status = PredicateStatus(bool: instance != nil && instance!.isKind(of: expectedClass)) - message = .expectedCustomValueTo( - matcherMessage(forClass: expectedClass), - "<\(String(describing: type(of: validInstance))) instance>" - ) - } else { - status = .fail - message = .expectedCustomValueTo( - matcherMessage(forClass: expectedClass), - "" - ) - } - - return PredicateResult(status: status, message: message) - } -} - -extension NMBObjCMatcher { - @objc public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher { - return NMBPredicate { actualExpression in - return try beAKindOf(expected).satisfies(actualExpression).toObjectiveC() - } - } -} - -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift deleted file mode 100644 index bc1b02c..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift +++ /dev/null @@ -1,56 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is an _exact_ instance of the given class. -public func beAnInstanceOf(_ expectedType: T.Type) -> Predicate { - let errorMessage = "be an instance of \(String(describing: expectedType))" - return Predicate.define { actualExpression in - let instance = try actualExpression.evaluate() - guard let validInstance = instance else { - return PredicateResult( - status: .doesNotMatch, - message: .expectedActualValueTo(errorMessage) - ) - } - - let actualString = "<\(String(describing: type(of: validInstance))) instance>" - - return PredicateResult( - status: PredicateStatus(bool: type(of: validInstance) == expectedType), - message: .expectedCustomValueTo(errorMessage, actualString) - ) - } -} - -/// A Nimble matcher that succeeds when the actual value is an instance of the given class. -/// @see beAKindOf if you want to match against subclasses -public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate { - let errorMessage = "be an instance of \(String(describing: expectedClass))" - return Predicate.define { actualExpression in - let instance = try actualExpression.evaluate() - let actualString: String - if let validInstance = instance { - actualString = "<\(String(describing: type(of: validInstance))) instance>" - } else { - actualString = "" - } - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - let matches = instance != nil && instance!.isMember(of: expectedClass) - #else - let matches = instance != nil && type(of: instance!) == expectedClass - #endif - return PredicateResult( - status: PredicateStatus(bool: matches), - message: .expectedCustomValueTo(errorMessage, actualString) - ) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher { - return NMBPredicate { actualExpression in - return try beAnInstanceOf(expected).satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift deleted file mode 100644 index b1e6f4c..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift +++ /dev/null @@ -1,138 +0,0 @@ -import Foundation - -public let DefaultDelta = 0.0001 - -internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, - expectedValue: NMBDoubleConvertible, - delta: Double) - -> PredicateResult { - let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" - return PredicateResult( - bool: actualValue != nil && - abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta, - message: .expectedCustomValueTo(errorMessage, "<\(stringify(actualValue))>") - ) -} - -/// A Nimble matcher that succeeds when a value is close to another. This is used for floating -/// point values which can have imprecise results when doing arithmetic on them. -/// -/// @see equal -public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDelta) -> Predicate { - return Predicate.define { actualExpression in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) - } -} - -/// A Nimble matcher that succeeds when a value is close to another. This is used for floating -/// point values which can have imprecise results when doing arithmetic on them. -/// -/// @see equal -public func beCloseTo(_ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> Predicate { - return Predicate.define { actualExpression in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -public class NMBObjCBeCloseToMatcher: NSObject, NMBMatcher { - var _expected: NSNumber - var _delta: CDouble - init(expected: NSNumber, within: CDouble) { - _expected = expected - _delta = within - } - - @objc public func matches(_ actualExpression: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let actualBlock: () -> NMBDoubleConvertible? = ({ - return actualExpression() as? NMBDoubleConvertible - }) - let expr = Expression(expression: actualBlock, location: location) - let matcher = beCloseTo(self._expected, within: self._delta) - - do { - return try matcher.matches(expr, failureMessage: failureMessage) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - } - - @objc public func doesNotMatch(_ actualExpression: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let actualBlock: () -> NMBDoubleConvertible? = ({ - return actualExpression() as? NMBDoubleConvertible - }) - let expr = Expression(expression: actualBlock, location: location) - let matcher = beCloseTo(self._expected, within: self._delta) - - do { - return try matcher.doesNotMatch(expr, failureMessage: failureMessage) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - } - - @objc public var within: (CDouble) -> NMBObjCBeCloseToMatcher { - return ({ delta in - return NMBObjCBeCloseToMatcher(expected: self._expected, within: delta) - }) - } -} - -extension NMBObjCMatcher { - @objc public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { - return NMBObjCBeCloseToMatcher(expected: expected, within: within) - } -} -#endif - -public func beCloseTo(_ expectedValues: [Double], within delta: Double = DefaultDelta) -> Predicate<[Double]> { - let errorMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" - return Predicate.simple(errorMessage) { actualExpression in - if let actual = try actualExpression.evaluate() { - if actual.count != expectedValues.count { - return .doesNotMatch - } else { - for (index, actualItem) in actual.enumerated() { - if fabs(actualItem - expectedValues[index]) > delta { - return .doesNotMatch - } - } - return .matches - } - } - return .doesNotMatch - } -} - -// MARK: - Operators - -infix operator ≈ : ComparisonPrecedence - -public func ≈(lhs: Expectation<[Double]>, rhs: [Double]) { - lhs.to(beCloseTo(rhs)) -} - -public func ≈(lhs: Expectation, rhs: NMBDoubleConvertible) { - lhs.to(beCloseTo(rhs)) -} - -public func ≈(lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) -} - -public func == (lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) -} - -// make this higher precedence than exponents so the Doubles either end aren't pulled in -// unexpectantly -precedencegroup PlusMinusOperatorPrecedence { - higherThan: BitwiseShiftPrecedence -} - -infix operator ± : PlusMinusOperatorPrecedence -public func ±(lhs: NMBDoubleConvertible, rhs: Double) -> (expected: NMBDoubleConvertible, delta: Double) { - return (expected: lhs, delta: rhs) -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift deleted file mode 100644 index 8d73dcc..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift +++ /dev/null @@ -1,95 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualSeq = try actualExpression.evaluate() - if actualSeq == nil { - return .fail - } - var generator = actualSeq!.makeIterator() - return PredicateStatus(bool: generator.next() == nil) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualString = try actualExpression.evaluate() - return PredicateStatus(bool: actualString == nil || NSString(string: actualString!).length == 0) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For NSString instances, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualString = try actualExpression.evaluate() - return PredicateStatus(bool: actualString == nil || actualString!.length == 0) - } -} - -// Without specific overrides, beEmpty() is ambiguous for NSDictionary, NSArray, -// etc, since they conform to Sequence as well as NMBCollection. - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualDictionary = try actualExpression.evaluate() - return PredicateStatus(bool: actualDictionary == nil || actualDictionary!.count == 0) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actualArray = try actualExpression.evaluate() - return PredicateStatus(bool: actualArray == nil || actualArray!.count == 0) - } -} - -/// A Nimble matcher that succeeds when a value is "empty". For collections, this -/// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in - let actual = try actualExpression.evaluate() - return PredicateStatus(bool: actual == nil || actual!.count == 0) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beEmptyMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in - let location = actualExpression.location - let actualValue = try actualExpression.evaluate() - - if let value = actualValue as? NMBCollection { - let expr = Expression(expression: ({ value as NMBCollection }), location: location) - return try beEmpty().satisfies(expr).toObjectiveC() - } else if let value = actualValue as? NSString { - let expr = Expression(expression: ({ value as String }), location: location) - return try beEmpty().satisfies(expr).toObjectiveC() - } else if let actualValue = actualValue { - // swiftlint:disable:next line_length - let badTypeErrorMsg = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage( - expectedActualValueTo: badTypeErrorMsg, - customActualValue: "\(String(describing: type(of: actualValue))) type" - ) - ) - } - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage(expectedActualValueTo: "be empty").appendedBeNilHint() - ) - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift deleted file mode 100644 index b86f25d..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift +++ /dev/null @@ -1,42 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: T?) -> Predicate { - let errorMessage = "be greater than <\(stringify(expectedValue))>" - return Predicate.simple(errorMessage) { actualExpression in - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return PredicateStatus(bool: actual > expected) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate { - let errorMessage = "be greater than <\(stringify(expectedValue))>" - return Predicate.simple(errorMessage) { actualExpression in - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil - && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending - return PredicateStatus(bool: matches) - } -} - -public func >(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThan(rhs)) -} - -public func > (lhs: Expectation, rhs: NMBComparable?) { - lhs.to(beGreaterThan(rhs)) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { $0 as? NMBComparable } - return try beGreaterThan(expected).matches(expr, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift deleted file mode 100644 index 2a3ca4a..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift +++ /dev/null @@ -1,44 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is greater than -/// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { - let message = "be greater than or equal to <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in - let actualValue = try actualExpression.evaluate() - if let actual = actualValue, let expected = expectedValue { - return PredicateStatus(bool: actual >= expected) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual value is greater than -/// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { - let message = "be greater than or equal to <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending - return PredicateStatus(bool: matches) - } -} - -public func >=(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThanOrEqualTo(rhs)) -} - -public func >=(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThanOrEqualTo(rhs)) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { $0 as? NMBComparable } - return try beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift deleted file mode 100644 index 94758c2..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift +++ /dev/null @@ -1,53 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is the same instance -/// as the expected instance. -public func beIdenticalTo(_ expected: Any?) -> Predicate { - return Predicate.define { actualExpression in - #if os(Linux) - let actual = try actualExpression.evaluate() as? AnyObject - #else - let actual = try actualExpression.evaluate() as AnyObject? - #endif - - let bool: Bool - #if os(Linux) - bool = actual === (expected as? AnyObject) && actual !== nil - #else - bool = actual === (expected as AnyObject?) && actual !== nil - #endif - return PredicateResult( - bool: bool, - message: .expectedCustomValueTo( - "be identical to \(identityAsString(expected))", - "\(identityAsString(actual))" - ) - ) - } -} - -public func === (lhs: Expectation, rhs: Any?) { - lhs.to(beIdenticalTo(rhs)) -} -public func !== (lhs: Expectation, rhs: Any?) { - lhs.toNot(beIdenticalTo(rhs)) -} - -/// A Nimble matcher that succeeds when the actual value is the same instance -/// as the expected instance. -/// -/// Alias for "beIdenticalTo". -public func be(_ expected: Any?) -> Predicate { - return beIdenticalTo(expected) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let aExpr = actualExpression.cast { $0 as Any? } - return try beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift deleted file mode 100644 index e1fbf1e..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift +++ /dev/null @@ -1,41 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: T?) -> Predicate { - let message = "be less than <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return PredicateStatus(bool: actual < expected) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate { - let message = "be less than <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending - return PredicateStatus(bool: matches) - } -} - -public func <(lhs: Expectation, rhs: T) { - lhs.to(beLessThan(rhs)) -} - -public func < (lhs: Expectation, rhs: NMBComparable?) { - lhs.to(beLessThan(rhs)) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { $0 as? NMBComparable } - return try beLessThan(expected).matches(expr, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift deleted file mode 100644 index c37cb16..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift +++ /dev/null @@ -1,41 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is less than -/// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { - return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return PredicateStatus(bool: actual <= expected) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual value is less than -/// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { - return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in - let actualValue = try actualExpression.evaluate() - let matches = actualValue.map { $0.NMB_compare(expectedValue) != .orderedDescending } ?? false - return PredicateStatus(bool: matches) - } -} - -public func <=(lhs: Expectation, rhs: T) { - lhs.to(beLessThanOrEqualTo(rhs)) -} - -public func <=(lhs: Expectation, rhs: T) { - lhs.to(beLessThanOrEqualTo(rhs)) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { $0 as? NMBComparable } - return try beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift deleted file mode 100644 index 035500e..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift +++ /dev/null @@ -1,167 +0,0 @@ -import Foundation - -extension Int8: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).int8Value - } -} - -extension UInt8: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uint8Value - } -} - -extension Int16: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).int16Value - } -} - -extension UInt16: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uint16Value - } -} - -extension Int32: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).int32Value - } -} - -extension UInt32: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uint32Value - } -} - -extension Int64: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).int64Value - } -} - -extension UInt64: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uint64Value - } -} - -extension Float: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).floatValue - } -} - -extension Double: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).doubleValue - } -} - -extension Int: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).intValue - } -} - -extension UInt: ExpressibleByBooleanLiteral { - public init(booleanLiteral value: Bool) { - self = NSNumber(value: value).uintValue - } -} - -internal func rename(_ matcher: Predicate, failureMessage message: ExpectationMessage) -> Predicate { - return Predicate { actualExpression in - let result = try matcher.satisfies(actualExpression) - return PredicateResult(status: result.status, message: message) - }.requireNonNil -} - -// MARK: beTrue() / beFalse() - -/// A Nimble matcher that succeeds when the actual value is exactly true. -/// This matcher will not match against nils. -public func beTrue() -> Predicate { - return rename(equal(true), failureMessage: .expectedActualValueTo("be true")) -} - -/// A Nimble matcher that succeeds when the actual value is exactly false. -/// This matcher will not match against nils. -public func beFalse() -> Predicate { - return rename(equal(false), failureMessage: .expectedActualValueTo("be false")) -} - -// MARK: beTruthy() / beFalsy() - -/// A Nimble matcher that succeeds when the actual value is not logically false. -public func beTruthy() -> Predicate { - return Predicate.simpleNilable("be truthy") { actualExpression in - let actualValue = try actualExpression.evaluate() - if let actualValue = actualValue { - // FIXME: This is a workaround to SR-2290. - // See: - // - https://bugs.swift.org/browse/SR-2290 - // - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873 - if let number = actualValue as? NSNumber { - return PredicateStatus(bool: number.boolValue == true) - } - - return PredicateStatus(bool: actualValue == (true as T)) - } - return PredicateStatus(bool: actualValue != nil) - } -} - -/// A Nimble matcher that succeeds when the actual value is logically false. -/// This matcher will match against nils. -public func beFalsy() -> Predicate { - return Predicate.simpleNilable("be falsy") { actualExpression in - let actualValue = try actualExpression.evaluate() - if let actualValue = actualValue { - // FIXME: This is a workaround to SR-2290. - // See: - // - https://bugs.swift.org/browse/SR-2290 - // - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873 - if let number = actualValue as? NSNumber { - return PredicateStatus(bool: number.boolValue == false) - } - - return PredicateStatus(bool: actualValue == (false as T)) - } - return PredicateStatus(bool: actualValue == nil) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beTruthyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try beTruthy().matches(expr, failureMessage: failureMessage) - } - } - - @objc public class func beFalsyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try beFalsy().matches(expr, failureMessage: failureMessage) - } - } - - @objc public class func beTrueMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try beTrue().matches(expr, failureMessage: failureMessage) - } - } - - @objc public class func beFalseMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try beFalse().matches(expr, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift deleted file mode 100644 index 387420b..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift +++ /dev/null @@ -1,19 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is nil. -public func beNil() -> Predicate { - return Predicate.simpleNilable("be nil") { actualExpression in - let actualValue = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue == nil) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beNilMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in - return try beNil().matches(actualExpression, failureMessage: failureMessage) - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift deleted file mode 100644 index a9dbc28..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift +++ /dev/null @@ -1,17 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is Void. -public func beVoid() -> Predicate<()> { - return Predicate.simpleNilable("be void") { actualExpression in - let actualValue: ()? = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue != nil) - } -} - -public func == (lhs: Expectation<()>, rhs: ()) { - lhs.to(beVoid()) -} - -public func != (lhs: Expectation<()>, rhs: ()) { - lhs.toNot(beVoid()) -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift deleted file mode 100644 index a013f9f..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift +++ /dev/null @@ -1,60 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual sequence's first element -/// is equal to the expected value. -public func beginWith(_ startingElement: T) -> Predicate - where S.Iterator.Element == T { - return Predicate.simple("begin with <\(startingElement)>") { actualExpression in - if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return PredicateStatus(bool: actualGenerator.next() == startingElement) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual collection's first element -/// is equal to the expected object. -public func beginWith(_ startingElement: Any) -> Predicate { - return Predicate.simple("begin with <\(startingElement)>") { actualExpression in - guard let collection = try actualExpression.evaluate() else { return .fail } - guard collection.count > 0 else { return .doesNotMatch } - #if os(Linux) - guard let collectionValue = collection.object(at: 0) as? NSObject else { - return .fail - } - #else - let collectionValue = collection.object(at: 0) as AnyObject - #endif - return PredicateStatus(bool: collectionValue.isEqual(startingElement)) - } -} - -/// A Nimble matcher that succeeds when the actual string contains expected substring -/// where the expected substring's location is zero. -public func beginWith(_ startingSubstring: String) -> Predicate { - return Predicate.simple("begin with <\(startingSubstring)>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let range = actual.range(of: startingSubstring) - return PredicateStatus(bool: range != nil && range!.lowerBound == actual.startIndex) - } - return .fail - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func beginWithMatcher(_ expected: Any) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = try actualExpression.evaluate() - if (actual as? String) != nil { - let expr = actualExpression.cast { $0 as? String } - return try beginWith(expected as! String).matches(expr, failureMessage: failureMessage) - } else { - let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return try beginWith(expected).matches(expr, failureMessage: failureMessage) - } - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift deleted file mode 100644 index 2c84c5c..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift +++ /dev/null @@ -1,95 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual sequence contains the expected value. -public func contain(_ items: T...) -> Predicate - where S.Iterator.Element == T { - return contain(items) -} - -public func contain(_ items: [T]) -> Predicate - where S.Iterator.Element == T { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let matches = items.all { - return actual.contains($0) - } - return PredicateStatus(bool: matches) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: String...) -> Predicate { - return contain(substrings) -} - -public func contain(_ substrings: [String]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(substrings))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let matches = substrings.all { - let range = actual.range(of: $0) - return range != nil && !range!.isEmpty - } - return PredicateStatus(bool: matches) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: NSString...) -> Predicate { - return contain(substrings) -} - -public func contain(_ substrings: [NSString]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(substrings))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - let matches = substrings.all { actual.range(of: $0.description).length != 0 } - return PredicateStatus(bool: matches) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual collection contains the expected object. -public func contain(_ items: Any?...) -> Predicate { - return contain(items) -} - -public func contain(_ items: [Any?]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in - guard let actual = try actualExpression.evaluate() else { return .fail } - let matches = items.all { item in - return item.map { actual.contains($0) } ?? false - } - return PredicateStatus(bool: matches) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func containMatcher(_ expected: [NSObject]) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let location = actualExpression.location - let actualValue = try actualExpression.evaluate() - if let value = actualValue as? NMBContainer { - let expr = Expression(expression: ({ value as NMBContainer }), location: location) - - // A straightforward cast on the array causes this to crash, so we have to cast the individual items - let expectedOptionals: [Any?] = expected.map({ $0 as Any? }) - return try contain(expectedOptionals).matches(expr, failureMessage: failureMessage) - } else if let value = actualValue as? NSString { - let expr = Expression(expression: ({ value as String }), location: location) - return try contain(expected as! [String]).matches(expr, failureMessage: failureMessage) - } else if actualValue != nil { - // swiftlint:disable:next line_length - failureMessage.postfixMessage = "contain <\(arrayAsString(expected))> (only works for NSArrays, NSSets, NSHashTables, and NSStrings)" - } else { - failureMessage.postfixMessage = "contain <\(arrayAsString(expected))>" - } - return false - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift deleted file mode 100644 index 8a23a6c..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift +++ /dev/null @@ -1,58 +0,0 @@ -import Foundation - -public func containElementSatisfying(_ predicate: @escaping ((T) -> Bool), _ predicateDescription: String = "") -> Predicate where S.Iterator.Element == T { - - return Predicate.define { actualExpression in - let message: ExpectationMessage - if predicateDescription == "" { - message = .expectedTo("find object in collection that satisfies predicate") - } else { - message = .expectedTo("find object in collection \(predicateDescription)") - } - - if let sequence = try actualExpression.evaluate() { - for object in sequence { - if predicate(object) { - return PredicateResult(bool: true, message: message) - } - } - - return PredicateResult(bool: false, message: message) - } - - return PredicateResult(status: .fail, message: message) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - extension NMBObjCMatcher { - @objc public class func containElementSatisfyingMatcher(_ predicate: @escaping ((NSObject) -> Bool)) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let value = try actualExpression.evaluate() - guard let enumeration = value as? NSFastEnumeration else { - // swiftlint:disable:next line_length - failureMessage.postfixMessage = "containElementSatisfying must be provided an NSFastEnumeration object" - failureMessage.actualValue = nil - failureMessage.expected = "" - failureMessage.to = "" - return false - } - - var iterator = NSFastEnumerationIterator(enumeration) - while let item = iterator.next() { - guard let object = item as? NSObject else { - continue - } - - if predicate(object) { - return true - } - } - - failureMessage.actualValue = nil - failureMessage.postfixMessage = "find object in collection that satisfies predicate" - return false - } - } - } -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift deleted file mode 100644 index 80a06ca..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift +++ /dev/null @@ -1,68 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual sequence's last element -/// is equal to the expected value. -public func endWith(_ endingElement: T) -> Predicate - where S.Iterator.Element == T { - return Predicate.simple("end with <\(endingElement)>") { actualExpression in - if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - var lastItem: T? - var item: T? - repeat { - lastItem = item - item = actualGenerator.next() - } while(item != nil) - - return PredicateStatus(bool: lastItem == endingElement) - } - return .fail - } -} - -/// A Nimble matcher that succeeds when the actual collection's last element -/// is equal to the expected object. -public func endWith(_ endingElement: Any) -> Predicate { - return Predicate.simple("end with <\(endingElement)>") { actualExpression in - guard let collection = try actualExpression.evaluate() else { return .fail } - guard collection.count > 0 else { return PredicateStatus(bool: false) } - #if os(Linux) - guard let collectionValue = collection.object(at: collection.count - 1) as? NSObject else { - return .fail - } - #else - let collectionValue = collection.object(at: collection.count - 1) as AnyObject - #endif - - return PredicateStatus(bool: collectionValue.isEqual(endingElement)) - } -} - -/// A Nimble matcher that succeeds when the actual string contains the expected substring -/// where the expected substring's location is the actual string's length minus the -/// expected substring's length. -public func endWith(_ endingSubstring: String) -> Predicate { - return Predicate.simple("end with <\(endingSubstring)>") { actualExpression in - if let collection = try actualExpression.evaluate() { - return PredicateStatus(bool: collection.hasSuffix(endingSubstring)) - } - return .fail - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func endWithMatcher(_ expected: Any) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = try actualExpression.evaluate() - if (actual as? String) != nil { - let expr = actualExpression.cast { $0 as? String } - return try endWith(expected as! String).matches(expr, failureMessage: failureMessage) - } else { - let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return try endWith(expected).matches(expr, failureMessage: failureMessage) - } - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift deleted file mode 100644 index 5f26f49..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift +++ /dev/null @@ -1,220 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value is equal to the expected value. -/// Values can support equal by supporting the Equatable protocol. -/// -/// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). -public func equal(_ expectedValue: T?) -> Predicate { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in - let actualValue = try actualExpression.evaluate() - let matches = actualValue == expectedValue && expectedValue != nil - if expectedValue == nil || actualValue == nil { - if expectedValue == nil && actualValue != nil { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - return PredicateResult(status: .fail, message: msg) - } - return PredicateResult(status: PredicateStatus(bool: matches), message: msg) - } -} - -/// A Nimble matcher that succeeds when the actual value is equal to the expected value. -/// Values can support equal by supporting the Equatable protocol. -/// -/// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). -public func equal(_ expectedValue: [T: C]?) -> Predicate<[T: C]> { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in - let actualValue = try actualExpression.evaluate() - if expectedValue == nil || actualValue == nil { - if expectedValue == nil && actualValue != nil { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - return PredicateResult(status: .fail, message: msg) - } - return PredicateResult( - status: PredicateStatus(bool: expectedValue! == actualValue!), - message: msg - ) - } -} - -/// A Nimble matcher that succeeds when the actual collection is equal to the expected collection. -/// Items must implement the Equatable protocol. -public func equal(_ expectedValue: [T]?) -> Predicate<[T]> { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in - let actualValue = try actualExpression.evaluate() - if expectedValue == nil || actualValue == nil { - if expectedValue == nil && actualValue != nil { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - return PredicateResult( - status: .fail, - message: msg - ) - } - return PredicateResult( - bool: expectedValue! == actualValue!, - message: msg - ) - } -} - -/// A Nimble matcher allowing comparison of collection with optional type -public func equal(_ expectedValue: [T?]) -> Predicate<[T?]> { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in - if let actualValue = try actualExpression.evaluate() { - let doesNotMatch = PredicateResult( - status: .doesNotMatch, - message: msg - ) - - if expectedValue.count != actualValue.count { - return doesNotMatch - } - - for (index, item) in actualValue.enumerated() { - let otherItem = expectedValue[index] - if item == nil && otherItem == nil { - continue - } else if item == nil && otherItem != nil { - return doesNotMatch - } else if item != nil && otherItem == nil { - return doesNotMatch - } else if item! != otherItem! { - return doesNotMatch - } - } - - return PredicateResult( - status: .matches, - message: msg - ) - } else { - return PredicateResult( - status: .fail, - message: msg.appendedBeNilHint() - ) - } - } -} - -/// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set?) -> Predicate> { - return equal(expectedValue, stringify: { stringify($0) }) -} - -/// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set?) -> Predicate> { - return equal(expectedValue, stringify: { - if let set = $0 { - return stringify(Array(set).sorted { $0 < $1 }) - } else { - return "nil" - } - }) -} - -private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> Predicate> { - return Predicate { actualExpression in - var errorMessage: ExpectationMessage = - .expectedActualValueTo("equal <\(stringify(expectedValue))>") - - if let expectedValue = expectedValue { - if let actualValue = try actualExpression.evaluate() { - errorMessage = .expectedCustomValueTo( - "equal <\(stringify(expectedValue))>", - "<\(stringify(actualValue))>" - ) - - if expectedValue == actualValue { - return PredicateResult( - status: .matches, - message: errorMessage - ) - } - - let missing = expectedValue.subtracting(actualValue) - if missing.count > 0 { - errorMessage = errorMessage.appended(message: ", missing <\(stringify(missing))>") - } - - let extra = actualValue.subtracting(expectedValue) - if extra.count > 0 { - errorMessage = errorMessage.appended(message: ", extra <\(stringify(extra))>") - } - return PredicateResult( - status: .doesNotMatch, - message: errorMessage - ) - } - return PredicateResult( - status: .fail, - message: errorMessage.appendedBeNilHint() - ) - } else { - return PredicateResult( - status: .fail, - message: errorMessage.appendedBeNilHint() - ) - } - } -} - -public func ==(lhs: Expectation, rhs: T?) { - lhs.to(equal(rhs)) -} - -public func !=(lhs: Expectation, rhs: T?) { - lhs.toNot(equal(rhs)) -} - -public func ==(lhs: Expectation<[T]>, rhs: [T]?) { - lhs.to(equal(rhs)) -} - -public func !=(lhs: Expectation<[T]>, rhs: [T]?) { - lhs.toNot(equal(rhs)) -} - -public func == (lhs: Expectation>, rhs: Set?) { - lhs.to(equal(rhs)) -} - -public func != (lhs: Expectation>, rhs: Set?) { - lhs.toNot(equal(rhs)) -} - -public func ==(lhs: Expectation>, rhs: Set?) { - lhs.to(equal(rhs)) -} - -public func !=(lhs: Expectation>, rhs: Set?) { - lhs.toNot(equal(rhs)) -} - -public func ==(lhs: Expectation<[T: C]>, rhs: [T: C]?) { - lhs.to(equal(rhs)) -} - -public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { - lhs.toNot(equal(rhs)) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func equalMatcher(_ expected: NSObject) -> NMBMatcher { - return NMBPredicate { actualExpression in - return try equal(expected).satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift deleted file mode 100644 index 3529da8..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift +++ /dev/null @@ -1,65 +0,0 @@ -import Foundation - -// The `haveCount` matchers do not print the full string representation of the collection value, -// instead they only print the type name and the expected count. This makes it easier to understand -// the reason for failed expectations. See: https://github.com/Quick/Nimble/issues/308. -// The representation of the collection content is provided in a new line as an `extendedMessage`. - -/// A Nimble matcher that succeeds when the actual Collection's count equals -/// the expected value -public func haveCount(_ expectedValue: T.IndexDistance) -> Predicate { - return Predicate.define { actualExpression in - if let actualValue = try actualExpression.evaluate() { - let message = ExpectationMessage - .expectedCustomValueTo( - "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))", - "\(actualValue.count)" - ) - .appended(details: "Actual Value: \(stringify(actualValue))") - - let result = expectedValue == actualValue.count - return PredicateResult(bool: result, message: message) - } else { - return PredicateResult(status: .fail, message: .fail("")) - } - } -} - -/// A Nimble matcher that succeeds when the actual collection's count equals -/// the expected value -public func haveCount(_ expectedValue: Int) -> Predicate { - return Predicate { actualExpression in - if let actualValue = try actualExpression.evaluate() { - let message = ExpectationMessage - .expectedCustomValueTo( - "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))", - "\(actualValue.count)" - ) - .appended(details: "Actual Value: \(stringify(actualValue))") - - let result = expectedValue == actualValue.count - return PredicateResult(bool: result, message: message) - } else { - return PredicateResult(status: .fail, message: .fail("")) - } - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func haveCountMatcher(_ expected: NSNumber) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let location = actualExpression.location - let actualValue = try actualExpression.evaluate() - if let value = actualValue as? NMBCollection { - let expr = Expression(expression: ({ value as NMBCollection}), location: location) - return try haveCount(expected.intValue).matches(expr, failureMessage: failureMessage) - } else if let actualValue = actualValue { - failureMessage.postfixMessage = "get type of NSArray, NSSet, NSDictionary, or NSHashTable" - failureMessage.actualValue = "\(String(describing: type(of: actualValue)))" - } - return false - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/Match.swift deleted file mode 100644 index f738daf..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Match.swift +++ /dev/null @@ -1,29 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual string satisfies the regular expression -/// described by the expected string. -public func match(_ expectedValue: String?) -> Predicate { - return Predicate.simple("match <\(stringify(expectedValue))>") { actualExpression in - if let actual = try actualExpression.evaluate() { - if let regexp = expectedValue { - let bool = actual.range(of: regexp, options: .regularExpression) != nil - return PredicateStatus(bool: bool) - } - } - - return .fail - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - -extension NMBObjCMatcher { - @objc public class func matchMatcher(_ expected: NSString) -> NMBMatcher { - return NMBPredicate { actualExpression in - let actual = actualExpression.cast { $0 as? String } - return try match(expected.description).satisfies(actual).toObjectiveC() - } - } -} - -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift deleted file mode 100644 index 4ad71d4..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift +++ /dev/null @@ -1,76 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual expression evaluates to an -/// error from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparison by _domain and _code. -public func matchError(_ error: T) -> Predicate { - return Predicate.define { actualExpression in - let actualError = try actualExpression.evaluate() - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - postfixMessageVerb: "match", - actualError: actualError, - error: error - ) - - var matches = false - if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { - matches = true - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression evaluates to an -/// error from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparision by _domain and _code. -public func matchError(_ error: T) -> Predicate { - return Predicate.define { actualExpression in - let actualError = try actualExpression.evaluate() - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - postfixMessageVerb: "match", - actualError: actualError, - error: error - ) - - var matches = false - if let actualError = actualError as? T, error == actualError { - matches = true - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression evaluates to an -/// error of the specified type -public func matchError(_ errorType: T.Type) -> Predicate { - return Predicate.define { actualExpression in - let actualError = try actualExpression.evaluate() - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - postfixMessageVerb: "match", - actualError: actualError, - errorType: errorType - ) - - var matches = false - if actualError as? T != nil { - matches = true - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift deleted file mode 100644 index abcafa9..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift +++ /dev/null @@ -1,85 +0,0 @@ -/// DEPRECATED: A convenience API to build matchers that don't need special negation -/// behavior. The toNot() behavior is the negation of to(). -/// -/// @see NonNilMatcherFunc if you prefer to have this matcher fail when nil -/// values are received in an expectation. -/// -/// You may use this when implementing your own custom matchers. -/// -/// Use the Matcher protocol instead of this type to accept custom matchers as -/// input parameters. -/// @see allPass for an example that uses accepts other matchers as input. -@available(*, deprecated, message: "Use to Predicate instead") -public struct MatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage) throws -> Bool - - public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { - self.matcher = matcher - } - - public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try matcher(actualExpression, failureMessage) - } - - public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try !matcher(actualExpression, failureMessage) - } - - /// Compatibility layer to new Matcher API. Converts an old-style matcher to a new one. - /// Note: You should definitely spend the time to convert to the new api as soon as possible - /// since this struct type is deprecated. - public var predicate: Predicate { - return Predicate.fromDeprecatedMatcher(self) - } -} - -/// DEPRECATED: A convenience API to build matchers that don't need special negation -/// behavior. The toNot() behavior is the negation of to(). -/// -/// Unlike MatcherFunc, this will always fail if an expectation contains nil. -/// This applies regardless of using to() or toNot(). -/// -/// You may use this when implementing your own custom matchers. -/// -/// Use the Matcher protocol instead of this type to accept custom matchers as -/// input parameters. -/// @see allPass for an example that uses accepts other matchers as input. -@available(*, deprecated, message: "Use to Predicate instead") -public struct NonNilMatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage) throws -> Bool - - public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { - self.matcher = matcher - } - - public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let pass = try matcher(actualExpression, failureMessage) - if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { - return false - } - return pass - } - - public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let pass = try !matcher(actualExpression, failureMessage) - if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { - return false - } - return pass - } - - internal func attachNilErrorIfNeeded(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - if try actualExpression.evaluate() == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - return true - } - return false - } - - /// Compatibility layer to new Matcher API. Converts an old-style matcher to a new one. - /// Note: You should definitely spend the time to convert to the new api as soon as possible - /// since this struct type is deprecated. - public var predicate: Predicate { - return Predicate.fromDeprecatedMatcher(self) - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift deleted file mode 100644 index 6f8f103..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift +++ /dev/null @@ -1,154 +0,0 @@ -import Foundation -// `CGFloat` is in Foundation (swift-corelibs-foundation) on Linux. -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - import CoreGraphics -#endif - -/// Implement this protocol to implement a custom matcher for Swift -@available(*, deprecated, message: "Use Predicate instead") -public protocol Matcher { - associatedtype ValueType - func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool - func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool -} - -extension Matcher { - var predicate: Predicate { - return Predicate.fromDeprecatedMatcher(self) - } - - var toClosure: (Expression, FailureMessage, Bool) throws -> Bool { - return ({ expr, msg, expectedResult in - if expectedResult { - return try self.matches(expr, failureMessage: msg) - } else { - return try self.doesNotMatch(expr, failureMessage: msg) - } - }) - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -/// Objective-C interface to the Swift variant of Matcher. -@objc public protocol NMBMatcher { - func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool - func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool -} -#endif - -/// Protocol for types that support contain() matcher. -public protocol NMBContainer { - func contains(_ anObject: Any) -> Bool -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -// FIXME: NSHashTable can not conform to NMBContainer since swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a -//extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet -#endif - -extension NSArray: NMBContainer {} -extension NSSet: NMBContainer {} - -/// Protocol for types that support only beEmpty(), haveCount() matchers -public protocol NMBCollection { - var count: Int { get } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NSHashTable: NMBCollection {} // Corelibs Foundation does not include these classes yet -extension NSMapTable: NMBCollection {} -#endif - -extension NSSet: NMBCollection {} -extension NSIndexSet: NMBCollection {} -extension NSDictionary: NMBCollection {} - -/// Protocol for types that support beginWith(), endWith(), beEmpty() matchers -public protocol NMBOrderedCollection: NMBCollection { - func object(at index: Int) -> Any -} - -extension NSArray: NMBOrderedCollection {} - -public protocol NMBDoubleConvertible { - var doubleValue: CDouble { get } -} - -extension Double: NMBDoubleConvertible { - public var doubleValue: CDouble { - return self - } -} - -extension Float: NMBDoubleConvertible { - public var doubleValue: CDouble { - return CDouble(self) - } -} - -extension CGFloat: NMBDoubleConvertible { - public var doubleValue: CDouble { - return CDouble(self) - } -} - -extension NSNumber: NMBDoubleConvertible { -} - -private let dateFormatter: DateFormatter = { - let formatter = DateFormatter() - formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSS" - formatter.locale = Locale(identifier: "en_US_POSIX") - - return formatter -}() - -extension Date: NMBDoubleConvertible { - public var doubleValue: CDouble { - return self.timeIntervalSinceReferenceDate - } -} - -extension NSDate: NMBDoubleConvertible { - public var doubleValue: CDouble { - return self.timeIntervalSinceReferenceDate - } -} - -extension Date: TestOutputStringConvertible { - public var testDescription: String { - return dateFormatter.string(from: self) - } -} - -extension NSDate: TestOutputStringConvertible { - public var testDescription: String { - return dateFormatter.string(from: Date(timeIntervalSinceReferenceDate: self.timeIntervalSinceReferenceDate)) - } -} - -/// Protocol for types to support beLessThan(), beLessThanOrEqualTo(), -/// beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers. -/// -/// Types that conform to Swift's Comparable protocol will work implicitly too -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -@objc public protocol NMBComparable { - func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult -} -#else -// This should become obsolete once Corelibs Foundation adds Comparable conformance to NSNumber -public protocol NMBComparable { - func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult -} -#endif - -extension NSNumber: NMBComparable { - public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { - return compare(otherObject as! NSNumber) - } -} -extension NSString: NMBComparable { - public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { - return compare(otherObject as! String) - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift deleted file mode 100644 index 16af011..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift +++ /dev/null @@ -1,98 +0,0 @@ -import Foundation - -// A workaround to SR-6419. -extension NotificationCenter { -#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) - #if swift(>=4.0) - #if swift(>=4.0.2) - #else - func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { - return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) - } - #endif - #elseif swift(>=3.2) - #if swift(>=3.2.2) - #else - // swiftlint:disable:next line_length - func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { - return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) - } - #endif - #else - // swiftlint:disable:next line_length - func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { - return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) - } - #endif -#endif -} - -internal class NotificationCollector { - private(set) var observedNotifications: [Notification] - private let notificationCenter: NotificationCenter - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - private var token: AnyObject? - #else - private var token: NSObjectProtocol? - #endif - - required init(notificationCenter: NotificationCenter) { - self.notificationCenter = notificationCenter - self.observedNotifications = [] - } - - func startObserving() { - // swiftlint:disable:next line_length - self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil, using: { [weak self] n in - // linux-swift gets confused by .append(n) - self?.observedNotifications.append(n) - }) - } - - deinit { - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - if let token = self.token { - self.notificationCenter.removeObserver(token) - } - #else - if let token = self.token as? AnyObject { - self.notificationCenter.removeObserver(token) - } - #endif - } -} - -private let mainThread = pthread_self() - -public func postNotifications( - _ notificationsMatcher: T, - fromNotificationCenter center: NotificationCenter = .default) - -> Predicate - where T: Matcher, T.ValueType == [Notification] -{ - _ = mainThread // Force lazy-loading of this value - let collector = NotificationCollector(notificationCenter: center) - collector.startObserving() - var once: Bool = false - - return Predicate { actualExpression in - let collectorNotificationsExpression = Expression(memoizedExpression: { _ in - return collector.observedNotifications - }, location: actualExpression.location, withoutCaching: true) - - assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") - if !once { - once = true - _ = try actualExpression.evaluate() - } - - let failureMessage = FailureMessage() - let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) - if collector.observedNotifications.isEmpty { - failureMessage.actualValue = "no notifications" - } else { - failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" - } - return PredicateResult(bool: match, message: failureMessage.toExpectationMessage()) - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift deleted file mode 100644 index 19fd322..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift +++ /dev/null @@ -1,352 +0,0 @@ -// New Matcher API -// -import Foundation - -/// A Predicate is part of the new matcher API that provides assertions to expectations. -/// -/// Given a code snippet: -/// -/// expect(1).to(equal(2)) -/// ^^^^^^^^ -/// Called a "matcher" -/// -/// A matcher consists of two parts a constructor function and the Predicate. The term Predicate -/// is used as a separate name from Matcher to help transition custom matchers to the new Nimble -/// matcher API. -/// -/// The Predicate provide the heavy lifting on how to assert against a given value. Internally, -/// predicates are simple wrappers around closures to provide static type information and -/// allow composition and wrapping of existing behaviors. -public struct Predicate { - fileprivate var matcher: (Expression) throws -> PredicateResult - - /// Constructs a predicate that knows how take a given value - public init(_ matcher: @escaping (Expression) throws -> PredicateResult) { - self.matcher = matcher - } - - /// Uses a predicate on a given value to see if it passes the predicate. - /// - /// @param expression The value to run the predicate's logic against - /// @returns A predicate result indicate passing or failing and an associated error message. - public func satisfies(_ expression: Expression) throws -> PredicateResult { - return try matcher(expression) - } -} - -/// Provides convenience helpers to defining predicates -extension Predicate { - /// Like Predicate() constructor, but automatically guard against nil (actual) values - public static func define(matcher: @escaping (Expression) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual) - }.requireNonNil - } - - /// Defines a predicate with a default message that can be returned in the closure - /// Also ensures the predicate's actual value cannot pass with `nil` given. - public static func define(_ msg: String, matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual, .expectedActualValueTo(msg)) - }.requireNonNil - } - - /// Defines a predicate with a default message that can be returned in the closure - /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. - public static func defineNilable(_ msg: String, matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual, .expectedActualValueTo(msg)) - } - } -} - -extension Predicate { - /// Provides a simple predicate definition that provides no control over the predefined - /// error message. - /// - /// Also ensures the predicate's actual value cannot pass with `nil` given. - public static func simple(_ msg: String, matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { - return Predicate { actual in - return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) - }.requireNonNil - } - - /// Provides a simple predicate definition that provides no control over the predefined - /// error message. - /// - /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. - public static func simpleNilable(_ msg: String, matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { - return Predicate { actual in - return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) - } - } -} - -// The Expectation style intended for comparison to a PredicateStatus. -public enum ExpectationStyle { - case toMatch, toNotMatch -} - -/// The value that a Predicates return to describe if the given (actual) value matches the -/// predicate. -public struct PredicateResult { - /// Status indicates if the predicate matches, does not match, or fails. - public var status: PredicateStatus - /// The error message that can be displayed if it does not match - public var message: ExpectationMessage - - /// Constructs a new PredicateResult with a given status and error message - public init(status: PredicateStatus, message: ExpectationMessage) { - self.status = status - self.message = message - } - - /// Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message) - public init(bool: Bool, message: ExpectationMessage) { - self.status = PredicateStatus(bool: bool) - self.message = message - } - - /// Converts the result to a boolean based on what the expectation intended - public func toBoolean(expectation style: ExpectationStyle) -> Bool { - return status.toBoolean(expectation: style) - } -} - -/// PredicateStatus is a trinary that indicates if a Predicate matches a given value or not -public enum PredicateStatus { - /// Matches indicates if the predicate / matcher passes with the given value - /// - /// For example, `equals(1)` returns `.matches` for `expect(1).to(equal(1))`. - case matches - /// DoesNotMatch indicates if the predicate / matcher fails with the given value, but *would* - /// succeed if the expectation was inverted. - /// - /// For example, `equals(2)` returns `.doesNotMatch` for `expect(1).toNot(equal(2))`. - case doesNotMatch - /// Fail indicates the predicate will never satisfy with the given value in any case. - /// A perfect example is that most matchers fail whenever given `nil`. - /// - /// Using `equal(1)` fails both `expect(nil).to(equal(1))` and `expect(nil).toNot(equal(1))`. - /// Note: Predicate's `requireNonNil` property will also provide this feature mostly for free. - /// Your predicate will still need to guard against nils, but error messaging will be - /// handled for you. - case fail - - /// Converts a boolean to either .matches (if true) or .doesNotMatch (if false). - public init(bool matches: Bool) { - if matches { - self = .matches - } else { - self = .doesNotMatch - } - } - - private func shouldMatch() -> Bool { - switch self { - case .matches: return true - case .doesNotMatch, .fail: return false - } - } - - private func shouldNotMatch() -> Bool { - switch self { - case .doesNotMatch: return true - case .matches, .fail: return false - } - } - - /// Converts the PredicateStatus result to a boolean based on what the expectation intended - internal func toBoolean(expectation style: ExpectationStyle) -> Bool { - if style == .toMatch { - return shouldMatch() - } else { - return shouldNotMatch() - } - } -} - -// Backwards compatibility until Old Matcher API removal -extension Predicate: Matcher { - /// Compatibility layer for old Matcher API, deprecated - public static func fromDeprecatedFullClosure(_ matcher: @escaping (Expression, FailureMessage, Bool) throws -> Bool) -> Predicate { - return Predicate { actual in - let failureMessage = FailureMessage() - let result = try matcher(actual, failureMessage, true) - return PredicateResult( - status: PredicateStatus(bool: result), - message: failureMessage.toExpectationMessage() - ) - } - } - - /// Compatibility layer for old Matcher API, deprecated. - /// Emulates the MatcherFunc API - public static func fromDeprecatedClosure(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) -> Predicate { - return Predicate { actual in - let failureMessage = FailureMessage() - let result = try matcher(actual, failureMessage) - return PredicateResult( - status: PredicateStatus(bool: result), - message: failureMessage.toExpectationMessage() - ) - } - - } - - /// Compatibility layer for old Matcher API, deprecated. - /// Same as calling .predicate on a MatcherFunc or NonNilMatcherFunc type. - public static func fromDeprecatedMatcher(_ matcher: M) -> Predicate where M: Matcher, M.ValueType == T { - return self.fromDeprecatedFullClosure(matcher.toClosure) - } - - /// Deprecated Matcher API, use satisfies(_:_) instead - public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let result = try satisfies(actualExpression) - result.message.update(failureMessage: failureMessage) - return result.toBoolean(expectation: .toMatch) - } - - /// Deprecated Matcher API, use satisfies(_:_) instead - public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let result = try satisfies(actualExpression) - result.message.update(failureMessage: failureMessage) - return result.toBoolean(expectation: .toNotMatch) - } -} - -extension Predicate { - // Someday, make this public? Needs documentation - internal func after(f: @escaping (Expression, PredicateResult) throws -> PredicateResult) -> Predicate { - return Predicate { actual -> PredicateResult in - let result = try self.satisfies(actual) - return try f(actual, result) - } - } - - /// Returns a new Predicate based on the current one that always fails if nil is given as - /// the actual value. - /// - /// This replaces `NonNilMatcherFunc`. - public var requireNonNil: Predicate { - return after { actual, result in - if try actual.evaluate() == nil { - return PredicateResult( - status: .fail, - message: result.message.appendedBeNilHint() - ) - } - return result - } - } -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -public typealias PredicateBlock = (_ actualExpression: Expression) throws -> NMBPredicateResult - -public class NMBPredicate: NSObject { - private let predicate: PredicateBlock - - public init(predicate: @escaping PredicateBlock) { - self.predicate = predicate - } - - func satisfies(_ expression: @escaping () throws -> NSObject?, location: SourceLocation) -> NMBPredicateResult { - let expr = Expression(expression: expression, location: location) - do { - return try self.predicate(expr) - } catch let error { - return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")).toObjectiveC() - } - } -} - -extension NMBPredicate: NMBMatcher { - public func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let result = satisfies(actualBlock, location: location).toSwift() - result.message.update(failureMessage: failureMessage) - return result.status.toBoolean(expectation: .toMatch) - } - - public func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let result = satisfies(actualBlock, location: location).toSwift() - result.message.update(failureMessage: failureMessage) - return result.status.toBoolean(expectation: .toNotMatch) - } -} - -final public class NMBPredicateResult: NSObject { - public var status: NMBPredicateStatus - public var message: NMBExpectationMessage - - public init(status: NMBPredicateStatus, message: NMBExpectationMessage) { - self.status = status - self.message = message - } - - public init(bool success: Bool, message: NMBExpectationMessage) { - self.status = NMBPredicateStatus.from(bool: success) - self.message = message - } - - public func toSwift() -> PredicateResult { - return PredicateResult(status: status.toSwift(), - message: message.toSwift()) - } -} - -extension PredicateResult { - public func toObjectiveC() -> NMBPredicateResult { - return NMBPredicateResult(status: status.toObjectiveC(), message: message.toObjectiveC()) - } -} - -final public class NMBPredicateStatus: NSObject { - private let status: Int - private init(status: Int) { - self.status = status - } - - public static let matches: NMBPredicateStatus = NMBPredicateStatus(status: 0) - public static let doesNotMatch: NMBPredicateStatus = NMBPredicateStatus(status: 1) - public static let fail: NMBPredicateStatus = NMBPredicateStatus(status: 2) - - public override var hashValue: Int { return self.status.hashValue } - - public override func isEqual(_ object: Any?) -> Bool { - guard let otherPredicate = object as? NMBPredicateStatus else { - return false - } - return self.status == otherPredicate.status - } - - public static func from(status: PredicateStatus) -> NMBPredicateStatus { - switch status { - case .matches: return self.matches - case .doesNotMatch: return self.doesNotMatch - case .fail: return self.fail - } - } - - public static func from(bool success: Bool) -> NMBPredicateStatus { - return self.from(status: PredicateStatus(bool: success)) - } - - public func toSwift() -> PredicateStatus { - switch status { - case NMBPredicateStatus.matches.status: return .matches - case NMBPredicateStatus.doesNotMatch.status: return .doesNotMatch - case NMBPredicateStatus.fail.status: return .fail - default: - internalError("Unhandle status for NMBPredicateStatus") - } - } -} - -extension PredicateStatus { - public func toObjectiveC() -> NMBPredicateStatus { - return NMBPredicateStatus.from(status: self) - } -} - -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift deleted file mode 100644 index 459d2cd..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift +++ /dev/null @@ -1,204 +0,0 @@ -import Foundation - -// This matcher requires the Objective-C, and being built by Xcode rather than the Swift Package Manager -#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - -/// A Nimble matcher that succeeds when the actual expression raises an -/// exception with the specified name, reason, and/or userInfo. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the raised exception. The closure only gets called when an exception -/// is raised. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func raiseException( - named: String? = nil, - reason: String? = nil, - userInfo: NSDictionary? = nil, - closure: ((NSException) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in - var exception: NSException? - let capture = NMBExceptionCapture(handler: ({ e in - exception = e - }), finally: nil) - - capture.tryBlock { - _ = try! actualExpression.evaluate() - } - - let failureMessage = FailureMessage() - setFailureMessageForException( - failureMessage, - exception: exception, - named: named, - reason: reason, - userInfo: userInfo, - closure: closure - ) - - let matches = exceptionMatchesNonNilFieldsOrClosure( - exception, - named: named, - reason: reason, - userInfo: userInfo, - closure: closure - ) - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -// swiftlint:disable:next function_parameter_count -internal func setFailureMessageForException( - _ failureMessage: FailureMessage, - exception: NSException?, - named: String?, - reason: String?, - userInfo: NSDictionary?, - closure: ((NSException) -> Void)?) { - failureMessage.postfixMessage = "raise exception" - - if let named = named { - failureMessage.postfixMessage += " with name <\(named)>" - } - if let reason = reason { - failureMessage.postfixMessage += " with reason <\(reason)>" - } - if let userInfo = userInfo { - failureMessage.postfixMessage += " with userInfo <\(userInfo)>" - } - if closure != nil { - failureMessage.postfixMessage += " that satisfies block" - } - if named == nil && reason == nil && userInfo == nil && closure == nil { - failureMessage.postfixMessage = "raise any exception" - } - - if let exception = exception { - // swiftlint:disable:next line_length - failureMessage.actualValue = "\(String(describing: type(of: exception))) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" - } else { - failureMessage.actualValue = "no exception" - } -} - -internal func exceptionMatchesNonNilFieldsOrClosure( - _ exception: NSException?, - named: String?, - reason: String?, - userInfo: NSDictionary?, - closure: ((NSException) -> Void)?) -> Bool { - var matches = false - - if let exception = exception { - matches = true - - if let named = named, exception.name.rawValue != named { - matches = false - } - if reason != nil && exception.reason != reason { - matches = false - } - if let userInfo = userInfo, let exceptionUserInfo = exception.userInfo, - (exceptionUserInfo as NSDictionary) != userInfo { - matches = false - } - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(exception) - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } - - return matches -} - -public class NMBObjCRaiseExceptionMatcher: NSObject, NMBMatcher { - internal var _name: String? - internal var _reason: String? - internal var _userInfo: NSDictionary? - internal var _block: ((NSException) -> Void)? - - internal init(name: String?, reason: String?, userInfo: NSDictionary?, block: ((NSException) -> Void)?) { - _name = name - _reason = reason - _userInfo = userInfo - _block = block - } - - @objc public func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let block: () -> Any? = ({ _ = actualBlock(); return nil }) - let expr = Expression(expression: block, location: location) - - do { - return try raiseException( - named: _name, - reason: _reason, - userInfo: _userInfo, - closure: _block - ).matches(expr, failureMessage: failureMessage) - } catch let error { - failureMessage.stringValue = "unexpected error thrown: <\(error)>" - return false - } - } - - @objc public func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - return !matches(actualBlock, failureMessage: failureMessage, location: location) - } - - @objc public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { - return ({ name in - return NMBObjCRaiseExceptionMatcher( - name: name, - reason: self._reason, - userInfo: self._userInfo, - block: self._block - ) - }) - } - - @objc public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { - return ({ reason in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: reason, - userInfo: self._userInfo, - block: self._block - ) - }) - } - - @objc public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { - return ({ userInfo in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: self._reason, - userInfo: userInfo, - block: self._block - ) - }) - } - - @objc public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { - return ({ block in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: self._reason, - userInfo: self._userInfo, - block: block - ) - }) - } -} - -extension NMBObjCMatcher { - @objc public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionMatcher { - return NMBObjCRaiseExceptionMatcher(name: nil, reason: nil, userInfo: nil, block: nil) - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift deleted file mode 100644 index 2b9eb21..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift +++ /dev/null @@ -1,76 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value matches with all of the matchers -/// provided in the variable list of matchers. -public func satisfyAllOf(_ matchers: U...) -> Predicate - where U: Matcher, U.ValueType == T { - return satisfyAllOf(matchers.map { $0.predicate }) -} - -internal func satisfyAllOf(_ predicates: [Predicate]) -> Predicate { - return Predicate.define { actualExpression in - var postfixMessages = [String]() - var matches = true - for predicate in predicates { - let result = try predicate.satisfies(actualExpression) - if result.toBoolean(expectation: .toNotMatch) { - matches = false - } - postfixMessages.append("{\(result.message.expectedMessage)}") - } - - var msg: ExpectationMessage - if let actualValue = try actualExpression.evaluate() { - msg = .expectedCustomValueTo( - "match all of: " + postfixMessages.joined(separator: ", and "), - "\(actualValue)" - ) - } else { - msg = .expectedActualValueTo( - "match all of: " + postfixMessages.joined(separator: ", and ") - ) - } - - return PredicateResult(bool: matches, message: msg) - } -} - -public func && (left: Predicate, right: Predicate) -> Predicate { - return satisfyAllOf(left, right) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func satisfyAllOfMatcher(_ matchers: [NMBMatcher]) -> NMBPredicate { - return NMBPredicate { actualExpression in - if matchers.isEmpty { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage( - fail: "satisfyAllOf must be called with at least one matcher" - ) - ) - } - - var elementEvaluators = [Predicate]() - for matcher in matchers { - let elementEvaluator = Predicate { expression in - if let predicate = matcher as? NMBPredicate { - // swiftlint:disable:next line_length - return predicate.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() - } else { - let failureMessage = FailureMessage() - // swiftlint:disable:next line_length - let success = matcher.matches({ try! expression.evaluate() }, failureMessage: failureMessage, location: actualExpression.location) - return PredicateResult(bool: success, message: failureMessage.toExpectationMessage()) - } - } - - elementEvaluators.append(elementEvaluator) - } - - return try satisfyAllOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift deleted file mode 100644 index 57b15fd..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift +++ /dev/null @@ -1,84 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual value matches with any of the matchers -/// provided in the variable list of matchers. -public func satisfyAnyOf(_ matchers: U...) -> Predicate - where U: Matcher, U.ValueType == T { - return satisfyAnyOf(matchers.map { $0.predicate }) -} - -internal func satisfyAnyOf(_ predicates: [Predicate]) -> Predicate { - return Predicate.define { actualExpression in - var postfixMessages = [String]() - var matches = false - for predicate in predicates { - let result = try predicate.satisfies(actualExpression) - if result.toBoolean(expectation: .toMatch) { - matches = true - } - postfixMessages.append("{\(result.message.expectedMessage)}") - } - - var msg: ExpectationMessage - if let actualValue = try actualExpression.evaluate() { - msg = .expectedCustomValueTo( - "match one of: " + postfixMessages.joined(separator: ", or "), - "\(actualValue)" - ) - } else { - msg = .expectedActualValueTo( - "match one of: " + postfixMessages.joined(separator: ", or ") - ) - } - - return PredicateResult(bool: matches, message: msg) - } -} - -public func || (left: Predicate, right: Predicate) -> Predicate { - return satisfyAnyOf(left, right) -} - -public func || (left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> Predicate { - return satisfyAnyOf(left, right) -} - -public func || (left: MatcherFunc, right: MatcherFunc) -> Predicate { - return satisfyAnyOf(left, right) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -extension NMBObjCMatcher { - @objc public class func satisfyAnyOfMatcher(_ matchers: [NMBMatcher]) -> NMBPredicate { - return NMBPredicate { actualExpression in - if matchers.isEmpty { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, - message: NMBExpectationMessage( - fail: "satisfyAnyOf must be called with at least one matcher" - ) - ) - } - - var elementEvaluators = [Predicate]() - for matcher in matchers { - let elementEvaluator = Predicate { expression in - if let predicate = matcher as? NMBPredicate { - // swiftlint:disable:next line_length - return predicate.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() - } else { - let failureMessage = FailureMessage() - // swiftlint:disable:next line_length - let success = matcher.matches({ try! expression.evaluate() }, failureMessage: failureMessage, location: actualExpression.location) - return PredicateResult(bool: success, message: failureMessage.toExpectationMessage()) - } - } - - elementEvaluators.append(elementEvaluator) - } - - return try satisfyAnyOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() - } - } -} -#endif diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift deleted file mode 100644 index 035c744..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift +++ /dev/null @@ -1,52 +0,0 @@ -import Foundation - -public func throwAssertion() -> Predicate { - return Predicate { actualExpression in - #if arch(x86_64) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - let message = ExpectationMessage.expectedTo("throw an assertion") - - var actualError: Error? - let caughtException: BadInstructionException? = catchBadInstruction { - #if os(tvOS) - if !NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning { - print() - print("[Nimble Warning]: If you're getting stuck on a debugger breakpoint for a " + - "fatal error while using throwAssertion(), please disable 'Debug Executable' " + - "in your scheme. Go to 'Edit Scheme > Test > Info' and uncheck " + - "'Debug Executable'. If you've already done that, suppress this warning " + - "by setting `NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true`. " + - "This is required because the standard methods of catching assertions " + - "(mach APIs) are unavailable for tvOS. Instead, the same mechanism the " + - "debugger uses is the fallback method for tvOS." - ) - print() - NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true - } - #endif - do { - try actualExpression.evaluate() - } catch { - actualError = error - } - } - - if let actualError = actualError { - return PredicateResult( - bool: false, - message: message.appended(message: "; threw error instead <\(actualError)>") - ) - } else { - return PredicateResult(bool: caughtException != nil, message: message) - } - #elseif SWIFT_PACKAGE - fatalError("The throwAssertion Nimble matcher does not currently support Swift CLI." + - " You can silence this error by placing the test case inside an #if !SWIFT_PACKAGE" + - " conditional statement") - #else - fatalError("The throwAssertion Nimble matcher can only run on x86_64 platforms with " + - "Objective-C (e.g. Mac, iPhone 5s or later simulators). You can silence this error " + - "by placing the test case inside an #if arch(x86_64) or (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) conditional statement") - // swiftlint:disable:previous line_length - #endif - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift deleted file mode 100644 index d294ba3..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift +++ /dev/null @@ -1,264 +0,0 @@ -import Foundation - -/// A Nimble matcher that succeeds when the actual expression throws an -/// error of the specified type or from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparison by _domain and _code. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the thrown error. The closure only gets called when an error was thrown. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func throwError() -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - if let actualError = actualError { - return PredicateResult(bool: true, message: .expectedCustomValueTo("throw any error", "<\(actualError)>")) - } else { - return PredicateResult(bool: false, message: .expectedCustomValueTo("throw any error", "no error")) - } - } -} - -/// A Nimble matcher that succeeds when the actual expression throws an -/// error of the specified type or from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparision by _domain and _code. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the thrown error. The closure only gets called when an error was thrown. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func throwError(_ error: T, closure: ((Error) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - actualError: actualError, - error: error, - errorType: nil, - closure: closure - ) - - var matches = false - if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { - matches = true - - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression throws an -/// error of the specified type or from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparision by _domain and _code. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the thrown error. The closure only gets called when an error was thrown. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func throwError(_ error: T, closure: ((T) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - actualError: actualError, - error: error, - errorType: nil, - closure: closure - ) - - var matches = false - if let actualError = actualError as? T, error == actualError { - matches = true - - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression throws an -/// error of the specified type or from the specified case. -/// -/// Errors are tried to be compared by their implementation of Equatable, -/// otherwise they fallback to comparision by _domain and _code. -/// -/// Alternatively, you can pass a closure to do any arbitrary custom matching -/// to the thrown error. The closure only gets called when an error was thrown. -/// -/// nil arguments indicates that the matcher should not attempt to match against -/// that parameter. -public func throwError( - errorType: T.Type, - closure: ((T) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError( - failureMessage, - actualError: actualError, - error: nil, - errorType: errorType, - closure: closure - ) - - var matches = false - if let actualError = actualError { - matches = true - - if let actualError = actualError as? T { - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - } else { - matches = (actualError is T) - // The closure expects another ErrorProtocol as argument, so this - // is _supposed_ to fail, so that it becomes more obvious. - if let closure = closure { - let assertions = gatherExpectations { - if let actual = actualError as? T { - closure(actual) - } - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression throws any -/// error or when the passed closures' arbitrary custom matching succeeds. -/// -/// This duplication to it's generic adequate is required to allow to receive -/// values of the existential type `Error` in the closure. -/// -/// The closure only gets called when an error was thrown. -public func throwError(closure: @escaping ((Error) -> Void)) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) - - var matches = false - if let actualError = actualError { - matches = true - - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} - -/// A Nimble matcher that succeeds when the actual expression throws any -/// error or when the passed closures' arbitrary custom matching succeeds. -/// -/// This duplication to it's generic adequate is required to allow to receive -/// values of the existential type `Error` in the closure. -/// -/// The closure only gets called when an error was thrown. -public func throwError(closure: @escaping ((T) -> Void)) -> Predicate { - return Predicate { actualExpression in - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch { - actualError = error - } - - let failureMessage = FailureMessage() - setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) - - var matches = false - if let actualError = actualError as? T { - matches = true - - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if !messages.isEmpty { - matches = false - } - } - - return PredicateResult(bool: matches, message: failureMessage.toExpectationMessage()) - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift b/Demo/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift deleted file mode 100644 index 01369bb..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift +++ /dev/null @@ -1,37 +0,0 @@ -/** - Used by the `toSucceed` matcher. - - This is the return type for the closure. - */ -public enum ToSucceedResult { - case succeeded - case failed(reason: String) -} - -/** - A Nimble matcher that takes in a closure for validation. - - Return `.succeeded` when the validation succeeds. - Return `.failed` with a failure reason when the validation fails. - */ -public func succeed() -> Predicate<() -> ToSucceedResult> { - return Predicate.define { actualExpression in - let optActual = try actualExpression.evaluate() - guard let actual = optActual else { - return PredicateResult(status: .fail, message: .fail("expected a closure, got ")) - } - - switch actual() { - case .succeeded: - return PredicateResult( - bool: true, - message: .expectedCustomValueTo("succeed", "") - ) - case .failed(let reason): - return PredicateResult( - bool: false, - message: .expectedCustomValueTo("succeed", " because <\(reason)>") - ) - } - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Nimble.h b/Demo/Pods/Nimble/Sources/Nimble/Nimble.h deleted file mode 100644 index 2bbc693..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Nimble.h +++ /dev/null @@ -1,13 +0,0 @@ -#import -#import "NMBExceptionCapture.h" -#import "NMBStringify.h" -#import "DSL.h" - -#if TARGET_OS_TV - #import "CwlPreconditionTesting_POSIX.h" -#else - #import "CwlPreconditionTesting.h" -#endif - -FOUNDATION_EXPORT double NimbleVersionNumber; -FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Demo/Pods/Nimble/Sources/Nimble/Utils/Await.swift b/Demo/Pods/Nimble/Sources/Nimble/Utils/Await.swift deleted file mode 100644 index cb672ad..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Utils/Await.swift +++ /dev/null @@ -1,381 +0,0 @@ -import CoreFoundation -import Dispatch -import Foundation - -#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) - import CDispatch -#endif - -private let timeoutLeeway = DispatchTimeInterval.milliseconds(1) -private let pollLeeway = DispatchTimeInterval.milliseconds(1) - -/// Stores debugging information about callers -internal struct WaitingInfo: CustomStringConvertible { - let name: String - let file: FileString - let lineNumber: UInt - - var description: String { - return "\(name) at \(file):\(lineNumber)" - } -} - -internal protocol WaitLock { - func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) - func releaseWaitingLock() - func isWaitingLocked() -> Bool -} - -internal class AssertionWaitLock: WaitLock { - private var currentWaiter: WaitingInfo? - init() { } - - func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) { - let info = WaitingInfo(name: fnName, file: file, lineNumber: line) - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - let isMainThread = Thread.isMainThread - #else - let isMainThread = _CFIsMainThread() - #endif - nimblePrecondition( - isMainThread, - "InvalidNimbleAPIUsage", - "\(fnName) can only run on the main thread." - ) - nimblePrecondition( - currentWaiter == nil, - "InvalidNimbleAPIUsage", - "Nested async expectations are not allowed to avoid creating flaky tests.\n\n" + - "The call to\n\t\(info)\n" + - "triggered this exception because\n\t\(currentWaiter!)\n" + - "is currently managing the main run loop." - ) - currentWaiter = info - } - - func isWaitingLocked() -> Bool { - return currentWaiter != nil - } - - func releaseWaitingLock() { - currentWaiter = nil - } -} - -internal enum AwaitResult { - /// Incomplete indicates None (aka - this value hasn't been fulfilled yet) - case incomplete - /// TimedOut indicates the result reached its defined timeout limit before returning - case timedOut - /// BlockedRunLoop indicates the main runloop is too busy processing other blocks to trigger - /// the timeout code. - /// - /// This may also mean the async code waiting upon may have never actually ran within the - /// required time because other timers & sources are running on the main run loop. - case blockedRunLoop - /// The async block successfully executed and returned a given result - case completed(T) - /// When a Swift Error is thrown - case errorThrown(Error) - /// When an Objective-C Exception is raised - case raisedException(NSException) - - func isIncomplete() -> Bool { - switch self { - case .incomplete: return true - default: return false - } - } - - func isCompleted() -> Bool { - switch self { - case .completed: return true - default: return false - } - } -} - -/// Holds the resulting value from an asynchronous expectation. -/// This class is thread-safe at receiving an "response" to this promise. -internal class AwaitPromise { - private(set) internal var asyncResult: AwaitResult = .incomplete - private var signal: DispatchSemaphore - - init() { - signal = DispatchSemaphore(value: 1) - } - - deinit { - signal.signal() - } - - /// Resolves the promise with the given result if it has not been resolved. Repeated calls to - /// this method will resolve in a no-op. - /// - /// @returns a Bool that indicates if the async result was accepted or rejected because another - /// value was received first. - func resolveResult(_ result: AwaitResult) -> Bool { - if signal.wait(timeout: .now()) == .success { - self.asyncResult = result - return true - } else { - return false - } - } -} - -internal struct AwaitTrigger { - let timeoutSource: DispatchSourceTimer - let actionSource: DispatchSourceTimer? - let start: () throws -> Void -} - -/// Factory for building fully configured AwaitPromises and waiting for their results. -/// -/// This factory stores all the state for an async expectation so that Await doesn't -/// doesn't have to manage it. -internal class AwaitPromiseBuilder { - let awaiter: Awaiter - let waitLock: WaitLock - let trigger: AwaitTrigger - let promise: AwaitPromise - - internal init( - awaiter: Awaiter, - waitLock: WaitLock, - promise: AwaitPromise, - trigger: AwaitTrigger) { - self.awaiter = awaiter - self.waitLock = waitLock - self.promise = promise - self.trigger = trigger - } - - func timeout(_ timeoutInterval: TimeInterval, forcefullyAbortTimeout: TimeInterval) -> Self { - // = Discussion = - // - // There's a lot of technical decisions here that is useful to elaborate on. This is - // definitely more lower-level than the previous NSRunLoop based implementation. - // - // - // Why Dispatch Source? - // - // - // We're using a dispatch source to have better control of the run loop behavior. - // A timer source gives us deferred-timing control without having to rely as much on - // a run loop's traditional dispatching machinery (eg - NSTimers, DefaultRunLoopMode, etc.) - // which is ripe for getting corrupted by application code. - // - // And unlike dispatch_async(), we can control how likely our code gets prioritized to - // executed (see leeway parameter) + DISPATCH_TIMER_STRICT. - // - // This timer is assumed to run on the HIGH priority queue to ensure it maintains the - // highest priority over normal application / test code when possible. - // - // - // Run Loop Management - // - // In order to properly interrupt the waiting behavior performed by this factory class, - // this timer stops the main run loop to tell the waiter code that the result should be - // checked. - // - // In addition, stopping the run loop is used to halt code executed on the main run loop. - #if swift(>=4.0) - trigger.timeoutSource.schedule( - deadline: DispatchTime.now() + timeoutInterval, - repeating: .never, - leeway: timeoutLeeway - ) - #else - trigger.timeoutSource.scheduleOneshot( - deadline: DispatchTime.now() + timeoutInterval, - leeway: timeoutLeeway - ) - #endif - trigger.timeoutSource.setEventHandler { - guard self.promise.asyncResult.isIncomplete() else { return } - let timedOutSem = DispatchSemaphore(value: 0) - let semTimedOutOrBlocked = DispatchSemaphore(value: 0) - semTimedOutOrBlocked.signal() - let runLoop = CFRunLoopGetMain() - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - let runLoopMode = CFRunLoopMode.defaultMode.rawValue - #else - let runLoopMode = kCFRunLoopDefaultMode - #endif - CFRunLoopPerformBlock(runLoop, runLoopMode) { - if semTimedOutOrBlocked.wait(timeout: .now()) == .success { - timedOutSem.signal() - semTimedOutOrBlocked.signal() - if self.promise.resolveResult(.timedOut) { - CFRunLoopStop(CFRunLoopGetMain()) - } - } - } - // potentially interrupt blocking code on run loop to let timeout code run - CFRunLoopStop(runLoop) - let now = DispatchTime.now() + forcefullyAbortTimeout - let didNotTimeOut = timedOutSem.wait(timeout: now) != .success - let timeoutWasNotTriggered = semTimedOutOrBlocked.wait(timeout: .now()) == .success - if didNotTimeOut && timeoutWasNotTriggered { - if self.promise.resolveResult(.blockedRunLoop) { - CFRunLoopStop(CFRunLoopGetMain()) - } - } - } - return self - } - - /// Blocks for an asynchronous result. - /// - /// @discussion - /// This function must be executed on the main thread and cannot be nested. This is because - /// this function (and it's related methods) coordinate through the main run loop. Tampering - /// with the run loop can cause undesirable behavior. - /// - /// This method will return an AwaitResult in the following cases: - /// - /// - The main run loop is blocked by other operations and the async expectation cannot be - /// be stopped. - /// - The async expectation timed out - /// - The async expectation succeeded - /// - The async expectation raised an unexpected exception (objc) - /// - The async expectation raised an unexpected error (swift) - /// - /// The returned AwaitResult will NEVER be .incomplete. - func wait(_ fnName: String = #function, file: FileString = #file, line: UInt = #line) -> AwaitResult { - waitLock.acquireWaitingLock( - fnName, - file: file, - line: line) - - let capture = NMBExceptionCapture(handler: ({ exception in - _ = self.promise.resolveResult(.raisedException(exception)) - }), finally: ({ - self.waitLock.releaseWaitingLock() - })) - capture.tryBlock { - do { - try self.trigger.start() - } catch let error { - _ = self.promise.resolveResult(.errorThrown(error)) - } - self.trigger.timeoutSource.resume() - while self.promise.asyncResult.isIncomplete() { - // Stopping the run loop does not work unless we run only 1 mode - #if swift(>=4.2) - _ = RunLoop.current.run(mode: .default, before: .distantFuture) - #else - _ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture) - #endif - } - - self.trigger.timeoutSource.cancel() - if let asyncSource = self.trigger.actionSource { - asyncSource.cancel() - } - } - - return promise.asyncResult - } -} - -internal class Awaiter { - let waitLock: WaitLock - let timeoutQueue: DispatchQueue - let asyncQueue: DispatchQueue - - internal init( - waitLock: WaitLock, - asyncQueue: DispatchQueue, - timeoutQueue: DispatchQueue) { - self.waitLock = waitLock - self.asyncQueue = asyncQueue - self.timeoutQueue = timeoutQueue - } - - private func createTimerSource(_ queue: DispatchQueue) -> DispatchSourceTimer { - return DispatchSource.makeTimerSource(flags: .strict, queue: queue) - } - - func performBlock( - file: FileString, - line: UInt, - _ closure: @escaping (@escaping (T) -> Void) throws -> Void - ) -> AwaitPromiseBuilder { - let promise = AwaitPromise() - let timeoutSource = createTimerSource(timeoutQueue) - var completionCount = 0 - let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: nil) { - try closure { - completionCount += 1 - if completionCount < 2 { - if promise.resolveResult(.completed($0)) { - CFRunLoopStop(CFRunLoopGetMain()) - } - } else { - fail("waitUntil(..) expects its completion closure to be only called once", - file: file, line: line) - } - } - } - - return AwaitPromiseBuilder( - awaiter: self, - waitLock: waitLock, - promise: promise, - trigger: trigger) - } - - func poll(_ pollInterval: TimeInterval, closure: @escaping () throws -> T?) -> AwaitPromiseBuilder { - let promise = AwaitPromise() - let timeoutSource = createTimerSource(timeoutQueue) - let asyncSource = createTimerSource(asyncQueue) - let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { - let interval = DispatchTimeInterval.nanoseconds(Int(pollInterval * TimeInterval(NSEC_PER_SEC))) - #if swift(>=4.0) - asyncSource.schedule(deadline: .now(), repeating: interval, leeway: pollLeeway) - #else - asyncSource.scheduleRepeating(deadline: .now(), interval: interval, leeway: pollLeeway) - #endif - asyncSource.setEventHandler { - do { - if let result = try closure() { - if promise.resolveResult(.completed(result)) { - CFRunLoopStop(CFRunLoopGetCurrent()) - } - } - } catch let error { - if promise.resolveResult(.errorThrown(error)) { - CFRunLoopStop(CFRunLoopGetCurrent()) - } - } - } - asyncSource.resume() - } - - return AwaitPromiseBuilder( - awaiter: self, - waitLock: waitLock, - promise: promise, - trigger: trigger) - } -} - -internal func pollBlock( - pollInterval: TimeInterval, - timeoutInterval: TimeInterval, - file: FileString, - line: UInt, - fnName: String = #function, - expression: @escaping () throws -> Bool) -> AwaitResult { - let awaiter = NimbleEnvironment.activeInstance.awaiter - let result = awaiter.poll(pollInterval) { () throws -> Bool? in - if try expression() { - return true - } - return nil - }.timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval / 2.0).wait(fnName, file: file, line: line) - - return result -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Utils/Errors.swift b/Demo/Pods/Nimble/Sources/Nimble/Utils/Errors.swift deleted file mode 100644 index 074cb20..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Utils/Errors.swift +++ /dev/null @@ -1,59 +0,0 @@ -import Foundation - -// Generic - -internal func setFailureMessageForError( - _ failureMessage: FailureMessage, - postfixMessageVerb: String = "throw", - actualError: Error?, - error: T? = nil, - errorType: T.Type? = nil, - closure: ((T) -> Void)? = nil) { - failureMessage.postfixMessage = "\(postfixMessageVerb) error" - - if let error = error { - failureMessage.postfixMessage += " <\(error)>" - } else if errorType != nil || closure != nil { - failureMessage.postfixMessage += " from type <\(T.self)>" - } - if closure != nil { - failureMessage.postfixMessage += " that satisfies block" - } - if error == nil && errorType == nil && closure == nil { - failureMessage.postfixMessage = "\(postfixMessageVerb) any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesExpectedError( - _ actualError: Error, - expectedError: T) -> Bool { - return actualError._domain == expectedError._domain - && actualError._code == expectedError._code -} - -// Non-generic - -internal func setFailureMessageForError( - _ failureMessage: FailureMessage, - actualError: Error?, - closure: ((Error) -> Void)?) { - failureMessage.postfixMessage = "throw error" - - if closure != nil { - failureMessage.postfixMessage += " that satisfies block" - } else { - failureMessage.postfixMessage = "throw any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Utils/Functional.swift b/Demo/Pods/Nimble/Sources/Nimble/Utils/Functional.swift deleted file mode 100644 index 6c5126a..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Utils/Functional.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension Sequence { - internal func all(_ fn: (Iterator.Element) -> Bool) -> Bool { - for item in self { - if !fn(item) { - return false - } - } - return true - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift b/Demo/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift deleted file mode 100644 index 4e37aef..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift +++ /dev/null @@ -1,31 +0,0 @@ -import Foundation - -// Ideally we would always use `StaticString` as the type for tracking the file name -// that expectations originate from, for consistency with `assert` etc. from the -// stdlib, and because recent versions of the XCTest overlay require `StaticString` -// when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we -// have to use `String` instead because StaticString can't be generated from Objective-C -#if SWIFT_PACKAGE -public typealias FileString = StaticString -#else -public typealias FileString = String -#endif - -public final class SourceLocation: NSObject { - public let file: FileString - public let line: UInt - - override init() { - file = "Unknown File" - line = 0 - } - - init(file: FileString, line: UInt) { - self.file = file - self.line = line - } - - override public var description: String { - return "\(file):\(line)" - } -} diff --git a/Demo/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift b/Demo/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift deleted file mode 100644 index 7c4d273..0000000 --- a/Demo/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift +++ /dev/null @@ -1,206 +0,0 @@ -import Foundation - -internal func identityAsString(_ value: Any?) -> String { - let anyObject: AnyObject? -#if os(Linux) - anyObject = value as? AnyObject -#else - anyObject = value as AnyObject? -#endif - if let value = anyObject { - return NSString(format: "<%p>", unsafeBitCast(value, to: Int.self)).description - } else { - return "nil" - } -} - -internal func arrayAsString(_ items: [T], joiner: String = ", ") -> String { - return items.reduce("") { accum, item in - let prefix = (accum.isEmpty ? "" : joiner) - return accum + prefix + "\(stringify(item))" - } -} - -/// A type with a customized test output text representation. -/// -/// This textual representation is produced when values will be -/// printed in test runs, and may be useful when producing -/// error messages in custom matchers. -/// -/// - SeeAlso: `CustomDebugStringConvertible` -public protocol TestOutputStringConvertible { - var testDescription: String { get } -} - -extension Double: TestOutputStringConvertible { - public var testDescription: String { - return NSNumber(value: self).testDescription - } -} - -extension Float: TestOutputStringConvertible { - public var testDescription: String { - return NSNumber(value: self).testDescription - } -} - -extension NSNumber: TestOutputStringConvertible { - // This is using `NSString(format:)` instead of - // `String(format:)` because the latter somehow breaks - // the travis CI build on linux. - public var testDescription: String { - let description = self.description - - if description.contains(".") { - // Travis linux swiftpm build doesn't like casting String to NSString, - // which is why this annoying nested initializer thing is here. - // Maybe this will change in a future snapshot. - let decimalPlaces = NSString(string: NSString(string: description) - .components(separatedBy: ".")[1]) - - // SeeAlso: https://bugs.swift.org/browse/SR-1464 - switch decimalPlaces.length { - case 1: - return NSString(format: "%0.1f", self.doubleValue).description - case 2: - return NSString(format: "%0.2f", self.doubleValue).description - case 3: - return NSString(format: "%0.3f", self.doubleValue).description - default: - return NSString(format: "%0.4f", self.doubleValue).description - } - } - return self.description - } -} - -extension Array: TestOutputStringConvertible { - public var testDescription: String { - let list = self.map(Nimble.stringify).joined(separator: ", ") - return "[\(list)]" - } -} - -extension AnySequence: TestOutputStringConvertible { - public var testDescription: String { - let generator = self.makeIterator() - var strings = [String]() - var value: AnySequence.Iterator.Element? - - repeat { - value = generator.next() - if let value = value { - strings.append(stringify(value)) - } - } while value != nil - - let list = strings.joined(separator: ", ") - return "[\(list)]" - } -} - -extension NSArray: TestOutputStringConvertible { - public var testDescription: String { - let list = Array(self).map(Nimble.stringify).joined(separator: ", ") - return "(\(list))" - } -} - -extension NSIndexSet: TestOutputStringConvertible { - public var testDescription: String { - let list = Array(self).map(Nimble.stringify).joined(separator: ", ") - return "(\(list))" - } -} - -extension String: TestOutputStringConvertible { - public var testDescription: String { - return self - } -} - -extension Data: TestOutputStringConvertible { - public var testDescription: String { - #if os(Linux) - // FIXME: Swift on Linux triggers a segfault when calling NSData's hash() (last checked on 03-11-16) - return "Data" - #else - return "Data" - #endif - } -} - -/// -/// Returns a string appropriate for displaying in test output -/// from the provided value. -/// -/// - parameter value: A value that will show up in a test's output. -/// -/// - returns: The string that is returned can be -/// customized per type by conforming a type to the `TestOutputStringConvertible` -/// protocol. When stringifying a non-`TestOutputStringConvertible` type, this -/// function will return the value's debug description and then its -/// normal description if available and in that order. Otherwise it -/// will return the result of constructing a string from the value. -/// -/// - SeeAlso: `TestOutputStringConvertible` -public func stringify(_ value: T?) -> String { - guard let value = value else { return "nil" } - - if let value = value as? TestOutputStringConvertible { - return value.testDescription - } - - if let value = value as? CustomDebugStringConvertible { - return value.debugDescription - } - - return String(describing: value) -} - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -@objc public class NMBStringer: NSObject { - @objc public class func stringify(_ obj: Any?) -> String { - return Nimble.stringify(obj) - } -} -#endif - -// MARK: Collection Type Stringers - -/// Attempts to generate a pretty type string for a given value. If the value is of a Objective-C -/// collection type, or a subclass thereof, (e.g. `NSArray`, `NSDictionary`, etc.). -/// This function will return the type name of the root class of the class cluster for better -/// readability (e.g. `NSArray` instead of `__NSArrayI`). -/// -/// For values that don't have a type of an Objective-C collection, this function returns the -/// default type description. -/// -/// - parameter value: A value that will be used to determine a type name. -/// -/// - returns: The name of the class cluster root class for Objective-C collection types, or the -/// the `dynamicType` of the value for values of any other type. -public func prettyCollectionType(_ value: T) -> String { - switch value { - case is NSArray: - return String(describing: NSArray.self) - case is NSDictionary: - return String(describing: NSDictionary.self) - case is NSSet: - return String(describing: NSSet.self) - case is NSIndexSet: - return String(describing: NSIndexSet.self) - default: - return String(describing: value) - } -} - -/// Returns the type name for a given collection type. This overload is used by Swift -/// collection types. -/// -/// - parameter collection: A Swift `CollectionType` value. -/// -/// - returns: A string representing the `dynamicType` of the value. -public func prettyCollectionType(_ collection: T) -> String { - return String(describing: type(of: collection)) -} diff --git a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h b/Demo/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h deleted file mode 100644 index 9170541..0000000 --- a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h +++ /dev/null @@ -1,389 +0,0 @@ -#import - -@class NMBExpectation; -@class NMBObjCBeCloseToMatcher; -@class NMBObjCRaiseExceptionMatcher; -@protocol NMBMatcher; - - -NS_ASSUME_NONNULL_BEGIN - - -#define NIMBLE_OVERLOADABLE __attribute__((overloadable)) -#define NIMBLE_EXPORT FOUNDATION_EXPORT -#define NIMBLE_EXPORT_INLINE FOUNDATION_STATIC_INLINE - -#define NIMBLE_VALUE_OF(VAL) ({ \ - __typeof__((VAL)) val = (VAL); \ - [NSValue valueWithBytes:&val objCType:@encode(__typeof__((VAL)))]; \ -}) - -#ifdef NIMBLE_DISABLE_SHORT_SYNTAX -#define NIMBLE_SHORT(PROTO, ORIGINAL) -#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) -#else -#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); } -#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE NIMBLE_OVERLOADABLE PROTO { return (ORIGINAL); } -#endif - - - -#define DEFINE_NMB_EXPECT_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBExpectation *NMB_expect(TYPE(^actualBlock)(void), NSString *file, NSUInteger line) { \ - return NMB_expect(^id { return EXPR; }, file, line); \ - } - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBExpectation *NMB_expect(id(^actualBlock)(void), NSString *file, NSUInteger line); - - // overloaded dispatch for nils - expect(nil) - DEFINE_NMB_EXPECT_OVERLOAD(void*, nil) - DEFINE_NMB_EXPECT_OVERLOAD(NSRange, NIMBLE_VALUE_OF(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(long, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(unsigned long, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(int, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(unsigned int, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(float, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(double, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(long long, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(unsigned long long, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(char, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(unsigned char, @(actualBlock())) - // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow - // the compiler to dispatch to bool. - DEFINE_NMB_EXPECT_OVERLOAD(BOOL, @(actualBlock())) - DEFINE_NMB_EXPECT_OVERLOAD(char *, @(actualBlock())) - - -#undef DEFINE_NMB_EXPECT_OVERLOAD - - - -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line); - - - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_equal(TYPE expectedValue) { \ - return NMB_equal((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id equal(TYPE expectedValue), NMB_equal(expectedValue)); - - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_equal(__nullable id expectedValue); - - NIMBLE_SHORT_OVERLOADED(id equal(__nullable id expectedValue), - NMB_equal(expectedValue)); - - // overloaded dispatch for nils - expect(nil) - DEFINE_OVERLOAD(void*__nullable, (id)nil) - DEFINE_OVERLOAD(NSRange, NIMBLE_VALUE_OF(expectedValue)) - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow - // the compiler to dispatch to bool. - DEFINE_OVERLOAD(BOOL, @(expectedValue)) - DEFINE_OVERLOAD(char *, @(expectedValue)) - -#undef DEFINE_OVERLOAD - - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_haveCount(TYPE expectedValue) { \ - return NMB_haveCount((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id haveCount(TYPE expectedValue), \ - NMB_haveCount(expectedValue)); - - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_haveCount(id expectedValue); - - NIMBLE_SHORT_OVERLOADED(id haveCount(id expectedValue), - NMB_haveCount(expectedValue)); - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBObjCBeCloseToMatcher *NMB_beCloseTo(TYPE expectedValue) { \ - return NMB_beCloseTo((NSNumber *)(EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(TYPE expectedValue), \ - NMB_beCloseTo(expectedValue)); - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); - NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(NSNumber *expectedValue), - NMB_beCloseTo(expectedValue)); - - // it would be better to only overload float & double, but zero becomes ambigious - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); -NIMBLE_EXPORT_INLINE id beAnInstanceOf(Class expectedClass) { - return NMB_beAnInstanceOf(expectedClass); -} - -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); -NIMBLE_EXPORT_INLINE id beAKindOf(Class expectedClass) { - return NMB_beAKindOf(expectedClass); -} - -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); -NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { - return NMB_beginWith(itemElementOrSubstring); -} - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beGreaterThan(TYPE expectedValue) { \ - return NMB_beGreaterThan((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beGreaterThan(NSNumber *expectedValue); - - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beGreaterThan(NSNumber *expectedValue) { - return NMB_beGreaterThan(expectedValue); - } - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ - return NMB_beGreaterThanOrEqualTo((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id beGreaterThanOrEqualTo(TYPE expectedValue), \ - NMB_beGreaterThanOrEqualTo(expectedValue)); - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); - - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beGreaterThanOrEqualTo(NSNumber *expectedValue) { - return NMB_beGreaterThanOrEqualTo(expectedValue); - } - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - - -#undef DEFINE_OVERLOAD - -NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance); -NIMBLE_SHORT(id beIdenticalTo(id expectedInstance), - NMB_beIdenticalTo(expectedInstance)); - -NIMBLE_EXPORT id NMB_be(id expectedInstance); -NIMBLE_SHORT(id be(id expectedInstance), - NMB_be(expectedInstance)); - - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beLessThan(TYPE expectedValue) { \ - return NMB_beLessThan((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id beLessThan(TYPE expectedValue), \ - NMB_beLessThan(expectedValue)); - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beLessThan(NSNumber *expectedValue); - - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beLessThan(NSNumber *expectedValue) { - return NMB_beLessThan(expectedValue); - } - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - - -#define DEFINE_OVERLOAD(TYPE, EXPR) \ - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ - return NMB_beLessThanOrEqualTo((EXPR)); \ - } \ - NIMBLE_SHORT_OVERLOADED(id beLessThanOrEqualTo(TYPE expectedValue), \ - NMB_beLessThanOrEqualTo(expectedValue)); - - - NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); - - NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beLessThanOrEqualTo(NSNumber *expectedValue) { - return NMB_beLessThanOrEqualTo(expectedValue); - } - - DEFINE_OVERLOAD(long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long, @(expectedValue)) - DEFINE_OVERLOAD(int, @(expectedValue)) - DEFINE_OVERLOAD(unsigned int, @(expectedValue)) - DEFINE_OVERLOAD(float, @(expectedValue)) - DEFINE_OVERLOAD(double, @(expectedValue)) - DEFINE_OVERLOAD(long long, @(expectedValue)) - DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) - DEFINE_OVERLOAD(char, @(expectedValue)) - DEFINE_OVERLOAD(unsigned char, @(expectedValue)) - -#undef DEFINE_OVERLOAD - -NIMBLE_EXPORT id NMB_beTruthy(void); -NIMBLE_SHORT(id beTruthy(void), - NMB_beTruthy()); - -NIMBLE_EXPORT id NMB_beFalsy(void); -NIMBLE_SHORT(id beFalsy(void), - NMB_beFalsy()); - -NIMBLE_EXPORT id NMB_beTrue(void); -NIMBLE_SHORT(id beTrue(void), - NMB_beTrue()); - -NIMBLE_EXPORT id NMB_beFalse(void); -NIMBLE_SHORT(id beFalse(void), - NMB_beFalse()); - -NIMBLE_EXPORT id NMB_beNil(void); -NIMBLE_SHORT(id beNil(void), - NMB_beNil()); - -NIMBLE_EXPORT id NMB_beEmpty(void); -NIMBLE_SHORT(id beEmpty(void), - NMB_beEmpty()); - -NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; -#define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define contain(...) NMB_contain(__VA_ARGS__) -#endif - -NIMBLE_EXPORT id NMB_containElementSatisfying(BOOL(^predicate)(id)); -NIMBLE_SHORT(id containElementSatisfying(BOOL(^predicate)(id)), - NMB_containElementSatisfying(predicate)); - -NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring); -NIMBLE_SHORT(id endWith(id itemElementOrSubstring), - NMB_endWith(itemElementOrSubstring)); - -NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); -NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), - NMB_raiseException()); - -NIMBLE_EXPORT id NMB_match(id expectedValue); -NIMBLE_SHORT(id match(id expectedValue), - NMB_match(expectedValue)); - -NIMBLE_EXPORT id NMB_allPass(id matcher); -NIMBLE_SHORT(id allPass(id matcher), - NMB_allPass(matcher)); - -NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers); -#define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define satisfyAnyOf(...) NMB_satisfyAnyOf(__VA_ARGS__) -#endif - -NIMBLE_EXPORT id NMB_satisfyAllOfWithMatchers(id matchers); -#define NMB_satisfyAllOf(...) NMB_satisfyAllOfWithMatchers(@[__VA_ARGS__]) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define satisfyAllOf(...) NMB_satisfyAllOf(__VA_ARGS__) -#endif - -// In order to preserve breakpoint behavior despite using macros to fill in __FILE__ and __LINE__, -// define a builder that populates __FILE__ and __LINE__, and returns a block that takes timeout -// and action arguments. See https://github.com/Quick/Quick/pull/185 for details. -typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void))); -typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void))); - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); - -NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line); -NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line); - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); - -#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__) -#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__) - -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define expect(...) NMB_expect(^{ return (__VA_ARGS__); }, @(__FILE__), __LINE__) -#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__) -#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__) -#define fail() failWithMessage(@"fail() always fails") - - -#define waitUntilTimeout NMB_waitUntilTimeout -#define waitUntil NMB_waitUntil - -#undef NIMBLE_VALUE_OF - -#endif - -NS_ASSUME_NONNULL_END diff --git a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m b/Demo/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m deleted file mode 100644 index 670415b..0000000 --- a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m +++ /dev/null @@ -1,161 +0,0 @@ -#import - -#if __has_include("Nimble-Swift.h") -#import "Nimble-Swift.h" -#else -#import -#endif - - -NS_ASSUME_NONNULL_BEGIN - - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(void), NSString *__nonnull file, NSUInteger line) { - return [[NMBExpectation alloc] initWithActualBlock:actualBlock - negative:NO - file:file - line:line]; -} - -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line) { - return NMB_expect(^id{ - actualBlock(); - return nil; - }, file, line); -} - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line) { - return [NMBExpectation failWithMessage:msg file:file line:line]; -} - -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass) { - return [NMBObjCMatcher beAnInstanceOfMatcher:expectedClass]; -} - -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass) { - return [NMBObjCMatcher beAKindOfMatcher:expectedClass]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beCloseToMatcher:expectedValue within:0.001]; -} - -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring) { - return [NMBObjCMatcher beginWithMatcher:itemElementOrSubstring]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThan(NSNumber *expectedValue) { - return [NMBObjCMatcher beGreaterThanMatcher:expectedValue]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beGreaterThanOrEqualToMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance) { - return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; -} - -NIMBLE_EXPORT id NMB_be(id expectedInstance) { - return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThan(NSNumber *expectedValue) { - return [NMBObjCMatcher beLessThanMatcher:expectedValue]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beLessThanOrEqualToMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_beTruthy() { - return [NMBObjCMatcher beTruthyMatcher]; -} - -NIMBLE_EXPORT id NMB_beFalsy() { - return [NMBObjCMatcher beFalsyMatcher]; -} - -NIMBLE_EXPORT id NMB_beTrue() { - return [NMBObjCMatcher beTrueMatcher]; -} - -NIMBLE_EXPORT id NMB_beFalse() { - return [NMBObjCMatcher beFalseMatcher]; -} - -NIMBLE_EXPORT id NMB_beNil() { - return [NMBObjCMatcher beNilMatcher]; -} - -NIMBLE_EXPORT id NMB_beEmpty() { - return [NMBObjCMatcher beEmptyMatcher]; -} - -NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) { - NSMutableArray *itemOrSubstringArray = [NSMutableArray array]; - - if (itemOrSubstring) { - [itemOrSubstringArray addObject:itemOrSubstring]; - - va_list args; - va_start(args, itemOrSubstring); - id next; - while ((next = va_arg(args, id))) { - [itemOrSubstringArray addObject:next]; - } - va_end(args); - } - - return [NMBObjCMatcher containMatcher:itemOrSubstringArray]; -} - -NIMBLE_EXPORT id NMB_containElementSatisfying(BOOL(^predicate)(id)) { - return [NMBObjCMatcher containElementSatisfyingMatcher:predicate]; -} - -NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring) { - return [NMBObjCMatcher endWithMatcher:itemElementOrSubstring]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_equal(__nullable id expectedValue) { - return [NMBObjCMatcher equalMatcher:expectedValue]; -} - -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_haveCount(id expectedValue) { - return [NMBObjCMatcher haveCountMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_match(id expectedValue) { - return [NMBObjCMatcher matchMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_allPass(id expectedValue) { - return [NMBObjCMatcher allPassMatcher:expectedValue]; -} - -NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers) { - return [NMBObjCMatcher satisfyAnyOfMatcher:matchers]; -} - -NIMBLE_EXPORT id NMB_satisfyAllOfWithMatchers(id matchers) { - return [NMBObjCMatcher satisfyAllOfMatcher:matchers]; -} - -NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException() { - return [NMBObjCMatcher raiseExceptionMatcher]; -} - -NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line) { - return ^(NSTimeInterval timeout, void (^ _Nonnull action)(void (^ _Nonnull)(void))) { - [NMBWait untilTimeout:timeout file:file line:line action:action]; - }; -} - -NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line) { - return ^(void (^ _Nonnull action)(void (^ _Nonnull)(void))) { - [NMBWait untilFile:file line:line action:action]; - }; -} - -NS_ASSUME_NONNULL_END diff --git a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h b/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h deleted file mode 100644 index e6e0272..0000000 --- a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import - -@interface NMBExceptionCapture : NSObject - -- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally; -- (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); - -@end - -typedef void(^NMBSourceCallbackBlock)(BOOL successful); diff --git a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m b/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m deleted file mode 100644 index 52684b7..0000000 --- a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m +++ /dev/null @@ -1,35 +0,0 @@ -#import "NMBExceptionCapture.h" - -@interface NMBExceptionCapture () -@property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); -@property (nonatomic, copy) void(^ _Nullable finally)(void); -@end - -@implementation NMBExceptionCapture - -- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally { - self = [super init]; - if (self) { - self.handler = handler; - self.finally = finally; - } - return self; -} - -- (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock { - @try { - unsafeBlock(); - } - @catch (NSException *exception) { - if (self.handler) { - self.handler(exception); - } - } - @finally { - if (self.finally) { - self.finally(); - } - } -} - -@end diff --git a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h b/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h deleted file mode 100644 index 7938bca..0000000 --- a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h +++ /dev/null @@ -1,18 +0,0 @@ -@class NSString; - -/** - * Returns a string appropriate for displaying in test output - * from the provided value. - * - * @param anyObject A value that will show up in a test's output. - * - * @return The string that is returned can be - * customized per type by conforming a type to the `TestOutputStringConvertible` - * protocol. When stringifying a non-`TestOutputStringConvertible` type, this - * function will return the value's debug description and then its - * normal description if available and in that order. Otherwise it - * will return the result of constructing a string from the value. - * - * @see `TestOutputStringConvertible` - */ -extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result)); diff --git a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m b/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m deleted file mode 100644 index 31a80d6..0000000 --- a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m +++ /dev/null @@ -1,11 +0,0 @@ -#import "NMBStringify.h" - -#if __has_include("Nimble-Swift.h") -#import "Nimble-Swift.h" -#else -#import -#endif - -NSString *_Nonnull NMBStringify(id _Nullable anyObject) { - return [NMBStringer stringify:anyObject]; -} diff --git a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m b/Demo/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m deleted file mode 100644 index fa5030a..0000000 --- a/Demo/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m +++ /dev/null @@ -1,83 +0,0 @@ -#import -#import - -#if __has_include("Nimble-Swift.h") -#import "Nimble-Swift.h" -#else -#import -#endif - -#pragma mark - Method Swizzling - -/// Swaps the implementations between two instance methods. -/// -/// @param class The class containing `originalSelector`. -/// @param originalSelector Original method to replace. -/// @param replacementSelector Replacement method. -void swizzleSelectors(Class class, SEL originalSelector, SEL replacementSelector) { - Method originalMethod = class_getInstanceMethod(class, originalSelector); - Method replacementMethod = class_getInstanceMethod(class, replacementSelector); - - BOOL didAddMethod = - class_addMethod(class, - originalSelector, - method_getImplementation(replacementMethod), - method_getTypeEncoding(replacementMethod)); - - if (didAddMethod) { - class_replaceMethod(class, - replacementSelector, - method_getImplementation(originalMethod), - method_getTypeEncoding(originalMethod)); - } else { - method_exchangeImplementations(originalMethod, replacementMethod); - } -} - -#pragma mark - Private - -@interface XCTestObservationCenter (Private) -- (void)_addLegacyTestObserver:(id)observer; -@end - -@implementation XCTestObservationCenter (Register) - -/// Uses objc method swizzling to register `CurrentTestCaseTracker` as a test observer. This is necessary -/// because Xcode 7.3 introduced timing issues where if a custom `XCTestObservation` is registered too early -/// it suppresses all console output (generated by `XCTestLog`), breaking any tools that depend on this output. -/// This approach waits to register our custom test observer until XCTest adds its first "legacy" observer, -/// falling back to registering after the first normal observer if this private method ever changes. -+ (void)load { - if (class_getInstanceMethod([self class], @selector(_addLegacyTestObserver:))) { - // Swizzle -_addLegacyTestObserver: - swizzleSelectors([self class], @selector(_addLegacyTestObserver:), @selector(NMB_original__addLegacyTestObserver:)); - } else { - // Swizzle -addTestObserver:, only if -_addLegacyTestObserver: is not implemented - swizzleSelectors([self class], @selector(addTestObserver:), @selector(NMB_original_addTestObserver:)); - } -} - -#pragma mark - Replacement Methods - -/// Registers `CurrentTestCaseTracker` as a test observer after `XCTestLog` has been added. -- (void)NMB_original__addLegacyTestObserver:(id)observer { - [self NMB_original__addLegacyTestObserver:observer]; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - [self addTestObserver:[CurrentTestCaseTracker sharedInstance]]; - }); -} - -/// Registers `CurrentTestCaseTracker` as a test observer after `XCTestLog` has been added. -/// This method is only used if `-_addLegacyTestObserver:` is not impelemented. (added in Xcode 7.3) -- (void)NMB_original_addTestObserver:(id)observer { - [self NMB_original_addTestObserver:observer]; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - [self NMB_original_addTestObserver:[CurrentTestCaseTracker sharedInstance]]; - }); -} - -@end diff --git a/Demo/Pods/Pods.xcodeproj/project.pbxproj b/Demo/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index 2fd82ee..0000000 --- a/Demo/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,2315 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 01089B3FDEFB0CDD0B67D38ED86963BB /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8A88E7CC4DB576335240864037BBF5 /* AsMaybe.swift */; }; - 014C8C742FEFDB7E7542BF2436F955CA /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC444D5DB3186C2696883C395754E536 /* ObserveOn.swift */; }; - 020D79365071F89CF47E8F65D60DF685 /* NSObject+Rx-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BFDD89119F9756A31AAE0C61C6C392F5 /* NSObject+Rx-dummy.m */; }; - 02DD07956B014D81FC3B7E17BC237ACC /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 95B816FDFB9914FDB5932A277BF49BE8 /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04C3D6EA8DB704A044E57A603F8051AD /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C91694859FC7B8E83B4294F7DEE91417 /* OperationQueueScheduler.swift */; }; - 0584D0378A7BC566D680CA4745759AAE /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 893DFA6FA782016C4ADC97E04614AA64 /* TailRecursiveSink.swift */; }; - 06A8D4A5474C39C04655948F8CD31A2F /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E5FDC2B2154419FF94FF3678B00B02 /* Zip.swift */; }; - 06D49CD0E284F13EC4446F702800D17B /* Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77BF4BFBEE7621F16B88B263CA2C38CD /* Create.swift */; }; - 06F38DD26D80484050C9ED86478406F2 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18710F2DC29EACD57A91E061B8FEC5A /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 076322ECD83CCD5978E82A6C27850C42 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8D444BAF7554FCBEECBC80AD3B8A5F /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 08210EC63215AC1453760A6267015D98 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E109B04A41B36246DD8B544AF9B7EC /* Dematerialize.swift */; }; - 089F2B2C34FD6211087F479001EEB544 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A80966CC4EC9818649F9C9E2CFC0741 /* Using.swift */; }; - 0C345DBBF5EF9ED046CB579FDD401A57 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7074E9CA670A4C3E1FE286964C801BB3 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 0D26DF5C78770563BB602E49C68DD75A /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F9A5783A2A7CE35D48E4AAE5C202487 /* InfiniteSequence.swift */; }; - 0D74DB80E4766C505062F32B6C5A70AD /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9BE8C1E97DC1056F68928312334310C /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 103425C9315079FFDF4868042FE2CF79 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15BB44DFD228A90F805B9FEEBA7A4E80 /* ExampleHooks.swift */; }; - 112CAE9947132F20975ED24B680C0E0A /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6122E3E38B44456ED3B5B47B73EB2DC /* ReplaySubject.swift */; }; - 114852CA7443A6F59DC7F10854BFFE5E /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A65F0423427F1590B3974881584BA82 /* VirtualTimeConverterType.swift */; }; - 17B386AD2B53702744C4169B5201217C /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = B531259A56F7748DE2B778579A87338F /* Closures.swift */; }; - 18FAD9641B101E8EEBEB00EE431E3440 /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 797BA25F337844CAD75AED0CB57A95CD /* CombineLatest.swift */; }; - 19291565899B5113A5355002CF9C8F2F /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F354095154E0131D2DBC40757AF3EA6 /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1AC5D2CE6FA79327468F53B53D0A9418 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA8DFA962931C0D5C66AA5C3A08F61F /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1E2AE2B6202B65E712FE05FB2699BD2C /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95E460802B8FFF3BF02E54C2EA0BE9D9 /* ExpectationMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1F2F8FB86E40FAB4663086CE83B7654D /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4198195DE6196A273806238279B8F604 /* BooleanDisposable.swift */; }; - 2008CD2E1A5CB2AC1E02C9BD37AF8C22 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6303AD957AF6EB732CD23753FEFD3A0 /* Do.swift */; }; - 205B3DFADA2BF30BFF78E1EC996EE385 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FFC65524FB644895BDCBBA0657F2FA07 /* XCTest.framework */; }; - 218D5177D58A35446EF01C47A2ECC7CC /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C716D15548A214C7698156BFC17719D /* BehaviorSubject.swift */; }; - 223CA7D4EDF23874D61C762F6CF51C56 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305E4331419736FD5897A2AE8C89EE97 /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 22948773F0660B81265C2C17A0761F0D /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2011689AB7C05B7EFCB3487499B8D277 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 2443408236BFC805C0E5EC554DA4787C /* Completable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C9205A34A84D74C21CDC8A2C00CE7C8 /* Completable.swift */; }; - 24AC6513961FF6DC60E0FB284E8914B6 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A46CC4790475C2D3E8C62106E9E87BF /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 24E286D69C7DC48C2914448A0A7B29DC /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00C13AB47B67BD647DDFA8EB325A17A5 /* WithLatestFrom.swift */; }; - 25670E01BF12BAC45AB20A404F24EB91 /* Pods-DemoTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 947511070799896770CAF73BCB20B722 /* Pods-DemoTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2574D09B363D42ACA6BA589B675FFA26 /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACBE3CDD05A5487CDC82EAB5F2171E23 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 28B4541F690EC0D5DEB304142D6A5CFE /* Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0C55A49EBBDEA751964AB79B51D5144 /* Single.swift */; }; - 2A53CE49E35851735AC464248730EF5A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4629AD8C523D2FDA5C72258FAA2846DC /* Foundation.framework */; }; - 2A8ADC8C1A772582E3F54ABAE5DFA18B /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5AE0479796206409FCAA0309BF6CDF /* SubscribeOn.swift */; }; - 2ACB6F721F83AA421857ACACBECD7BA1 /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B28044CA00CB23EC2407CC4122C4D28 /* SkipWhile.swift */; }; - 2C06E9D96634BC6B95FAF6BF7CED54A1 /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F99207603EB59E03D49A87AD6985D75 /* SynchronizedOnType.swift */; }; - 2CC91D1EF04393AE48463B5C9D8CAF96 /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE15C6D1844F1E64D2B1AFD049A9D79A /* DisposeBase.swift */; }; - 2D09E756E4941FA3825047E1E2517091 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = FFA5A3E4C4EA8083112AB03B934B3322 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2EF89DB591335BFB29606E0706E66D9F /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = F6A24D057CFAB8AC0F42B410E04BC8DA /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 2F8837FDE943E4810DA303DB0C4D5483 /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 5291FFF3A591A584E3FD0C0D57FB22B0 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2FDEB16F1990368152338AF2DE6D0C32 /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A82807BF1FD7E2A42F11A48277F0D4B /* AnonymousObserver.swift */; }; - 30151F3559071F4DFAC85F54E8A1A37A /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1701A6D3E2D2886092827A97CB2B50E /* SkipUntil.swift */; }; - 33044D36B602FD581BE14DEBE3A4F489 /* Behavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92A189AEA8097CFFFDB0E5804C3C1C71 /* Behavior.swift */; }; - 3312F77A6C289F2CEFBF0C1D98431671 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88011BB9DEE5C83495C831B3F209E75A /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 3351B401498926F2535052FC5EAF64A7 /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1BB4BBDD3FA1FE0AB0D5CD935421FE9 /* String+Rx.swift */; }; - 34FF932D6DEFC87B16BB8B2CE3AA5A01 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9966B286269124E595FC35634650F842 /* AnonymousDisposable.swift */; }; - 350C051E271508531C90540A2496684C /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F83D1F29400CB3E6AC588928E3AE393 /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 35382B1E443979F689AB1B64A9DF839B /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC007682565B2949752002198645C43 /* Generate.swift */; }; - 37C3C6235A5DDB8E37629314CF0E8489 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB58ADA89038564E8D37D27A81D9EEB3 /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 39022340BA4C753EE74695EE2C7C455D /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 160AC927638F4BB5403FCDA183972881 /* Amb.swift */; }; - 3A9EFBA686520511F5F4E7A57643EF3B /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = 114E68352CD984771851423579F40A2A /* Just.swift */; }; - 3BED04BCEE6536D8937220381EE790AA /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3337AADFE03A8F4AD76EAA5747827B5 /* ConcurrentDispatchQueueScheduler.swift */; }; - 3C0D99EED837A3AD705A664503EF48DE /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = AB94114691FA364F6528B887F9CCB745 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 3D600AC02826CE784CB7E9F88E9AC5DD /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B422D4026116E98349BC299E86A115F /* QCKDSL.m */; }; - 3D7E3805A91D58036235B9A70333A9AE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4629AD8C523D2FDA5C72258FAA2846DC /* Foundation.framework */; }; - 3DA38E69E7910F5F001F05BD09D957D1 /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 074852CF0825C588D1A3D4BAFFF336F8 /* Empty.swift */; }; - 3E5BF54F40548F50A634D911A92F8D18 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = DC1EC9968F9F25CDF86C277FB0995035 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3F076E5E0ACCE80863235591773EA2CD /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 46A0731852D50F1DB5BAFB19F88EAB8C /* QuickSpec.m */; }; - 3F5316B5ADE2B573B9ECEB45B5D061C0 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C210218A9F8486C724AF000E9BC9C37A /* Configuration.swift */; }; - 3FC7EEF76396FF30EF783749C26F8C05 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 427E782658A674CCF0CB37E38704950A /* Disposable.swift */; }; - 42927A4F037AAE24843B79E44FE19AC9 /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8157656B0734D038A9E7480F90A400FB /* ObserverBase.swift */; }; - 429367E7C28030B3509C31B053D17CB0 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93E44F300CBA04F70194186384480022 /* ErrorUtility.swift */; }; - 42A9F49A3D23555A2EC71F3E84E435FB /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 240F5BB7F84055523169BA056A193790 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4349DBA2D11F7116FCA85B892C0966C5 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F1000398A937193871996A3F20A1462 /* VirtualTimeScheduler.swift */; }; - 4463FF547D5F565394B614D1A73D8877 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEF29A6102B5568BD9AAFF638630D8D /* Range.swift */; }; - 44F6B7EB2EAF73218A16F56D45C877A4 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF9F9A43FECF77D55637FBA87BE8F84C /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 44FA2F66B24E147991026B20AEFD2158 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 354D24E958A393E94828843EB7BA53E7 /* Bag.swift */; }; - 45B3DA8C3A339E583A2BEDF6161D0592 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CA898E26C422AA68784F179A306788 /* Cancelable.swift */; }; - 46238EE10297B2070114146C08FED333 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AC713BD372892587446BB06FED1F3EB /* Error.swift */; }; - 47542DCAC61738574E2F2BCACA6611F1 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB78C52CD56B4FA18B083FA7296FCB0C /* DSL.swift */; }; - 4949A35DFD7AF5D991FA12BA16D37A6F /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 164F3AB078C274155C74354ABDB631F7 /* CompositeDisposable.swift */; }; - 4BC738EA304E6FA57294B9AAFEC56F70 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FB7B448FE8D14A1A1033C5B2D60297A /* Functional.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4C093ABFA796CEC3AC89C1B9DC36841D /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C31E6FEB9D56741DB672C8382B2518A /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4FD0B668599BDAF28C3B48264646A05D /* Pods-Demo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 61FCD9F5AFAA918AE18E0F1754E59089 /* Pods-Demo-dummy.m */; }; - 51294689F8DD7158A89F4083A2207F60 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2319471065A9D1CD76F47F65B85C2B9A /* PriorityQueue.swift */; }; - 540670A34C103B3D2EFC67692D64D94C /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E69C9350D2F7C715612EAA27FE74850 /* TakeUntil.swift */; }; - 54CCCCF6DE0F0196785ED239FB290146 /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63155FFB4E0398159B73FA1AB4B35DBE /* RxMutableBox.swift */; }; - 54EFB7A3E7737C4CFF3C0E30C525B81E /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 939094E692477DC2564BA8E062FD8322 /* Timer.swift */; }; - 562B8E7BBB3176E837BEBD6D24DA7EF4 /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D0BB645A4FAFCB5F640230E7F25570B /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 5747F17B237F1ACB862F3F2911E5CBB1 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E6878F54DB7E975AF72BCA44F5186D3 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 574F89786271FD7BAD216D075EA1E898 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 53C19900EDD8583ACC910B537E5D5C4B /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5780AAD342CE3C8CCDC47ADFF96973B1 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844DD75ACFEDFA15534455AAED0E3653 /* Buffer.swift */; }; - 5895EA4D5666103B2CD4243690487D07 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E603428CD7A07A4FC0C6F7958B3CAC /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 58B249717B134855DA1DF182DF0AEDB9 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39850425D82DB5D7CEB583E418B77552 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 596E6C82A98EE40174F48463FA1BE093 /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E3408C3DA17809FD2D1AF79092FB61 /* StartWith.swift */; }; - 5B392CA36C975AC73B4ACD3FA812176D /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143DC6F29498D8013E6BEC40FBA5E02C /* RecursiveScheduler.swift */; }; - 5B8933F55D812751FD5DC9C962D4B880 /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B72A9772A6F1DAC3C6BE21ABCD1EB7A1 /* SchedulerServices+Emulation.swift */; }; - 5BA1006DAFD72ACF9F31DC95096FD054 /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = D4D814CA1F7D55C5CE8D8A62F578BDCB /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5BFF937266E4511B7365D3B5F552EE4C /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA4A119E40151F454272BA8D2E6DDE07 /* Reactive.swift */; }; - 5E689A3A729873D290AD5C963C4D5389 /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FDA83E1F8E3CEA2D465E20D3214B773 /* Concat.swift */; }; - 5E901977E117A5D74CD1701BB665B3A0 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1C08FDD640F8069F0780569F49E173C /* Multicast.swift */; }; - 60F93E168485BCB9AA3A157FE2CB7C41 /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBF3EE16F855C8DBB30D15A2D3D1AFDA /* ExampleGroup.swift */; }; - 618C13D4020EBA363997EFB60A56AC20 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = C7DD7EC55777F14EF1925F57BDF9C1E1 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 62795B841FA47336A4A09F0B0776FDA5 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4DC9433907411D9872E64D72EC0EB8C /* Rx.swift */; }; - 62A3D36B892ED9C9A3210134C97FE3F9 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B178C80B40AAE6BB62339FF0344BE272 /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 631DE69A990BC90C4B864A9056F810A8 /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEECCD6C2C998EE81C97DF26F90C00A3 /* ObservableConvertibleType.swift */; }; - 65345217D4A1DE88312F171F0251DB96 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0635D052A48DC2468609F1AC2E6F7D /* HooksPhase.swift */; }; - 65FF97EE04691FA9881DAA432DEAC165 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C813EBE18B28E147E2D2A4E1315ED6B /* ExampleMetadata.swift */; }; - 6677FB54CA94A573E7055E91A774BAA7 /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29A6E3F42A38B96DC41F4AD405047BAE /* PrimitiveSequence.swift */; }; - 66B1964BB363964D6D5997D1A036AA4C /* Pods-DemoTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B986DA8565410A1FBB275EBDC22173F /* Pods-DemoTests-dummy.m */; }; - 66D3DA2225488356273B3D0AB83DA268 /* CwlMachBadInstructionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = DF5265DC9B29D8CA8FF54085E2B7DF5D /* CwlMachBadInstructionHandler.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6789FBB44FD34F04961C57D946F303C8 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BCCD69666E088C50F6C38EA6CD1AB4B /* SingleAsync.swift */; }; - 682734406B4017836DFA3477E9580A75 /* Completable+AndThen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28E1A1F23E60EF795CDF40CC4BACEA8 /* Completable+AndThen.swift */; }; - 694209670715D02154935BBC68357DDC /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E4E005EEF95B0D83D99B6692A1350BC /* RefCountDisposable.swift */; }; - 6985430721C89135D5B4CBE13357EC31 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7667193A493030E75DFD96FE7487BAA1 /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 69DCD40C8C5C22615B29432BF0ADB8F1 /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 359EF32513E15E5F9736472E34E8BA2F /* Sequence.swift */; }; - 6A81D8BA95FB1AE2D08BAF2CD8722D1F /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 953602682825A527034579F7C76FE490 /* Repeat.swift */; }; - 6ABBC348BEF5F20DBE251EB1DA4139D8 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370E28D8AB2F773D22F0F14A4380D8D1 /* Zip+Collection.swift */; }; - 6B124A4D8EB28A918E0C87F2E75D94F8 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = E32EF20994BA990A01264A673D581032 /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6B2DF45B9BFABD4BF3DDC503F073FB71 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA5CA08861E3FE5683C967ACE8CB4B6E /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6C7793E96DD52017C4265E4AC7B7DFDC /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0355709C623A5CE75C62DADE7ED13864 /* CombineLatest+arity.swift */; }; - 6ED60AC96F8472044C00C8D7D628A0C6 /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5C6E9FFEAEA19E766DE091CA2CED49B /* AsSingle.swift */; }; - 6FC73E611DB28D56E414368C62293B35 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7891998A72CC5885870EAA5C1DB6090D /* SingleAssignmentDisposable.swift */; }; - 6FE504E9ED5B37C05CFC2A530019AE5D /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C16136FA33975C0E5E721B340B54FEC /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 71620E4C41A339C58454366C0C745343 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14254979BB7DBDECF8A42729EB0DAD3A /* Platform.Linux.swift */; }; - 71E9ACE34A2AC6107D9D3FD879E54003 /* ShareReplayScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE060340E5949C3EA68028FFE2F6FAFD /* ShareReplayScope.swift */; }; - 7296E0A03EC8B756490B091FC364D56C /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C10D0D490E840FD368480CA5687CB9 /* AsyncLock.swift */; }; - 72F5C956E3EEC102D8C074CECC6BC3FA /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62E964D3332805902ED02A58CEAD6763 /* Deferred.swift */; }; - 7371D9E42417DC2735CC0B33FCAA5B53 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4713F6654D54AB72593C74FC5B61E96 /* ConnectableObservableType.swift */; }; - 74605907C211553B00F09768BEF12834 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E119EFB1EAF08A062C6AE19BAF7AC39 /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 746D0DBAF8EB27CA816CFD021DE2A7A1 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = C248DC53B42DE75A0CBD7043CB1F3BCC /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7485AAEB633B78268D656D019B77E023 /* SatisfyAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 469C30CEF7D2A4D3C4CCF20CEE62E015 /* SatisfyAllOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 783623D1EBFE01DAB87B7B68F150C4C4 /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08B5B59E45712A057FDA37338206B27D /* CombineLatest+Collection.swift */; }; - 7876A8DBFDC1DB9B1AE2DEDE6A3215B1 /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA2B4351FE4514079E5C27A7CC047C5 /* HistoricalSchedulerTimeConverter.swift */; }; - 792874E54F86CE42C62738D2A617471B /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1EEE78514F442CE33602A647235C73E /* GroupBy.swift */; }; - 7961143C7234A4CCE19F18B3E46A3675 /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54C8B8F19EE0A378AFB47AEF4F46106B /* RetryWhen.swift */; }; - 79A97F6BE246CF2D3CAF89AD701B92DA /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7A9320BEA924A5F642EFD71C5422EF8 /* PrimitiveSequence+Zip+arity.swift */; }; - 79FA255F43C9E42470C9720C0604444F /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 77EF7A3BA578E9A34C4A4608778AAD11 /* Nimble-dummy.m */; }; - 7AA9A7388AF44BB4EB2111CEDB29A666 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6CF95E05725AA13265818026FD6246B /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7ABB709BD6428FCC8793EA57479CB750 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24D1A75476250C2A48E7F5448FAF09A9 /* DistinctUntilChanged.swift */; }; - 7BF648A27F63C337E891EFD80CEFEDCF /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B445A2DE8B41E87F9063B9231FBBF8E /* Sample.swift */; }; - 7E4106FB6CD590CF28FB62BEF94CFC9B /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F3C35BAE591AFECEB05635881E769C9 /* RxSwift-dummy.m */; }; - 7F1BE590E76E43F561D8F8CF354F72F6 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC800C898D2D37EE433653C10CD924F4 /* Filter.swift */; }; - 8050C10B78F2D1DD98A2F3E250A24AD0 /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B071A84DD47E9A2223335FED77ADF2C7 /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 81FEEC4A4AAE20EB19B8D499CC21F0F0 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = D14B39EDDF06E204809CFC94AFFDEB86 /* TakeWhile.swift */; }; - 836BD1324E5478A3AB7542A3CE75F283 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 363D20503FA622D74B2953ADE9EF5BC9 /* Errors.swift */; }; - 845A3084299A4B5366BC11E793F47FC8 /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8101628CF72189785B691AC6B4E0289 /* SubjectType.swift */; }; - 85107C3BD627EA89CC1EAB25859EF85D /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 714F613A3647ADF3B1A3BC1CAD3DDA28 /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8580697F001A38CF65562CBE91B3C3D0 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 470B86DFF7ED33C296F43DACA490CE9C /* ObservableType+Extensions.swift */; }; - 86DC85C7CF36987627A4A36D82C310C5 /* DeprecationWarner.swift in Sources */ = {isa = PBXBuildFile; fileRef = B21EC49FB786C1D81036492BE569EC3D /* DeprecationWarner.swift */; }; - 8A07E63BB7C668B40163BA52C80E6532 /* HasDisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B10CE857DE60321E2473DA326FB12B /* HasDisposeBag.swift */; }; - 8BB7F5B7E3E77CF25E64E1EAD1A26E68 /* ContainElementSatisfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3842DB32E06DE501958B97A857F58B82 /* ContainElementSatisfying.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8D4752D7E2883F2567EF632CC4E226C4 /* Maybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6671BAA13CD18FEE8106C9712F03FA43 /* Maybe.swift */; }; - 8DB82AD773179E60305CE27BCD1A089E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4629AD8C523D2FDA5C72258FAA2846DC /* Foundation.framework */; }; - 8E83E547D107FFC8B596829313AAF38F /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95EF400AF65F8B21865F81A17A3CB4BB /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8F5F62256B3D0CA7C0F3C12873E5A6AE /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7E207A4F51F9EB4921B778F527FD38 /* ToArray.swift */; }; - 9096D686AB39D3475A4227F0765C3DC4 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2802F374F28EDC38A097F63405F76D6E /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 91BBDC01F5559CD8ECBF2591ACAB7E04 /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C22E5D2E05F8DF2210DCECD0FA648DA /* InvocableType.swift */; }; - 93438224836AC1AFFD43A69A04501382 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD9AA26C47D968373890A1FB6485742 /* NSBundle+CurrentTestBundle.swift */; }; - 935558F919649CDE3784CBD344D3C008 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 810E828B743FB8120679616F1A71760C /* Predicate.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 94641EE53103489464DC9A221DB495A2 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AFEE7880FB8439DCD66B8C502896611 /* Disposables.swift */; }; - 95971795C6F61C01410B264C4BBF3A6E /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3AA38902E6E9E06B7493AB312E5236 /* World.swift */; }; - 960B9B027E55F6C0481B63E25CF50EE6 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54E70EA13F7FA77DD8FA0B1F55597CE3 /* Event.swift */; }; - 97A60F28FA1FF94422D2560002CEE407 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = DA98F69D71655FD9BD126636D8287A07 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 97EE56F66DCD3C983D0585D8F45FDB6A /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A741EC25A9FAB83CC4422BE397426328 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9832EC5987372E75A4C3F1E13CD3F372 /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F5A272707A1F50C050DE72AB2003B1 /* ConcurrentMainScheduler.swift */; }; - 9837B2C2E8067FC961F5ADF7F2A70764 /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70768FAAD304AE8702BB00F59F1D0DC3 /* Reduce.swift */; }; - 983B50800F73172C0CFDBE2C9AA34CCD /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16A0AAA6F245B75A656A4B2518C7335B /* Debounce.swift */; }; - 98D381D62E332A089ACB3A59FCCE4ACF /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B0CA0F1FC4FC57170B89F6C07D3B2DE /* Callsite.swift */; }; - 993640128A087C5D96F453A18DCD9138 /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE7E9035154A3B24B6F7BF064B34D961 /* AsyncSubject.swift */; }; - 9A0EB2F0A468E4576E776AE1E9221E7A /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB5FAD837BE2AAE61455BFD7B32DA9F7 /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9C22921616DC80691662977DDEA6B2C4 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6586E98D2401323473BC5C42F6FEC090 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9C736F7C9C052DFFF87DCBA83FF50599 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 2352A949CDB3DB99563DEEFB6A3C4B0C /* XCTestSuite+QuickTestSuiteBuilder.m */; }; - 9CA1B83C396A9E9AB68F7C5137B493FD /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAA9BB2D4A6C2F84F3A205B1635BBA99 /* URL+FileName.swift */; }; - 9CAA6C0F3A9D7BED04A08EECF400A0CE /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FEAFE56F3ED5F6E99CF9B24253F2421 /* TakeLast.swift */; }; - 9D4E546FF329D4109FC3C282928B02E8 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FA2AE3513A9716B710893D98246801C /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A274C62D7E69DB37DDBF4634D893E4BC /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EEACE83E0A6A980E3B00BB915449B7E /* Lock.swift */; }; - A286AD495C5D4520ADF2ECE7786EF950 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5E5FF9976441B8C4B99ADBA2B921D91 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A3209494C8B29F390AC14D95519460A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4629AD8C523D2FDA5C72258FAA2846DC /* Foundation.framework */; }; - A3769A79129A62719850CA2BD7F8B4BC /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1A7DA6A081CAE89BEE14C9BC4655DAA /* Platform.Darwin.swift */; }; - A490FAE0B78B47AF739B0DAFC1DC5AD6 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49742A5C11C901751E6A9D8BB806B59C /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A54297FF959864299C019286DDCE4E90 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47825406D7C5A6DEA89B0AF2C056C79F /* BinaryDisposable.swift */; }; - A6D8B1FECC9C49BC75F4FFEDD6DD86AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4629AD8C523D2FDA5C72258FAA2846DC /* Foundation.framework */; }; - A773C0EEDBE9F7DF4D6F7F13D60C8509 /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84693A87C5C5D2F05C08327D2A4B001D /* Window.swift */; }; - A7EA3539CBE2EBB42D92C3132763E251 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A0F18D7BA4CD704304888CCF78EB82 /* World+DSL.swift */; }; - A9ED0D16B96A912902689EC0B359D695 /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7EE7E5BED1F5444680691BAC2DC2217 /* SynchronizedDisposeType.swift */; }; - ACBC3FF2772BDB948D79DE4ACE4D7722 /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CEAB6772D554FD8158AA584BB52908 /* HistoricalScheduler.swift */; }; - ACBDFCBB834F0381E3CC9B223F9FF40E /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 329F6D3325A0CFDCA45B42B53996B676 /* AnyObserver.swift */; }; - AD3AB11277BC8A2880794BFA14AA3327 /* SwiftSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F92503F46B55D4F4A3BFD15E7179C81 /* SwiftSupport.swift */; }; - ADBCE6E49E093AD2C1E6366DABBBC03F /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3283B87E27D08583CBA1ECF30756E5F /* DisposeBag.swift */; }; - B0F913BBEE0EFA8232619A91191BF412 /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F0D73D9BD0515FA3306EFC358189E8 /* LockOwnerType.swift */; }; - B16E0468AF7B79011E9E5008D74DF99D /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22B1203DA40864EE94B6C1E277231E5E /* Throttle.swift */; }; - B287D5E766B234A090DCBC039E87B2D6 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAB8BAF401ECC4A253D755B27763BC4B /* Map.swift */; }; - B2F5395D43472600D7BA7E26E3772069 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3692E1BE689C456EFFCA8713705DB0E0 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B30FCDD03BFE82B7E9776FD9CE3A1C51 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AF226AA1C6369E28470BFDF0B8B1811 /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B34A6018FDF04D597D6E7529674C70B8 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD9A6F50B048B75D8EA7E457FAB2953F /* Catch.swift */; }; - B3895E766FFE0B7DF58F4D0BE246221B /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B4F410F57910B0F6B0F18AFD2F8AF74 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B3C3D7DAB6567A273DA50FD2068AFF77 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 826512B771104143AEAB0F494EEAF955 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B5541AEE9C3EF1FC587FD966C696255A /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72D33CF85D0E14163C30C93662CCF51 /* Switch.swift */; }; - B5C4D238942464AAF42FEDDBB3512EF7 /* NSObject+Rx-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F448C4244A86825882FEC5453730CA1F /* NSObject+Rx-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B6F0D7C04121F97B1D4933C0168278EF /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBFAA7F4BF7C3113856D36AD34A1DE76 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B7ED1B41F56087971B656A2E38322310 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CDED84A81BE984BDBC5FC295D439898 /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B8A8CC77A2A845C44237B66CF0C8F022 /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 240BA3650D70E820ABF9412BCA527E91 /* ScheduledItem.swift */; }; - BB02C07DFD814F2B8FD5797635B156A3 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682299A86071B7158145932CB0D1BBF5 /* Delay.swift */; }; - BB7BDB047E44BF96B6967525A2EF0301 /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E0E76A1C543895177E899C435E069A /* ImmediateSchedulerType.swift */; }; - BDDE7F52290E745F8E0ADF2F1B88B660 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5552815B1D6B85B22773B342182410F /* MainScheduler.swift */; }; - BEB8082717D949400F2DE3458E75CBE3 /* CwlMachBadInstructionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = D4713B10B2644CE1F98886857CDB397E /* CwlMachBadInstructionHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C062E295E908096B138F19EAC25F86F6 /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAED59CA25B110A7B74B373CA11A5DD7 /* PublishSubject.swift */; }; - C17F7ABA56D9CF3BCCCC099B28E2180F /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E03BA62093D7BC8C7CF21D07B63CE87 /* SwitchIfEmpty.swift */; }; - C25C2936C31569B3F4247170224114E3 /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A68F151BE54A2F04AB50E53B935D79 /* Queue.swift */; }; - C25FC7A56AC20E4C745248B505FB8864 /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D7B9B6643C71DDDBC3A8B7C0B60A880 /* AddRef.swift */; }; - C2DB15EDDCB2D09A7BA3DADEE3E48A3E /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EF5A94E2EF4108B8AAF8ED75F7A1872 /* Zip+arity.swift */; }; - C3DB1DB7DDD26BB48EDA8EA92289F398 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B256F24A6D99A8F066F044EB158EADA /* Observable.swift */; }; - C4F42D1DA4FF9D2A4A74B2EACBB42EEE /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9F5B8284085D8FECC48F4A0F89485D8 /* NopDisposable.swift */; }; - C5305DE0B553BCA7361C3997ACD70FFB /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9EAF6483E08D795DEA5172EE1BC70F1B /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C606BCAC386078403182F3AB0EA32A95 /* NSString+C99ExtendedIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5271EE6500A485B24AB3878D7B2CA7B /* NSString+C99ExtendedIdentifier.swift */; }; - C70836640F9BCAD036DC24CD53EAD941 /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAA662D89BF735BEDA1820FF2B1259DD /* Scan.swift */; }; - C798F9D3D2C528634CE1AF5B9D1A86EC /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDF20B48B6E7109EE06F817D2F4FD91B /* CurrentThreadScheduler.swift */; }; - CB2070AAD7F9B9E283AD2A50624DC8E5 /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 693FA9B96E88629D39696CE901394BC4 /* Materialize.swift */; }; - CB3FE477A28D5F42659E775DDADFA162 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 969E229627CEB3E2BB5AC2D0A021B227 /* SubscriptionDisposable.swift */; }; - CC6C123ABABD01D69876BB64F3F78884 /* QuickSpecBase.h in Headers */ = {isa = PBXBuildFile; fileRef = D8D94B3AF1FAE7195873672682DD65CE /* QuickSpecBase.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CDE5591E5DC14A3BD4C44557996D0912 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8618BABC2E115BF6DDD424871D134F62 /* DispatchQueueConfiguration.swift */; }; - CDE8D74CECACB82D52879CA3EFA439A9 /* ObservableType+PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6413E762A5EBA3739D651907C4AFE4AE /* ObservableType+PrimitiveSequence.swift */; }; - CE1287DA39DB4208F5511CE47FE8298D /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0276210F7791A98E44CF60C73E6BA118 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - CF1ED281DEC16E6F808DE809FD9A4688 /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1933D8E0310F94603B8FD9851FD5FE1B /* RecursiveLock.swift */; }; - CF344AE64DC644F7F9643462510552F0 /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25E927D100A94EBC1CFB1D2C75F540CC /* SchedulerType.swift */; }; - D20332D3554078C7F69A22AD794F38DF /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CEB04C02E607AA3AD97B6F71EBAFF25 /* Take.swift */; }; - D20D415DB1DC034E1434D3265645F21D /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42A6C4D50D4793EB419FC568B796501 /* ObservableType.swift */; }; - D288903D8382C3A45230B8E8F1ABD4A3 /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9ABE8F53EEDF350CE9E98036A1388B9 /* DefaultIfEmpty.swift */; }; - D2E59573AB346DE7A8E9492084578ED4 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C53E3F10D7DBBB1C92DB551BE4E55FA3 /* ScheduledItemType.swift */; }; - D469257F041DDCAF64BEED7BC8A03095 /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 133B81FBCBE2867E65695417011A8A0F /* ScheduledDisposable.swift */; }; - D5E2476AE4B2324B73B769C1B866D709 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 892AE6FA0CC8D00329D80A079A2CC781 /* QuickConfiguration.m */; }; - D66898CEEBBB911BAD9BD1FD9179A7B5 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC74AA969E8AB63D1EB8807A90B9E291 /* RxSwift.framework */; }; - D710D0C1F200BB05972529EEED15D4AE /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AA2AC65F9FD2C9F028886DA5DF992D /* Filter.swift */; }; - D7F54D1594E9B050170EAD9762901A41 /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 591AB3255214FAC8B04C1178BF4AB315 /* Merge.swift */; }; - D89AD296DD7AAF395C236A8708FCE1AA /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE18D3D48A514F0873D97857ADFD5467 /* SynchronizedUnsubscribeType.swift */; }; - DA257CBBCAB6C22BA5476F983AC78BB5 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F0DE87C78ADC36B83F5F95C1D79FE6 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DA4FBA76599ECAB9A1993F119A41359D /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8375E055ABF700CDD22E540C278690CA /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DAF21E37BBBFD5D408F514E867A5936C /* ToSucceed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B62414F5CC774D8C0A71BFBCFED3C28 /* ToSucceed.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DD2EB3198539280E2F07F0E360AFF324 /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = B91C3C38EDF4C0FA75689C670E9FF69C /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DDB89D0F2F9422FEFF8D3ABB4B1FC7F9 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = F404DBBC429942E6C3B29B82B9B33127 /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DEEDD0D7C0369178EC867A59373F6380 /* Await.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D15E09F59E707CE8DCFA06DA95E1955 /* Await.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DEF90E9699C9CFF31E275EDF10E67F5A /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9E8191074B83A31E03235A74753E1C /* Timeout.swift */; }; - DF7CF1941236840A89D99B233E4DC086 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAFAF82614BD68A87F254861741C0F09 /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - E0AE698E1A4F0D9064C04882327C92F3 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F9D0F9A639D77A50EFB45E3EEF3284E /* Example.swift */; }; - E1ED227B3AD36380A637CA2B5980E7CC /* QuickSpecBase.m in Sources */ = {isa = PBXBuildFile; fileRef = E9589240691151AB6A2D4C860573AD53 /* QuickSpecBase.m */; }; - E2A16679D4DDEBA514BE2B37ED821EBC /* Enumerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F14ADA04EC375F9355811F7FB479F30 /* Enumerated.swift */; }; - E2B9A7FCED63F1F8FE196ADAB3F10E8B /* Pods-Demo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = ED4652D686FFA05E4CFD837F5DD948A0 /* Pods-Demo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E3520A44C282726253DDE4DAC512CCA0 /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 80D7E59A7AB5A6E0A9F70553026A1432 /* Quick-dummy.m */; }; - E454528E8D39931207848DACBB617A4C /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19BC99B3171B4D39B517C1C8F619EE0 /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - E4D4B352127EE8DB616595CF15FA7704 /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8E5D7A9D671C721C1E12793E2003311 /* Never.swift */; }; - E4E54DCF87B0DDFE063F6E4DC162BDE6 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69C14CC6F1FDF38F363AFC56BA6F3308 /* ElementAt.swift */; }; - E85EAC40F42C10F327BE0BCF39C2DF3B /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57B68089FB51524F2540E998F84D39F6 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - E9051C0B4E7A242E6E97A5B5AA0404A4 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50AF8513B9AB383E48A62162FCE5CDCD /* SerialDispatchQueueScheduler.swift */; }; - E984CB87ABF0DD970BD4B856DEA35E1A /* CwlPreconditionTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A331E455E604A8FD062D062BC8C2CDE /* CwlPreconditionTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EAE3244F76D911D79ED30B4A7259DFB6 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CA979333254652BCD92B81BE2A52273 /* DelaySubscription.swift */; }; - EB7C68E6DCCC3500FE08F9B2F0C85F08 /* NSObject+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DA0C14A9787B97E9C5E661EA66B8618 /* NSObject+Rx.swift */; }; - EE99E3B1DCB0348F44C7499B2BA809A9 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2189B77DF040C86FCFF5D369FB3174E /* Deprecated.swift */; }; - F01E5B65B40B6E3082994D09EC7A55BE /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1146875A7BF6594AA772516883D1AC4D /* GroupedObservable.swift */; }; - F088EE1AE386EEF27AC934DE13F455BB /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = AA72A7AC13BEBC006DC6A08BE7158B77 /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F099097291330AC895E75E72028EBC0B /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0217A0A42340465992FEC11F73C50759 /* QuickTestSuite.swift */; }; - F09B92DBEA01E4AC34B1936261B29D7C /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88384211B224E7DC58855FA587A676A7 /* Skip.swift */; }; - F19DEFB017CE9B3CFB0C0A0AE9249CC4 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047E23E180142B6FADC17E1E69757B2C /* QuickSelectedTestSuiteBuilder.swift */; }; - F32B9D0318D13B740E6D88E16709FEA3 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 315147E49635C8F348F328E18989C976 /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F3BD9C72BAF02A3B4B8731C95C076B69 /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36A538752EB17DCE0DB682EF8DE237B8 /* Producer.swift */; }; - F3D08045C8E29935EA0B91BCE94B951F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4629AD8C523D2FDA5C72258FAA2846DC /* Foundation.framework */; }; - F44B8D914434D1395E2873C45587B500 /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5605D21C0A02C9A590028A83CFF730DC /* DispatchQueue+Extensions.swift */; }; - F4EE282D8435D54A662C6DDD30A3D2CD /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = 0691A529241CC719252270B5515C79F2 /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F4F64B5A42509E4397D3D51E13B0C4C9 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77CD36657390EB761A89CC16CFCF007D /* Debug.swift */; }; - F552462D6CD28A8074CF8746ED010AF6 /* First.swift in Sources */ = {isa = PBXBuildFile; fileRef = A83B3BD4D27B914EF152352BB94DF1A0 /* First.swift */; }; - F647E5A7CA3CDAB1EB28BB0E119FF954 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = B70E02E24CED64298A1B42C70BA76CA8 /* SuiteHooks.swift */; }; - F683E04324F4494A9FA86E8D9AB15F0A /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = E730DFEBE1FC3034DE9A7F4481D1B76A /* Sink.swift */; }; - F7D7D1D92A2A67BF2977AE46A48ABBF7 /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E38701C3B0A94C31245884CA79DE9371 /* InvocableScheduledItem.swift */; }; - FA47FEE3404BEA929C6B6081015CAA22 /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9874781A641D9A2DC14AF764B2E138F /* Optional.swift */; }; - FB208F9C94AE4284B4695DCED66AF03F /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CF7F13A70415793AAB045D2F65EC7FF /* Bag+Rx.swift */; }; - FD164FECF087F6F23A090797CA3E9949 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C481F203A3D82E046D561B227D7708B /* SerialDisposable.swift */; }; - FDBCBA60FA2DCFBCE0D09A484859687E /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66807E6510B06C0EB6C8084D8262B245 /* ObserverType.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1945352C42EA3A9BB808659DF7EF5C93 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 5E269AA9A7FBCB9BFD8EA487B43AE7F9; - remoteInfo = Nimble; - }; - 84FAAE3376CA8F3F598F8202CA76A6B5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = AB6A097ED9ED31C93AA4B971CFDBBC33; - remoteInfo = RxSwift; - }; - 9C4E6AA93842E1B669F2567D9577B796 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = C86D25EC2265DA7A383D953ED7711121; - remoteInfo = Quick; - }; - AD4AC3E78E4C00FE6FA84A78B2B48EF9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6DB514A28E386B633179B9615872C399; - remoteInfo = "NSObject+Rx"; - }; - D0865859F488184744C9D0FB7CC8B06A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = AB6A097ED9ED31C93AA4B971CFDBBC33; - remoteInfo = RxSwift; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 00C13AB47B67BD647DDFA8EB325A17A5 /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/WithLatestFrom.swift; sourceTree = ""; }; - 01F89D13AB5B86376E75FEE6A9DBA004 /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Quick.framework; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0217A0A42340465992FEC11F73C50759 /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; - 0276210F7791A98E44CF60C73E6BA118 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; - 0355709C623A5CE75C62DADE7ED13864 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/CombineLatest+arity.swift"; sourceTree = ""; }; - 03A68F151BE54A2F04AB50E53B935D79 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; - 047E23E180142B6FADC17E1E69757B2C /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - 0691A529241CC719252270B5515C79F2 /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m; sourceTree = ""; }; - 06E620464506C8F032D83509BF8CA155 /* Readme.md */ = {isa = PBXFileReference; includeInIndex = 1; path = Readme.md; sourceTree = ""; }; - 074852CF0825C588D1A3D4BAFFF336F8 /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Empty.swift; sourceTree = ""; }; - 08B5B59E45712A057FDA37338206B27D /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/CombineLatest+Collection.swift"; sourceTree = ""; }; - 0B4F410F57910B0F6B0F18AFD2F8AF74 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; - 0E6878F54DB7E975AF72BCA44F5186D3 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - 0EF5A94E2EF4108B8AAF8ED75F7A1872 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Zip+arity.swift"; sourceTree = ""; }; - 0F83D1F29400CB3E6AC588928E3AE393 /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; - 0FB7B448FE8D14A1A1033C5B2D60297A /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; - 10B10CE857DE60321E2473DA326FB12B /* HasDisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HasDisposeBag.swift; sourceTree = ""; }; - 1146875A7BF6594AA772516883D1AC4D /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; - 114E68352CD984771851423579F40A2A /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Just.swift; sourceTree = ""; }; - 12E109B04A41B36246DD8B544AF9B7EC /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Dematerialize.swift; sourceTree = ""; }; - 133B81FBCBE2867E65695417011A8A0F /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - 137F93901D86DD727245232DB84C0501 /* Pods-DemoTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DemoTests-acknowledgements.markdown"; sourceTree = ""; }; - 14254979BB7DBDECF8A42729EB0DAD3A /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; - 143DC6F29498D8013E6BEC40FBA5E02C /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; - 15BB44DFD228A90F805B9FEEBA7A4E80 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; - 160AC927638F4BB5403FCDA183972881 /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Amb.swift; sourceTree = ""; }; - 164F3AB078C274155C74354ABDB631F7 /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - 16A0AAA6F245B75A656A4B2518C7335B /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Debounce.swift; sourceTree = ""; }; - 16AA2AC65F9FD2C9F028886DA5DF992D /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; - 1933D8E0310F94603B8FD9851FD5FE1B /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; - 1A4E7DF30B61AC226D85BBEF42D356F3 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Nimble.modulemap; sourceTree = ""; }; - 1B422D4026116E98349BC299E86A115F /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; - 1C813EBE18B28E147E2D2A4E1315ED6B /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; - 1E03BA62093D7BC8C7CF21D07B63CE87 /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/SwitchIfEmpty.swift; sourceTree = ""; }; - 1E119EFB1EAF08A062C6AE19BAF7AC39 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; - 1F9A5783A2A7CE35D48E4AAE5C202487 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; - 2011689AB7C05B7EFCB3487499B8D277 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; - 22B1203DA40864EE94B6C1E277231E5E /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Throttle.swift; sourceTree = ""; }; - 2319471065A9D1CD76F47F65B85C2B9A /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - 2352A949CDB3DB99563DEEFB6A3C4B0C /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; - 240BA3650D70E820ABF9412BCA527E91 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - 240F5BB7F84055523169BA056A193790 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; - 24D1A75476250C2A48E7F5448FAF09A9 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/DistinctUntilChanged.swift; sourceTree = ""; }; - 25E927D100A94EBC1CFB1D2C75F540CC /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - 2795306084CC6CBA4B48D733AB0F8249 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2802F374F28EDC38A097F63405F76D6E /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - 29A6E3F42A38B96DC41F4AD405047BAE /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; - 2A82807BF1FD7E2A42F11A48277F0D4B /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; - 2D752ECA4EA765B6DC3853D1F8DE902C /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - 2F14ADA04EC375F9355811F7FB479F30 /* Enumerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Enumerated.swift; path = RxSwift/Observables/Enumerated.swift; sourceTree = ""; }; - 2F92503F46B55D4F4A3BFD15E7179C81 /* SwiftSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftSupport.swift; path = RxSwift/SwiftSupport/SwiftSupport.swift; sourceTree = ""; }; - 305E4331419736FD5897A2AE8C89EE97 /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; - 315147E49635C8F348F328E18989C976 /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; - 329F6D3325A0CFDCA45B42B53996B676 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - 34F0D73D9BD0515FA3306EFC358189E8 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - 354D24E958A393E94828843EB7BA53E7 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; - 359EF32513E15E5F9736472E34E8BA2F /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Sequence.swift; sourceTree = ""; }; - 363D20503FA622D74B2953ADE9EF5BC9 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - 3692E1BE689C456EFFCA8713705DB0E0 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; - 36A538752EB17DCE0DB682EF8DE237B8 /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Producer.swift; sourceTree = ""; }; - 370E28D8AB2F773D22F0F14A4380D8D1 /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Zip+Collection.swift"; sourceTree = ""; }; - 3842DB32E06DE501958B97A857F58B82 /* ContainElementSatisfying.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContainElementSatisfying.swift; path = Sources/Nimble/Matchers/ContainElementSatisfying.swift; sourceTree = ""; }; - 39850425D82DB5D7CEB583E418B77552 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; - 399B006E2977C12A104E16C77804FD8D /* Pods-DemoTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoTests-frameworks.sh"; sourceTree = ""; }; - 399E5C6EE42A10DDD4470126DBF1B820 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Quick.modulemap; sourceTree = ""; }; - 3A80966CC4EC9818649F9C9E2CFC0741 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Using.swift; sourceTree = ""; }; - 3AFEE7880FB8439DCD66B8C502896611 /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; - 3C716D15548A214C7698156BFC17719D /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - 3D8A88E7CC4DB576335240864037BBF5 /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/AsMaybe.swift; sourceTree = ""; }; - 3E4E005EEF95B0D83D99B6692A1350BC /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; - 4198195DE6196A273806238279B8F604 /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - 427E782658A674CCF0CB37E38704950A /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - 42CC3F1254541F29401A9CEAF5840368 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - 42F5A272707A1F50C050DE72AB2003B1 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - 43B0514188824A8DF9BE4525F4C0AAF7 /* Pods-Demo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Demo-frameworks.sh"; sourceTree = ""; }; - 445E569FB550D10E1D62648BF25BB32D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4629AD8C523D2FDA5C72258FAA2846DC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 469C30CEF7D2A4D3C4CCF20CEE62E015 /* SatisfyAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAllOf.swift; path = Sources/Nimble/Matchers/SatisfyAllOf.swift; sourceTree = ""; }; - 46A0731852D50F1DB5BAFB19F88EAB8C /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; - 470B86DFF7ED33C296F43DACA490CE9C /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; - 47825406D7C5A6DEA89B0AF2C056C79F /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; - 48CA898E26C422AA68784F179A306788 /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - 4906E7F6E307512D338DAAB9808A5980 /* Pods-Demo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Demo.modulemap"; sourceTree = ""; }; - 49742A5C11C901751E6A9D8BB806B59C /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; - 4B256F24A6D99A8F066F044EB158EADA /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - 4B5AE0479796206409FCAA0309BF6CDF /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/SubscribeOn.swift; sourceTree = ""; }; - 4B9E8191074B83A31E03235A74753E1C /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Timeout.swift; sourceTree = ""; }; - 4C31E6FEB9D56741DB672C8382B2518A /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; - 4CA2B4351FE4514079E5C27A7CC047C5 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - 4CB22A9BED60505A355D13240451A9E0 /* Pods-DemoTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DemoTests-resources.sh"; sourceTree = ""; }; - 50420501293EDA6AA5A34DACAEFBB2EA /* NSObject+Rx.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = "NSObject+Rx.podspec"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 50AF8513B9AB383E48A62162FCE5CDCD /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; - 5167FF8A5B2F212486CFD19AD479585A /* NSObject+Rx.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "NSObject+Rx.xcconfig"; sourceTree = ""; }; - 5291FFF3A591A584E3FD0C0D57FB22B0 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; - 53C19900EDD8583ACC910B537E5D5C4B /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; - 54C8B8F19EE0A378AFB47AEF4F46106B /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/RetryWhen.swift; sourceTree = ""; }; - 54E70EA13F7FA77DD8FA0B1F55597CE3 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - 55E603428CD7A07A4FC0C6F7958B3CAC /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; - 5605D21C0A02C9A590028A83CFF730DC /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; - 57B68089FB51524F2540E998F84D39F6 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; - 591AB3255214FAC8B04C1178BF4AB315 /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Merge.swift; sourceTree = ""; }; - 5A65F0423427F1590B3974881584BA82 /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - 5C22E5D2E05F8DF2210DCECD0FA648DA /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - 5D0BB645A4FAFCB5F640230E7F25570B /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/NMBObjCMatcher.swift; sourceTree = ""; }; - 5D15E09F59E707CE8DCFA06DA95E1955 /* Await.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Await.swift; path = Sources/Nimble/Utils/Await.swift; sourceTree = ""; }; - 5F1000398A937193871996A3F20A1462 /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - 5F99207603EB59E03D49A87AD6985D75 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - 5FEAFE56F3ED5F6E99CF9B24253F2421 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/TakeLast.swift; sourceTree = ""; }; - 61FCD9F5AFAA918AE18E0F1754E59089 /* Pods-Demo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Demo-dummy.m"; sourceTree = ""; }; - 62E964D3332805902ED02A58CEAD6763 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Deferred.swift; sourceTree = ""; }; - 63155FFB4E0398159B73FA1AB4B35DBE /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - 6413E762A5EBA3739D651907C4AFE4AE /* ObservableType+PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+PrimitiveSequence.swift"; path = "RxSwift/Traits/ObservableType+PrimitiveSequence.swift"; sourceTree = ""; }; - 6586E98D2401323473BC5C42F6FEC090 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; - 6671BAA13CD18FEE8106C9712F03FA43 /* Maybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Maybe.swift; path = RxSwift/Traits/Maybe.swift; sourceTree = ""; }; - 66807E6510B06C0EB6C8084D8262B245 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - 682299A86071B7158145932CB0D1BBF5 /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Delay.swift; sourceTree = ""; }; - 693FA9B96E88629D39696CE901394BC4 /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Materialize.swift; sourceTree = ""; }; - 69C14CC6F1FDF38F363AFC56BA6F3308 /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/ElementAt.swift; sourceTree = ""; }; - 6AF226AA1C6369E28470BFDF0B8B1811 /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; - 6B62414F5CC774D8C0A71BFBCFED3C28 /* ToSucceed.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToSucceed.swift; path = Sources/Nimble/Matchers/ToSucceed.swift; sourceTree = ""; }; - 6B986DA8565410A1FBB275EBDC22173F /* Pods-DemoTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DemoTests-dummy.m"; sourceTree = ""; }; - 6CA979333254652BCD92B81BE2A52273 /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/DelaySubscription.swift; sourceTree = ""; }; - 6CDED84A81BE984BDBC5FC295D439898 /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; - 6CEB04C02E607AA3AD97B6F71EBAFF25 /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Take.swift; sourceTree = ""; }; - 6D963093B3E8D12443FDB45479F08481 /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; - 6F354095154E0131D2DBC40757AF3EA6 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - 6F7E207A4F51F9EB4921B778F527FD38 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/ToArray.swift; sourceTree = ""; }; - 6FA2AE3513A9716B710893D98246801C /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; - 6FDA83E1F8E3CEA2D465E20D3214B773 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Concat.swift; sourceTree = ""; }; - 7074E9CA670A4C3E1FE286964C801BB3 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - 70768FAAD304AE8702BB00F59F1D0DC3 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Reduce.swift; sourceTree = ""; }; - 714F613A3647ADF3B1A3BC1CAD3DDA28 /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; - 7476D59404D46DDD01ACC0AF798AA489 /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Demo.framework; path = "Pods-Demo.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 7667193A493030E75DFD96FE7487BAA1 /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; - 77BF4BFBEE7621F16B88B263CA2C38CD /* Create.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Create.swift; path = RxSwift/Observables/Create.swift; sourceTree = ""; }; - 77CD36657390EB761A89CC16CFCF007D /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Debug.swift; sourceTree = ""; }; - 77E0E76A1C543895177E899C435E069A /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - 77EF7A3BA578E9A34C4A4608778AAD11 /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; - 7891998A72CC5885870EAA5C1DB6090D /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; - 797BA25F337844CAD75AED0CB57A95CD /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/CombineLatest.swift; sourceTree = ""; }; - 7A331E455E604A8FD062D062BC8C2CDE /* CwlPreconditionTesting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlPreconditionTesting.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h; sourceTree = ""; }; - 7A46CC4790475C2D3E8C62106E9E87BF /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; - 7BAABE3D70B15D706F0E0BC9A5AA411C /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; - 7C16136FA33975C0E5E721B340B54FEC /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; - 7C9205A34A84D74C21CDC8A2C00CE7C8 /* Completable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Completable.swift; path = RxSwift/Traits/Completable.swift; sourceTree = ""; }; - 7DA0C14A9787B97E9C5E661EA66B8618 /* NSObject+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSObject+Rx.swift"; sourceTree = ""; }; - 7F9D0F9A639D77A50EFB45E3EEF3284E /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; - 80D7E59A7AB5A6E0A9F70553026A1432 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; - 810E828B743FB8120679616F1A71760C /* Predicate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Predicate.swift; path = Sources/Nimble/Matchers/Predicate.swift; sourceTree = ""; }; - 8157656B0734D038A9E7480F90A400FB /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; - 826512B771104143AEAB0F494EEAF955 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; - 8375E055ABF700CDD22E540C278690CA /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; - 844DD75ACFEDFA15534455AAED0E3653 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Buffer.swift; sourceTree = ""; }; - 84693A87C5C5D2F05C08327D2A4B001D /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Window.swift; sourceTree = ""; }; - 84F0DE87C78ADC36B83F5F95C1D79FE6 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; - 8618BABC2E115BF6DDD424871D134F62 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; - 87642C0C62C2F733872ED6F8967428A5 /* NSObject+Rx.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "NSObject+Rx.modulemap"; sourceTree = ""; }; - 8770613CD8D6FFEBC01B5906D0AE2C99 /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Demo.release.xcconfig"; sourceTree = ""; }; - 87E3408C3DA17809FD2D1AF79092FB61 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/StartWith.swift; sourceTree = ""; }; - 88011BB9DEE5C83495C831B3F209E75A /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Matchers/Async.swift; sourceTree = ""; }; - 88384211B224E7DC58855FA587A676A7 /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Skip.swift; sourceTree = ""; }; - 892AE6FA0CC8D00329D80A079A2CC781 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; - 893DFA6FA782016C4ADC97E04614AA64 /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - 899F7D96738B594A432CEED858F6FF94 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8AC713BD372892587446BB06FED1F3EB /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Error.swift; sourceTree = ""; }; - 8B0CA0F1FC4FC57170B89F6C07D3B2DE /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; - 8B445A2DE8B41E87F9063B9231FBBF8E /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Sample.swift; sourceTree = ""; }; - 8BCCD69666E088C50F6C38EA6CD1AB4B /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/SingleAsync.swift; sourceTree = ""; }; - 8D3AA38902E6E9E06B7493AB312E5236 /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; - 8E69C9350D2F7C715612EAA27FE74850 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/TakeUntil.swift; sourceTree = ""; }; - 8EEACE83E0A6A980E3B00BB915449B7E /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - 8F3C35BAE591AFECEB05635881E769C9 /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - 9035AB3B1B87BE64DA7F6D62D4004A32 /* Pods-Demo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Demo-acknowledgements.markdown"; sourceTree = ""; }; - 91E4AEE60C203947FD25B20886A6938C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 92A189AEA8097CFFFDB0E5804C3C1C71 /* Behavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Behavior.swift; path = Sources/Quick/Behavior.swift; sourceTree = ""; }; - 939094E692477DC2564BA8E062FD8322 /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Timer.swift; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 93E44F300CBA04F70194186384480022 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; - 947511070799896770CAF73BCB20B722 /* Pods-DemoTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DemoTests-umbrella.h"; sourceTree = ""; }; - 953602682825A527034579F7C76FE490 /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Repeat.swift; sourceTree = ""; }; - 95B816FDFB9914FDB5932A277BF49BE8 /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - 95E460802B8FFF3BF02E54C2EA0BE9D9 /* ExpectationMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpectationMessage.swift; path = Sources/Nimble/ExpectationMessage.swift; sourceTree = ""; }; - 95EF400AF65F8B21865F81A17A3CB4BB /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - 969E229627CEB3E2BB5AC2D0A021B227 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - 98A0F18D7BA4CD704304888CCF78EB82 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; - 9966B286269124E595FC35634650F842 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; - 9B28044CA00CB23EC2407CC4122C4D28 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/SkipWhile.swift; sourceTree = ""; }; - 9C481F203A3D82E046D561B227D7708B /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - 9C86746B7782939999EF488A707ED793 /* Pods-DemoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoTests.debug.xcconfig"; sourceTree = ""; }; - 9CF7F13A70415793AAB045D2F65EC7FF /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; - 9D7B9B6643C71DDDBC3A8B7C0B60A880 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/AddRef.swift; sourceTree = ""; }; - 9EAF6483E08D795DEA5172EE1BC70F1B /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mach_excServer.c; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c; sourceTree = ""; }; - A1A7DA6A081CAE89BEE14C9BC4655DAA /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; - A2189B77DF040C86FCFF5D369FB3174E /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; - A3337AADFE03A8F4AD76EAA5747827B5 /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - A54350F518A110AD397EF8CFF0150CAD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A6303AD957AF6EB732CD23753FEFD3A0 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Do.swift; sourceTree = ""; }; - A6CB3D9F45EE9BAEB738CFCA213A7D9A /* Pods-Demo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Demo-resources.sh"; sourceTree = ""; }; - A741EC25A9FAB83CC4422BE397426328 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; - A7EE7E5BED1F5444680691BAC2DC2217 /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; - A83B3BD4D27B914EF152352BB94DF1A0 /* First.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = First.swift; path = RxSwift/Observables/First.swift; sourceTree = ""; }; - A8E5FDC2B2154419FF94FF3678B00B02 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Zip.swift; sourceTree = ""; }; - A90D775A3043D21572B4AF438A91629D /* Pods-DemoTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DemoTests-acknowledgements.plist"; sourceTree = ""; }; - A95A9A98F76112807DB84996E09D0E14 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; - A9D57B9A5440D76082DF3AD2C1289F7B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A9F5B8284085D8FECC48F4A0F89485D8 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; - AA4A119E40151F454272BA8D2E6DDE07 /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; - AA72A7AC13BEBC006DC6A08BE7158B77 /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h; sourceTree = ""; }; - AAA662D89BF735BEDA1820FF2B1259DD /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Scan.swift; sourceTree = ""; }; - AAA9BB2D4A6C2F84F3A205B1635BBA99 /* URL+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+FileName.swift"; path = "Sources/Quick/URL+FileName.swift"; sourceTree = ""; }; - AB12C0F86FEBA9F3834D32312A15B28A /* NSObject_Rx.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = NSObject_Rx.framework; path = "NSObject+Rx.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - AB94114691FA364F6528B887F9CCB745 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; - AC444D5DB3186C2696883C395754E536 /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/ObserveOn.swift; sourceTree = ""; }; - ACBE3CDD05A5487CDC82EAB5F2171E23 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; - AEECCD6C2C998EE81C97DF26F90C00A3 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; - AFA8DFA962931C0D5C66AA5C3A08F61F /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; - B071A84DD47E9A2223335FED77ADF2C7 /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; - B178C80B40AAE6BB62339FF0344BE272 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; - B18710F2DC29EACD57A91E061B8FEC5A /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; - B21EC49FB786C1D81036492BE569EC3D /* DeprecationWarner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DeprecationWarner.swift; path = Platform/DeprecationWarner.swift; sourceTree = ""; }; - B3B1FE08B862EAB796DF4CF965FDAF54 /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Demo.debug.xcconfig"; sourceTree = ""; }; - B40B43EEE8457F3CC4D6A4F0FA11471A /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxSwift.modulemap; sourceTree = ""; }; - B531259A56F7748DE2B778579A87338F /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; - B5C6E9FFEAEA19E766DE091CA2CED49B /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/AsSingle.swift; sourceTree = ""; }; - B6CF95E05725AA13265818026FD6246B /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; - B70E02E24CED64298A1B42C70BA76CA8 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; - B72A9772A6F1DAC3C6BE21ABCD1EB7A1 /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; - B8101628CF72189785B691AC6B4E0289 /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; - B91C3C38EDF4C0FA75689C670E9FF69C /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; - B9874781A641D9A2DC14AF764B2E138F /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Optional.swift; sourceTree = ""; }; - B9BE8C1E97DC1056F68928312334310C /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; - B9C10D0D490E840FD368480CA5687CB9 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - BB78C52CD56B4FA18B083FA7296FCB0C /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; - BE15C6D1844F1E64D2B1AFD049A9D79A /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - BE7E9035154A3B24B6F7BF064B34D961 /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; - BFDD89119F9756A31AAE0C61C6C392F5 /* NSObject+Rx-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "NSObject+Rx-dummy.m"; sourceTree = ""; }; - C0C55A49EBBDEA751964AB79B51D5144 /* Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Single.swift; path = RxSwift/Traits/Single.swift; sourceTree = ""; }; - C1701A6D3E2D2886092827A97CB2B50E /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/SkipUntil.swift; sourceTree = ""; }; - C19BC99B3171B4D39B517C1C8F619EE0 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - C210218A9F8486C724AF000E9BC9C37A /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; - C248DC53B42DE75A0CBD7043CB1F3BCC /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; - C3283B87E27D08583CBA1ECF30756E5F /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - C493BBD5CFCB280EB8EF00B929156F28 /* Pods_DemoTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_DemoTests.framework; path = "Pods-DemoTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - C53E3F10D7DBBB1C92DB551BE4E55FA3 /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - C54E50CCCF5E687EC58D23139DBE4815 /* NSObject+Rx-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSObject+Rx-prefix.pch"; sourceTree = ""; }; - C7DD7EC55777F14EF1925F57BDF9C1E1 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; - C91694859FC7B8E83B4294F7DEE91417 /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - CA5CA08861E3FE5683C967ACE8CB4B6E /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; - CA7749509FFC4CF987FE94C109993700 /* Pods-DemoTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-DemoTests.modulemap"; sourceTree = ""; }; - CC74AA969E8AB63D1EB8807A90B9E291 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CDC007682565B2949752002198645C43 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Generate.swift; sourceTree = ""; }; - CE0635D052A48DC2468609F1AC2E6F7D /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; - CEE8FAC3960020923D811F92029719E4 /* Pods-DemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DemoTests.release.xcconfig"; sourceTree = ""; }; - CF9F9A43FECF77D55637FBA87BE8F84C /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; - D14B39EDDF06E204809CFC94AFFDEB86 /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/TakeWhile.swift; sourceTree = ""; }; - D1BB4BBDD3FA1FE0AB0D5CD935421FE9 /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; - D1C08FDD640F8069F0780569F49E173C /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Multicast.swift; sourceTree = ""; }; - D1EEE78514F442CE33602A647235C73E /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/GroupBy.swift; sourceTree = ""; }; - D28E1A1F23E60EF795CDF40CC4BACEA8 /* Completable+AndThen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Completable+AndThen.swift"; path = "RxSwift/Traits/Completable+AndThen.swift"; sourceTree = ""; }; - D4713B10B2644CE1F98886857CDB397E /* CwlMachBadInstructionHandler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlMachBadInstructionHandler.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h; sourceTree = ""; }; - D4713F6654D54AB72593C74FC5B61E96 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; - D4D814CA1F7D55C5CE8D8A62F578BDCB /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h; sourceTree = ""; }; - D5271EE6500A485B24AB3878D7B2CA7B /* NSString+C99ExtendedIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSString+C99ExtendedIdentifier.swift"; path = "Sources/Quick/NSString+C99ExtendedIdentifier.swift"; sourceTree = ""; }; - D5552815B1D6B85B22773B342182410F /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - D8D94B3AF1FAE7195873672682DD65CE /* QuickSpecBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpecBase.h; path = Sources/QuickSpecBase/include/QuickSpecBase.h; sourceTree = ""; }; - D9ABE8F53EEDF350CE9E98036A1388B9 /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/DefaultIfEmpty.swift; sourceTree = ""; }; - DA8D444BAF7554FCBEECBC80AD3B8A5F /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; - DA98F69D71655FD9BD126636D8287A07 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; - DAB8BAF401ECC4A253D755B27763BC4B /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Map.swift; sourceTree = ""; }; - DC1EC9968F9F25CDF86C277FB0995035 /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; - DC800C898D2D37EE433653C10CD924F4 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Filter.swift; sourceTree = ""; }; - DD9A6F50B048B75D8EA7E457FAB2953F /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Catch.swift; sourceTree = ""; }; - DF5265DC9B29D8CA8FF54085E2B7DF5D /* CwlMachBadInstructionHandler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlMachBadInstructionHandler.m; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m; sourceTree = ""; }; - E0BCA2F92CA4AF4599FC7E2A65DD2420 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E2CEAB6772D554FD8158AA584BB52908 /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - E32EF20994BA990A01264A673D581032 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; - E38701C3B0A94C31245884CA79DE9371 /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; - E4A14CA2097D3428011144D158327644 /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; - E591EB13105E3738351C6AB010D7A223 /* Pods-Demo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Demo-acknowledgements.plist"; sourceTree = ""; }; - E6122E3E38B44456ED3B5B47B73EB2DC /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - E72D33CF85D0E14163C30C93662CCF51 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Switch.swift; sourceTree = ""; }; - E730DFEBE1FC3034DE9A7F4481D1B76A /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Sink.swift; sourceTree = ""; }; - E8E5D7A9D671C721C1E12793E2003311 /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Never.swift; sourceTree = ""; }; - E9589240691151AB6A2D4C860573AD53 /* QuickSpecBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpecBase.m; path = Sources/QuickSpecBase/QuickSpecBase.m; sourceTree = ""; }; - EAED59CA25B110A7B74B373CA11A5DD7 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - EAEF29A6102B5568BD9AAFF638630D8D /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Range.swift; sourceTree = ""; }; - EAFAF82614BD68A87F254861741C0F09 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; - EB58ADA89038564E8D37D27A81D9EEB3 /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; - EB5FAD837BE2AAE61455BFD7B32DA9F7 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; - EBFAA7F4BF7C3113856D36AD34A1DE76 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; - ED4652D686FFA05E4CFD837F5DD948A0 /* Pods-Demo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Demo-umbrella.h"; sourceTree = ""; }; - F404DBBC429942E6C3B29B82B9B33127 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; - F42A6C4D50D4793EB419FC568B796501 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - F448C4244A86825882FEC5453730CA1F /* NSObject+Rx-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "NSObject+Rx-umbrella.h"; sourceTree = ""; }; - F4DC9433907411D9872E64D72EC0EB8C /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - F5E5FF9976441B8C4B99ADBA2B921D91 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; - F6A24D057CFAB8AC0F42B410E04BC8DA /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; - F7A9320BEA924A5F642EFD71C5422EF8 /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; - F98E837E3836FD16E13D4A18CEED912B /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; - F996C636C4BFB2FF8976D728BB62B899 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nimble.framework; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FBF3EE16F855C8DBB30D15A2D3D1AFDA /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; - FCD9AA26C47D968373890A1FB6485742 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; - FDF20B48B6E7109EE06F817D2F4FD91B /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; - FE060340E5949C3EA68028FFE2F6FAFD /* ShareReplayScope.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplayScope.swift; path = RxSwift/Observables/ShareReplayScope.swift; sourceTree = ""; }; - FE18D3D48A514F0873D97857ADFD5467 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; - FFA5A3E4C4EA8083112AB03B934B3322 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; - FFC65524FB644895BDCBBA0657F2FA07 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 02575E8E5526E395222B8E6986F55C36 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - F3D08045C8E29935EA0B91BCE94B951F /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 22249B7EC004189037EC4DC74DA5AC70 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A6D8B1FECC9C49BC75F4FFEDD6DD86AA /* Foundation.framework in Frameworks */, - 205B3DFADA2BF30BFF78E1EC996EE385 /* XCTest.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 53AE72D620A2271AD1024079E2C920E3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3D7E3805A91D58036235B9A70333A9AE /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7F682A9E296D139B5A1E649989FB51D0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A3209494C8B29F390AC14D95519460A8 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A1DF0937E05CA7B08FF16B515B2D0108 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8DB82AD773179E60305CE27BCD1A089E /* Foundation.framework in Frameworks */, - D66898CEEBBB911BAD9BD1FD9179A7B5 /* RxSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DF3AF52FC03889BB23520BD9B51A5DCC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2A53CE49E35851735AC464248730EF5A /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0F33FF97839F84AA56FCBC831C93EC68 /* RxSwift */ = { - isa = PBXGroup; - children = ( - 9D7B9B6643C71DDDBC3A8B7C0B60A880 /* AddRef.swift */, - 160AC927638F4BB5403FCDA183972881 /* Amb.swift */, - 9966B286269124E595FC35634650F842 /* AnonymousDisposable.swift */, - 2A82807BF1FD7E2A42F11A48277F0D4B /* AnonymousObserver.swift */, - 329F6D3325A0CFDCA45B42B53996B676 /* AnyObserver.swift */, - 3D8A88E7CC4DB576335240864037BBF5 /* AsMaybe.swift */, - B5C6E9FFEAEA19E766DE091CA2CED49B /* AsSingle.swift */, - B9C10D0D490E840FD368480CA5687CB9 /* AsyncLock.swift */, - BE7E9035154A3B24B6F7BF064B34D961 /* AsyncSubject.swift */, - 354D24E958A393E94828843EB7BA53E7 /* Bag.swift */, - 9CF7F13A70415793AAB045D2F65EC7FF /* Bag+Rx.swift */, - 3C716D15548A214C7698156BFC17719D /* BehaviorSubject.swift */, - 47825406D7C5A6DEA89B0AF2C056C79F /* BinaryDisposable.swift */, - 4198195DE6196A273806238279B8F604 /* BooleanDisposable.swift */, - 844DD75ACFEDFA15534455AAED0E3653 /* Buffer.swift */, - 48CA898E26C422AA68784F179A306788 /* Cancelable.swift */, - DD9A6F50B048B75D8EA7E457FAB2953F /* Catch.swift */, - 797BA25F337844CAD75AED0CB57A95CD /* CombineLatest.swift */, - 0355709C623A5CE75C62DADE7ED13864 /* CombineLatest+arity.swift */, - 08B5B59E45712A057FDA37338206B27D /* CombineLatest+Collection.swift */, - 7C9205A34A84D74C21CDC8A2C00CE7C8 /* Completable.swift */, - D28E1A1F23E60EF795CDF40CC4BACEA8 /* Completable+AndThen.swift */, - 164F3AB078C274155C74354ABDB631F7 /* CompositeDisposable.swift */, - 6FDA83E1F8E3CEA2D465E20D3214B773 /* Concat.swift */, - A3337AADFE03A8F4AD76EAA5747827B5 /* ConcurrentDispatchQueueScheduler.swift */, - 42F5A272707A1F50C050DE72AB2003B1 /* ConcurrentMainScheduler.swift */, - D4713F6654D54AB72593C74FC5B61E96 /* ConnectableObservableType.swift */, - 77BF4BFBEE7621F16B88B263CA2C38CD /* Create.swift */, - FDF20B48B6E7109EE06F817D2F4FD91B /* CurrentThreadScheduler.swift */, - 16A0AAA6F245B75A656A4B2518C7335B /* Debounce.swift */, - 77CD36657390EB761A89CC16CFCF007D /* Debug.swift */, - D9ABE8F53EEDF350CE9E98036A1388B9 /* DefaultIfEmpty.swift */, - 62E964D3332805902ED02A58CEAD6763 /* Deferred.swift */, - 682299A86071B7158145932CB0D1BBF5 /* Delay.swift */, - 6CA979333254652BCD92B81BE2A52273 /* DelaySubscription.swift */, - 12E109B04A41B36246DD8B544AF9B7EC /* Dematerialize.swift */, - A2189B77DF040C86FCFF5D369FB3174E /* Deprecated.swift */, - B21EC49FB786C1D81036492BE569EC3D /* DeprecationWarner.swift */, - 5605D21C0A02C9A590028A83CFF730DC /* DispatchQueue+Extensions.swift */, - 8618BABC2E115BF6DDD424871D134F62 /* DispatchQueueConfiguration.swift */, - 427E782658A674CCF0CB37E38704950A /* Disposable.swift */, - 3AFEE7880FB8439DCD66B8C502896611 /* Disposables.swift */, - C3283B87E27D08583CBA1ECF30756E5F /* DisposeBag.swift */, - BE15C6D1844F1E64D2B1AFD049A9D79A /* DisposeBase.swift */, - 24D1A75476250C2A48E7F5448FAF09A9 /* DistinctUntilChanged.swift */, - A6303AD957AF6EB732CD23753FEFD3A0 /* Do.swift */, - 69C14CC6F1FDF38F363AFC56BA6F3308 /* ElementAt.swift */, - 074852CF0825C588D1A3D4BAFFF336F8 /* Empty.swift */, - 2F14ADA04EC375F9355811F7FB479F30 /* Enumerated.swift */, - 8AC713BD372892587446BB06FED1F3EB /* Error.swift */, - 363D20503FA622D74B2953ADE9EF5BC9 /* Errors.swift */, - 54E70EA13F7FA77DD8FA0B1F55597CE3 /* Event.swift */, - DC800C898D2D37EE433653C10CD924F4 /* Filter.swift */, - A83B3BD4D27B914EF152352BB94DF1A0 /* First.swift */, - CDC007682565B2949752002198645C43 /* Generate.swift */, - D1EEE78514F442CE33602A647235C73E /* GroupBy.swift */, - 1146875A7BF6594AA772516883D1AC4D /* GroupedObservable.swift */, - E2CEAB6772D554FD8158AA584BB52908 /* HistoricalScheduler.swift */, - 4CA2B4351FE4514079E5C27A7CC047C5 /* HistoricalSchedulerTimeConverter.swift */, - 77E0E76A1C543895177E899C435E069A /* ImmediateSchedulerType.swift */, - 1F9A5783A2A7CE35D48E4AAE5C202487 /* InfiniteSequence.swift */, - E38701C3B0A94C31245884CA79DE9371 /* InvocableScheduledItem.swift */, - 5C22E5D2E05F8DF2210DCECD0FA648DA /* InvocableType.swift */, - 114E68352CD984771851423579F40A2A /* Just.swift */, - 8EEACE83E0A6A980E3B00BB915449B7E /* Lock.swift */, - 34F0D73D9BD0515FA3306EFC358189E8 /* LockOwnerType.swift */, - D5552815B1D6B85B22773B342182410F /* MainScheduler.swift */, - DAB8BAF401ECC4A253D755B27763BC4B /* Map.swift */, - 693FA9B96E88629D39696CE901394BC4 /* Materialize.swift */, - 6671BAA13CD18FEE8106C9712F03FA43 /* Maybe.swift */, - 591AB3255214FAC8B04C1178BF4AB315 /* Merge.swift */, - D1C08FDD640F8069F0780569F49E173C /* Multicast.swift */, - E8E5D7A9D671C721C1E12793E2003311 /* Never.swift */, - A9F5B8284085D8FECC48F4A0F89485D8 /* NopDisposable.swift */, - 4B256F24A6D99A8F066F044EB158EADA /* Observable.swift */, - AEECCD6C2C998EE81C97DF26F90C00A3 /* ObservableConvertibleType.swift */, - F42A6C4D50D4793EB419FC568B796501 /* ObservableType.swift */, - 470B86DFF7ED33C296F43DACA490CE9C /* ObservableType+Extensions.swift */, - 6413E762A5EBA3739D651907C4AFE4AE /* ObservableType+PrimitiveSequence.swift */, - AC444D5DB3186C2696883C395754E536 /* ObserveOn.swift */, - 8157656B0734D038A9E7480F90A400FB /* ObserverBase.swift */, - 66807E6510B06C0EB6C8084D8262B245 /* ObserverType.swift */, - C91694859FC7B8E83B4294F7DEE91417 /* OperationQueueScheduler.swift */, - B9874781A641D9A2DC14AF764B2E138F /* Optional.swift */, - A1A7DA6A081CAE89BEE14C9BC4655DAA /* Platform.Darwin.swift */, - 14254979BB7DBDECF8A42729EB0DAD3A /* Platform.Linux.swift */, - 29A6E3F42A38B96DC41F4AD405047BAE /* PrimitiveSequence.swift */, - F7A9320BEA924A5F642EFD71C5422EF8 /* PrimitiveSequence+Zip+arity.swift */, - 2319471065A9D1CD76F47F65B85C2B9A /* PriorityQueue.swift */, - 36A538752EB17DCE0DB682EF8DE237B8 /* Producer.swift */, - EAED59CA25B110A7B74B373CA11A5DD7 /* PublishSubject.swift */, - 03A68F151BE54A2F04AB50E53B935D79 /* Queue.swift */, - EAEF29A6102B5568BD9AAFF638630D8D /* Range.swift */, - AA4A119E40151F454272BA8D2E6DDE07 /* Reactive.swift */, - 1933D8E0310F94603B8FD9851FD5FE1B /* RecursiveLock.swift */, - 143DC6F29498D8013E6BEC40FBA5E02C /* RecursiveScheduler.swift */, - 70768FAAD304AE8702BB00F59F1D0DC3 /* Reduce.swift */, - 3E4E005EEF95B0D83D99B6692A1350BC /* RefCountDisposable.swift */, - 953602682825A527034579F7C76FE490 /* Repeat.swift */, - E6122E3E38B44456ED3B5B47B73EB2DC /* ReplaySubject.swift */, - 54C8B8F19EE0A378AFB47AEF4F46106B /* RetryWhen.swift */, - F4DC9433907411D9872E64D72EC0EB8C /* Rx.swift */, - 63155FFB4E0398159B73FA1AB4B35DBE /* RxMutableBox.swift */, - 8B445A2DE8B41E87F9063B9231FBBF8E /* Sample.swift */, - AAA662D89BF735BEDA1820FF2B1259DD /* Scan.swift */, - 133B81FBCBE2867E65695417011A8A0F /* ScheduledDisposable.swift */, - 240BA3650D70E820ABF9412BCA527E91 /* ScheduledItem.swift */, - C53E3F10D7DBBB1C92DB551BE4E55FA3 /* ScheduledItemType.swift */, - B72A9772A6F1DAC3C6BE21ABCD1EB7A1 /* SchedulerServices+Emulation.swift */, - 25E927D100A94EBC1CFB1D2C75F540CC /* SchedulerType.swift */, - 359EF32513E15E5F9736472E34E8BA2F /* Sequence.swift */, - 50AF8513B9AB383E48A62162FCE5CDCD /* SerialDispatchQueueScheduler.swift */, - 9C481F203A3D82E046D561B227D7708B /* SerialDisposable.swift */, - FE060340E5949C3EA68028FFE2F6FAFD /* ShareReplayScope.swift */, - C0C55A49EBBDEA751964AB79B51D5144 /* Single.swift */, - 7891998A72CC5885870EAA5C1DB6090D /* SingleAssignmentDisposable.swift */, - 8BCCD69666E088C50F6C38EA6CD1AB4B /* SingleAsync.swift */, - E730DFEBE1FC3034DE9A7F4481D1B76A /* Sink.swift */, - 88384211B224E7DC58855FA587A676A7 /* Skip.swift */, - C1701A6D3E2D2886092827A97CB2B50E /* SkipUntil.swift */, - 9B28044CA00CB23EC2407CC4122C4D28 /* SkipWhile.swift */, - 87E3408C3DA17809FD2D1AF79092FB61 /* StartWith.swift */, - D1BB4BBDD3FA1FE0AB0D5CD935421FE9 /* String+Rx.swift */, - B8101628CF72189785B691AC6B4E0289 /* SubjectType.swift */, - 4B5AE0479796206409FCAA0309BF6CDF /* SubscribeOn.swift */, - 969E229627CEB3E2BB5AC2D0A021B227 /* SubscriptionDisposable.swift */, - 2F92503F46B55D4F4A3BFD15E7179C81 /* SwiftSupport.swift */, - E72D33CF85D0E14163C30C93662CCF51 /* Switch.swift */, - 1E03BA62093D7BC8C7CF21D07B63CE87 /* SwitchIfEmpty.swift */, - A7EE7E5BED1F5444680691BAC2DC2217 /* SynchronizedDisposeType.swift */, - 5F99207603EB59E03D49A87AD6985D75 /* SynchronizedOnType.swift */, - FE18D3D48A514F0873D97857ADFD5467 /* SynchronizedUnsubscribeType.swift */, - 893DFA6FA782016C4ADC97E04614AA64 /* TailRecursiveSink.swift */, - 6CEB04C02E607AA3AD97B6F71EBAFF25 /* Take.swift */, - 5FEAFE56F3ED5F6E99CF9B24253F2421 /* TakeLast.swift */, - 8E69C9350D2F7C715612EAA27FE74850 /* TakeUntil.swift */, - D14B39EDDF06E204809CFC94AFFDEB86 /* TakeWhile.swift */, - 22B1203DA40864EE94B6C1E277231E5E /* Throttle.swift */, - 4B9E8191074B83A31E03235A74753E1C /* Timeout.swift */, - 939094E692477DC2564BA8E062FD8322 /* Timer.swift */, - 6F7E207A4F51F9EB4921B778F527FD38 /* ToArray.swift */, - 3A80966CC4EC9818649F9C9E2CFC0741 /* Using.swift */, - 5A65F0423427F1590B3974881584BA82 /* VirtualTimeConverterType.swift */, - 5F1000398A937193871996A3F20A1462 /* VirtualTimeScheduler.swift */, - 84693A87C5C5D2F05C08327D2A4B001D /* Window.swift */, - 00C13AB47B67BD647DDFA8EB325A17A5 /* WithLatestFrom.swift */, - A8E5FDC2B2154419FF94FF3678B00B02 /* Zip.swift */, - 0EF5A94E2EF4108B8AAF8ED75F7A1872 /* Zip+arity.swift */, - 370E28D8AB2F773D22F0F14A4380D8D1 /* Zip+Collection.swift */, - CBC6899AF7A50C3E8797239BD8628D5E /* Support Files */, - ); - name = RxSwift; - path = RxSwift; - sourceTree = ""; - }; - 36F1889F15D85BA27583E8E62FA67202 /* Support Files */ = { - isa = PBXGroup; - children = ( - 445E569FB550D10E1D62648BF25BB32D /* Info.plist */, - 399E5C6EE42A10DDD4470126DBF1B820 /* Quick.modulemap */, - F98E837E3836FD16E13D4A18CEED912B /* Quick.xcconfig */, - 80D7E59A7AB5A6E0A9F70553026A1432 /* Quick-dummy.m */, - E4A14CA2097D3428011144D158327644 /* Quick-prefix.pch */, - 6FA2AE3513A9716B710893D98246801C /* Quick-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Quick"; - sourceTree = ""; - }; - 408E5B954D249322F80B1E494713717A /* iOS */ = { - isa = PBXGroup; - children = ( - 4629AD8C523D2FDA5C72258FAA2846DC /* Foundation.framework */, - FFC65524FB644895BDCBBA0657F2FA07 /* XCTest.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 6F625147604D1173EF763610E131A8DB /* Development Pods */ = { - isa = PBXGroup; - children = ( - B67F486A50FBE553DE63EBD9ABA64FA5 /* NSObject+Rx */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 71960E4308F9053FB1C91EDDE6860ECA /* Pods-DemoTests */ = { - isa = PBXGroup; - children = ( - 899F7D96738B594A432CEED858F6FF94 /* Info.plist */, - CA7749509FFC4CF987FE94C109993700 /* Pods-DemoTests.modulemap */, - 137F93901D86DD727245232DB84C0501 /* Pods-DemoTests-acknowledgements.markdown */, - A90D775A3043D21572B4AF438A91629D /* Pods-DemoTests-acknowledgements.plist */, - 6B986DA8565410A1FBB275EBDC22173F /* Pods-DemoTests-dummy.m */, - 399B006E2977C12A104E16C77804FD8D /* Pods-DemoTests-frameworks.sh */, - 4CB22A9BED60505A355D13240451A9E0 /* Pods-DemoTests-resources.sh */, - 947511070799896770CAF73BCB20B722 /* Pods-DemoTests-umbrella.h */, - 9C86746B7782939999EF488A707ED793 /* Pods-DemoTests.debug.xcconfig */, - CEE8FAC3960020923D811F92029719E4 /* Pods-DemoTests.release.xcconfig */, - ); - name = "Pods-DemoTests"; - path = "Target Support Files/Pods-DemoTests"; - sourceTree = ""; - }; - 7DB346D0F39D3F0E887471402A8071AB = { - isa = PBXGroup; - children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 6F625147604D1173EF763610E131A8DB /* Development Pods */, - B3BCD19CE5DB1376ED6BCF153307B567 /* Frameworks */, - 95DD4BF984F30B768395992C21F1F8BE /* Pods */, - D89AE27D1A90CC903A83BCF24DB99EC6 /* Products */, - 8BD2AF98586608E9C5E4AC2EE85150B7 /* Targets Support Files */, - ); - sourceTree = ""; - }; - 87C3E998A375EC91276A6CB7FE1B9115 /* Support Files */ = { - isa = PBXGroup; - children = ( - A54350F518A110AD397EF8CFF0150CAD /* Info.plist */, - 1A4E7DF30B61AC226D85BBEF42D356F3 /* Nimble.modulemap */, - 7BAABE3D70B15D706F0E0BC9A5AA411C /* Nimble.xcconfig */, - 77EF7A3BA578E9A34C4A4608778AAD11 /* Nimble-dummy.m */, - 6D963093B3E8D12443FDB45479F08481 /* Nimble-prefix.pch */, - 2802F374F28EDC38A097F63405F76D6E /* Nimble-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Nimble"; - sourceTree = ""; - }; - 8BD2AF98586608E9C5E4AC2EE85150B7 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - BADBF3A0E4C3B3010DD70FEB4AF18153 /* Pods-Demo */, - 71960E4308F9053FB1C91EDDE6860ECA /* Pods-DemoTests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 95DD4BF984F30B768395992C21F1F8BE /* Pods */ = { - isa = PBXGroup; - children = ( - E8D4F63A43597E5B057735FE3037E199 /* Nimble */, - B94E9C7AB177A25310933324ED00CEC6 /* Quick */, - 0F33FF97839F84AA56FCBC831C93EC68 /* RxSwift */, - ); - name = Pods; - sourceTree = ""; - }; - B3BCD19CE5DB1376ED6BCF153307B567 /* Frameworks */ = { - isa = PBXGroup; - children = ( - CC74AA969E8AB63D1EB8807A90B9E291 /* RxSwift.framework */, - 408E5B954D249322F80B1E494713717A /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - B67F486A50FBE553DE63EBD9ABA64FA5 /* NSObject+Rx */ = { - isa = PBXGroup; - children = ( - 10B10CE857DE60321E2473DA326FB12B /* HasDisposeBag.swift */, - 7DA0C14A9787B97E9C5E661EA66B8618 /* NSObject+Rx.swift */, - DE415C5497CEFD2D5E5E184469B5B3CD /* Pod */, - F8ABFC704B76502CD8EE98DE6BC6ED77 /* Support Files */, - ); - name = "NSObject+Rx"; - path = ../..; - sourceTree = ""; - }; - B94E9C7AB177A25310933324ED00CEC6 /* Quick */ = { - isa = PBXGroup; - children = ( - 92A189AEA8097CFFFDB0E5804C3C1C71 /* Behavior.swift */, - 8B0CA0F1FC4FC57170B89F6C07D3B2DE /* Callsite.swift */, - B531259A56F7748DE2B778579A87338F /* Closures.swift */, - C210218A9F8486C724AF000E9BC9C37A /* Configuration.swift */, - BB78C52CD56B4FA18B083FA7296FCB0C /* DSL.swift */, - 93E44F300CBA04F70194186384480022 /* ErrorUtility.swift */, - 7F9D0F9A639D77A50EFB45E3EEF3284E /* Example.swift */, - FBF3EE16F855C8DBB30D15A2D3D1AFDA /* ExampleGroup.swift */, - 15BB44DFD228A90F805B9FEEBA7A4E80 /* ExampleHooks.swift */, - 1C813EBE18B28E147E2D2A4E1315ED6B /* ExampleMetadata.swift */, - 16AA2AC65F9FD2C9F028886DA5DF992D /* Filter.swift */, - CE0635D052A48DC2468609F1AC2E6F7D /* HooksPhase.swift */, - FCD9AA26C47D968373890A1FB6485742 /* NSBundle+CurrentTestBundle.swift */, - D5271EE6500A485B24AB3878D7B2CA7B /* NSString+C99ExtendedIdentifier.swift */, - FFA5A3E4C4EA8083112AB03B934B3322 /* QCKDSL.h */, - 1B422D4026116E98349BC299E86A115F /* QCKDSL.m */, - DC1EC9968F9F25CDF86C277FB0995035 /* Quick.h */, - 5291FFF3A591A584E3FD0C0D57FB22B0 /* QuickConfiguration.h */, - 892AE6FA0CC8D00329D80A079A2CC781 /* QuickConfiguration.m */, - 047E23E180142B6FADC17E1E69757B2C /* QuickSelectedTestSuiteBuilder.swift */, - DA8D444BAF7554FCBEECBC80AD3B8A5F /* QuickSpec.h */, - 46A0731852D50F1DB5BAFB19F88EAB8C /* QuickSpec.m */, - D8D94B3AF1FAE7195873672682DD65CE /* QuickSpecBase.h */, - E9589240691151AB6A2D4C860573AD53 /* QuickSpecBase.m */, - 0217A0A42340465992FEC11F73C50759 /* QuickTestSuite.swift */, - B70E02E24CED64298A1B42C70BA76CA8 /* SuiteHooks.swift */, - AAA9BB2D4A6C2F84F3A205B1635BBA99 /* URL+FileName.swift */, - 8D3AA38902E6E9E06B7493AB312E5236 /* World.swift */, - 98A0F18D7BA4CD704304888CCF78EB82 /* World+DSL.swift */, - 2352A949CDB3DB99563DEEFB6A3C4B0C /* XCTestSuite+QuickTestSuiteBuilder.m */, - 36F1889F15D85BA27583E8E62FA67202 /* Support Files */, - ); - name = Quick; - path = Quick; - sourceTree = ""; - }; - BADBF3A0E4C3B3010DD70FEB4AF18153 /* Pods-Demo */ = { - isa = PBXGroup; - children = ( - A9D57B9A5440D76082DF3AD2C1289F7B /* Info.plist */, - 4906E7F6E307512D338DAAB9808A5980 /* Pods-Demo.modulemap */, - 9035AB3B1B87BE64DA7F6D62D4004A32 /* Pods-Demo-acknowledgements.markdown */, - E591EB13105E3738351C6AB010D7A223 /* Pods-Demo-acknowledgements.plist */, - 61FCD9F5AFAA918AE18E0F1754E59089 /* Pods-Demo-dummy.m */, - 43B0514188824A8DF9BE4525F4C0AAF7 /* Pods-Demo-frameworks.sh */, - A6CB3D9F45EE9BAEB738CFCA213A7D9A /* Pods-Demo-resources.sh */, - ED4652D686FFA05E4CFD837F5DD948A0 /* Pods-Demo-umbrella.h */, - B3B1FE08B862EAB796DF4CF965FDAF54 /* Pods-Demo.debug.xcconfig */, - 8770613CD8D6FFEBC01B5906D0AE2C99 /* Pods-Demo.release.xcconfig */, - ); - name = "Pods-Demo"; - path = "Target Support Files/Pods-Demo"; - sourceTree = ""; - }; - CBC6899AF7A50C3E8797239BD8628D5E /* Support Files */ = { - isa = PBXGroup; - children = ( - 91E4AEE60C203947FD25B20886A6938C /* Info.plist */, - B40B43EEE8457F3CC4D6A4F0FA11471A /* RxSwift.modulemap */, - 2D752ECA4EA765B6DC3853D1F8DE902C /* RxSwift.xcconfig */, - 8F3C35BAE591AFECEB05635881E769C9 /* RxSwift-dummy.m */, - 42CC3F1254541F29401A9CEAF5840368 /* RxSwift-prefix.pch */, - 95B816FDFB9914FDB5932A277BF49BE8 /* RxSwift-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/RxSwift"; - sourceTree = ""; - }; - D89AE27D1A90CC903A83BCF24DB99EC6 /* Products */ = { - isa = PBXGroup; - children = ( - F996C636C4BFB2FF8976D728BB62B899 /* Nimble.framework */, - AB12C0F86FEBA9F3834D32312A15B28A /* NSObject_Rx.framework */, - 7476D59404D46DDD01ACC0AF798AA489 /* Pods_Demo.framework */, - C493BBD5CFCB280EB8EF00B929156F28 /* Pods_DemoTests.framework */, - 01F89D13AB5B86376E75FEE6A9DBA004 /* Quick.framework */, - E0BCA2F92CA4AF4599FC7E2A65DD2420 /* RxSwift.framework */, - ); - name = Products; - sourceTree = ""; - }; - DE415C5497CEFD2D5E5E184469B5B3CD /* Pod */ = { - isa = PBXGroup; - children = ( - A95A9A98F76112807DB84996E09D0E14 /* LICENSE */, - 50420501293EDA6AA5A34DACAEFBB2EA /* NSObject+Rx.podspec */, - 06E620464506C8F032D83509BF8CA155 /* Readme.md */, - ); - name = Pod; - sourceTree = ""; - }; - E8D4F63A43597E5B057735FE3037E199 /* Nimble */ = { - isa = PBXGroup; - children = ( - 0276210F7791A98E44CF60C73E6BA118 /* AdapterProtocols.swift */, - AFA8DFA962931C0D5C66AA5C3A08F61F /* AllPass.swift */, - EBFAA7F4BF7C3113856D36AD34A1DE76 /* AssertionDispatcher.swift */, - 714F613A3647ADF3B1A3BC1CAD3DDA28 /* AssertionRecorder.swift */, - 88011BB9DEE5C83495C831B3F209E75A /* Async.swift */, - 5D15E09F59E707CE8DCFA06DA95E1955 /* Await.swift */, - CA5CA08861E3FE5683C967ACE8CB4B6E /* BeAKindOf.swift */, - B9BE8C1E97DC1056F68928312334310C /* BeAnInstanceOf.swift */, - 84F0DE87C78ADC36B83F5F95C1D79FE6 /* BeCloseTo.swift */, - 6586E98D2401323473BC5C42F6FEC090 /* BeEmpty.swift */, - EAFAF82614BD68A87F254861741C0F09 /* BeginWith.swift */, - 7C16136FA33975C0E5E721B340B54FEC /* BeGreaterThan.swift */, - 39850425D82DB5D7CEB583E418B77552 /* BeGreaterThanOrEqualTo.swift */, - A741EC25A9FAB83CC4422BE397426328 /* BeIdenticalTo.swift */, - 3692E1BE689C456EFFCA8713705DB0E0 /* BeLessThan.swift */, - B18710F2DC29EACD57A91E061B8FEC5A /* BeLessThanOrEqual.swift */, - B91C3C38EDF4C0FA75689C670E9FF69C /* BeLogical.swift */, - 95EF400AF65F8B21865F81A17A3CB4BB /* BeNil.swift */, - 0E6878F54DB7E975AF72BCA44F5186D3 /* BeVoid.swift */, - 6AF226AA1C6369E28470BFDF0B8B1811 /* Contain.swift */, - 3842DB32E06DE501958B97A857F58B82 /* ContainElementSatisfying.swift */, - EB5FAD837BE2AAE61455BFD7B32DA9F7 /* CwlBadInstructionException.swift */, - 0F83D1F29400CB3E6AC588928E3AE393 /* CwlCatchBadInstruction.swift */, - AA72A7AC13BEBC006DC6A08BE7158B77 /* CwlCatchException.h */, - 0691A529241CC719252270B5515C79F2 /* CwlCatchException.m */, - ACBE3CDD05A5487CDC82EAB5F2171E23 /* CwlCatchException.swift */, - B071A84DD47E9A2223335FED77ADF2C7 /* CwlDarwinDefinitions.swift */, - D4713B10B2644CE1F98886857CDB397E /* CwlMachBadInstructionHandler.h */, - DF5265DC9B29D8CA8FF54085E2B7DF5D /* CwlMachBadInstructionHandler.m */, - 7A331E455E604A8FD062D062BC8C2CDE /* CwlPreconditionTesting.h */, - C7DD7EC55777F14EF1925F57BDF9C1E1 /* DSL.h */, - 7667193A493030E75DFD96FE7487BAA1 /* DSL.m */, - 49742A5C11C901751E6A9D8BB806B59C /* DSL.swift */, - 240F5BB7F84055523169BA056A193790 /* DSL+Wait.swift */, - 1E119EFB1EAF08A062C6AE19BAF7AC39 /* EndWith.swift */, - 6F354095154E0131D2DBC40757AF3EA6 /* Equal.swift */, - 4C31E6FEB9D56741DB672C8382B2518A /* Errors.swift */, - F5E5FF9976441B8C4B99ADBA2B921D91 /* Expectation.swift */, - 95E460802B8FFF3BF02E54C2EA0BE9D9 /* ExpectationMessage.swift */, - C19BC99B3171B4D39B517C1C8F619EE0 /* Expression.swift */, - 7A46CC4790475C2D3E8C62106E9E87BF /* FailureMessage.swift */, - 0FB7B448FE8D14A1A1033C5B2D60297A /* Functional.swift */, - 315147E49635C8F348F328E18989C976 /* HaveCount.swift */, - 9EAF6483E08D795DEA5172EE1BC70F1B /* mach_excServer.c */, - D4D814CA1F7D55C5CE8D8A62F578BDCB /* mach_excServer.h */, - F404DBBC429942E6C3B29B82B9B33127 /* Match.swift */, - CF9F9A43FECF77D55637FBA87BE8F84C /* MatcherFunc.swift */, - E32EF20994BA990A01264A673D581032 /* MatcherProtocols.swift */, - B6CF95E05725AA13265818026FD6246B /* MatchError.swift */, - 53C19900EDD8583ACC910B537E5D5C4B /* Nimble.h */, - 7074E9CA670A4C3E1FE286964C801BB3 /* NimbleEnvironment.swift */, - B178C80B40AAE6BB62339FF0344BE272 /* NimbleXCTestHandler.swift */, - 826512B771104143AEAB0F494EEAF955 /* NMBExceptionCapture.h */, - F6A24D057CFAB8AC0F42B410E04BC8DA /* NMBExceptionCapture.m */, - 305E4331419736FD5897A2AE8C89EE97 /* NMBExpectation.swift */, - 5D0BB645A4FAFCB5F640230E7F25570B /* NMBObjCMatcher.swift */, - DA98F69D71655FD9BD126636D8287A07 /* NMBStringify.h */, - AB94114691FA364F6528B887F9CCB745 /* NMBStringify.m */, - 2011689AB7C05B7EFCB3487499B8D277 /* PostNotification.swift */, - 810E828B743FB8120679616F1A71760C /* Predicate.swift */, - 55E603428CD7A07A4FC0C6F7958B3CAC /* RaisesException.swift */, - 469C30CEF7D2A4D3C4CCF20CEE62E015 /* SatisfyAllOf.swift */, - C248DC53B42DE75A0CBD7043CB1F3BCC /* SatisfyAnyOf.swift */, - 8375E055ABF700CDD22E540C278690CA /* SourceLocation.swift */, - 6CDED84A81BE984BDBC5FC295D439898 /* Stringers.swift */, - EB58ADA89038564E8D37D27A81D9EEB3 /* ThrowAssertion.swift */, - 57B68089FB51524F2540E998F84D39F6 /* ThrowError.swift */, - 6B62414F5CC774D8C0A71BFBCFED3C28 /* ToSucceed.swift */, - 0B4F410F57910B0F6B0F18AFD2F8AF74 /* XCTestObservationCenter+Register.m */, - 87C3E998A375EC91276A6CB7FE1B9115 /* Support Files */, - ); - name = Nimble; - path = Nimble; - sourceTree = ""; - }; - F8ABFC704B76502CD8EE98DE6BC6ED77 /* Support Files */ = { - isa = PBXGroup; - children = ( - 2795306084CC6CBA4B48D733AB0F8249 /* Info.plist */, - 87642C0C62C2F733872ED6F8967428A5 /* NSObject+Rx.modulemap */, - 5167FF8A5B2F212486CFD19AD479585A /* NSObject+Rx.xcconfig */, - BFDD89119F9756A31AAE0C61C6C392F5 /* NSObject+Rx-dummy.m */, - C54E50CCCF5E687EC58D23139DBE4815 /* NSObject+Rx-prefix.pch */, - F448C4244A86825882FEC5453730CA1F /* NSObject+Rx-umbrella.h */, - ); - name = "Support Files"; - path = "Demo/Pods/Target Support Files/NSObject+Rx"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 08E0FC17898A546C8BFDF9D0059E9B32 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 25670E01BF12BAC45AB20A404F24EB91 /* Pods-DemoTests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 628D2917551CB31F2DD2E3BCBF0C61F0 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - E2B9A7FCED63F1F8FE196ADAB3F10E8B /* Pods-Demo-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C9B96F4DDF06565D3B41A826AD209B1C /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - F088EE1AE386EEF27AC934DE13F455BB /* CwlCatchException.h in Headers */, - BEB8082717D949400F2DE3458E75CBE3 /* CwlMachBadInstructionHandler.h in Headers */, - E984CB87ABF0DD970BD4B856DEA35E1A /* CwlPreconditionTesting.h in Headers */, - 618C13D4020EBA363997EFB60A56AC20 /* DSL.h in Headers */, - 5BA1006DAFD72ACF9F31DC95096FD054 /* mach_excServer.h in Headers */, - 9096D686AB39D3475A4227F0765C3DC4 /* Nimble-umbrella.h in Headers */, - 574F89786271FD7BAD216D075EA1E898 /* Nimble.h in Headers */, - B3C3D7DAB6567A273DA50FD2068AFF77 /* NMBExceptionCapture.h in Headers */, - 97A60F28FA1FF94422D2560002CEE407 /* NMBStringify.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E84FBF9281CF38B4146AEE45A1E27FE9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B5C4D238942464AAF42FEDDBB3512EF7 /* NSObject+Rx-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E93C93D9D4FD5A19255DA598549BBCBF /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D09E756E4941FA3825047E1E2517091 /* QCKDSL.h in Headers */, - 9D4E546FF329D4109FC3C282928B02E8 /* Quick-umbrella.h in Headers */, - 3E5BF54F40548F50A634D911A92F8D18 /* Quick.h in Headers */, - 2F8837FDE943E4810DA303DB0C4D5483 /* QuickConfiguration.h in Headers */, - 076322ECD83CCD5978E82A6C27850C42 /* QuickSpec.h in Headers */, - CC6C123ABABD01D69876BB64F3F78884 /* QuickSpecBase.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FDF0B964DA151A0C6B9AAFF416F433BB /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 02DD07956B014D81FC3B7E17BC237ACC /* RxSwift-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 30FF1B444FA5E009DFB166BDEC7B0DAA /* Pods-DemoTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = ADC4463D2B4DCEB2FA24431FC1A19530 /* Build configuration list for PBXNativeTarget "Pods-DemoTests" */; - buildPhases = ( - 08E0FC17898A546C8BFDF9D0059E9B32 /* Headers */, - CE5A3B1F3B202904269DA6B397D220B9 /* Sources */, - DF3AF52FC03889BB23520BD9B51A5DCC /* Frameworks */, - 8CADF621F18A2240383603A364D3A9D1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - E48535A33F851BB05FA6B47DB26F3AFB /* PBXTargetDependency */, - 1F03E2CF6E0E59504F92E741CA377B41 /* PBXTargetDependency */, - E194097AC220C28B36F989E6D9F66B21 /* PBXTargetDependency */, - 66DAB9E9AE12C2A041CB508F76BF73B5 /* PBXTargetDependency */, - ); - name = "Pods-DemoTests"; - productName = "Pods-DemoTests"; - productReference = C493BBD5CFCB280EB8EF00B929156F28 /* Pods_DemoTests.framework */; - productType = "com.apple.product-type.framework"; - }; - 5E269AA9A7FBCB9BFD8EA487B43AE7F9 /* Nimble */ = { - isa = PBXNativeTarget; - buildConfigurationList = 10836172B46B0B0B73CE062C21769FF3 /* Build configuration list for PBXNativeTarget "Nimble" */; - buildPhases = ( - C9B96F4DDF06565D3B41A826AD209B1C /* Headers */, - 00172CED9D8741CA7FB64BA63FDC1054 /* Sources */, - 7F682A9E296D139B5A1E649989FB51D0 /* Frameworks */, - 260DB7AEBBC86367BD11959FA116A36E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Nimble; - productName = Nimble; - productReference = F996C636C4BFB2FF8976D728BB62B899 /* Nimble.framework */; - productType = "com.apple.product-type.framework"; - }; - 6DB514A28E386B633179B9615872C399 /* NSObject+Rx */ = { - isa = PBXNativeTarget; - buildConfigurationList = 59D39ADEC18E454A063B6E2651E7E53B /* Build configuration list for PBXNativeTarget "NSObject+Rx" */; - buildPhases = ( - E84FBF9281CF38B4146AEE45A1E27FE9 /* Headers */, - D6B1B6EDFDF8E2AE73E584AD6081223A /* Sources */, - A1DF0937E05CA7B08FF16B515B2D0108 /* Frameworks */, - 1B0C3F804F9043CEAA8A570D9C962BA6 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - F4A1E0BE5B20A85EF0215713A8A9B3BF /* PBXTargetDependency */, - ); - name = "NSObject+Rx"; - productName = "NSObject+Rx"; - productReference = AB12C0F86FEBA9F3834D32312A15B28A /* NSObject_Rx.framework */; - productType = "com.apple.product-type.framework"; - }; - 9E860C72338E2D1549352501D1903C4C /* Pods-Demo */ = { - isa = PBXNativeTarget; - buildConfigurationList = 45A9CE836141AB4AD8F20D23C8218FA1 /* Build configuration list for PBXNativeTarget "Pods-Demo" */; - buildPhases = ( - 628D2917551CB31F2DD2E3BCBF0C61F0 /* Headers */, - 4178138CCB22B58C4BB67FEF845A8E7D /* Sources */, - 02575E8E5526E395222B8E6986F55C36 /* Frameworks */, - F1EE10B850BD42D6521F73BDE13CB8A9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Pods-Demo"; - productName = "Pods-Demo"; - productReference = 7476D59404D46DDD01ACC0AF798AA489 /* Pods_Demo.framework */; - productType = "com.apple.product-type.framework"; - }; - AB6A097ED9ED31C93AA4B971CFDBBC33 /* RxSwift */ = { - isa = PBXNativeTarget; - buildConfigurationList = 42CCCE2685AFD37697FD06271CCC2728 /* Build configuration list for PBXNativeTarget "RxSwift" */; - buildPhases = ( - FDF0B964DA151A0C6B9AAFF416F433BB /* Headers */, - 668E4B9F3729C16F35FB8C5A7D6D88C7 /* Sources */, - 53AE72D620A2271AD1024079E2C920E3 /* Frameworks */, - 75BDE7950EDB6BEE0442227177A80DC6 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RxSwift; - productName = RxSwift; - productReference = E0BCA2F92CA4AF4599FC7E2A65DD2420 /* RxSwift.framework */; - productType = "com.apple.product-type.framework"; - }; - C86D25EC2265DA7A383D953ED7711121 /* Quick */ = { - isa = PBXNativeTarget; - buildConfigurationList = AE53E6CAD822DA849D5BF1AFD367C08A /* Build configuration list for PBXNativeTarget "Quick" */; - buildPhases = ( - E93C93D9D4FD5A19255DA598549BBCBF /* Headers */, - EC9C21A07385514359BB2357BDF22B6B /* Sources */, - 22249B7EC004189037EC4DC74DA5AC70 /* Frameworks */, - 9AC8B74697455856C6E8A31195858382 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Quick; - productName = Quick; - productReference = 01F89D13AB5B86376E75FEE6A9DBA004 /* Quick.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; - }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = D89AE27D1A90CC903A83BCF24DB99EC6 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 5E269AA9A7FBCB9BFD8EA487B43AE7F9 /* Nimble */, - 6DB514A28E386B633179B9615872C399 /* NSObject+Rx */, - 9E860C72338E2D1549352501D1903C4C /* Pods-Demo */, - 30FF1B444FA5E009DFB166BDEC7B0DAA /* Pods-DemoTests */, - C86D25EC2265DA7A383D953ED7711121 /* Quick */, - AB6A097ED9ED31C93AA4B971CFDBBC33 /* RxSwift */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1B0C3F804F9043CEAA8A570D9C962BA6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 260DB7AEBBC86367BD11959FA116A36E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 75BDE7950EDB6BEE0442227177A80DC6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8CADF621F18A2240383603A364D3A9D1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9AC8B74697455856C6E8A31195858382 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F1EE10B850BD42D6521F73BDE13CB8A9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00172CED9D8741CA7FB64BA63FDC1054 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CE1287DA39DB4208F5511CE47FE8298D /* AdapterProtocols.swift in Sources */, - 1AC5D2CE6FA79327468F53B53D0A9418 /* AllPass.swift in Sources */, - B6F0D7C04121F97B1D4933C0168278EF /* AssertionDispatcher.swift in Sources */, - 85107C3BD627EA89CC1EAB25859EF85D /* AssertionRecorder.swift in Sources */, - 3312F77A6C289F2CEFBF0C1D98431671 /* Async.swift in Sources */, - DEEDD0D7C0369178EC867A59373F6380 /* Await.swift in Sources */, - 6B2DF45B9BFABD4BF3DDC503F073FB71 /* BeAKindOf.swift in Sources */, - 0D74DB80E4766C505062F32B6C5A70AD /* BeAnInstanceOf.swift in Sources */, - DA257CBBCAB6C22BA5476F983AC78BB5 /* BeCloseTo.swift in Sources */, - 9C22921616DC80691662977DDEA6B2C4 /* BeEmpty.swift in Sources */, - DF7CF1941236840A89D99B233E4DC086 /* BeginWith.swift in Sources */, - 6FE504E9ED5B37C05CFC2A530019AE5D /* BeGreaterThan.swift in Sources */, - 58B249717B134855DA1DF182DF0AEDB9 /* BeGreaterThanOrEqualTo.swift in Sources */, - 97EE56F66DCD3C983D0585D8F45FDB6A /* BeIdenticalTo.swift in Sources */, - B2F5395D43472600D7BA7E26E3772069 /* BeLessThan.swift in Sources */, - 06F38DD26D80484050C9ED86478406F2 /* BeLessThanOrEqual.swift in Sources */, - DD2EB3198539280E2F07F0E360AFF324 /* BeLogical.swift in Sources */, - 8E83E547D107FFC8B596829313AAF38F /* BeNil.swift in Sources */, - 5747F17B237F1ACB862F3F2911E5CBB1 /* BeVoid.swift in Sources */, - B30FCDD03BFE82B7E9776FD9CE3A1C51 /* Contain.swift in Sources */, - 8BB7F5B7E3E77CF25E64E1EAD1A26E68 /* ContainElementSatisfying.swift in Sources */, - 9A0EB2F0A468E4576E776AE1E9221E7A /* CwlBadInstructionException.swift in Sources */, - 350C051E271508531C90540A2496684C /* CwlCatchBadInstruction.swift in Sources */, - F4EE282D8435D54A662C6DDD30A3D2CD /* CwlCatchException.m in Sources */, - 2574D09B363D42ACA6BA589B675FFA26 /* CwlCatchException.swift in Sources */, - 8050C10B78F2D1DD98A2F3E250A24AD0 /* CwlDarwinDefinitions.swift in Sources */, - 66D3DA2225488356273B3D0AB83DA268 /* CwlMachBadInstructionHandler.m in Sources */, - 42A9F49A3D23555A2EC71F3E84E435FB /* DSL+Wait.swift in Sources */, - 6985430721C89135D5B4CBE13357EC31 /* DSL.m in Sources */, - A490FAE0B78B47AF739B0DAFC1DC5AD6 /* DSL.swift in Sources */, - 74605907C211553B00F09768BEF12834 /* EndWith.swift in Sources */, - 19291565899B5113A5355002CF9C8F2F /* Equal.swift in Sources */, - 4C093ABFA796CEC3AC89C1B9DC36841D /* Errors.swift in Sources */, - A286AD495C5D4520ADF2ECE7786EF950 /* Expectation.swift in Sources */, - 1E2AE2B6202B65E712FE05FB2699BD2C /* ExpectationMessage.swift in Sources */, - E454528E8D39931207848DACBB617A4C /* Expression.swift in Sources */, - 24AC6513961FF6DC60E0FB284E8914B6 /* FailureMessage.swift in Sources */, - 4BC738EA304E6FA57294B9AAFEC56F70 /* Functional.swift in Sources */, - F32B9D0318D13B740E6D88E16709FEA3 /* HaveCount.swift in Sources */, - C5305DE0B553BCA7361C3997ACD70FFB /* mach_excServer.c in Sources */, - DDB89D0F2F9422FEFF8D3ABB4B1FC7F9 /* Match.swift in Sources */, - 44F6B7EB2EAF73218A16F56D45C877A4 /* MatcherFunc.swift in Sources */, - 6B124A4D8EB28A918E0C87F2E75D94F8 /* MatcherProtocols.swift in Sources */, - 7AA9A7388AF44BB4EB2111CEDB29A666 /* MatchError.swift in Sources */, - 79FA255F43C9E42470C9720C0604444F /* Nimble-dummy.m in Sources */, - 0C345DBBF5EF9ED046CB579FDD401A57 /* NimbleEnvironment.swift in Sources */, - 62A3D36B892ED9C9A3210134C97FE3F9 /* NimbleXCTestHandler.swift in Sources */, - 2EF89DB591335BFB29606E0706E66D9F /* NMBExceptionCapture.m in Sources */, - 223CA7D4EDF23874D61C762F6CF51C56 /* NMBExpectation.swift in Sources */, - 562B8E7BBB3176E837BEBD6D24DA7EF4 /* NMBObjCMatcher.swift in Sources */, - 3C0D99EED837A3AD705A664503EF48DE /* NMBStringify.m in Sources */, - 22948773F0660B81265C2C17A0761F0D /* PostNotification.swift in Sources */, - 935558F919649CDE3784CBD344D3C008 /* Predicate.swift in Sources */, - 5895EA4D5666103B2CD4243690487D07 /* RaisesException.swift in Sources */, - 7485AAEB633B78268D656D019B77E023 /* SatisfyAllOf.swift in Sources */, - 746D0DBAF8EB27CA816CFD021DE2A7A1 /* SatisfyAnyOf.swift in Sources */, - DA4FBA76599ECAB9A1993F119A41359D /* SourceLocation.swift in Sources */, - B7ED1B41F56087971B656A2E38322310 /* Stringers.swift in Sources */, - 37C3C6235A5DDB8E37629314CF0E8489 /* ThrowAssertion.swift in Sources */, - E85EAC40F42C10F327BE0BCF39C2DF3B /* ThrowError.swift in Sources */, - DAF21E37BBBFD5D408F514E867A5936C /* ToSucceed.swift in Sources */, - B3895E766FFE0B7DF58F4D0BE246221B /* XCTestObservationCenter+Register.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4178138CCB22B58C4BB67FEF845A8E7D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4FD0B668599BDAF28C3B48264646A05D /* Pods-Demo-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 668E4B9F3729C16F35FB8C5A7D6D88C7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C25FC7A56AC20E4C745248B505FB8864 /* AddRef.swift in Sources */, - 39022340BA4C753EE74695EE2C7C455D /* Amb.swift in Sources */, - 34FF932D6DEFC87B16BB8B2CE3AA5A01 /* AnonymousDisposable.swift in Sources */, - 2FDEB16F1990368152338AF2DE6D0C32 /* AnonymousObserver.swift in Sources */, - ACBDFCBB834F0381E3CC9B223F9FF40E /* AnyObserver.swift in Sources */, - 01089B3FDEFB0CDD0B67D38ED86963BB /* AsMaybe.swift in Sources */, - 6ED60AC96F8472044C00C8D7D628A0C6 /* AsSingle.swift in Sources */, - 7296E0A03EC8B756490B091FC364D56C /* AsyncLock.swift in Sources */, - 993640128A087C5D96F453A18DCD9138 /* AsyncSubject.swift in Sources */, - FB208F9C94AE4284B4695DCED66AF03F /* Bag+Rx.swift in Sources */, - 44FA2F66B24E147991026B20AEFD2158 /* Bag.swift in Sources */, - 218D5177D58A35446EF01C47A2ECC7CC /* BehaviorSubject.swift in Sources */, - A54297FF959864299C019286DDCE4E90 /* BinaryDisposable.swift in Sources */, - 1F2F8FB86E40FAB4663086CE83B7654D /* BooleanDisposable.swift in Sources */, - 5780AAD342CE3C8CCDC47ADFF96973B1 /* Buffer.swift in Sources */, - 45B3DA8C3A339E583A2BEDF6161D0592 /* Cancelable.swift in Sources */, - B34A6018FDF04D597D6E7529674C70B8 /* Catch.swift in Sources */, - 6C7793E96DD52017C4265E4AC7B7DFDC /* CombineLatest+arity.swift in Sources */, - 783623D1EBFE01DAB87B7B68F150C4C4 /* CombineLatest+Collection.swift in Sources */, - 18FAD9641B101E8EEBEB00EE431E3440 /* CombineLatest.swift in Sources */, - 682734406B4017836DFA3477E9580A75 /* Completable+AndThen.swift in Sources */, - 2443408236BFC805C0E5EC554DA4787C /* Completable.swift in Sources */, - 4949A35DFD7AF5D991FA12BA16D37A6F /* CompositeDisposable.swift in Sources */, - 5E689A3A729873D290AD5C963C4D5389 /* Concat.swift in Sources */, - 3BED04BCEE6536D8937220381EE790AA /* ConcurrentDispatchQueueScheduler.swift in Sources */, - 9832EC5987372E75A4C3F1E13CD3F372 /* ConcurrentMainScheduler.swift in Sources */, - 7371D9E42417DC2735CC0B33FCAA5B53 /* ConnectableObservableType.swift in Sources */, - 06D49CD0E284F13EC4446F702800D17B /* Create.swift in Sources */, - C798F9D3D2C528634CE1AF5B9D1A86EC /* CurrentThreadScheduler.swift in Sources */, - 983B50800F73172C0CFDBE2C9AA34CCD /* Debounce.swift in Sources */, - F4F64B5A42509E4397D3D51E13B0C4C9 /* Debug.swift in Sources */, - D288903D8382C3A45230B8E8F1ABD4A3 /* DefaultIfEmpty.swift in Sources */, - 72F5C956E3EEC102D8C074CECC6BC3FA /* Deferred.swift in Sources */, - BB02C07DFD814F2B8FD5797635B156A3 /* Delay.swift in Sources */, - EAE3244F76D911D79ED30B4A7259DFB6 /* DelaySubscription.swift in Sources */, - 08210EC63215AC1453760A6267015D98 /* Dematerialize.swift in Sources */, - EE99E3B1DCB0348F44C7499B2BA809A9 /* Deprecated.swift in Sources */, - 86DC85C7CF36987627A4A36D82C310C5 /* DeprecationWarner.swift in Sources */, - F44B8D914434D1395E2873C45587B500 /* DispatchQueue+Extensions.swift in Sources */, - CDE5591E5DC14A3BD4C44557996D0912 /* DispatchQueueConfiguration.swift in Sources */, - 3FC7EEF76396FF30EF783749C26F8C05 /* Disposable.swift in Sources */, - 94641EE53103489464DC9A221DB495A2 /* Disposables.swift in Sources */, - ADBCE6E49E093AD2C1E6366DABBBC03F /* DisposeBag.swift in Sources */, - 2CC91D1EF04393AE48463B5C9D8CAF96 /* DisposeBase.swift in Sources */, - 7ABB709BD6428FCC8793EA57479CB750 /* DistinctUntilChanged.swift in Sources */, - 2008CD2E1A5CB2AC1E02C9BD37AF8C22 /* Do.swift in Sources */, - E4E54DCF87B0DDFE063F6E4DC162BDE6 /* ElementAt.swift in Sources */, - 3DA38E69E7910F5F001F05BD09D957D1 /* Empty.swift in Sources */, - E2A16679D4DDEBA514BE2B37ED821EBC /* Enumerated.swift in Sources */, - 46238EE10297B2070114146C08FED333 /* Error.swift in Sources */, - 836BD1324E5478A3AB7542A3CE75F283 /* Errors.swift in Sources */, - 960B9B027E55F6C0481B63E25CF50EE6 /* Event.swift in Sources */, - 7F1BE590E76E43F561D8F8CF354F72F6 /* Filter.swift in Sources */, - F552462D6CD28A8074CF8746ED010AF6 /* First.swift in Sources */, - 35382B1E443979F689AB1B64A9DF839B /* Generate.swift in Sources */, - 792874E54F86CE42C62738D2A617471B /* GroupBy.swift in Sources */, - F01E5B65B40B6E3082994D09EC7A55BE /* GroupedObservable.swift in Sources */, - ACBC3FF2772BDB948D79DE4ACE4D7722 /* HistoricalScheduler.swift in Sources */, - 7876A8DBFDC1DB9B1AE2DEDE6A3215B1 /* HistoricalSchedulerTimeConverter.swift in Sources */, - BB7BDB047E44BF96B6967525A2EF0301 /* ImmediateSchedulerType.swift in Sources */, - 0D26DF5C78770563BB602E49C68DD75A /* InfiniteSequence.swift in Sources */, - F7D7D1D92A2A67BF2977AE46A48ABBF7 /* InvocableScheduledItem.swift in Sources */, - 91BBDC01F5559CD8ECBF2591ACAB7E04 /* InvocableType.swift in Sources */, - 3A9EFBA686520511F5F4E7A57643EF3B /* Just.swift in Sources */, - A274C62D7E69DB37DDBF4634D893E4BC /* Lock.swift in Sources */, - B0F913BBEE0EFA8232619A91191BF412 /* LockOwnerType.swift in Sources */, - BDDE7F52290E745F8E0ADF2F1B88B660 /* MainScheduler.swift in Sources */, - B287D5E766B234A090DCBC039E87B2D6 /* Map.swift in Sources */, - CB2070AAD7F9B9E283AD2A50624DC8E5 /* Materialize.swift in Sources */, - 8D4752D7E2883F2567EF632CC4E226C4 /* Maybe.swift in Sources */, - D7F54D1594E9B050170EAD9762901A41 /* Merge.swift in Sources */, - 5E901977E117A5D74CD1701BB665B3A0 /* Multicast.swift in Sources */, - E4D4B352127EE8DB616595CF15FA7704 /* Never.swift in Sources */, - C4F42D1DA4FF9D2A4A74B2EACBB42EEE /* NopDisposable.swift in Sources */, - C3DB1DB7DDD26BB48EDA8EA92289F398 /* Observable.swift in Sources */, - 631DE69A990BC90C4B864A9056F810A8 /* ObservableConvertibleType.swift in Sources */, - 8580697F001A38CF65562CBE91B3C3D0 /* ObservableType+Extensions.swift in Sources */, - CDE8D74CECACB82D52879CA3EFA439A9 /* ObservableType+PrimitiveSequence.swift in Sources */, - D20D415DB1DC034E1434D3265645F21D /* ObservableType.swift in Sources */, - 014C8C742FEFDB7E7542BF2436F955CA /* ObserveOn.swift in Sources */, - 42927A4F037AAE24843B79E44FE19AC9 /* ObserverBase.swift in Sources */, - FDBCBA60FA2DCFBCE0D09A484859687E /* ObserverType.swift in Sources */, - 04C3D6EA8DB704A044E57A603F8051AD /* OperationQueueScheduler.swift in Sources */, - FA47FEE3404BEA929C6B6081015CAA22 /* Optional.swift in Sources */, - A3769A79129A62719850CA2BD7F8B4BC /* Platform.Darwin.swift in Sources */, - 71620E4C41A339C58454366C0C745343 /* Platform.Linux.swift in Sources */, - 79A97F6BE246CF2D3CAF89AD701B92DA /* PrimitiveSequence+Zip+arity.swift in Sources */, - 6677FB54CA94A573E7055E91A774BAA7 /* PrimitiveSequence.swift in Sources */, - 51294689F8DD7158A89F4083A2207F60 /* PriorityQueue.swift in Sources */, - F3BD9C72BAF02A3B4B8731C95C076B69 /* Producer.swift in Sources */, - C062E295E908096B138F19EAC25F86F6 /* PublishSubject.swift in Sources */, - C25C2936C31569B3F4247170224114E3 /* Queue.swift in Sources */, - 4463FF547D5F565394B614D1A73D8877 /* Range.swift in Sources */, - 5BFF937266E4511B7365D3B5F552EE4C /* Reactive.swift in Sources */, - CF1ED281DEC16E6F808DE809FD9A4688 /* RecursiveLock.swift in Sources */, - 5B392CA36C975AC73B4ACD3FA812176D /* RecursiveScheduler.swift in Sources */, - 9837B2C2E8067FC961F5ADF7F2A70764 /* Reduce.swift in Sources */, - 694209670715D02154935BBC68357DDC /* RefCountDisposable.swift in Sources */, - 6A81D8BA95FB1AE2D08BAF2CD8722D1F /* Repeat.swift in Sources */, - 112CAE9947132F20975ED24B680C0E0A /* ReplaySubject.swift in Sources */, - 7961143C7234A4CCE19F18B3E46A3675 /* RetryWhen.swift in Sources */, - 62795B841FA47336A4A09F0B0776FDA5 /* Rx.swift in Sources */, - 54CCCCF6DE0F0196785ED239FB290146 /* RxMutableBox.swift in Sources */, - 7E4106FB6CD590CF28FB62BEF94CFC9B /* RxSwift-dummy.m in Sources */, - 7BF648A27F63C337E891EFD80CEFEDCF /* Sample.swift in Sources */, - C70836640F9BCAD036DC24CD53EAD941 /* Scan.swift in Sources */, - D469257F041DDCAF64BEED7BC8A03095 /* ScheduledDisposable.swift in Sources */, - B8A8CC77A2A845C44237B66CF0C8F022 /* ScheduledItem.swift in Sources */, - D2E59573AB346DE7A8E9492084578ED4 /* ScheduledItemType.swift in Sources */, - 5B8933F55D812751FD5DC9C962D4B880 /* SchedulerServices+Emulation.swift in Sources */, - CF344AE64DC644F7F9643462510552F0 /* SchedulerType.swift in Sources */, - 69DCD40C8C5C22615B29432BF0ADB8F1 /* Sequence.swift in Sources */, - E9051C0B4E7A242E6E97A5B5AA0404A4 /* SerialDispatchQueueScheduler.swift in Sources */, - FD164FECF087F6F23A090797CA3E9949 /* SerialDisposable.swift in Sources */, - 71E9ACE34A2AC6107D9D3FD879E54003 /* ShareReplayScope.swift in Sources */, - 28B4541F690EC0D5DEB304142D6A5CFE /* Single.swift in Sources */, - 6FC73E611DB28D56E414368C62293B35 /* SingleAssignmentDisposable.swift in Sources */, - 6789FBB44FD34F04961C57D946F303C8 /* SingleAsync.swift in Sources */, - F683E04324F4494A9FA86E8D9AB15F0A /* Sink.swift in Sources */, - F09B92DBEA01E4AC34B1936261B29D7C /* Skip.swift in Sources */, - 30151F3559071F4DFAC85F54E8A1A37A /* SkipUntil.swift in Sources */, - 2ACB6F721F83AA421857ACACBECD7BA1 /* SkipWhile.swift in Sources */, - 596E6C82A98EE40174F48463FA1BE093 /* StartWith.swift in Sources */, - 3351B401498926F2535052FC5EAF64A7 /* String+Rx.swift in Sources */, - 845A3084299A4B5366BC11E793F47FC8 /* SubjectType.swift in Sources */, - 2A8ADC8C1A772582E3F54ABAE5DFA18B /* SubscribeOn.swift in Sources */, - CB3FE477A28D5F42659E775DDADFA162 /* SubscriptionDisposable.swift in Sources */, - AD3AB11277BC8A2880794BFA14AA3327 /* SwiftSupport.swift in Sources */, - B5541AEE9C3EF1FC587FD966C696255A /* Switch.swift in Sources */, - C17F7ABA56D9CF3BCCCC099B28E2180F /* SwitchIfEmpty.swift in Sources */, - A9ED0D16B96A912902689EC0B359D695 /* SynchronizedDisposeType.swift in Sources */, - 2C06E9D96634BC6B95FAF6BF7CED54A1 /* SynchronizedOnType.swift in Sources */, - D89AD296DD7AAF395C236A8708FCE1AA /* SynchronizedUnsubscribeType.swift in Sources */, - 0584D0378A7BC566D680CA4745759AAE /* TailRecursiveSink.swift in Sources */, - D20332D3554078C7F69A22AD794F38DF /* Take.swift in Sources */, - 9CAA6C0F3A9D7BED04A08EECF400A0CE /* TakeLast.swift in Sources */, - 540670A34C103B3D2EFC67692D64D94C /* TakeUntil.swift in Sources */, - 81FEEC4A4AAE20EB19B8D499CC21F0F0 /* TakeWhile.swift in Sources */, - B16E0468AF7B79011E9E5008D74DF99D /* Throttle.swift in Sources */, - DEF90E9699C9CFF31E275EDF10E67F5A /* Timeout.swift in Sources */, - 54EFB7A3E7737C4CFF3C0E30C525B81E /* Timer.swift in Sources */, - 8F5F62256B3D0CA7C0F3C12873E5A6AE /* ToArray.swift in Sources */, - 089F2B2C34FD6211087F479001EEB544 /* Using.swift in Sources */, - 114852CA7443A6F59DC7F10854BFFE5E /* VirtualTimeConverterType.swift in Sources */, - 4349DBA2D11F7116FCA85B892C0966C5 /* VirtualTimeScheduler.swift in Sources */, - A773C0EEDBE9F7DF4D6F7F13D60C8509 /* Window.swift in Sources */, - 24E286D69C7DC48C2914448A0A7B29DC /* WithLatestFrom.swift in Sources */, - C2DB15EDDCB2D09A7BA3DADEE3E48A3E /* Zip+arity.swift in Sources */, - 6ABBC348BEF5F20DBE251EB1DA4139D8 /* Zip+Collection.swift in Sources */, - 06A8D4A5474C39C04655948F8CD31A2F /* Zip.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CE5A3B1F3B202904269DA6B397D220B9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 66B1964BB363964D6D5997D1A036AA4C /* Pods-DemoTests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6B1B6EDFDF8E2AE73E584AD6081223A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8A07E63BB7C668B40163BA52C80E6532 /* HasDisposeBag.swift in Sources */, - 020D79365071F89CF47E8F65D60DF685 /* NSObject+Rx-dummy.m in Sources */, - EB7C68E6DCCC3500FE08F9B2F0C85F08 /* NSObject+Rx.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EC9C21A07385514359BB2357BDF22B6B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33044D36B602FD581BE14DEBE3A4F489 /* Behavior.swift in Sources */, - 98D381D62E332A089ACB3A59FCCE4ACF /* Callsite.swift in Sources */, - 17B386AD2B53702744C4169B5201217C /* Closures.swift in Sources */, - 3F5316B5ADE2B573B9ECEB45B5D061C0 /* Configuration.swift in Sources */, - 47542DCAC61738574E2F2BCACA6611F1 /* DSL.swift in Sources */, - 429367E7C28030B3509C31B053D17CB0 /* ErrorUtility.swift in Sources */, - E0AE698E1A4F0D9064C04882327C92F3 /* Example.swift in Sources */, - 60F93E168485BCB9AA3A157FE2CB7C41 /* ExampleGroup.swift in Sources */, - 103425C9315079FFDF4868042FE2CF79 /* ExampleHooks.swift in Sources */, - 65FF97EE04691FA9881DAA432DEAC165 /* ExampleMetadata.swift in Sources */, - D710D0C1F200BB05972529EEED15D4AE /* Filter.swift in Sources */, - 65345217D4A1DE88312F171F0251DB96 /* HooksPhase.swift in Sources */, - 93438224836AC1AFFD43A69A04501382 /* NSBundle+CurrentTestBundle.swift in Sources */, - C606BCAC386078403182F3AB0EA32A95 /* NSString+C99ExtendedIdentifier.swift in Sources */, - 3D600AC02826CE784CB7E9F88E9AC5DD /* QCKDSL.m in Sources */, - E3520A44C282726253DDE4DAC512CCA0 /* Quick-dummy.m in Sources */, - D5E2476AE4B2324B73B769C1B866D709 /* QuickConfiguration.m in Sources */, - F19DEFB017CE9B3CFB0C0A0AE9249CC4 /* QuickSelectedTestSuiteBuilder.swift in Sources */, - 3F076E5E0ACCE80863235591773EA2CD /* QuickSpec.m in Sources */, - E1ED227B3AD36380A637CA2B5980E7CC /* QuickSpecBase.m in Sources */, - F099097291330AC895E75E72028EBC0B /* QuickTestSuite.swift in Sources */, - F647E5A7CA3CDAB1EB28BB0E119FF954 /* SuiteHooks.swift in Sources */, - 9CA1B83C396A9E9AB68F7C5137B493FD /* URL+FileName.swift in Sources */, - A7EA3539CBE2EBB42D92C3132763E251 /* World+DSL.swift in Sources */, - 95971795C6F61C01410B264C4BBF3A6E /* World.swift in Sources */, - 9C736F7C9C052DFFF87DCBA83FF50599 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1F03E2CF6E0E59504F92E741CA377B41 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Nimble; - target = 5E269AA9A7FBCB9BFD8EA487B43AE7F9 /* Nimble */; - targetProxy = 1945352C42EA3A9BB808659DF7EF5C93 /* PBXContainerItemProxy */; - }; - 66DAB9E9AE12C2A041CB508F76BF73B5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = AB6A097ED9ED31C93AA4B971CFDBBC33 /* RxSwift */; - targetProxy = 84FAAE3376CA8F3F598F8202CA76A6B5 /* PBXContainerItemProxy */; - }; - E194097AC220C28B36F989E6D9F66B21 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Quick; - target = C86D25EC2265DA7A383D953ED7711121 /* Quick */; - targetProxy = 9C4E6AA93842E1B669F2567D9577B796 /* PBXContainerItemProxy */; - }; - E48535A33F851BB05FA6B47DB26F3AFB /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "NSObject+Rx"; - target = 6DB514A28E386B633179B9615872C399 /* NSObject+Rx */; - targetProxy = AD4AC3E78E4C00FE6FA84A78B2B48EF9 /* PBXContainerItemProxy */; - }; - F4A1E0BE5B20A85EF0215713A8A9B3BF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = AB6A097ED9ED31C93AA4B971CFDBBC33 /* RxSwift */; - targetProxy = D0865859F488184744C9D0FB7CC8B06A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 16EB0A98D24404AD14E6C0B6EEF65551 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7BAABE3D70B15D706F0E0BC9A5AA411C /* Nimble.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - PRODUCT_MODULE_NAME = Nimble; - PRODUCT_NAME = Nimble; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 1EE094A14B5D7667CB376C3F8B36A5E3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F98E837E3836FD16E13D4A18CEED912B /* Quick.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - PRODUCT_MODULE_NAME = Quick; - PRODUCT_NAME = Quick; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 211B169ED37767918C24C3A4A06B4E85 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5167FF8A5B2F212486CFD19AD479585A /* NSObject+Rx.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/NSObject+Rx/NSObject+Rx-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/NSObject+Rx/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/NSObject+Rx/NSObject+Rx.modulemap"; - PRODUCT_MODULE_NAME = NSObject_Rx; - PRODUCT_NAME = NSObject_Rx; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 324B9C062846F5C25E2774053C7A7341 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8770613CD8D6FFEBC01B5906D0AE2C99 /* Pods-Demo.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-Demo/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Demo/Pods-Demo.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 33FD3AA7DDF995505498C9DB3C6FEF0A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F98E837E3836FD16E13D4A18CEED912B /* Quick.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - PRODUCT_MODULE_NAME = Quick; - PRODUCT_NAME = Quick; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 5F0383985A585AF9C7DC40DEC4A52705 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9C86746B7782939999EF488A707ED793 /* Pods-DemoTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-DemoTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-DemoTests/Pods-DemoTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 60107D7EF3F4757F0F5FF5711B3B141B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5167FF8A5B2F212486CFD19AD479585A /* NSObject+Rx.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/NSObject+Rx/NSObject+Rx-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/NSObject+Rx/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/NSObject+Rx/NSObject+Rx.modulemap"; - PRODUCT_MODULE_NAME = NSObject_Rx; - PRODUCT_NAME = NSObject_Rx; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 6638A516C9717D30201E40D4D47B1411 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CEE8FAC3960020923D811F92029719E4 /* Pods-DemoTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-DemoTests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-DemoTests/Pods-DemoTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 69D740E99ADEFE05633F621B7CAEDD30 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7BAABE3D70B15D706F0E0BC9A5AA411C /* Nimble.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - PRODUCT_MODULE_NAME = Nimble; - PRODUCT_NAME = Nimble; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A26B9A53EACDC68208C940A7897839B3 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B3B1FE08B862EAB796DF4CF965FDAF54 /* Pods-Demo.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-Demo/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Demo/Pods-Demo.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A65EB54E0DC02895358482FAD383A44F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2D752ECA4EA765B6DC3853D1F8DE902C /* RxSwift.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - PRODUCT_MODULE_NAME = RxSwift; - PRODUCT_NAME = RxSwift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A80E2ED3DD64D58835D9C118CB0D8757 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2D752ECA4EA765B6DC3853D1F8DE902C /* RxSwift.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - PRODUCT_MODULE_NAME = RxSwift; - PRODUCT_NAME = RxSwift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - E189E16F799384795D3A4D62BA9F34ED /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - 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_IMPLICIT_RETAIN_SELF = 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - F9688F385912A451151A9C66654C80CB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - 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_IMPLICIT_RETAIN_SELF = 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.1; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 10836172B46B0B0B73CE062C21769FF3 /* Build configuration list for PBXNativeTarget "Nimble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 69D740E99ADEFE05633F621B7CAEDD30 /* Debug */, - 16EB0A98D24404AD14E6C0B6EEF65551 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E189E16F799384795D3A4D62BA9F34ED /* Debug */, - F9688F385912A451151A9C66654C80CB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 42CCCE2685AFD37697FD06271CCC2728 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A65EB54E0DC02895358482FAD383A44F /* Debug */, - A80E2ED3DD64D58835D9C118CB0D8757 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 45A9CE836141AB4AD8F20D23C8218FA1 /* Build configuration list for PBXNativeTarget "Pods-Demo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A26B9A53EACDC68208C940A7897839B3 /* Debug */, - 324B9C062846F5C25E2774053C7A7341 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 59D39ADEC18E454A063B6E2651E7E53B /* Build configuration list for PBXNativeTarget "NSObject+Rx" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 60107D7EF3F4757F0F5FF5711B3B141B /* Debug */, - 211B169ED37767918C24C3A4A06B4E85 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - ADC4463D2B4DCEB2FA24431FC1A19530 /* Build configuration list for PBXNativeTarget "Pods-DemoTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5F0383985A585AF9C7DC40DEC4A52705 /* Debug */, - 6638A516C9717D30201E40D4D47B1411 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - AE53E6CAD822DA849D5BF1AFD367C08A /* Build configuration list for PBXNativeTarget "Quick" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1EE094A14B5D7667CB376C3F8B36A5E3 /* Debug */, - 33FD3AA7DDF995505498C9DB3C6FEF0A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; -} diff --git a/Demo/Pods/Quick/LICENSE b/Demo/Pods/Quick/LICENSE deleted file mode 100644 index e900165..0000000 --- a/Demo/Pods/Quick/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014, Quick Team - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Demo/Pods/Quick/README.md b/Demo/Pods/Quick/README.md deleted file mode 100644 index e6dc0ad..0000000 --- a/Demo/Pods/Quick/README.md +++ /dev/null @@ -1,88 +0,0 @@ -![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png) - -[![Build Status](https://travis-ci.org/Quick/Quick.svg?branch=master)](https://travis-ci.org/Quick/Quick) -[![CocoaPods](https://img.shields.io/cocoapods/v/Quick.svg)](https://cocoapods.org/pods/Quick) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platforms](https://img.shields.io/cocoapods/p/Quick.svg)](https://cocoapods.org/pods/Quick) - -Quick is a behavior-driven development framework for Swift and Objective-C. -Inspired by [RSpec](https://github.com/rspec/rspec), [Specta](https://github.com/specta/specta), and [Ginkgo](https://github.com/onsi/ginkgo). - -![](https://raw.githubusercontent.com/Quick/Assets/master/Screenshots/QuickSpec%20screenshot.png) - -```swift -// Swift - -import Quick -import Nimble - -class TableOfContentsSpec: QuickSpec { - override func spec() { - describe("the 'Documentation' directory") { - it("has everything you need to get started") { - let sections = Directory("Documentation").sections - expect(sections).to(contain("Organized Tests with Quick Examples and Example Groups")) - expect(sections).to(contain("Installing Quick")) - } - - context("if it doesn't have what you're looking for") { - it("needs to be updated") { - let you = You(awesome: true) - expect{you.submittedAnIssue}.toEventually(beTruthy()) - } - } - } - } -} -``` -#### Nimble -Quick comes together with [Nimble](https://github.com/Quick/Nimble) — a matcher framework for your tests. You can learn why `XCTAssert()` statements make your expectations unclear and how to fix that using Nimble assertions [here](./Documentation/en-us/NimbleAssertions.md). - -## Swift Version - -Certain versions of Quick and Nimble only support certain versions of Swift. Depending on which version of Swift your project uses, you should use specific versions of Quick and Nimble. Use the table below to determine which versions of Quick and Nimble are compatible with your project. - -|Swift version |Quick version |Nimble version | -|:--------------------|:---------------|:--------------| -|Swift 3 |v1.0.0 or later |v5.0.0 or later| -|Swift 2.2 / Swift 2.3|v0.9.3 |v4.1.0 | - -## Documentation - -All documentation can be found in the [Documentation folder](./Documentation), including [detailed installation instructions](./Documentation/en-us/InstallingQuick.md) for CocoaPods, Carthage, Git submodules, and more. For example, you can install Quick and [Nimble](https://github.com/Quick/Nimble) using CocoaPods by adding the following to your Podfile: - -```rb -# Podfile - -use_frameworks! - -target "MyApp" do - # Normal libraries - - abstract_target 'Tests' do - inherit! :search_paths - target "MyAppTests" - target "MyAppUITests" - - pod 'Quick' - pod 'Nimble' - end -end -``` - -## Projects using Quick - -Over ten-thousand apps use either Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them. - -Does your organization or project use Quick and Nimble? If yes, [please add your project to the list](https://github.com/Quick/Quick/wiki/Projects-using-Quick). - -## Who uses Quick - -Similar to projects using Quick, it would be nice to hear why people use Quick and Nimble. Are there features you love? Are there features that are just okay? Are there some features we have that no one uses? - -Have something positive to say about Quick (or Nimble)? If yes, [provide a testimonial here](https://github.com/Quick/Quick/wiki/Who-uses-Quick). - - -## License - -Apache 2.0 license. See the [`LICENSE`](LICENSE) file for details. diff --git a/Demo/Pods/Quick/Sources/Quick/Behavior.swift b/Demo/Pods/Quick/Sources/Quick/Behavior.swift deleted file mode 100644 index 1d98702..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Behavior.swift +++ /dev/null @@ -1,17 +0,0 @@ -/** - A `Behavior` encapsulates a set of examples that can be re-used in several locations using the `itBehavesLike` function with a context instance of the generic type. - */ - -open class Behavior { - - open static var name: String { return String(describing: self) } - /** - override this method in your behavior to define a set of reusable examples. - - This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach` - and `afterEach` closures, as well as any number of examples (defined using `it`). - - - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject. - */ - open class func spec(_ aContext: @escaping () -> Context) {} -} diff --git a/Demo/Pods/Quick/Sources/Quick/Callsite.swift b/Demo/Pods/Quick/Sources/Quick/Callsite.swift deleted file mode 100644 index f5e3711..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Callsite.swift +++ /dev/null @@ -1,45 +0,0 @@ -import Foundation - -// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` -// does not work as expected. -#if swift(>=3.2) - #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objcMembers - public class _CallsiteBase: NSObject {} - #else - public class _CallsiteBase: NSObject {} - #endif -#else -public class _CallsiteBase: NSObject {} -#endif - -/** - An object encapsulating the file and line number at which - a particular example is defined. -*/ -final public class Callsite: _CallsiteBase { - /** - The absolute path of the file in which an example is defined. - */ - public let file: String - - /** - The line number on which an example is defined. - */ - public let line: UInt - - internal init(file: String, line: UInt) { - self.file = file - self.line = line - } -} - -extension Callsite { - /** - Returns a boolean indicating whether two Callsite objects are equal. - If two callsites are in the same file and on the same line, they must be equal. - */ - @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool { - return lhs.file == rhs.file && lhs.line == rhs.line - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/Configuration/Configuration.swift b/Demo/Pods/Quick/Sources/Quick/Configuration/Configuration.swift deleted file mode 100644 index dbb95f1..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Configuration/Configuration.swift +++ /dev/null @@ -1,161 +0,0 @@ -import Foundation - -/** - A closure that temporarily exposes a Configuration object within - the scope of the closure. -*/ -public typealias QuickConfigurer = (_ configuration: Configuration) -> Void - -/** - A closure that, given metadata about an example, returns a boolean value - indicating whether that example should be run. -*/ -public typealias ExampleFilter = (_ example: Example) -> Bool - -/** - A configuration encapsulates various options you can use - to configure Quick's behavior. -*/ -final public class Configuration: NSObject { - internal let exampleHooks = ExampleHooks() - internal let suiteHooks = SuiteHooks() - internal var exclusionFilters: [ExampleFilter] = [ { example in - if let pending = example.filterFlags[Filter.pending] { - return pending - } else { - return false - } - }] - internal var inclusionFilters: [ExampleFilter] = [ { example in - if let focused = example.filterFlags[Filter.focused] { - return focused - } else { - return false - } - }] - - /** - Run all examples if none match the configured filters. True by default. - */ - public var runAllWhenEverythingFiltered = true - - /** - Registers an inclusion filter. - - All examples are filtered using all inclusion filters. - The remaining examples are run. If no examples remain, all examples are run. - - - parameter filter: A filter that, given an example, returns a value indicating - whether that example should be included in the examples - that are run. - */ - public func include(_ filter: @escaping ExampleFilter) { - inclusionFilters.append(filter) - } - - /** - Registers an exclusion filter. - - All examples that remain after being filtered by the inclusion filters are - then filtered via all exclusion filters. - - - parameter filter: A filter that, given an example, returns a value indicating - whether that example should be excluded from the examples - that are run. - */ - public func exclude(_ filter: @escaping ExampleFilter) { - exclusionFilters.append(filter) - } - - /** - Identical to Quick.Configuration.beforeEach, except the closure is - provided with metadata on the example that the closure is being run - prior to. - */ -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - @objc(beforeEachWithMetadata:) - public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { - exampleHooks.appendBefore(closure) - } -#else - public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { - exampleHooks.appendBefore(closure) - } -#endif - - /** - Like Quick.DSL.beforeEach, this configures Quick to execute the - given closure before each example that is run. The closure - passed to this method is executed before each example Quick runs, - globally across the test suite. You may call this method multiple - times across mulitple +[QuickConfigure configure:] methods in order - to define several closures to run before each example. - - Note that, since Quick makes no guarantee as to the order in which - +[QuickConfiguration configure:] methods are evaluated, there is no - guarantee as to the order in which beforeEach closures are evaluated - either. Mulitple beforeEach defined on a single configuration, however, - will be executed in the order they're defined. - - - parameter closure: The closure to be executed before each example - in the test suite. - */ - public func beforeEach(_ closure: @escaping BeforeExampleClosure) { - exampleHooks.appendBefore(closure) - } - - /** - Identical to Quick.Configuration.afterEach, except the closure - is provided with metadata on the example that the closure is being - run after. - */ -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - @objc(afterEachWithMetadata:) - public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { - exampleHooks.appendAfter(closure) - } -#else - public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { - exampleHooks.appendAfter(closure) - } -#endif - - /** - Like Quick.DSL.afterEach, this configures Quick to execute the - given closure after each example that is run. The closure - passed to this method is executed after each example Quick runs, - globally across the test suite. You may call this method multiple - times across mulitple +[QuickConfigure configure:] methods in order - to define several closures to run after each example. - - Note that, since Quick makes no guarantee as to the order in which - +[QuickConfiguration configure:] methods are evaluated, there is no - guarantee as to the order in which afterEach closures are evaluated - either. Mulitple afterEach defined on a single configuration, however, - will be executed in the order they're defined. - - - parameter closure: The closure to be executed before each example - in the test suite. - */ - public func afterEach(_ closure: @escaping AfterExampleClosure) { - exampleHooks.appendAfter(closure) - } - - /** - Like Quick.DSL.beforeSuite, this configures Quick to execute - the given closure prior to any and all examples that are run. - The two methods are functionally equivalent. - */ - public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { - suiteHooks.appendBefore(closure) - } - - /** - Like Quick.DSL.afterSuite, this configures Quick to execute - the given closure after all examples have been run. - The two methods are functionally equivalent. - */ - public func afterSuite(_ closure: @escaping AfterSuiteClosure) { - suiteHooks.appendAfter(closure) - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/DSL/DSL.swift b/Demo/Pods/Quick/Sources/Quick/DSL/DSL.swift deleted file mode 100644 index 94f20c5..0000000 --- a/Demo/Pods/Quick/Sources/Quick/DSL/DSL.swift +++ /dev/null @@ -1,271 +0,0 @@ -/** - Defines a closure to be run prior to any examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. - - If the test suite crashes before the first example is run, this closure - will not be executed. - - - parameter closure: The closure to be run prior to any examples in the test suite. -*/ -public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { - World.sharedWorld.beforeSuite(closure) -} - -/** - Defines a closure to be run after all of the examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. - - If the test suite crashes before all examples are run, this closure - will not be executed. - - - parameter closure: The closure to be run after all of the examples in the test suite. -*/ -public func afterSuite(_ closure: @escaping AfterSuiteClosure) { - World.sharedWorld.afterSuite(closure) -} - -/** - Defines a group of shared examples. These examples can be re-used in several locations - by using the `itBehavesLike` function. - - - parameter name: The name of the shared example group. This must be unique across all shared example - groups defined in a test suite. - - parameter closure: A closure containing the examples. This behaves just like an example group defined - using `describe` or `context`--the closure may contain any number of `beforeEach` - and `afterEach` closures, as well as any number of examples (defined using `it`). -*/ -public func sharedExamples(_ name: String, closure: @escaping () -> Void) { - World.sharedWorld.sharedExamples(name) { _ in closure() } -} - -/** - Defines a group of shared examples. These examples can be re-used in several locations - by using the `itBehavesLike` function. - - - parameter name: The name of the shared example group. This must be unique across all shared example - groups defined in a test suite. - - parameter closure: A closure containing the examples. This behaves just like an example group defined - using `describe` or `context`--the closure may contain any number of `beforeEach` - and `afterEach` closures, as well as any number of examples (defined using `it`). - - The closure takes a SharedExampleContext as an argument. This context is a function - that can be executed to retrieve parameters passed in via an `itBehavesLike` function. -*/ -public func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { - World.sharedWorld.sharedExamples(name, closure: closure) -} - -/** - Defines an example group. Example groups are logical groupings of examples. - Example groups can share setup and teardown code. - - - parameter description: An arbitrary string describing the example group. - - parameter closure: A closure that can contain other examples. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. -*/ -public func describe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - World.sharedWorld.describe(description, flags: flags, closure: closure) -} - -/** - Defines an example group. Equivalent to `describe`. -*/ -public func context(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - World.sharedWorld.context(description, flags: flags, closure: closure) -} - -/** - Defines a closure to be run prior to each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of beforeEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - - parameter closure: The closure to be run prior to each example. -*/ -public func beforeEach(_ closure: @escaping BeforeExampleClosure) { - World.sharedWorld.beforeEach(closure) -} - -/** - Identical to Quick.DSL.beforeEach, except the closure is provided with - metadata on the example that the closure is being run prior to. -*/ -public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { - World.sharedWorld.beforeEach(closure: closure) -} - -/** - Defines a closure to be run after each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of afterEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - - parameter closure: The closure to be run after each example. -*/ -public func afterEach(_ closure: @escaping AfterExampleClosure) { - World.sharedWorld.afterEach(closure) -} - -/** - Identical to Quick.DSL.afterEach, except the closure is provided with - metadata on the example that the closure is being run after. -*/ -public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { - World.sharedWorld.afterEach(closure: closure) -} - -/** - Defines an example. Examples use assertions to demonstrate how code should - behave. These are like "tests" in XCTest. - - - parameter description: An arbitrary string describing what the example is meant to specify. - - parameter closure: A closure that can contain assertions. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - - parameter file: The absolute path to the file containing the example. A sensible default is provided. - - parameter line: The line containing the example. A sensible default is provided. -*/ -public func it(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { - World.sharedWorld.it(description, flags: flags, file: file, line: line, closure: closure) -} - -/** - Inserts the examples defined using a `sharedExamples` function into the current example group. - The shared examples are executed at this location, as if they were written out manually. - - - parameter name: The name of the shared examples group to be executed. This must be identical to the - name of a shared examples group defined using `sharedExamples`. If there are no shared - examples that match the name given, an exception is thrown and the test suite will crash. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. -*/ -public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { - itBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) -} - -/** - Inserts the examples defined using a `sharedExamples` function into the current example group. - The shared examples are executed at this location, as if they were written out manually. - This function also passes those shared examples a context that can be evaluated to give the shared - examples extra information on the subject of the example. - - - parameter name: The name of the shared examples group to be executed. This must be identical to the - name of a shared examples group defined using `sharedExamples`. If there are no shared - examples that match the name given, an exception is thrown and the test suite will crash. - - parameter sharedExampleContext: A closure that, when evaluated, returns key-value pairs that provide the - shared examples with extra information on the subject of the example. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. -*/ -public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { - World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) -} - -/** - Inserts the examples defined using a `Behavior` into the current example group. - The shared examples are executed at this location, as if they were written out manually. - This function also passes a strongly-typed context that can be evaluated to give the shared examples extra information on the subject of the example. - - - parameter behavior: The type of `Behavior` class defining the example group to be executed. - - parameter context: A closure that, when evaluated, returns an instance of `Behavior`'s context type to provide its example group with extra information on the subject of the example. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. - */ -public func itBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.itBehavesLike(behavior, context: context, flags: flags, file: file, line: line) -} - -/** - Defines an example or example group that should not be executed. Use `pending` to temporarily disable - examples or groups that should not be run yet. - - - parameter description: An arbitrary string describing the example or example group. - - parameter closure: A closure that will not be evaluated. -*/ -public func pending(_ description: String, closure: () -> Void) { - World.sharedWorld.pending(description, closure: closure) -} - -/** - Use this to quickly mark a `describe` closure as pending. - This disables all examples within the closure. -*/ -public func xdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { - World.sharedWorld.xdescribe(description, flags: flags, closure: closure) -} - -/** - Use this to quickly mark a `context` closure as pending. - This disables all examples within the closure. -*/ -public func xcontext(_ description: String, flags: FilterFlags, closure: () -> Void) { - xdescribe(description, flags: flags, closure: closure) -} - -/** - Use this to quickly mark an `it` closure as pending. - This disables the example and ensures the code within the closure is never run. -*/ -public func xit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { - World.sharedWorld.xit(description, flags: flags, file: file, line: line, closure: closure) -} - -/** - Use this to quicklu mark an `itBehavesLike` closure as pending. - This disables the example group defined by this behavior and ensures the code within is never run. -*/ -public func xitBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.xitBehavesLike(behavior, context: context, flags: flags, file: file, line: line) -} -/** - Use this to quickly focus a `describe` closure, focusing the examples in the closure. - If any examples in the test suite are focused, only those examples are executed. - This trumps any explicitly focused or unfocused examples within the closure--they are all treated as focused. -*/ -public func fdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - World.sharedWorld.fdescribe(description, flags: flags, closure: closure) -} - -/** - Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. -*/ -public func fcontext(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { - fdescribe(description, flags: flags, closure: closure) -} - -/** - Use this to quickly focus an `it` closure, focusing the example. - If any examples in the test suite are focused, only those examples are executed. -*/ -public func fit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { - World.sharedWorld.fit(description, flags: flags, file: file, line: line, closure: closure) -} - -/** - Use this to quickly focus an `itBehavesLike` closure. -*/ -public func fitBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { - fitBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) -} - -/** - Use this to quickly focus an `itBehavesLike` closure. -*/ -public func fitBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { - World.sharedWorld.fitBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) -} - -/** - Use this to quickly focus on `itBehavesLike` closure. - */ -public func fitBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.fitBehavesLike(behavior, context: context, flags: flags, file: file, line: line) -} diff --git a/Demo/Pods/Quick/Sources/Quick/DSL/World+DSL.swift b/Demo/Pods/Quick/Sources/Quick/DSL/World+DSL.swift deleted file mode 100644 index 942c2e6..0000000 --- a/Demo/Pods/Quick/Sources/Quick/DSL/World+DSL.swift +++ /dev/null @@ -1,210 +0,0 @@ -import Foundation - -/** - Adds methods to World to support top-level DSL functions (Swift) and - macros (Objective-C). These functions map directly to the DSL that test - writers use in their specs. -*/ -extension World { - internal func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { - suiteHooks.appendBefore(closure) - } - - internal func afterSuite(_ closure: @escaping AfterSuiteClosure) { - suiteHooks.appendAfter(closure) - } - - internal func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { - registerSharedExample(name, closure: closure) - } - - internal func describe(_ description: String, flags: FilterFlags, closure: () -> Void) { - guard currentExampleMetadata == nil else { - raiseError("'describe' cannot be used inside '\(currentPhase)', 'describe' may only be used inside 'context' or 'describe'. ") - } - guard currentExampleGroup != nil else { - raiseError("Error: example group was not created by its parent QuickSpec spec. Check that describe() or context() was used in QuickSpec.spec() and not a more general context (i.e. an XCTestCase test)") - } - let group = ExampleGroup(description: description, flags: flags) - currentExampleGroup.appendExampleGroup(group) - performWithCurrentExampleGroup(group, closure: closure) - } - - internal func context(_ description: String, flags: FilterFlags, closure: () -> Void) { - guard currentExampleMetadata == nil else { - raiseError("'context' cannot be used inside '\(currentPhase)', 'context' may only be used inside 'context' or 'describe'. ") - } - self.describe(description, flags: flags, closure: closure) - } - - internal func fdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.describe(description, flags: focusedFlags, closure: closure) - } - - internal func xdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.describe(description, flags: pendingFlags, closure: closure) - } - - internal func beforeEach(_ closure: @escaping BeforeExampleClosure) { - guard currentExampleMetadata == nil else { - raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'. ") - } - currentExampleGroup.hooks.appendBefore(closure) - } - -#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objc(beforeEachWithMetadata:) - internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendBefore(closure) - } -#else - internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendBefore(closure) - } -#endif - - internal func afterEach(_ closure: @escaping AfterExampleClosure) { - guard currentExampleMetadata == nil else { - raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'. ") - } - currentExampleGroup.hooks.appendAfter(closure) - } - -#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objc(afterEachWithMetadata:) - internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendAfter(closure) - } -#else - internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { - currentExampleGroup.hooks.appendAfter(closure) - } -#endif - - @nonobjc - internal func it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { - if beforesCurrentlyExecuting { - raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'. ") - } - if aftersCurrentlyExecuting { - raiseError("'it' cannot be used inside 'afterEach', 'it' may only be used inside 'context' or 'describe'. ") - } - guard currentExampleMetadata == nil else { - raiseError("'it' cannot be used inside 'it', 'it' may only be used inside 'context' or 'describe'. ") - } - let callsite = Callsite(file: file, line: line) - let example = Example(description: description, callsite: callsite, flags: flags, closure: closure) - currentExampleGroup.appendExample(example) - } - - @nonobjc - internal func fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.it(description, flags: focusedFlags, file: file, line: line, closure: closure) - } - - @nonobjc - internal func xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.it(description, flags: pendingFlags, file: file, line: line, closure: closure) - } - - @nonobjc - internal func itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { - guard currentExampleMetadata == nil else { - raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'. ") - } - let callsite = Callsite(file: file, line: line) - let closure = World.sharedWorld.sharedExample(name) - - let group = ExampleGroup(description: name, flags: flags) - currentExampleGroup.appendExampleGroup(group) - performWithCurrentExampleGroup(group) { - closure(sharedExampleContext) - } - - group.walkDownExamples { (example: Example) in - example.isSharedExample = true - example.callsite = callsite - } - } - - @nonobjc - internal func fitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: focusedFlags, file: file, line: line) - } - - internal func itBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: String, line: UInt) { - guard currentExampleMetadata == nil else { - raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'. ") - } - let callsite = Callsite(file: file, line: line) - let closure = behavior.spec - let group = ExampleGroup(description: behavior.name, flags: flags) - currentExampleGroup.appendExampleGroup(group) - performWithCurrentExampleGroup(group) { - closure(context) - } - - group.walkDownExamples { (example: Example) in - example.isSharedExample = true - example.callsite = callsite - } - } - - internal func fitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: String, line: UInt) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.itBehavesLike(behavior, context: context, flags: focusedFlags, file: file, line: line) - } - - internal func xitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: String, line: UInt) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.itBehavesLike(behavior, context: context, flags: pendingFlags, file: file, line: line) - } - -#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objc(itWithDescription:flags:file:line:closure:) - internal func objc_it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { - it(description, flags: flags, file: file, line: line, closure: closure) - } - - @objc(fitWithDescription:flags:file:line:closure:) - internal func objc_fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { - fit(description, flags: flags, file: file, line: line, closure: closure) - } - - @objc(xitWithDescription:flags:file:line:closure:) - internal func objc_xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { - xit(description, flags: flags, file: file, line: line, closure: closure) - } - - @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:flags:file:line:) - internal func objc_itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { - itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) - } -#endif - - internal func pending(_ description: String, closure: () -> Void) { - print("Pending: \(description)") - } - - private var currentPhase: String { - if beforesCurrentlyExecuting { - return "beforeEach" - } else if aftersCurrentlyExecuting { - return "afterEach" - } - - return "it" - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/ErrorUtility.swift b/Demo/Pods/Quick/Sources/Quick/ErrorUtility.swift deleted file mode 100644 index 155fefd..0000000 --- a/Demo/Pods/Quick/Sources/Quick/ErrorUtility.swift +++ /dev/null @@ -1,10 +0,0 @@ -import Foundation - -internal func raiseError(_ message: String) -> Never { -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() -#endif - - // This won't be reached when ObjC is available and the exception above is raisd - fatalError(message) -} diff --git a/Demo/Pods/Quick/Sources/Quick/Example.swift b/Demo/Pods/Quick/Sources/Quick/Example.swift deleted file mode 100644 index cf7b4a3..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Example.swift +++ /dev/null @@ -1,134 +0,0 @@ -import Foundation - -private var numberOfExamplesRun = 0 -private var numberOfIncludedExamples = 0 - -// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` -// does not work as expected. -#if swift(>=3.2) - #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objcMembers - public class _ExampleBase: NSObject {} - #else - public class _ExampleBase: NSObject {} - #endif -#else -public class _ExampleBase: NSObject {} -#endif - -/** - Examples, defined with the `it` function, use assertions to - demonstrate how code should behave. These are like "tests" in XCTest. -*/ -final public class Example: _ExampleBase { - /** - A boolean indicating whether the example is a shared example; - i.e.: whether it is an example defined with `itBehavesLike`. - */ - public var isSharedExample = false - - /** - The site at which the example is defined. - This must be set correctly in order for Xcode to highlight - the correct line in red when reporting a failure. - */ - public var callsite: Callsite - - weak internal var group: ExampleGroup? - - private let internalDescription: String - private let closure: () -> Void - private let flags: FilterFlags - - internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () -> Void) { - self.internalDescription = description - self.closure = closure - self.callsite = callsite - self.flags = flags - } - - public override var description: String { - return internalDescription - } - - /** - The example name. A name is a concatenation of the name of - the example group the example belongs to, followed by the - description of the example itself. - - The example name is used to generate a test method selector - to be displayed in Xcode's test navigator. - */ - public var name: String { - guard let groupName = group?.name else { return description } - return "\(groupName), \(description)" - } - - /** - Executes the example closure, as well as all before and after - closures defined in the its surrounding example groups. - */ - public func run() { - let world = World.sharedWorld - - if numberOfIncludedExamples == 0 { - numberOfIncludedExamples = world.includedExampleCount - } - - if numberOfExamplesRun == 0 { - world.suiteHooks.executeBefores() - } - - let exampleMetadata = ExampleMetadata(example: self, exampleIndex: numberOfExamplesRun) - world.currentExampleMetadata = exampleMetadata - defer { - world.currentExampleMetadata = nil - } - - world.exampleHooks.executeBefores(exampleMetadata) - group!.phase = .beforesExecuting - for before in group!.befores { - before(exampleMetadata) - } - group!.phase = .beforesFinished - - closure() - - group!.phase = .aftersExecuting - for after in group!.afters { - after(exampleMetadata) - } - group!.phase = .aftersFinished - world.exampleHooks.executeAfters(exampleMetadata) - - numberOfExamplesRun += 1 - - if !world.isRunningAdditionalSuites && numberOfExamplesRun >= numberOfIncludedExamples { - world.suiteHooks.executeAfters() - } - } - - /** - Evaluates the filter flags set on this example and on the example groups - this example belongs to. Flags set on the example are trumped by flags on - the example group it belongs to. Flags on inner example groups are trumped - by flags on outer example groups. - */ - internal var filterFlags: FilterFlags { - var aggregateFlags = flags - for (key, value) in group!.filterFlags { - aggregateFlags[key] = value - } - return aggregateFlags - } -} - -extension Example { - /** - Returns a boolean indicating whether two Example objects are equal. - If two examples are defined at the exact same callsite, they must be equal. - */ - @nonobjc public static func == (lhs: Example, rhs: Example) -> Bool { - return lhs.callsite == rhs.callsite - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/ExampleGroup.swift b/Demo/Pods/Quick/Sources/Quick/ExampleGroup.swift deleted file mode 100644 index 129bed0..0000000 --- a/Demo/Pods/Quick/Sources/Quick/ExampleGroup.swift +++ /dev/null @@ -1,99 +0,0 @@ -import Foundation - -/** - Example groups are logical groupings of examples, defined with - the `describe` and `context` functions. Example groups can share - setup and teardown code. -*/ -final public class ExampleGroup: NSObject { - weak internal var parent: ExampleGroup? - internal let hooks = ExampleHooks() - - internal var phase: HooksPhase = .nothingExecuted - - private let internalDescription: String - private let flags: FilterFlags - private let isInternalRootExampleGroup: Bool - private var childGroups = [ExampleGroup]() - private var childExamples = [Example]() - - internal init(description: String, flags: FilterFlags, isInternalRootExampleGroup: Bool = false) { - self.internalDescription = description - self.flags = flags - self.isInternalRootExampleGroup = isInternalRootExampleGroup - } - - public override var description: String { - return internalDescription - } - - /** - Returns a list of examples that belong to this example group, - or to any of its descendant example groups. - */ - public var examples: [Example] { - return childExamples + childGroups.flatMap { $0.examples } - } - - internal var name: String? { - guard let parent = parent else { - return isInternalRootExampleGroup ? nil : description - } - - guard let name = parent.name else { return description } - return "\(name), \(description)" - } - - internal var filterFlags: FilterFlags { - var aggregateFlags = flags - walkUp { group in - for (key, value) in group.flags { - aggregateFlags[key] = value - } - } - return aggregateFlags - } - - internal var befores: [BeforeExampleWithMetadataClosure] { - var closures = Array(hooks.befores.reversed()) - walkUp { group in - closures.append(contentsOf: Array(group.hooks.befores.reversed())) - } - return Array(closures.reversed()) - } - - internal var afters: [AfterExampleWithMetadataClosure] { - var closures = hooks.afters - walkUp { group in - closures.append(contentsOf: group.hooks.afters) - } - return closures - } - - internal func walkDownExamples(_ callback: (_ example: Example) -> Void) { - for example in childExamples { - callback(example) - } - for group in childGroups { - group.walkDownExamples(callback) - } - } - - internal func appendExampleGroup(_ group: ExampleGroup) { - group.parent = self - childGroups.append(group) - } - - internal func appendExample(_ example: Example) { - example.group = self - childExamples.append(example) - } - - private func walkUp(_ callback: (_ group: ExampleGroup) -> Void) { - var group = self - while let parent = group.parent { - callback(parent) - group = parent - } - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/ExampleMetadata.swift b/Demo/Pods/Quick/Sources/Quick/ExampleMetadata.swift deleted file mode 100644 index 3dd28ab..0000000 --- a/Demo/Pods/Quick/Sources/Quick/ExampleMetadata.swift +++ /dev/null @@ -1,37 +0,0 @@ -import Foundation - -// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` -// does not work as expected. -#if swift(>=3.2) - #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objcMembers - public class _ExampleMetadataBase: NSObject {} - #else - public class _ExampleMetadataBase: NSObject {} - #endif -#else -public class _ExampleMetadataBase: NSObject {} -#endif - -/** - A class that encapsulates information about an example, - including the index at which the example was executed, as - well as the example itself. -*/ -final public class ExampleMetadata: _ExampleMetadataBase { - /** - The example for which this metadata was collected. - */ - public let example: Example - - /** - The index at which this example was executed in the - test suite. - */ - public let exampleIndex: Int - - internal init(example: Example, exampleIndex: Int) { - self.example = example - self.exampleIndex = exampleIndex - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/Filter.swift b/Demo/Pods/Quick/Sources/Quick/Filter.swift deleted file mode 100644 index da137f8..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Filter.swift +++ /dev/null @@ -1,44 +0,0 @@ -import Foundation - -// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` -// does not work as expected. -#if swift(>=3.2) - #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objcMembers - public class _FilterBase: NSObject {} - #else - public class _FilterBase: NSObject {} - #endif -#else -public class _FilterBase: NSObject {} -#endif - -/** - A mapping of string keys to booleans that can be used to - filter examples or example groups. For example, a "focused" - example would have the flags [Focused: true]. -*/ -public typealias FilterFlags = [String: Bool] - -/** - A namespace for filter flag keys, defined primarily to make the - keys available in Objective-C. -*/ -final public class Filter: _FilterBase { - /** - Example and example groups with [Focused: true] are included in test runs, - excluding all other examples without this flag. Use this to only run one or - two tests that you're currently focusing on. - */ - public class var focused: String { - return "focused" - } - - /** - Example and example groups with [Pending: true] are excluded from test runs. - Use this to temporarily suspend examples that you know do not pass yet. - */ - public class var pending: String { - return "pending" - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/Hooks/Closures.swift b/Demo/Pods/Quick/Sources/Quick/Hooks/Closures.swift deleted file mode 100644 index 9c7d310..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Hooks/Closures.swift +++ /dev/null @@ -1,35 +0,0 @@ -// MARK: Example Hooks - -/** - A closure executed before an example is run. -*/ -public typealias BeforeExampleClosure = () -> Void - -/** - A closure executed before an example is run. The closure is given example metadata, - which contains information about the example that is about to be run. -*/ -public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void - -/** - A closure executed after an example is run. -*/ -public typealias AfterExampleClosure = BeforeExampleClosure - -/** - A closure executed after an example is run. The closure is given example metadata, - which contains information about the example that has just finished running. -*/ -public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure - -// MARK: Suite Hooks - -/** - A closure executed before any examples are run. -*/ -public typealias BeforeSuiteClosure = () -> Void - -/** - A closure executed after all examples have finished running. -*/ -public typealias AfterSuiteClosure = BeforeSuiteClosure diff --git a/Demo/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift b/Demo/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift deleted file mode 100644 index 449cbfc..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift +++ /dev/null @@ -1,42 +0,0 @@ -/** - A container for closures to be executed before and after each example. -*/ -final internal class ExampleHooks { - internal var befores: [BeforeExampleWithMetadataClosure] = [] - internal var afters: [AfterExampleWithMetadataClosure] = [] - internal var phase: HooksPhase = .nothingExecuted - - internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { - befores.append(closure) - } - - internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { - befores.append { (_: ExampleMetadata) in closure() } - } - - internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { - afters.append(closure) - } - - internal func appendAfter(_ closure: @escaping AfterExampleClosure) { - afters.append { (_: ExampleMetadata) in closure() } - } - - internal func executeBefores(_ exampleMetadata: ExampleMetadata) { - phase = .beforesExecuting - for before in befores { - before(exampleMetadata) - } - - phase = .beforesFinished - } - - internal func executeAfters(_ exampleMetadata: ExampleMetadata) { - phase = .aftersExecuting - for after in afters { - after(exampleMetadata) - } - - phase = .aftersFinished - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift b/Demo/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift deleted file mode 100644 index 2440158..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift +++ /dev/null @@ -1,11 +0,0 @@ -/** - A description of the execution cycle of the current example with - respect to the hooks of that example. - */ -internal enum HooksPhase { - case nothingExecuted - case beforesExecuting - case beforesFinished - case aftersExecuting - case aftersFinished -} diff --git a/Demo/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift b/Demo/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift deleted file mode 100644 index b39292b..0000000 --- a/Demo/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift +++ /dev/null @@ -1,32 +0,0 @@ -/** - A container for closures to be executed before and after all examples. -*/ -final internal class SuiteHooks { - internal var befores: [BeforeSuiteClosure] = [] - internal var afters: [AfterSuiteClosure] = [] - internal var phase: HooksPhase = .nothingExecuted - - internal func appendBefore(_ closure: @escaping BeforeSuiteClosure) { - befores.append(closure) - } - - internal func appendAfter(_ closure: @escaping AfterSuiteClosure) { - afters.append(closure) - } - - internal func executeBefores() { - phase = .beforesExecuting - for before in befores { - before() - } - phase = .beforesFinished - } - - internal func executeAfters() { - phase = .aftersExecuting - for after in afters { - after() - } - phase = .aftersFinished - } -} diff --git a/Demo/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift b/Demo/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift deleted file mode 100644 index d7a1442..0000000 --- a/Demo/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift +++ /dev/null @@ -1,25 +0,0 @@ -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - -import Foundation - -extension Bundle { - - /** - Locates the first bundle with a '.xctest' file extension. - */ - internal static var currentTestBundle: Bundle? { - return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } - } - - /** - Return the module name of the bundle. - Uses the bundle filename and transform it to match Xcode's transformation. - Module name has to be a valid "C99 extended identifier". - */ - internal var moduleName: String { - let fileName = bundleURL.fileName as NSString - return fileName.c99ExtendedIdentifier - } -} - -#endif diff --git a/Demo/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift b/Demo/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift deleted file mode 100644 index 8d67d8d..0000000 --- a/Demo/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift +++ /dev/null @@ -1,49 +0,0 @@ -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) -import Foundation - -extension NSString { - private static var invalidCharacters: CharacterSet = { - var invalidCharacters = CharacterSet() - - let invalidCharacterSets: [CharacterSet] = [ - .whitespacesAndNewlines, - .illegalCharacters, - .controlCharacters, - .punctuationCharacters, - .nonBaseCharacters, - .symbols - ] - - for invalidSet in invalidCharacterSets { - invalidCharacters.formUnion(invalidSet) - } - - return invalidCharacters - }() - - /// This API is not meant to be used outside Quick, so will be unavaialbe in - /// a next major version. - @objc(qck_c99ExtendedIdentifier) - public var c99ExtendedIdentifier: String { - let validComponents = components(separatedBy: NSString.invalidCharacters) - let result = validComponents.joined(separator: "_") - - return result.isEmpty ? "_" : result - } -} - -/// Extension methods or properties for NSObject subclasses are invisible from -/// the Objective-C runtime on static linking unless the consumers add `-ObjC` -/// linker flag, so let's make a wrapper class to mitigate that situation. -/// -/// See: https://github.com/Quick/Quick/issues/785 and https://github.com/Quick/Quick/pull/803 -@objc -class QCKObjCStringUtils: NSObject { - override private init() {} - - @objc - static func c99ExtendedIdentifier(from string: String) -> String { - return string.c99ExtendedIdentifier - } -} -#endif diff --git a/Demo/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift b/Demo/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift deleted file mode 100644 index 415b680..0000000 --- a/Demo/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift +++ /dev/null @@ -1,74 +0,0 @@ -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) -import Foundation - -/** - Responsible for building a "Selected tests" suite. This corresponds to a single - spec, and all its examples. - */ -internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { - - /** - The test spec class to run. - */ - let testCaseClass: AnyClass! - - /** - For Objective-C classes, returns the class name. For Swift classes without, - an explicit Objective-C name, returns a module-namespaced class name - (e.g., "FooTests.FooSpec"). - */ - var testSuiteClassName: String { - return NSStringFromClass(testCaseClass) - } - - /** - Given a test case name: - - FooSpec/testFoo - - Optionally constructs a test suite builder for the named test case class - in the running test bundle. - - If no test bundle can be found, or the test case class can't be found, - initialization fails and returns `nil`. - */ - init?(forTestCaseWithName name: String) { - guard let testCaseClass = testCaseClassForTestCaseWithName(name) else { - self.testCaseClass = nil - return nil - } - - self.testCaseClass = testCaseClass - } - - /** - Returns a `QuickTestSuite` that runs the associated test case class. - */ - func buildTestSuite() -> QuickTestSuite { - return QuickTestSuite(forTestCaseClass: testCaseClass) - } - -} - -/** - Searches `Bundle.allBundles()` for an xctest bundle, then looks up the named - test case class in that bundle. - - Returns `nil` if a bundle or test case class cannot be found. - */ -private func testCaseClassForTestCaseWithName(_ name: String) -> AnyClass? { - func extractClassName(_ name: String) -> String? { - return name.components(separatedBy: "/").first - } - - guard let className = extractClassName(name) else { return nil } - guard let bundle = Bundle.currentTestBundle else { return nil } - - if let testCaseClass = bundle.classNamed(className) { return testCaseClass } - - let moduleName = bundle.moduleName - - return NSClassFromString("\(moduleName).\(className)") -} - -#endif diff --git a/Demo/Pods/Quick/Sources/Quick/QuickTestSuite.swift b/Demo/Pods/Quick/Sources/Quick/QuickTestSuite.swift deleted file mode 100644 index 0fe76a7..0000000 --- a/Demo/Pods/Quick/Sources/Quick/QuickTestSuite.swift +++ /dev/null @@ -1,52 +0,0 @@ -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - -import XCTest - -/** - This protocol defines the role of an object that builds test suites. - */ -internal protocol QuickTestSuiteBuilder { - - /** - Construct a `QuickTestSuite` instance with the appropriate test cases added as tests. - - Subsequent calls to this method should return equivalent test suites. - */ - func buildTestSuite() -> QuickTestSuite - -} - -/** - A base class for a class cluster of Quick test suites, that should correctly - build dynamic test suites for XCTest to execute. - */ -public class QuickTestSuite: XCTestSuite { - - private static var builtTestSuites: Set = Set() - - /** - Construct a test suite for a specific, selected subset of test cases (rather - than the default, which as all test cases). - - If this method is called multiple times for the same test case class, e.g.. - - FooSpec/testFoo - FooSpec/testBar - - It is expected that the first call should return a valid test suite, and - all subsequent calls should return `nil`. - */ - @objc - public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { - guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } - - let (inserted, _) = builtTestSuites.insert(builder.testSuiteClassName) - if inserted { - return builder.buildTestSuite() - } else { - return nil - } - } -} - -#endif diff --git a/Demo/Pods/Quick/Sources/Quick/URL+FileName.swift b/Demo/Pods/Quick/Sources/Quick/URL+FileName.swift deleted file mode 100644 index 23c4781..0000000 --- a/Demo/Pods/Quick/Sources/Quick/URL+FileName.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension URL { - - /** - Returns the path file name without file extension. - */ - var fileName: String { - return self.deletingPathExtension().lastPathComponent - } - -} diff --git a/Demo/Pods/Quick/Sources/Quick/World.swift b/Demo/Pods/Quick/Sources/Quick/World.swift deleted file mode 100644 index 59ea7e6..0000000 --- a/Demo/Pods/Quick/Sources/Quick/World.swift +++ /dev/null @@ -1,247 +0,0 @@ -import Foundation - -/** - A closure that, when evaluated, returns a dictionary of key-value - pairs that can be accessed from within a group of shared examples. -*/ -public typealias SharedExampleContext = () -> [String: Any] - -/** - A closure that is used to define a group of shared examples. This - closure may contain any number of example and example groups. -*/ -public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> Void - -// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` -// does not work as expected. -#if swift(>=3.2) - #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE - @objcMembers - internal class _WorldBase: NSObject {} - #else - internal class _WorldBase: NSObject {} - #endif -#else -internal class _WorldBase: NSObject {} -#endif - -/** - A collection of state Quick builds up in order to work its magic. - World is primarily responsible for maintaining a mapping of QuickSpec - classes to root example groups for those classes. - - It also maintains a mapping of shared example names to shared - example closures. - - You may configure how Quick behaves by calling the -[World configure:] - method from within an overridden +[QuickConfiguration configure:] method. -*/ -final internal class World: _WorldBase { - /** - The example group that is currently being run. - The DSL requires that this group is correctly set in order to build a - correct hierarchy of example groups and their examples. - */ - internal var currentExampleGroup: ExampleGroup! - - /** - The example metadata of the test that is currently being run. - This is useful for using the Quick test metadata (like its name) at - runtime. - */ - - internal var currentExampleMetadata: ExampleMetadata? - - /** - A flag that indicates whether additional test suites are being run - within this test suite. This is only true within the context of Quick - functional tests. - */ -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - // Convention of generating Objective-C selector has been changed on Swift 3 - @objc(isRunningAdditionalSuites) - internal var isRunningAdditionalSuites = false -#else - internal var isRunningAdditionalSuites = false -#endif - - private var specs: [String: ExampleGroup] = [:] - private var sharedExamples: [String: SharedExampleClosure] = [:] - private let configuration = Configuration() - - internal private(set) var isConfigurationFinalized = false - - internal var exampleHooks: ExampleHooks {return configuration.exampleHooks } - internal var suiteHooks: SuiteHooks { return configuration.suiteHooks } - - // MARK: Singleton Constructor - - private override init() {} - - static let sharedWorld = World() - - // MARK: Public Interface - - /** - Exposes the World's Configuration object within the scope of the closure - so that it may be configured. This method must not be called outside of - an overridden +[QuickConfiguration configure:] method. - - - parameter closure: A closure that takes a Configuration object that can - be mutated to change Quick's behavior. - */ - internal func configure(_ closure: QuickConfigurer) { - assert(!isConfigurationFinalized, - "Quick cannot be configured outside of a +[QuickConfiguration configure:] method. You should not call -[World configure:] directly. Instead, subclass QuickConfiguration and override the +[QuickConfiguration configure:] method.") - closure(configuration) - } - - /** - Finalizes the World's configuration. - Any subsequent calls to World.configure() will raise. - */ - internal func finalizeConfiguration() { - isConfigurationFinalized = true - } - - /** - Returns an internally constructed root example group for the given - QuickSpec class. - - A root example group with the description "root example group" is lazily - initialized for each QuickSpec class. This root example group wraps the - top level of a -[QuickSpec spec] method--it's thanks to this group that - users can define beforeEach and it closures at the top level, like so: - - override func spec() { - // These belong to the root example group - beforeEach {} - it("is at the top level") {} - } - - - parameter cls: The QuickSpec class for which to retrieve the root example group. - - returns: The root example group for the class. - */ - internal func rootExampleGroupForSpecClass(_ cls: AnyClass) -> ExampleGroup { - let name = String(describing: cls) - - if let group = specs[name] { - return group - } else { - let group = ExampleGroup( - description: "root example group", - flags: [:], - isInternalRootExampleGroup: true - ) - specs[name] = group - return group - } - } - - /** - Returns all examples that should be run for a given spec class. - There are two filtering passes that occur when determining which examples should be run. - That is, these examples are the ones that are included by inclusion filters, and are - not excluded by exclusion filters. - - - parameter specClass: The QuickSpec subclass for which examples are to be returned. - - returns: A list of examples to be run as test invocations. - */ - internal func examples(_ specClass: AnyClass) -> [Example] { - // 1. Grab all included examples. - let included = includedExamples - // 2. Grab the intersection of (a) examples for this spec, and (b) included examples. - let spec = rootExampleGroupForSpecClass(specClass).examples.filter { included.contains($0) } - // 3. Remove all excluded examples. - return spec.filter { example in - !self.configuration.exclusionFilters.reduce(false) { $0 || $1(example) } - } - } - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - @objc(examplesForSpecClass:) - internal func objc_examples(_ specClass: AnyClass) -> [Example] { - return examples(specClass) - } -#endif - - // MARK: Internal - - internal func registerSharedExample(_ name: String, closure: @escaping SharedExampleClosure) { - raiseIfSharedExampleAlreadyRegistered(name) - sharedExamples[name] = closure - } - - internal func sharedExample(_ name: String) -> SharedExampleClosure { - raiseIfSharedExampleNotRegistered(name) - return sharedExamples[name]! - } - - internal var includedExampleCount: Int { - return includedExamples.count - } - - internal var beforesCurrentlyExecuting: Bool { - let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting - let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting - var groupBeforesExecuting = false - if let runningExampleGroup = currentExampleMetadata?.example.group { - groupBeforesExecuting = runningExampleGroup.phase == .beforesExecuting - } - - return suiteBeforesExecuting || exampleBeforesExecuting || groupBeforesExecuting - } - - internal var aftersCurrentlyExecuting: Bool { - let suiteAftersExecuting = suiteHooks.phase == .aftersExecuting - let exampleAftersExecuting = exampleHooks.phase == .aftersExecuting - var groupAftersExecuting = false - if let runningExampleGroup = currentExampleMetadata?.example.group { - groupAftersExecuting = runningExampleGroup.phase == .aftersExecuting - } - - return suiteAftersExecuting || exampleAftersExecuting || groupAftersExecuting - } - - internal func performWithCurrentExampleGroup(_ group: ExampleGroup, closure: () -> Void) { - let previousExampleGroup = currentExampleGroup - currentExampleGroup = group - - closure() - - currentExampleGroup = previousExampleGroup - } - - private var allExamples: [Example] { - var all: [Example] = [] - for (_, group) in specs { - group.walkDownExamples { all.append($0) } - } - return all - } - - private var includedExamples: [Example] { - let all = allExamples - let included = all.filter { example in - return self.configuration.inclusionFilters.reduce(false) { $0 || $1(example) } - } - - if included.isEmpty && configuration.runAllWhenEverythingFiltered { - return all - } else { - return included - } - } - - private func raiseIfSharedExampleAlreadyRegistered(_ name: String) { - if sharedExamples[name] != nil { - raiseError("A shared example named '\(name)' has already been registered.") - } - } - - private func raiseIfSharedExampleNotRegistered(_ name: String) { - if sharedExamples[name] == nil { - raiseError("No shared example named '\(name)' has been registered. Registered shared examples: '\(Array(sharedExamples.keys))'") - } - } -} diff --git a/Demo/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h b/Demo/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h deleted file mode 100644 index 5646199..0000000 --- a/Demo/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h +++ /dev/null @@ -1,30 +0,0 @@ -#import - -@class Configuration; - -/** - Subclass QuickConfiguration and override the +[QuickConfiguration configure:] - method in order to configure how Quick behaves when running specs, or to define - shared examples that are used across spec files. - */ -@interface QuickConfiguration : NSObject - -/** - This method is executed on each subclass of this class before Quick runs - any examples. You may override this method on as many subclasses as you like, but - there is no guarantee as to the order in which these methods are executed. - - You can override this method in order to: - - 1. Configure how Quick behaves, by modifying properties on the Configuration object. - Setting the same properties in several methods has undefined behavior. - - 2. Define shared examples using `sharedExamples`. - - @param configuration A mutable object that is used to configure how Quick behaves on - a framework level. For details on all the options, see the - documentation in Configuration.swift. - */ -+ (void)configure:(Configuration *)configuration; - -@end diff --git a/Demo/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m b/Demo/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m deleted file mode 100644 index 17beaa7..0000000 --- a/Demo/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m +++ /dev/null @@ -1,88 +0,0 @@ -#import "QuickConfiguration.h" -#import - -#if __has_include("Quick-Swift.h") -#import "Quick-Swift.h" -#else -#import -#endif - -typedef void (^QCKClassEnumerationBlock)(Class klass); - -/** - Finds all direct subclasses of the given class and passes them to the block provided. - The classes are iterated over in the order that objc_getClassList returns them. - - @param klass The base class to find subclasses of. - @param block A block that takes a Class. This block will be executed once for each subclass of klass. - */ -void qck_enumerateSubclasses(Class klass, QCKClassEnumerationBlock block) { - Class *classes = NULL; - int classesCount = objc_getClassList(NULL, 0); - - if (classesCount > 0) { - classes = (Class *)calloc(sizeof(Class), classesCount); - classesCount = objc_getClassList(classes, classesCount); - - Class subclass, superclass; - for(int i = 0; i < classesCount; i++) { - subclass = classes[i]; - superclass = class_getSuperclass(subclass); - if (superclass == klass && block) { - block(subclass); - } - } - - free(classes); - } -} - -@implementation QuickConfiguration - -#pragma mark - Object Lifecycle - -/** - QuickConfiguration is not meant to be instantiated; it merely provides a hook - for users to configure how Quick behaves. Raise an exception if an instance of - QuickConfiguration is created. - */ -- (instancetype)init { - NSString *className = NSStringFromClass([self class]); - NSString *selectorName = NSStringFromSelector(@selector(configure:)); - [NSException raise:NSInternalInconsistencyException - format:@"%@ is not meant to be instantiated; " - @"subclass %@ and override %@ to configure Quick.", - className, className, selectorName]; - return nil; -} - -#pragma mark - NSObject Overrides - -/** - Hook into when QuickConfiguration is initialized in the runtime in order to - call +[QuickConfiguration configure:] on each of its subclasses. - */ -+ (void)initialize { - // Only enumerate over the subclasses of QuickConfiguration, not any of its subclasses. - if ([self class] == [QuickConfiguration class]) { - - // Only enumerate over subclasses once, even if +[QuickConfiguration initialize] - // were to be called several times. This is necessary because +[QuickSpec initialize] - // manually calls +[QuickConfiguration initialize]. - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - qck_enumerateSubclasses([QuickConfiguration class], ^(__unsafe_unretained Class klass) { - [[World sharedWorld] configure:^(Configuration *configuration) { - [klass configure:configuration]; - }]; - }); - [[World sharedWorld] finalizeConfiguration]; - }); - } -} - -#pragma mark - Public Interface - -+ (void)configure:(Configuration *)configuration { } - -@end diff --git a/Demo/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h b/Demo/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h deleted file mode 100644 index c5f3152..0000000 --- a/Demo/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h +++ /dev/null @@ -1,234 +0,0 @@ -#import - -@class ExampleMetadata; - -/** - Provides a hook for Quick to be configured before any examples are run. - Within this scope, override the +[QuickConfiguration configure:] method - to set properties on a configuration object to customize Quick behavior. - For details, see the documentation for Configuraiton.swift. - - @param name The name of the configuration class. Like any Objective-C - class name, this must be unique to the current runtime - environment. - */ -#define QuickConfigurationBegin(name) \ - @interface name : QuickConfiguration; @end \ - @implementation name \ - - -/** - Marks the end of a Quick configuration. - Make sure you put this after `QuickConfigurationBegin`. - */ -#define QuickConfigurationEnd \ - @end \ - - -/** - Defines a new QuickSpec. Define examples and example groups within the space - between this and `QuickSpecEnd`. - - @param name The name of the spec class. Like any Objective-C class name, this - must be unique to the current runtime environment. - */ -#define QuickSpecBegin(name) \ - @interface name : QuickSpec; @end \ - @implementation name \ - - (void)spec { \ - - -/** - Marks the end of a QuickSpec. Make sure you put this after `QuickSpecBegin`. - */ -#define QuickSpecEnd \ - } \ - @end \ - -typedef NSDictionary *(^QCKDSLSharedExampleContext)(void); -typedef void (^QCKDSLSharedExampleBlock)(QCKDSLSharedExampleContext); -typedef void (^QCKDSLEmptyBlock)(void); -typedef void (^QCKDSLExampleMetadataBlock)(ExampleMetadata *exampleMetadata); - -#define QUICK_EXPORT FOUNDATION_EXPORT - -QUICK_EXPORT void qck_beforeSuite(QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_afterSuite(QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure); -QUICK_EXPORT void qck_describe(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_context(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_beforeEach(QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure); -QUICK_EXPORT void qck_afterEach(QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure); -QUICK_EXPORT void qck_pending(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure); -QUICK_EXPORT void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure); - -#ifndef QUICK_DISABLE_SHORT_SYNTAX -/** - Defines a closure to be run prior to any examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. - - If the test suite crashes before the first example is run, this closure - will not be executed. - - @param closure The closure to be run prior to any examples in the test suite. - */ -static inline void beforeSuite(QCKDSLEmptyBlock closure) { - qck_beforeSuite(closure); -} - - -/** - Defines a closure to be run after all of the examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. - - If the test suite crashes before all examples are run, this closure - will not be executed. - - @param closure The closure to be run after all of the examples in the test suite. - */ -static inline void afterSuite(QCKDSLEmptyBlock closure) { - qck_afterSuite(closure); -} - -/** - Defines a group of shared examples. These examples can be re-used in several locations - by using the `itBehavesLike` function. - - @param name The name of the shared example group. This must be unique across all shared example - groups defined in a test suite. - @param closure A closure containing the examples. This behaves just like an example group defined - using `describe` or `context`--the closure may contain any number of `beforeEach` - and `afterEach` closures, as well as any number of examples (defined using `it`). - */ -static inline void sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure) { - qck_sharedExamples(name, closure); -} - -/** - Defines an example group. Example groups are logical groupings of examples. - Example groups can share setup and teardown code. - - @param description An arbitrary string describing the example group. - @param closure A closure that can contain other examples. - */ -static inline void describe(NSString *description, QCKDSLEmptyBlock closure) { - qck_describe(description, closure); -} - -/** - Defines an example group. Equivalent to `describe`. - */ -static inline void context(NSString *description, QCKDSLEmptyBlock closure) { - qck_context(description, closure); -} - -/** - Defines a closure to be run prior to each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of beforeEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - @param closure The closure to be run prior to each example. - */ -static inline void beforeEach(QCKDSLEmptyBlock closure) { - qck_beforeEach(closure); -} - -/** - Identical to QCKDSL.beforeEach, except the closure is provided with - metadata on the example that the closure is being run prior to. - */ -static inline void beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure) { - qck_beforeEachWithMetadata(closure); -} - -/** - Defines a closure to be run after each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of afterEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - @param closure The closure to be run after each example. - */ -static inline void afterEach(QCKDSLEmptyBlock closure) { - qck_afterEach(closure); -} - -/** - Identical to QCKDSL.afterEach, except the closure is provided with - metadata on the example that the closure is being run after. - */ -static inline void afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { - qck_afterEachWithMetadata(closure); -} - -/** - Defines an example or example group that should not be executed. Use `pending` to temporarily disable - examples or groups that should not be run yet. - - @param description An arbitrary string describing the example or example group. - @param closure A closure that will not be evaluated. - */ -static inline void pending(NSString *description, QCKDSLEmptyBlock closure) { - qck_pending(description, closure); -} - -/** - Use this to quickly mark a `describe` block as pending. - This disables all examples within the block. - */ -static inline void xdescribe(NSString *description, QCKDSLEmptyBlock closure) { - qck_xdescribe(description, closure); -} - -/** - Use this to quickly mark a `context` block as pending. - This disables all examples within the block. - */ -static inline void xcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_xcontext(description, closure); -} - -/** - Use this to quickly focus a `describe` block, focusing the examples in the block. - If any examples in the test suite are focused, only those examples are executed. - This trumps any explicitly focused or unfocused examples within the block--they are all treated as focused. - */ -static inline void fdescribe(NSString *description, QCKDSLEmptyBlock closure) { - qck_fdescribe(description, closure); -} - -/** - Use this to quickly focus a `context` block. Equivalent to `fdescribe`. - */ -static inline void fcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_fcontext(description, closure); -} - -#define it qck_it -#define xit qck_xit -#define fit qck_fit -#define itBehavesLike qck_itBehavesLike -#define xitBehavesLike qck_xitBehavesLike -#define fitBehavesLike qck_fitBehavesLike -#endif - -#define qck_it qck_it_builder(@{}, @(__FILE__), __LINE__) -#define qck_xit qck_it_builder(@{Filter.pending: @YES}, @(__FILE__), __LINE__) -#define qck_fit qck_it_builder(@{Filter.focused: @YES}, @(__FILE__), __LINE__) -#define qck_itBehavesLike qck_itBehavesLike_builder(@{}, @(__FILE__), __LINE__) -#define qck_xitBehavesLike qck_itBehavesLike_builder(@{Filter.pending: @YES}, @(__FILE__), __LINE__) -#define qck_fitBehavesLike qck_itBehavesLike_builder(@{Filter.focused: @YES}, @(__FILE__), __LINE__) - -typedef void (^QCKItBlock)(NSString *description, QCKDSLEmptyBlock closure); -typedef void (^QCKItBehavesLikeBlock)(NSString *description, QCKDSLSharedExampleContext context); - -QUICK_EXPORT QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line); -QUICK_EXPORT QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line); diff --git a/Demo/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m b/Demo/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m deleted file mode 100644 index 624832e..0000000 --- a/Demo/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m +++ /dev/null @@ -1,83 +0,0 @@ -#import "QCKDSL.h" - -#if __has_include("Quick-Swift.h") -#import "Quick-Swift.h" -#else -#import -#endif - -void qck_beforeSuite(QCKDSLEmptyBlock closure) { - [[World sharedWorld] beforeSuite:closure]; -} - -void qck_afterSuite(QCKDSLEmptyBlock closure) { - [[World sharedWorld] afterSuite:closure]; -} - -void qck_sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure) { - [[World sharedWorld] sharedExamples:name closure:closure]; -} - -void qck_describe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] describe:description flags:@{} closure:closure]; -} - -void qck_context(NSString *description, QCKDSLEmptyBlock closure) { - qck_describe(description, closure); -} - -void qck_beforeEach(QCKDSLEmptyBlock closure) { - [[World sharedWorld] beforeEach:closure]; -} - -void qck_beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure) { - [[World sharedWorld] beforeEachWithMetadata:closure]; -} - -void qck_afterEach(QCKDSLEmptyBlock closure) { - [[World sharedWorld] afterEach:closure]; -} - -void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { - [[World sharedWorld] afterEachWithMetadata:closure]; -} - -QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line) { - return ^(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] itWithDescription:description - flags:flags - file:file - line:line - closure:closure]; - }; -} - -QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line) { - return ^(NSString *name, QCKDSLSharedExampleContext context) { - [[World sharedWorld] itBehavesLikeSharedExampleNamed:name - sharedExampleContext:context - flags:flags - file:file - line:line]; - }; -} - -void qck_pending(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] pending:description closure:closure]; -} - -void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] xdescribe:description flags:@{} closure:closure]; -} - -void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_xdescribe(description, closure); -} - -void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] fdescribe:description flags:@{} closure:closure]; -} - -void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_fdescribe(description, closure); -} diff --git a/Demo/Pods/Quick/Sources/QuickObjectiveC/Quick.h b/Demo/Pods/Quick/Sources/QuickObjectiveC/Quick.h deleted file mode 100644 index 87dad10..0000000 --- a/Demo/Pods/Quick/Sources/QuickObjectiveC/Quick.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -//! Project version number for Quick. -FOUNDATION_EXPORT double QuickVersionNumber; - -//! Project version string for Quick. -FOUNDATION_EXPORT const unsigned char QuickVersionString[]; - -#import "QuickSpec.h" -#import "QCKDSL.h" -#import "QuickConfiguration.h" diff --git a/Demo/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h b/Demo/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h deleted file mode 100644 index 21bc772..0000000 --- a/Demo/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h +++ /dev/null @@ -1,56 +0,0 @@ -#import - -/** - QuickSpec is a base class all specs written in Quick inherit from. - They need to inherit from QuickSpec, a subclass of XCTestCase, in - order to be discovered by the XCTest framework. - - XCTest automatically compiles a list of XCTestCase subclasses included - in the test target. It iterates over each class in that list, and creates - a new instance of that class for each test method. It then creates an - "invocation" to execute that test method. The invocation is an instance of - NSInvocation, which represents a single message send in Objective-C. - The invocation is set on the XCTestCase instance, and the test is run. - - Most of the code in QuickSpec is dedicated to hooking into XCTest events. - First, when the spec is first loaded and before it is sent any messages, - the +[NSObject initialize] method is called. QuickSpec overrides this method - to call +[QuickSpec spec]. This builds the example group stacks and - registers them with Quick.World, a global register of examples. - - Then, XCTest queries QuickSpec for a list of test methods. Normally, XCTest - automatically finds all methods whose selectors begin with the string "test". - However, QuickSpec overrides this default behavior by implementing the - +[XCTestCase testInvocations] method. This method iterates over each example - registered in Quick.World, defines a new method for that example, and - returns an invocation to call that method to XCTest. Those invocations are - the tests that are run by XCTest. Their selector names are displayed in - the Xcode test navigation bar. - */ -@interface QuickSpec : XCTestCase - -/** - Override this method in your spec to define a set of example groups - and examples. - - @code - override func spec() { - describe("winter") { - it("is coming") { - // ... - } - } - } - @endcode - - See DSL.swift for more information on what syntax is available. - */ -- (void)spec; - -/** - Returns the currently executing spec. Use in specs that require XCTestCase - methds, e.g. expectationWithDescription. -*/ -@property (class, nonatomic, readonly) QuickSpec *current; - -@end diff --git a/Demo/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m b/Demo/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m deleted file mode 100644 index ed70d35..0000000 --- a/Demo/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m +++ /dev/null @@ -1,149 +0,0 @@ -#import "QuickSpec.h" -#import "QuickConfiguration.h" - -#if __has_include("Quick-Swift.h") -#import "Quick-Swift.h" -#else -#import -#endif - -static QuickSpec *currentSpec = nil; - -@interface QuickSpec () -@property (nonatomic, strong) Example *example; -@end - -@implementation QuickSpec - -#pragma mark - XCTestCase Overrides - -/** - The runtime sends initialize to each class in a program just before the class, or any class - that inherits from it, is sent its first message from within the program. QuickSpec hooks into - this event to compile the example groups for this spec subclass. - - If an exception occurs when compiling the examples, report it to the user. Chances are they - included an expectation outside of a "it", "describe", or "context" block. - */ -+ (void)initialize { - [QuickConfiguration initialize]; - - World *world = [World sharedWorld]; - [world performWithCurrentExampleGroup:[world rootExampleGroupForSpecClass:self] closure:^{ - QuickSpec *spec = [self new]; - - @try { - [spec spec]; - } - @catch (NSException *exception) { - [NSException raise:NSInternalInconsistencyException - format:@"An exception occurred when building Quick's example groups.\n" - @"Some possible reasons this might happen include:\n\n" - @"- An 'expect(...).to' expectation was evaluated outside of " - @"an 'it', 'context', or 'describe' block\n" - @"- 'sharedExamples' was called twice with the same name\n" - @"- 'itBehavesLike' was called with a name that is not registered as a shared example\n\n" - @"Here's the original exception: '%@', reason: '%@', userInfo: '%@'", - exception.name, exception.reason, exception.userInfo]; - } - [self testInvocations]; - }]; -} - -/** - Invocations for each test method in the test case. QuickSpec overrides this method to define a - new method for each example defined in +[QuickSpec spec]. - - @return An array of invocations that execute the newly defined example methods. - */ -+ (NSArray *)testInvocations { - NSArray *examples = [[World sharedWorld] examplesForSpecClass:[self class]]; - NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:[examples count]]; - - NSMutableSet *selectorNames = [NSMutableSet set]; - - for (Example *example in examples) { - SEL selector = [self addInstanceMethodForExample:example classSelectorNames:selectorNames]; - - NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - invocation.selector = selector; - - [invocations addObject:invocation]; - } - - return invocations; -} - -#pragma mark - Public Interface - -- (void)spec { } - -+ (QuickSpec*) current { - return currentSpec; -} - -#pragma mark - Internal Methods - -/** - QuickSpec uses this method to dynamically define a new instance method for the - given example. The instance method runs the example, catching any exceptions. - The exceptions are then reported as test failures. - - In order to report the correct file and line number, examples must raise exceptions - containing following keys in their userInfo: - - - "SenTestFilenameKey": A String representing the file name - - "SenTestLineNumberKey": An Int representing the line number - - These keys used to be used by SenTestingKit, and are still used by some testing tools - in the wild. See: https://github.com/Quick/Quick/pull/41 - - @return The selector of the newly defined instance method. - */ -+ (SEL)addInstanceMethodForExample:(Example *)example classSelectorNames:(NSMutableSet *)selectorNames { - IMP implementation = imp_implementationWithBlock(^(QuickSpec *self){ - self.example = example; - currentSpec = self; - [example run]; - }); - - const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(void), @encode(id), @encode(SEL)] UTF8String]; - - NSString *originalName = [QCKObjCStringUtils c99ExtendedIdentifierFrom:example.name]; - NSString *selectorName = originalName; - NSUInteger i = 2; - - while ([selectorNames containsObject:selectorName]) { - selectorName = [NSString stringWithFormat:@"%@_%tu", originalName, i++]; - } - - [selectorNames addObject:selectorName]; - - SEL selector = NSSelectorFromString(selectorName); - class_addMethod(self, selector, implementation, types); - - return selector; -} - -/** - This method is used to record failures, whether they represent example - expectations that were not met, or exceptions raised during test setup - and teardown. By default, the failure will be reported as an - XCTest failure, and the example will be highlighted in Xcode. - */ -- (void)recordFailureWithDescription:(NSString *)description - inFile:(NSString *)filePath - atLine:(NSUInteger)lineNumber - expected:(BOOL)expected { - if (self.example.isSharedExample) { - filePath = self.example.callsite.file; - lineNumber = self.example.callsite.line; - } - [currentSpec.testRun recordFailureWithDescription:description - inFile:filePath - atLine:lineNumber - expected:expected]; -} - -@end diff --git a/Demo/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m b/Demo/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m deleted file mode 100644 index ae63036..0000000 --- a/Demo/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m +++ /dev/null @@ -1,45 +0,0 @@ -#import -#import - -#if __has_include("Quick-Swift.h") -#import "Quick-Swift.h" -#else -#import -#endif - -@interface XCTestSuite (QuickTestSuiteBuilder) -@end - -@implementation XCTestSuite (QuickTestSuiteBuilder) - -/** - In order to ensure we can correctly build dynamic test suites, we need to - replace some of the default test suite constructors. - */ -+ (void)load { - Method testCaseWithName = class_getClassMethod(self, @selector(testSuiteForTestCaseWithName:)); - Method hooked_testCaseWithName = class_getClassMethod(self, @selector(qck_hooked_testSuiteForTestCaseWithName:)); - method_exchangeImplementations(testCaseWithName, hooked_testCaseWithName); -} - -/** - The `+testSuiteForTestCaseWithName:` method is called when a specific test case - class is run from the Xcode test navigator. If the built test suite is `nil`, - Xcode will not run any tests for that test case. - - Given if the following test case class is run from the Xcode test navigator: - - FooSpec - testFoo - testBar - - XCTest will invoke this once per test case, with test case names following this format: - - FooSpec/testFoo - FooSpec/testBar - */ -+ (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name { - return [QuickTestSuite selectedTestSuiteForTestCaseWithName:name]; -} - -@end diff --git a/Demo/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m b/Demo/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m deleted file mode 100644 index 10b6f7e..0000000 --- a/Demo/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m +++ /dev/null @@ -1,55 +0,0 @@ -#import "QuickSpecBase.h" - -#pragma mark - _QuickSelectorWrapper - -@interface _QuickSelectorWrapper () -@property(nonatomic, assign) SEL selector; -@end - -@implementation _QuickSelectorWrapper - -- (instancetype)initWithSelector:(SEL)selector { - self = [super init]; - _selector = selector; - return self; -} - -@end - - -#pragma mark - _QuickSpecBase - -@implementation _QuickSpecBase - -- (instancetype)init { - self = [super initWithInvocation: nil]; - return self; -} - -/** - Invocations for each test method in the test case. QuickSpec overrides this method to define a - new method for each example defined in +[QuickSpec spec]. - - @return An array of invocations that execute the newly defined example methods. - */ -+ (NSArray *)testInvocations { - NSArray<_QuickSelectorWrapper *> *wrappers = [self _qck_testMethodSelectors]; - NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:wrappers.count]; - - for (_QuickSelectorWrapper *wrapper in wrappers) { - SEL selector = wrapper.selector; - NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - invocation.selector = selector; - - [invocations addObject:invocation]; - } - - return invocations; -} - -+ (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors { - return @[]; -} - -@end diff --git a/Demo/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h b/Demo/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h deleted file mode 100644 index 8881ca0..0000000 --- a/Demo/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import - -@interface _QuickSelectorWrapper : NSObject -- (instancetype)initWithSelector:(SEL)selector; -@end - -@interface _QuickSpecBase : XCTestCase -+ (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors; -- (instancetype)init NS_DESIGNATED_INITIALIZER; -@end diff --git a/Demo/Pods/RxSwift/LICENSE.md b/Demo/Pods/RxSwift/LICENSE.md deleted file mode 100644 index d6765d9..0000000 --- a/Demo/Pods/RxSwift/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -**The MIT License** -**Copyright © 2015 Krunoslav Zaher** -**All rights reserved.** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Demo/Pods/RxSwift/Platform/DataStructures/Bag.swift b/Demo/Pods/RxSwift/Platform/DataStructures/Bag.swift deleted file mode 100644 index 22d82d5..0000000 --- a/Demo/Pods/RxSwift/Platform/DataStructures/Bag.swift +++ /dev/null @@ -1,183 +0,0 @@ -// -// Bag.swift -// Platform -// -// Created by Krunoslav Zaher on 2/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Swift - -let arrayDictionaryMaxSize = 30 - -struct BagKey { - /** - Unique identifier for object added to `Bag`. - - It's underlying type is UInt64. If we assume there in an idealized CPU that works at 4GHz, - it would take ~150 years of continuous running time for it to overflow. - */ - fileprivate let rawValue: UInt64 -} - -/** -Data structure that represents a bag of elements typed `T`. - -Single element can be stored multiple times. - -Time and space complexity of insertion and deletion is O(n). - -It is suitable for storing small number of elements. -*/ -struct Bag : CustomDebugStringConvertible { - /// Type of identifier for inserted elements. - typealias KeyType = BagKey - - typealias Entry = (key: BagKey, value: T) - - fileprivate var _nextKey: BagKey = BagKey(rawValue: 0) - - // data - - // first fill inline variables - var _key0: BagKey? = nil - var _value0: T? = nil - - // then fill "array dictionary" - var _pairs = ContiguousArray() - - // last is sparse dictionary - var _dictionary: [BagKey : T]? = nil - - var _onlyFastPath = true - - /// Creates new empty `Bag`. - init() { - } - - /** - Inserts `value` into bag. - - - parameter element: Element to insert. - - returns: Key that can be used to remove element from bag. - */ - mutating func insert(_ element: T) -> BagKey { - let key = _nextKey - - _nextKey = BagKey(rawValue: _nextKey.rawValue &+ 1) - - if _key0 == nil { - _key0 = key - _value0 = element - return key - } - - _onlyFastPath = false - - if _dictionary != nil { - _dictionary![key] = element - return key - } - - if _pairs.count < arrayDictionaryMaxSize { - _pairs.append((key: key, value: element)) - return key - } - - _dictionary = [key: element] - - return key - } - - /// - returns: Number of elements in bag. - var count: Int { - let dictionaryCount: Int = _dictionary?.count ?? 0 - return (_value0 != nil ? 1 : 0) + _pairs.count + dictionaryCount - } - - /// Removes all elements from bag and clears capacity. - mutating func removeAll() { - _key0 = nil - _value0 = nil - - _pairs.removeAll(keepingCapacity: false) - _dictionary?.removeAll(keepingCapacity: false) - } - - /** - Removes element with a specific `key` from bag. - - - parameter key: Key that identifies element to remove from bag. - - returns: Element that bag contained, or nil in case element was already removed. - */ - mutating func removeKey(_ key: BagKey) -> T? { - if _key0 == key { - _key0 = nil - let value = _value0! - _value0 = nil - return value - } - - if let existingObject = _dictionary?.removeValue(forKey: key) { - return existingObject - } - - for i in 0 ..< _pairs.count { - if _pairs[i].key == key { - let value = _pairs[i].value - _pairs.remove(at: i) - return value - } - } - - return nil - } -} - -extension Bag { - /// A textual representation of `self`, suitable for debugging. - var debugDescription : String { - return "\(self.count) elements in Bag" - } -} - -extension Bag { - /// Enumerates elements inside the bag. - /// - /// - parameter action: Enumeration closure. - func forEach(_ action: (T) -> Void) { - if _onlyFastPath { - if let value0 = _value0 { - action(value0) - } - return - } - - let value0 = _value0 - let dictionary = _dictionary - - if let value0 = value0 { - action(value0) - } - - for i in 0 ..< _pairs.count { - action(_pairs[i].value) - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - action(element) - } - } - } -} - -extension BagKey: Hashable { - var hashValue: Int { - return rawValue.hashValue - } -} - -func ==(lhs: BagKey, rhs: BagKey) -> Bool { - return lhs.rawValue == rhs.rawValue -} diff --git a/Demo/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift b/Demo/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift deleted file mode 100644 index 5a573a0..0000000 --- a/Demo/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// InfiniteSequence.swift -// Platform -// -// Created by Krunoslav Zaher on 6/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Sequence that repeats `repeatedValue` infinite number of times. -struct InfiniteSequence : Sequence { - typealias Element = E - typealias Iterator = AnyIterator - - private let _repeatedValue: E - - init(repeatedValue: E) { - _repeatedValue = repeatedValue - } - - func makeIterator() -> Iterator { - let repeatedValue = _repeatedValue - return AnyIterator { - return repeatedValue - } - } -} diff --git a/Demo/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift b/Demo/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift deleted file mode 100644 index 9b2c370..0000000 --- a/Demo/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift +++ /dev/null @@ -1,123 +0,0 @@ -// -// PriorityQueue.swift -// Platform -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct PriorityQueue { - private let _hasHigherPriority: (Element, Element) -> Bool - private let _isEqual: (Element, Element) -> Bool - - fileprivate var _elements = [Element]() - - init(hasHigherPriority: @escaping (Element, Element) -> Bool, isEqual: @escaping (Element, Element) -> Bool) { - _hasHigherPriority = hasHigherPriority - _isEqual = isEqual - } - - mutating func enqueue(_ element: Element) { - _elements.append(element) - bubbleToHigherPriority(_elements.count - 1) - } - - func peek() -> Element? { - return _elements.first - } - - var isEmpty: Bool { - return _elements.count == 0 - } - - mutating func dequeue() -> Element? { - guard let front = peek() else { - return nil - } - - removeAt(0) - - return front - } - - mutating func remove(_ element: Element) { - for i in 0 ..< _elements.count { - if _isEqual(_elements[i], element) { - removeAt(i) - return - } - } - } - - private mutating func removeAt(_ index: Int) { - let removingLast = index == _elements.count - 1 - if !removingLast { - #if swift(>=3.2) - _elements.swapAt(index, _elements.count - 1) - #else - swap(&_elements[index], &_elements[_elements.count - 1]) - #endif - } - - _ = _elements.popLast() - - if !removingLast { - bubbleToHigherPriority(index) - bubbleToLowerPriority(index) - } - } - - private mutating func bubbleToHigherPriority(_ initialUnbalancedIndex: Int) { - precondition(initialUnbalancedIndex >= 0) - precondition(initialUnbalancedIndex < _elements.count) - - var unbalancedIndex = initialUnbalancedIndex - - while unbalancedIndex > 0 { - let parentIndex = (unbalancedIndex - 1) / 2 - guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break } - #if swift(>=3.2) - _elements.swapAt(unbalancedIndex, parentIndex) - #else - swap(&_elements[unbalancedIndex], &_elements[parentIndex]) - #endif - unbalancedIndex = parentIndex - } - } - - private mutating func bubbleToLowerPriority(_ initialUnbalancedIndex: Int) { - precondition(initialUnbalancedIndex >= 0) - precondition(initialUnbalancedIndex < _elements.count) - - var unbalancedIndex = initialUnbalancedIndex - while true { - let leftChildIndex = unbalancedIndex * 2 + 1 - let rightChildIndex = unbalancedIndex * 2 + 2 - - var highestPriorityIndex = unbalancedIndex - - if leftChildIndex < _elements.count && _hasHigherPriority(_elements[leftChildIndex], _elements[highestPriorityIndex]) { - highestPriorityIndex = leftChildIndex - } - - if rightChildIndex < _elements.count && _hasHigherPriority(_elements[rightChildIndex], _elements[highestPriorityIndex]) { - highestPriorityIndex = rightChildIndex - } - - guard highestPriorityIndex != unbalancedIndex else { break } - - #if swift(>=3.2) - _elements.swapAt(highestPriorityIndex, unbalancedIndex) - #else - swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex]) - #endif - unbalancedIndex = highestPriorityIndex - } - } -} - -extension PriorityQueue : CustomDebugStringConvertible { - var debugDescription: String { - return _elements.debugDescription - } -} diff --git a/Demo/Pods/RxSwift/Platform/DataStructures/Queue.swift b/Demo/Pods/RxSwift/Platform/DataStructures/Queue.swift deleted file mode 100644 index d05726c..0000000 --- a/Demo/Pods/RxSwift/Platform/DataStructures/Queue.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// Queue.swift -// Platform -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -Data structure that represents queue. - -Complexity of `enqueue`, `dequeue` is O(1) when number of operations is -averaged over N operations. - -Complexity of `peek` is O(1). -*/ -struct Queue: Sequence { - /// Type of generator. - typealias Generator = AnyIterator - - private let _resizeFactor = 2 - - private var _storage: ContiguousArray - private var _count = 0 - private var _pushNextIndex = 0 - private let _initialCapacity: Int - - /** - Creates new queue. - - - parameter capacity: Capacity of newly created queue. - */ - init(capacity: Int) { - _initialCapacity = capacity - - _storage = ContiguousArray(repeating: nil, count: capacity) - } - - private var dequeueIndex: Int { - let index = _pushNextIndex - count - return index < 0 ? index + _storage.count : index - } - - /// - returns: Is queue empty. - var isEmpty: Bool { - return count == 0 - } - - /// - returns: Number of elements inside queue. - var count: Int { - return _count - } - - /// - returns: Element in front of a list of elements to `dequeue`. - func peek() -> T { - precondition(count > 0) - - return _storage[dequeueIndex]! - } - - mutating private func resizeTo(_ size: Int) { - var newStorage = ContiguousArray(repeating: nil, count: size) - - let count = _count - - let dequeueIndex = self.dequeueIndex - let spaceToEndOfQueue = _storage.count - dequeueIndex - - // first batch is from dequeue index to end of array - let countElementsInFirstBatch = Swift.min(count, spaceToEndOfQueue) - // second batch is wrapped from start of array to end of queue - let numberOfElementsInSecondBatch = count - countElementsInFirstBatch - - newStorage[0 ..< countElementsInFirstBatch] = _storage[dequeueIndex ..< (dequeueIndex + countElementsInFirstBatch)] - newStorage[countElementsInFirstBatch ..< (countElementsInFirstBatch + numberOfElementsInSecondBatch)] = _storage[0 ..< numberOfElementsInSecondBatch] - - _count = count - _pushNextIndex = count - _storage = newStorage - } - - /// Enqueues `element`. - /// - /// - parameter element: Element to enqueue. - mutating func enqueue(_ element: T) { - if count == _storage.count { - resizeTo(Swift.max(_storage.count, 1) * _resizeFactor) - } - - _storage[_pushNextIndex] = element - _pushNextIndex += 1 - _count += 1 - - if _pushNextIndex >= _storage.count { - _pushNextIndex -= _storage.count - } - } - - private mutating func dequeueElementOnly() -> T { - precondition(count > 0) - - let index = dequeueIndex - - defer { - _storage[index] = nil - _count -= 1 - } - - return _storage[index]! - } - - /// Dequeues element or throws an exception in case queue is empty. - /// - /// - returns: Dequeued element. - mutating func dequeue() -> T? { - if self.count == 0 { - return nil - } - - defer { - let downsizeLimit = _storage.count / (_resizeFactor * _resizeFactor) - if _count < downsizeLimit && downsizeLimit >= _initialCapacity { - resizeTo(_storage.count / _resizeFactor) - } - } - - return dequeueElementOnly() - } - - /// - returns: Generator of contained elements. - func makeIterator() -> AnyIterator { - var i = dequeueIndex - var count = _count - - return AnyIterator { - if count == 0 { - return nil - } - - defer { - count -= 1 - i += 1 - } - - if i >= self._storage.count { - i -= self._storage.count - } - - return self._storage[i] - } - } -} diff --git a/Demo/Pods/RxSwift/Platform/DeprecationWarner.swift b/Demo/Pods/RxSwift/Platform/DeprecationWarner.swift deleted file mode 100644 index 863636b..0000000 --- a/Demo/Pods/RxSwift/Platform/DeprecationWarner.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// DeprecationWarner.swift -// Platform -// -// Created by Shai Mishali on 1/9/18. -// Copyright © 2018 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -#if DEBUG - class DeprecationWarner { - private static var warned = Set() - private static var _lock = NSRecursiveLock() - - static func warnIfNeeded(_ kind: Kind) { - _lock.lock(); defer { _lock.unlock() } - guard !warned.contains(kind) else { return } - - warned.insert(kind) - print("ℹ️ [DEPRECATED] \(kind.message)") - } - } - - extension DeprecationWarner { - enum Kind { - case variable - case globalTestFunctionNext - case globalTestFunctionError - case globalTestFunctionCompleted - - var message: String { - switch self { - case .variable: return "`Variable` is planned for future deprecation. Please consider `BehaviorRelay` as a replacement. Read more at: https://git.io/vNqvx" - case .globalTestFunctionNext: return "The `next()` global function is planned for future deprecation. Please use `Recorded.next()` instead." - case .globalTestFunctionError: return "The `error()` global function is planned for future deprecation. Please use `Recorded.error()` instead." - case .globalTestFunctionCompleted: return "The `completed()` global function is planned for future deprecation. Please use `Recorded.completed()` instead." - } - } - } - } -#endif - diff --git a/Demo/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift b/Demo/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift deleted file mode 100644 index 552314a..0000000 --- a/Demo/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// DispatchQueue+Extensions.swift -// Platform -// -// Created by Krunoslav Zaher on 10/22/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import Dispatch - -extension DispatchQueue { - private static var token: DispatchSpecificKey<()> = { - let key = DispatchSpecificKey<()>() - DispatchQueue.main.setSpecific(key: key, value: ()) - return key - }() - - static var isMain: Bool { - return DispatchQueue.getSpecific(key: token) != nil - } -} diff --git a/Demo/Pods/RxSwift/Platform/Platform.Darwin.swift b/Demo/Pods/RxSwift/Platform/Platform.Darwin.swift deleted file mode 100644 index d9e744f..0000000 --- a/Demo/Pods/RxSwift/Platform/Platform.Darwin.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// Platform.Darwin.swift -// Platform -// -// Created by Krunoslav Zaher on 12/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - - import Darwin - import class Foundation.Thread - import func Foundation.OSAtomicCompareAndSwap32Barrier - import func Foundation.OSAtomicIncrement32Barrier - import func Foundation.OSAtomicDecrement32Barrier - import protocol Foundation.NSCopying - - typealias AtomicInt = Int32 - - fileprivate func castToUInt32Pointer(_ pointer: UnsafeMutablePointer) -> UnsafeMutablePointer { - let raw = UnsafeMutableRawPointer(pointer) - return raw.assumingMemoryBound(to: UInt32.self) - } - - let AtomicCompareAndSwap = OSAtomicCompareAndSwap32Barrier - let AtomicIncrement = OSAtomicIncrement32Barrier - let AtomicDecrement = OSAtomicDecrement32Barrier - func AtomicOr(_ mask: UInt32, _ theValue : UnsafeMutablePointer) -> Int32 { - return OSAtomicOr32OrigBarrier(mask, castToUInt32Pointer(theValue)) - } - func AtomicFlagSet(_ mask: UInt32, _ theValue : UnsafeMutablePointer) -> Bool { - // just used to create a barrier - OSAtomicXor32OrigBarrier(0, castToUInt32Pointer(theValue)) - return (theValue.pointee & Int32(mask)) != 0 - } - - extension Thread { - - static func setThreadLocalStorageValue(_ value: T?, forKey key: NSCopying - ) { - let currentThread = Thread.current - let threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary[key] = newValue - } - else { - threadDictionary[key] = nil - } - - } - static func getThreadLocalStorageValueForKey(_ key: NSCopying) -> T? { - let currentThread = Thread.current - let threadDictionary = currentThread.threadDictionary - - return threadDictionary[key] as? T - } - } - - extension AtomicInt { - func valueSnapshot() -> Int32 { - return self - } - } - -#endif diff --git a/Demo/Pods/RxSwift/Platform/Platform.Linux.swift b/Demo/Pods/RxSwift/Platform/Platform.Linux.swift deleted file mode 100644 index 5cd07e2..0000000 --- a/Demo/Pods/RxSwift/Platform/Platform.Linux.swift +++ /dev/null @@ -1,105 +0,0 @@ -// -// Platform.Linux.swift -// Platform -// -// Created by Krunoslav Zaher on 12/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if os(Linux) - - import XCTest - import Glibc - import SwiftShims - import class Foundation.Thread - - final class AtomicInt { - typealias IntegerLiteralType = Int - fileprivate var value: Int32 = 0 - fileprivate var _lock = RecursiveLock() - - func lock() { - _lock.lock() - } - func unlock() { - _lock.unlock() - } - - func valueSnapshot() -> Int32 { - return value - } - } - - extension AtomicInt: ExpressibleByIntegerLiteral { - convenience init(integerLiteral value: Int) { - self.init() - self.value = Int32(value) - } - } - - func >(lhs: AtomicInt, rhs: Int32) -> Bool { - return lhs.value > rhs - } - func ==(lhs: AtomicInt, rhs: Int32) -> Bool { - return lhs.value == rhs - } - - func AtomicFlagSet(_ mask: UInt32, _ atomic: inout AtomicInt) -> Bool { - atomic.lock(); defer { atomic.unlock() } - return (atomic.value & Int32(mask)) != 0 - } - - func AtomicOr(_ mask: UInt32, _ atomic: inout AtomicInt) -> Int32 { - atomic.lock(); defer { atomic.unlock() } - let value = atomic.value - atomic.value |= Int32(mask) - return value - } - - func AtomicIncrement(_ atomic: inout AtomicInt) -> Int32 { - atomic.lock(); defer { atomic.unlock() } - atomic.value += 1 - return atomic.value - } - - func AtomicDecrement(_ atomic: inout AtomicInt) -> Int32 { - atomic.lock(); defer { atomic.unlock() } - atomic.value -= 1 - return atomic.value - } - - func AtomicCompareAndSwap(_ l: Int32, _ r: Int32, _ atomic: inout AtomicInt) -> Bool { - atomic.lock(); defer { atomic.unlock() } - if atomic.value == l { - atomic.value = r - return true - } - - return false - } - - extension Thread { - - static func setThreadLocalStorageValue(_ value: T?, forKey key: String) { - let currentThread = Thread.current - var threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary[key] = newValue - } - else { - threadDictionary[key] = nil - } - - currentThread.threadDictionary = threadDictionary - } - - static func getThreadLocalStorageValueForKey(_ key: String) -> T? { - let currentThread = Thread.current - let threadDictionary = currentThread.threadDictionary - - return threadDictionary[key] as? T - } - } - -#endif diff --git a/Demo/Pods/RxSwift/Platform/RecursiveLock.swift b/Demo/Pods/RxSwift/Platform/RecursiveLock.swift deleted file mode 100644 index c03471d..0000000 --- a/Demo/Pods/RxSwift/Platform/RecursiveLock.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// RecursiveLock.swift -// Platform -// -// Created by Krunoslav Zaher on 12/18/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSRecursiveLock - -#if TRACE_RESOURCES - class RecursiveLock: NSRecursiveLock { - override init() { - _ = Resources.incrementTotal() - super.init() - } - - override func lock() { - super.lock() - _ = Resources.incrementTotal() - } - - override func unlock() { - super.unlock() - _ = Resources.decrementTotal() - } - - deinit { - _ = Resources.decrementTotal() - } - } -#else - typealias RecursiveLock = NSRecursiveLock -#endif diff --git a/Demo/Pods/RxSwift/README.md b/Demo/Pods/RxSwift/README.md deleted file mode 100644 index f7952f5..0000000 --- a/Demo/Pods/RxSwift/README.md +++ /dev/null @@ -1,217 +0,0 @@ -Miss Electric Eel 2016 RxSwift: ReactiveX for Swift -====================================== - -[![Travis CI](https://travis-ci.org/ReactiveX/RxSwift.svg?branch=master)](https://travis-ci.org/ReactiveX/RxSwift) ![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-333333.svg) ![pod](https://img.shields.io/cocoapods/v/RxSwift.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) - -* RxSwift 3.x / Swift 3.x can be found in [**rxswift-3.0** branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0). - -Rx is a [generic abstraction of computation](https://youtu.be/looJcaeboBY) expressed through `Observable` interface. - -This is a Swift version of [Rx](https://github.com/Reactive-Extensions/Rx.NET). - -It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment. - -Cross platform documentation can be found on [ReactiveX.io](http://reactivex.io/). - -Like the original Rx, its intention is to enable easy composition of asynchronous operations and event/data streams. - -KVO observing, async operations and streams are all unified under [abstraction of sequence](Documentation/GettingStarted.md#observables-aka-sequences). This is the reason why Rx is so simple, elegant and powerful. - -## I came here because I want to ... - -###### ... understand - -* [why use rx?](Documentation/Why.md) -* [the basics, getting started with RxSwift](Documentation/GettingStarted.md) -* [traits](Documentation/Traits.md) - what are `Single`, `Completable`, `Maybe`, `Driver`, `ControlProperty`, and `Variable` ... and why do they exist? -* [testing](Documentation/UnitTests.md) -* [tips and common errors](Documentation/Tips.md) -* [debugging](Documentation/GettingStarted.md#debugging) -* [the math behind Rx](Documentation/MathBehindRx.md) -* [what are hot and cold observable sequences?](Documentation/HotAndColdObservables.md) - -###### ... install - -* Integrate RxSwift/RxCocoa with my app. [Installation Guide](#installation) - -###### ... hack around - -* with the example app. [Running Example App](Documentation/ExampleApp.md) -* with operators in playgrounds. [Playgrounds](Documentation/Playgrounds.md) - -###### ... interact - -* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences.
[![Slack channel](http://rxswift-slack.herokuapp.com/badge.svg)](http://slack.rxswift.org) [Join Slack Channel](http://slack.rxswift.org) -* Report a problem using the library. [Open an Issue With Bug Template](.github/ISSUE_TEMPLATE.md) -* Request a new feature. [Open an Issue With Feature Request Template](Documentation/NewFeatureRequestTemplate.md) -* Help out [Check out contribution guide](CONTRIBUTING.md) - -###### ... compare - -* [with other libraries](Documentation/ComparisonWithOtherLibraries.md). - - -###### ... find compatible - -* libraries from [RxSwiftCommunity](https://github.com/RxSwiftCommunity). -* [Pods using RxSwift](https://cocoapods.org/?q=uses%3Arxswift). - -###### ... see the broader vision - -* Does this exist for Android? [RxJava](https://github.com/ReactiveX/RxJava) -* Where is all of this going, what is the future, what about reactive architectures, how do you design entire apps this way? [Cycle.js](https://github.com/cyclejs/cycle-core) - this is javascript, but [RxJS](https://github.com/Reactive-Extensions/RxJS) is javascript version of Rx. - -## Usage - - - - - - - - - - - - - - - - - - - -
Here's an exampleIn Action
Define search for GitHub repositories ...
-let searchResults = searchBar.rx.text.orEmpty
-    .throttle(0.3, scheduler: MainScheduler.instance)
-    .distinctUntilChanged()
-    .flatMapLatest { query -> Observable<[Repository]> in
-        if query.isEmpty {
-            return .just([])
-        }
-        return searchGitHub(query)
-            .catchErrorJustReturn([])
-    }
-    .observeOn(MainScheduler.instance)
... then bind the results to your tableview
-searchResults
-    .bind(to: tableView.rx.items(cellIdentifier: "Cell")) {
-        (index, repository: Repository, cell) in
-        cell.textLabel?.text = repository.name
-        cell.detailTextLabel?.text = repository.url
-    }
-    .disposed(by: disposeBag)
- - -## Requirements - -* Xcode 9.0 -* Swift 4.0 -* Swift 3.x ([use `rxswift-3.0` branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0) instead) -* Swift 2.3 ([use `rxswift-2.0` branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0) instead) - -## Installation - -Rx doesn't contain any external dependencies. - -These are currently the supported options: - -### Manual - -Open Rx.xcworkspace, choose `RxExample` and hit run. This method will build everything and run the sample app - -### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html) - -**Tested with `pod --version`: `1.3.1`** - -```ruby -# Podfile -use_frameworks! - -target 'YOUR_TARGET_NAME' do - pod 'RxSwift', '~> 4.0' - pod 'RxCocoa', '~> 4.0' -end - -# RxTest and RxBlocking make the most sense in the context of unit/integration tests -target 'YOUR_TESTING_TARGET' do - pod 'RxBlocking', '~> 4.0' - pod 'RxTest', '~> 4.0' -end -``` - -Replace `YOUR_TARGET_NAME` and then, in the `Podfile` directory, type: - -```bash -$ pod install -``` - -### [Carthage](https://github.com/Carthage/Carthage) - -**Tested with `carthage version`: `0.26.2`** - -Add this to `Cartfile` - -``` -github "ReactiveX/RxSwift" ~> 4.0 -``` - -```bash -$ carthage update -``` - -### [Swift Package Manager](https://github.com/apple/swift-package-manager) - -**Tested with `swift build --version`: `Swift 4.0.0-dev (swiftpm-13126)`** - -Create a `Package.swift` file. - -```swift -// swift-tools-version:4.0 - -import PackageDescription - -let package = Package( - name: "RxTestProject", - dependencies: [ - .package(url: "https://github.com/ReactiveX/RxSwift.git", "4.0.0" ..< "5.0.0") - ], - targets: [ - .target(name: "RxTestProject", dependencies: ["RxSwift", "RxCocoa"]) - ] -) -``` - -```bash -$ swift build -``` - -To build or test a module with RxTest dependency, set `TEST=1`. ([RxSwift >= 3.4.2](https://github.com/ReactiveX/RxSwift/releases/tag/3.4.2)) - -```bash -$ TEST=1 swift test -``` - -### Manually using git submodules - -* Add RxSwift as a submodule - -```bash -$ git submodule add git@github.com:ReactiveX/RxSwift.git -``` - -* Drag `Rx.xcodeproj` into Project Navigator -* Go to `Project > Targets > Build Phases > Link Binary With Libraries`, click `+` and select `RxSwift-[Platform]` and `RxCocoa-[Platform]` targets - - -## References - -* [http://reactivex.io/](http://reactivex.io/) -* [Reactive Extensions GitHub (GitHub)](https://github.com/Reactive-Extensions) -* [RxSwift RayWenderlich.com Book](https://store.raywenderlich.com/products/rxswift) -* [Boxue.io RxSwift Online Course](https://boxueio.com/series/rxswift-101) (Chinese 🇨🇳) -* [Erik Meijer (Wikipedia)](http://en.wikipedia.org/wiki/Erik_Meijer_%28computer_scientist%29) -* [Expert to Expert: Brian Beckman and Erik Meijer - Inside the .NET Reactive Framework (Rx) (video)](https://youtu.be/looJcaeboBY) -* [Reactive Programming Overview (Jafar Husain from Netflix)](https://www.youtube.com/watch?v=dwP1TNXE6fc) -* [Subject/Observer is Dual to Iterator (paper)](http://csl.stanford.edu/~christos/pldi2010.fit/meijer.duality.pdf) -* [Rx standard sequence operators visualized (visualization tool)](http://rxmarbles.com/) -* [Haskell](https://www.haskell.org/) diff --git a/Demo/Pods/RxSwift/RxSwift/AnyObserver.swift b/Demo/Pods/RxSwift/RxSwift/AnyObserver.swift deleted file mode 100644 index dd4f9c4..0000000 --- a/Demo/Pods/RxSwift/RxSwift/AnyObserver.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// AnyObserver.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// A type-erased `ObserverType`. -/// -/// Forwards operations to an arbitrary underlying observer with the same `Element` type, hiding the specifics of the underlying observer type. -public struct AnyObserver : ObserverType { - /// The type of elements in sequence that observer can observe. - public typealias E = Element - - /// Anonymous event handler type. - public typealias EventHandler = (Event) -> Void - - private let observer: EventHandler - - /// Construct an instance whose `on(event)` calls `eventHandler(event)` - /// - /// - parameter eventHandler: Event handler that observes sequences events. - public init(eventHandler: @escaping EventHandler) { - self.observer = eventHandler - } - - /// Construct an instance whose `on(event)` calls `observer.on(event)` - /// - /// - parameter observer: Observer that receives sequence events. - public init(_ observer: O) where O.E == Element { - self.observer = observer.on - } - - /// Send `event` to this observer. - /// - /// - parameter event: Event instance. - public func on(_ event: Event) { - return self.observer(event) - } - - /// Erases type of observer and returns canonical observer. - /// - /// - returns: type erased observer. - public func asObserver() -> AnyObserver { - return self - } -} - -extension AnyObserver { - /// Collection of `AnyObserver`s - typealias s = Bag<(Event) -> ()> -} - -extension ObserverType { - /// Erases type of observer and returns canonical observer. - /// - /// - returns: type erased observer. - public func asObserver() -> AnyObserver { - return AnyObserver(self) - } - - /// Transforms observer of type R to type E using custom transform method. - /// Each event sent to result observer is transformed and sent to `self`. - /// - /// - returns: observer that transforms events. - public func mapObserver(_ transform: @escaping (R) throws -> E) -> AnyObserver { - return AnyObserver { e in - self.on(e.map(transform)) - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Cancelable.swift b/Demo/Pods/RxSwift/RxSwift/Cancelable.swift deleted file mode 100644 index 1fa7a67..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Cancelable.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Cancelable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents disposable resource with state tracking. -public protocol Cancelable : Disposable { - /// Was resource disposed. - var isDisposed: Bool { get } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift b/Demo/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift deleted file mode 100644 index 2597078..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// AsyncLock.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -In case nobody holds this lock, the work will be queued and executed immediately -on thread that is requesting lock. - -In case there is somebody currently holding that lock, action will be enqueued. -When owned of the lock finishes with it's processing, it will also execute -and pending work. - -That means that enqueued work could possibly be executed later on a different thread. -*/ -final class AsyncLock - : Disposable - , Lock - , SynchronizedDisposeType { - typealias Action = () -> Void - - var _lock = SpinLock() - - private var _queue: Queue = Queue(capacity: 0) - - private var _isExecuting: Bool = false - private var _hasFaulted: Bool = false - - // lock { - func lock() { - _lock.lock() - } - - func unlock() { - _lock.unlock() - } - // } - - private func enqueue(_ action: I) -> I? { - _lock.lock(); defer { _lock.unlock() } // { - if _hasFaulted { - return nil - } - - if _isExecuting { - _queue.enqueue(action) - return nil - } - - _isExecuting = true - - return action - // } - } - - private func dequeue() -> I? { - _lock.lock(); defer { _lock.unlock() } // { - if _queue.count > 0 { - return _queue.dequeue() - } - else { - _isExecuting = false - return nil - } - // } - } - - func invoke(_ action: I) { - let firstEnqueuedAction = enqueue(action) - - if let firstEnqueuedAction = firstEnqueuedAction { - firstEnqueuedAction.invoke() - } - else { - // action is enqueued, it's somebody else's concern now - return - } - - while true { - let nextAction = dequeue() - - if let nextAction = nextAction { - nextAction.invoke() - } - else { - return - } - } - } - - func dispose() { - synchronizedDispose() - } - - func _synchronized_dispose() { - _queue = Queue(capacity: 0) - _hasFaulted = true - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Concurrency/Lock.swift b/Demo/Pods/RxSwift/RxSwift/Concurrency/Lock.swift deleted file mode 100644 index 52afc1c..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Concurrency/Lock.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Lock.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/31/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol Lock { - func lock() - func unlock() -} - -// https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html -typealias SpinLock = RecursiveLock - -extension RecursiveLock : Lock { - @inline(__always) - final func performLocked(_ action: () -> Void) { - lock(); defer { unlock() } - action() - } - - @inline(__always) - final func calculateLocked(_ action: () -> T) -> T { - lock(); defer { unlock() } - return action() - } - - @inline(__always) - final func calculateLockedOrFail(_ action: () throws -> T) throws -> T { - lock(); defer { unlock() } - let result = try action() - return result - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift b/Demo/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift deleted file mode 100644 index eca8d8e..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// LockOwnerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol LockOwnerType : class, Lock { - var _lock: RecursiveLock { get } -} - -extension LockOwnerType { - func lock() { - _lock.lock() - } - - func unlock() { - _lock.unlock() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift b/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift deleted file mode 100644 index af9548f..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// SynchronizedDisposeType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedDisposeType : class, Disposable, Lock { - func _synchronized_dispose() -} - -extension SynchronizedDisposeType { - func synchronizedDispose() { - lock(); defer { unlock() } - _synchronized_dispose() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift b/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift deleted file mode 100644 index 8dfc556..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// SynchronizedOnType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedOnType : class, ObserverType, Lock { - func _synchronized_on(_ event: Event) -} - -extension SynchronizedOnType { - func synchronizedOn(_ event: Event) { - lock(); defer { unlock() } - _synchronized_on(event) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift deleted file mode 100644 index bb1aa7e..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// SynchronizedUnsubscribeType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedUnsubscribeType : class { - associatedtype DisposeKey - - func synchronizedUnsubscribe(_ disposeKey: DisposeKey) -} diff --git a/Demo/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/Demo/Pods/RxSwift/RxSwift/ConnectableObservableType.swift deleted file mode 100644 index 52bf93c..0000000 --- a/Demo/Pods/RxSwift/RxSwift/ConnectableObservableType.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ConnectableObservableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence. -*/ -public protocol ConnectableObservableType : ObservableType { - /** - Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. - - - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. - */ - func connect() -> Disposable -} diff --git a/Demo/Pods/RxSwift/RxSwift/Deprecated.swift b/Demo/Pods/RxSwift/RxSwift/Deprecated.swift deleted file mode 100644 index 0337d82..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Deprecated.swift +++ /dev/null @@ -1,228 +0,0 @@ -// -// Deprecated.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/5/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension Observable { - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - @available(*, deprecated, message: "Implicit conversions from any type to optional type are allowed and that is causing issues with `from` operator overloading.", renamed: "from(optional:)") - public static func from(_ optional: E?) -> Observable { - return Observable.from(optional: optional) - } - - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - parameter scheduler: Scheduler to send the optional element on. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - @available(*, deprecated, message: "Implicit conversions from any type to optional type are allowed and that is causing issues with `from` operator overloading.", renamed: "from(optional:scheduler:)") - public static func from(_ optional: E?, scheduler: ImmediateSchedulerType) -> Observable { - return Observable.from(optional: optional, scheduler: scheduler) - } -} - -extension ObservableType { - /** - - Projects each element of an observable sequence into a new form by incorporating the element's index. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - parameter selector: A transform function to apply to each source element; the second parameter of the function represents the index of the source element. - - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. - */ - @available(*, deprecated, message: "Please use enumerated().map()") - public func mapWithIndex(_ selector: @escaping (E, Int) throws -> R) - -> Observable { - return enumerated().map { try selector($0.element, $0.index) } - } - - - /** - - Projects each element of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence. - - - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element; the second parameter of the function represents the index of the source element. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. - */ - @available(*, deprecated, message: "Please use enumerated().flatMap()") - public func flatMapWithIndex(_ selector: @escaping (E, Int) throws -> O) - -> Observable { - return enumerated().flatMap { try selector($0.element, $0.index) } - } - - /** - - Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - The element's index is used in the logic of the predicate function. - - - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) - - - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - @available(*, deprecated, message: "Please use enumerated().skipWhile().map()") - public func skipWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { - return enumerated().skipWhile { try predicate($0.element, $0.index) }.map { $0.element } - } - - - /** - - Returns elements from an observable sequence as long as a specified condition is true. - - The element's index is used in the logic of the predicate function. - - - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) - - - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - */ - @available(*, deprecated, message: "Please use enumerated().takeWhile().map()") - public func takeWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { - return enumerated().takeWhile { try predicate($0.element, $0.index) }.map { $0.element } - } -} - -extension Disposable { - /// Deprecated in favor of `disposed(by:)` - /// - /// - /// Adds `self` to `bag`. - /// - /// - parameter bag: `DisposeBag` to add `self` to. - @available(*, deprecated, message: "use disposed(by:) instead", renamed: "disposed(by:)") - public func addDisposableTo(_ bag: DisposeBag) { - disposed(by: bag) - } -} - - -extension ObservableType { - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays latest element in buffer. - - This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - @available(*, deprecated, message: "use share(replay: 1) instead", renamed: "share(replay:)") - public func shareReplayLatestWhileConnected() - -> Observable { - return share(replay: 1, scope: .whileConnected) - } -} - - -extension ObservableType { - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays maximum number of elements in buffer. - - This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - parameter bufferSize: Maximum element count of the replay buffer. - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - @available(*, deprecated, message: "Suggested replacement is `share(replay: 1)`. In case old 3.x behavior of `shareReplay` is required please use `share(replay: 1, scope: .forever)` instead.", renamed: "share(replay:)") - public func shareReplay(_ bufferSize: Int) - -> Observable { - return self.share(replay: bufferSize, scope: .forever) - } -} - -/// Variable is a wrapper for `BehaviorSubject`. -/// -/// Unlike `BehaviorSubject` it can't terminate with error, and when variable is deallocated -/// it will complete its observable sequence (`asObservable`). -/// -/// **This concept will be deprecated from RxSwift but offical migration path hasn't been decided yet.** -/// https://github.com/ReactiveX/RxSwift/issues/1501 -/// -/// Current recommended replacement for this API is `RxCocoa.BehaviorRelay` because: -/// * `Variable` isn't a standard cross platform concept, hence it's out of place in RxSwift target. -/// * It doesn't have a counterpart for handling events (`PublishRelay`). It models state only. -/// * It doesn't have a consistent naming with *Relay or other Rx concepts. -/// * It has an inconsistent memory management model compared to other parts of RxSwift (completes on `deinit`). -/// -/// Once plans are finalized, official availability attribute will be added in one of upcoming versions. -public final class Variable { - - public typealias E = Element - - private let _subject: BehaviorSubject - - private var _lock = SpinLock() - - // state - private var _value: E - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - /// Gets or sets current value of variable. - /// - /// Whenever a new value is set, all the observers are notified of the change. - /// - /// Even if the newly set value is same as the old value, observers are still notified for change. - public var value: E { - get { - _lock.lock(); defer { _lock.unlock() } - return _value - } - set(newValue) { - #if DEBUG - _synchronizationTracker.register(synchronizationErrorMessage: .variable) - defer { _synchronizationTracker.unregister() } - #endif - _lock.lock() - _value = newValue - _lock.unlock() - - _subject.on(.next(newValue)) - } - } - - /// Initializes variable with initial value. - /// - /// - parameter value: Initial variable value. - public init(_ value: Element) { - #if DEBUG - DeprecationWarner.warnIfNeeded(.variable) - #endif - - _value = value - _subject = BehaviorSubject(value: value) - } - - /// - returns: Canonical interface for push style sequence - public func asObservable() -> Observable { - return _subject - } - - deinit { - _subject.on(.completed) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposable.swift deleted file mode 100644 index b79c77a..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposable.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Disposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource. -public protocol Disposable { - /// Dispose resource. - func dispose() -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift deleted file mode 100644 index e54532b..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// AnonymousDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents an Action-based disposable. -/// -/// When dispose method is called, disposal action will be dereferenced. -fileprivate final class AnonymousDisposable : DisposeBase, Cancelable { - public typealias DisposeAction = () -> Void - - private var _isDisposed: AtomicInt = 0 - private var _disposeAction: DisposeAction? - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return _isDisposed == 1 - } - - /// Constructs a new disposable with the given action used for disposal. - /// - /// - parameter disposeAction: Disposal action which will be run upon calling `dispose`. - fileprivate init(_ disposeAction: @escaping DisposeAction) { - _disposeAction = disposeAction - super.init() - } - - // Non-deprecated version of the constructor, used by `Disposables.create(with:)` - fileprivate init(disposeAction: @escaping DisposeAction) { - _disposeAction = disposeAction - super.init() - } - - /// Calls the disposal action if and only if the current instance hasn't been disposed yet. - /// - /// After invoking disposal action, disposal action will be dereferenced. - fileprivate func dispose() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { - assert(_isDisposed == 1) - - if let action = _disposeAction { - _disposeAction = nil - action() - } - } - } -} - -extension Disposables { - - /// Constructs a new disposable with the given action used for disposal. - /// - /// - parameter dispose: Disposal action which will be run upon calling `dispose`. - public static func create(with dispose: @escaping () -> ()) -> Cancelable { - return AnonymousDisposable(disposeAction: dispose) - } - -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift deleted file mode 100644 index 8a518f0..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// BinaryDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents two disposable resources that are disposed together. -private final class BinaryDisposable : DisposeBase, Cancelable { - - private var _isDisposed: AtomicInt = 0 - - // state - private var _disposable1: Disposable? - private var _disposable2: Disposable? - - /// - returns: Was resource disposed. - var isDisposed: Bool { - return _isDisposed > 0 - } - - /// Constructs new binary disposable from two disposables. - /// - /// - parameter disposable1: First disposable - /// - parameter disposable2: Second disposable - init(_ disposable1: Disposable, _ disposable2: Disposable) { - _disposable1 = disposable1 - _disposable2 = disposable2 - super.init() - } - - /// Calls the disposal action if and only if the current instance hasn't been disposed yet. - /// - /// After invoking disposal action, disposal action will be dereferenced. - func dispose() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { - _disposable1?.dispose() - _disposable2?.dispose() - _disposable1 = nil - _disposable2 = nil - } - } -} - -extension Disposables { - - /// Creates a disposable with the given disposables. - public static func create(_ disposable1: Disposable, _ disposable2: Disposable) -> Cancelable { - return BinaryDisposable(disposable1, disposable2) - } - -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift deleted file mode 100644 index efae55e..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// BooleanDisposable.swift -// RxSwift -// -// Created by Junior B. on 10/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource that can be checked for disposal status. -public final class BooleanDisposable : Cancelable { - - internal static let BooleanDisposableTrue = BooleanDisposable(isDisposed: true) - private var _isDisposed = false - - /// Initializes a new instance of the `BooleanDisposable` class - public init() { - } - - /// Initializes a new instance of the `BooleanDisposable` class with given value - public init(isDisposed: Bool) { - self._isDisposed = isDisposed - } - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return _isDisposed - } - - /// Sets the status to disposed, which can be observer through the `isDisposed` property. - public func dispose() { - _isDisposed = true - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift deleted file mode 100644 index b057817..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CompositeDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/20/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a group of disposable resources that are disposed together. -public final class CompositeDisposable : DisposeBase, Cancelable { - /// Key used to remove disposable from composite disposable - public struct DisposeKey { - fileprivate let key: BagKey - fileprivate init(key: BagKey) { - self.key = key - } - } - - private var _lock = SpinLock() - - // state - private var _disposables: Bag? = Bag() - - public var isDisposed: Bool { - _lock.lock(); defer { _lock.unlock() } - return _disposables == nil - } - - public override init() { - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(_ disposable1: Disposable, _ disposable2: Disposable) { - // This overload is here to make sure we are using optimized version up to 4 arguments. - let _ = _disposables!.insert(disposable1) - let _ = _disposables!.insert(disposable2) - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) { - // This overload is here to make sure we are using optimized version up to 4 arguments. - let _ = _disposables!.insert(disposable1) - let _ = _disposables!.insert(disposable2) - let _ = _disposables!.insert(disposable3) - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposable4: Disposable, _ disposables: Disposable...) { - // This overload is here to make sure we are using optimized version up to 4 arguments. - let _ = _disposables!.insert(disposable1) - let _ = _disposables!.insert(disposable2) - let _ = _disposables!.insert(disposable3) - let _ = _disposables!.insert(disposable4) - - for disposable in disposables { - let _ = _disposables!.insert(disposable) - } - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(disposables: [Disposable]) { - for disposable in disposables { - let _ = _disposables!.insert(disposable) - } - } - - /** - Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. - - - parameter disposable: Disposable to add. - - returns: Key that can be used to remove disposable from composite disposable. In case dispose bag was already - disposed `nil` will be returned. - */ - public func insert(_ disposable: Disposable) -> DisposeKey? { - let key = _insert(disposable) - - if key == nil { - disposable.dispose() - } - - return key - } - - private func _insert(_ disposable: Disposable) -> DisposeKey? { - _lock.lock(); defer { _lock.unlock() } - - let bagKey = _disposables?.insert(disposable) - return bagKey.map(DisposeKey.init) - } - - /// - returns: Gets the number of disposables contained in the `CompositeDisposable`. - public var count: Int { - _lock.lock(); defer { _lock.unlock() } - return _disposables?.count ?? 0 - } - - /// Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. - /// - /// - parameter disposeKey: Key used to identify disposable to be removed. - public func remove(for disposeKey: DisposeKey) { - _remove(for: disposeKey)?.dispose() - } - - private func _remove(for disposeKey: DisposeKey) -> Disposable? { - _lock.lock(); defer { _lock.unlock() } - return _disposables?.removeKey(disposeKey.key) - } - - /// Disposes all disposables in the group and removes them from the group. - public func dispose() { - if let disposables = _dispose() { - disposeAll(in: disposables) - } - } - - private func _dispose() -> Bag? { - _lock.lock(); defer { _lock.unlock() } - - let disposeBag = _disposables - _disposables = nil - - return disposeBag - } -} - -extension Disposables { - - /// Creates a disposable with the given disposables. - public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) -> Cancelable { - return CompositeDisposable(disposable1, disposable2, disposable3) - } - - /// Creates a disposable with the given disposables. - public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposables: Disposable ...) -> Cancelable { - var disposables = disposables - disposables.append(disposable1) - disposables.append(disposable2) - disposables.append(disposable3) - return CompositeDisposable(disposables: disposables) - } - - /// Creates a disposable with the given disposables. - public static func create(_ disposables: [Disposable]) -> Cancelable { - switch disposables.count { - case 2: - return Disposables.create(disposables[0], disposables[1]) - default: - return CompositeDisposable(disposables: disposables) - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/Disposables.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/Disposables.swift deleted file mode 100644 index 8cd6e28..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/Disposables.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Disposables.swift -// RxSwift -// -// Created by Mohsen Ramezanpoor on 01/08/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -/// A collection of utility methods for common disposable operations. -public struct Disposables { - private init() {} -} - diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift deleted file mode 100644 index 9a2386d..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift +++ /dev/null @@ -1,114 +0,0 @@ -// -// DisposeBag.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension Disposable { - /// Adds `self` to `bag` - /// - /// - parameter bag: `DisposeBag` to add `self` to. - public func disposed(by bag: DisposeBag) { - bag.insert(self) - } -} - -/** -Thread safe bag that disposes added disposables on `deinit`. - -This returns ARC (RAII) like resource management to `RxSwift`. - -In case contained disposables need to be disposed, just put a different dispose bag -or create a new one in its place. - - self.existingDisposeBag = DisposeBag() - -In case explicit disposal is necessary, there is also `CompositeDisposable`. -*/ -public final class DisposeBag: DisposeBase { - - private var _lock = SpinLock() - - // state - fileprivate var _disposables = [Disposable]() - fileprivate var _isDisposed = false - - /// Constructs new empty dispose bag. - public override init() { - super.init() - } - - /// Adds `disposable` to be disposed when dispose bag is being deinited. - /// - /// - parameter disposable: Disposable to add. - public func insert(_ disposable: Disposable) { - _insert(disposable)?.dispose() - } - - private func _insert(_ disposable: Disposable) -> Disposable? { - _lock.lock(); defer { _lock.unlock() } - if _isDisposed { - return disposable - } - - _disposables.append(disposable) - - return nil - } - - /// This is internal on purpose, take a look at `CompositeDisposable` instead. - private func dispose() { - let oldDisposables = _dispose() - - for disposable in oldDisposables { - disposable.dispose() - } - } - - private func _dispose() -> [Disposable] { - _lock.lock(); defer { _lock.unlock() } - - let disposables = _disposables - - _disposables.removeAll(keepingCapacity: false) - _isDisposed = true - - return disposables - } - - deinit { - dispose() - } -} - -extension DisposeBag { - - /// Convenience init allows a list of disposables to be gathered for disposal. - public convenience init(disposing disposables: Disposable...) { - self.init() - _disposables += disposables - } - - /// Convenience init allows an array of disposables to be gathered for disposal. - public convenience init(disposing disposables: [Disposable]) { - self.init() - _disposables += disposables - } - - /// Convenience function allows a list of disposables to be gathered for disposal. - public func insert(_ disposables: Disposable...) { - insert(disposables) - } - - /// Convenience function allows an array of disposables to be gathered for disposal. - public func insert(_ disposables: [Disposable]) { - _lock.lock(); defer { _lock.unlock() } - if _isDisposed { - disposables.forEach { $0.dispose() } - } else { - _disposables += disposables - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift deleted file mode 100644 index 8c6a44f..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// DisposeBase.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/4/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Base class for all disposables. -public class DisposeBase { - init() { -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - } - - deinit { -#if TRACE_RESOURCES - let _ = Resources.decrementTotal() -#endif - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift deleted file mode 100644 index 149f866..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// NopDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable that does nothing on disposal. -/// -/// Nop = No Operation -fileprivate struct NopDisposable : Disposable { - - fileprivate static let noOp: Disposable = NopDisposable() - - fileprivate init() { - - } - - /// Does nothing. - public func dispose() { - } -} - -extension Disposables { - /** - Creates a disposable that does nothing on disposal. - */ - static public func create() -> Disposable { - return NopDisposable.noOp - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift deleted file mode 100644 index a21662a..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift +++ /dev/null @@ -1,117 +0,0 @@ -// -// RefCountDisposable.swift -// RxSwift -// -// Created by Junior B. on 10/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. -public final class RefCountDisposable : DisposeBase, Cancelable { - private var _lock = SpinLock() - private var _disposable = nil as Disposable? - private var _primaryDisposed = false - private var _count = 0 - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - _lock.lock(); defer { _lock.unlock() } - return _disposable == nil - } - - /// Initializes a new instance of the `RefCountDisposable`. - public init(disposable: Disposable) { - _disposable = disposable - super.init() - } - - /** - Holds a dependent disposable that when disposed decreases the refcount on the underlying disposable. - - When getter is called, a dependent disposable contributing to the reference count that manages the underlying disposable's lifetime is returned. - */ - public func retain() -> Disposable { - return _lock.calculateLocked { - if let _ = _disposable { - - do { - let _ = try incrementChecked(&_count) - } catch (_) { - rxFatalError("RefCountDisposable increment failed") - } - - return RefCountInnerDisposable(self) - } else { - return Disposables.create() - } - } - } - - /// Disposes the underlying disposable only when all dependent disposables have been disposed. - public func dispose() { - let oldDisposable: Disposable? = _lock.calculateLocked { - if let oldDisposable = _disposable, !_primaryDisposed - { - _primaryDisposed = true - - if (_count == 0) - { - _disposable = nil - return oldDisposable - } - } - - return nil - } - - if let disposable = oldDisposable { - disposable.dispose() - } - } - - fileprivate func release() { - let oldDisposable: Disposable? = _lock.calculateLocked { - if let oldDisposable = _disposable { - do { - let _ = try decrementChecked(&_count) - } catch (_) { - rxFatalError("RefCountDisposable decrement on release failed") - } - - guard _count >= 0 else { - rxFatalError("RefCountDisposable counter is lower than 0") - } - - if _primaryDisposed && _count == 0 { - _disposable = nil - return oldDisposable - } - } - - return nil - } - - if let disposable = oldDisposable { - disposable.dispose() - } - } -} - -internal final class RefCountInnerDisposable: DisposeBase, Disposable -{ - private let _parent: RefCountDisposable - private var _isDisposed: AtomicInt = 0 - - init(_ parent: RefCountDisposable) - { - _parent = parent - super.init() - } - - internal func dispose() - { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { - _parent.release() - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift deleted file mode 100644 index 92c220d..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// ScheduledDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -private let disposeScheduledDisposable: (ScheduledDisposable) -> Disposable = { sd in - sd.disposeInner() - return Disposables.create() -} - -/// Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler. -public final class ScheduledDisposable : Cancelable { - public let scheduler: ImmediateSchedulerType - - private var _isDisposed: AtomicInt = 0 - - // state - private var _disposable: Disposable? - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return _isDisposed == 1 - } - - /** - Initializes a new instance of the `ScheduledDisposable` that uses a `scheduler` on which to dispose the `disposable`. - - - parameter scheduler: Scheduler where the disposable resource will be disposed on. - - parameter disposable: Disposable resource to dispose on the given scheduler. - */ - public init(scheduler: ImmediateSchedulerType, disposable: Disposable) { - self.scheduler = scheduler - _disposable = disposable - } - - /// Disposes the wrapped disposable on the provided scheduler. - public func dispose() { - let _ = scheduler.schedule(self, action: disposeScheduledDisposable) - } - - func disposeInner() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { - _disposable!.dispose() - _disposable = nil - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift deleted file mode 100644 index 6373d2b..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// SerialDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource. -public final class SerialDisposable : DisposeBase, Cancelable { - private var _lock = SpinLock() - - // state - private var _current = nil as Disposable? - private var _isDisposed = false - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return _isDisposed - } - - /// Initializes a new instance of the `SerialDisposable`. - override public init() { - super.init() - } - - /** - Gets or sets the underlying disposable. - - Assigning this property disposes the previous disposable object. - - If the `SerialDisposable` has already been disposed, assignment to this property causes immediate disposal of the given disposable object. - */ - public var disposable: Disposable { - get { - return _lock.calculateLocked { - return _current ?? Disposables.create() - } - } - set (newDisposable) { - let disposable: Disposable? = _lock.calculateLocked { - if _isDisposed { - return newDisposable - } - else { - let toDispose = _current - _current = newDisposable - return toDispose - } - } - - if let disposable = disposable { - disposable.dispose() - } - } - } - - /// Disposes the underlying disposable as well as all future replacements. - public func dispose() { - _dispose()?.dispose() - } - - private func _dispose() -> Disposable? { - _lock.lock(); defer { _lock.unlock() } - if _isDisposed { - return nil - } - else { - _isDisposed = true - let current = _current - _current = nil - return current - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift deleted file mode 100644 index e8ef67d..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// SingleAssignmentDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -Represents a disposable resource which only allows a single assignment of its underlying disposable resource. - -If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an exception. -*/ -public final class SingleAssignmentDisposable : DisposeBase, Cancelable { - - fileprivate enum DisposeState: UInt32 { - case disposed = 1 - case disposableSet = 2 - } - - // Jeej, swift API consistency rules - fileprivate enum DisposeStateInt32: Int32 { - case disposed = 1 - case disposableSet = 2 - } - - // state - private var _state: AtomicInt = 0 - private var _disposable = nil as Disposable? - - /// - returns: A value that indicates whether the object is disposed. - public var isDisposed: Bool { - return AtomicFlagSet(DisposeState.disposed.rawValue, &_state) - } - - /// Initializes a new instance of the `SingleAssignmentDisposable`. - public override init() { - super.init() - } - - /// Gets or sets the underlying disposable. After disposal, the result of getting this property is undefined. - /// - /// **Throws exception if the `SingleAssignmentDisposable` has already been assigned to.** - public func setDisposable(_ disposable: Disposable) { - _disposable = disposable - - let previousState = AtomicOr(DisposeState.disposableSet.rawValue, &_state) - - if (previousState & DisposeStateInt32.disposableSet.rawValue) != 0 { - rxFatalError("oldState.disposable != nil") - } - - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { - disposable.dispose() - _disposable = nil - } - } - - /// Disposes the underlying disposable. - public func dispose() { - let previousState = AtomicOr(DisposeState.disposed.rawValue, &_state) - - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { - return - } - - if (previousState & DisposeStateInt32.disposableSet.rawValue) != 0 { - guard let disposable = _disposable else { - rxFatalError("Disposable not set") - } - disposable.dispose() - _disposable = nil - } - } - -} diff --git a/Demo/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift b/Demo/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift deleted file mode 100644 index 3ae138a..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// SubscriptionDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct SubscriptionDisposable : Disposable { - private let _key: T.DisposeKey - private weak var _owner: T? - - init(owner: T, key: T.DisposeKey) { - _owner = owner - _key = key - } - - func dispose() { - _owner?.synchronizedUnsubscribe(_key) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Errors.swift b/Demo/Pods/RxSwift/RxSwift/Errors.swift deleted file mode 100644 index f17b52d..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Errors.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// Errors.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -let RxErrorDomain = "RxErrorDomain" -let RxCompositeFailures = "RxCompositeFailures" - -/// Generic Rx error codes. -public enum RxError - : Swift.Error - , CustomDebugStringConvertible { - /// Unknown error occurred. - case unknown - /// Performing an action on disposed object. - case disposed(object: AnyObject) - /// Aritmetic overflow error. - case overflow - /// Argument out of range error. - case argumentOutOfRange - /// Sequence doesn't contain any elements. - case noElements - /// Sequence contains more than one element. - case moreThanOneElement - /// Timeout error. - case timeout -} - -extension RxError { - /// A textual representation of `self`, suitable for debugging. - public var debugDescription: String { - switch self { - case .unknown: - return "Unknown error occurred." - case .disposed(let object): - return "Object `\(object)` was already disposed." - case .overflow: - return "Arithmetic overflow occurred." - case .argumentOutOfRange: - return "Argument out of range." - case .noElements: - return "Sequence doesn't contain any elements." - case .moreThanOneElement: - return "Sequence contains more than one element." - case .timeout: - return "Sequence timeout." - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Event.swift b/Demo/Pods/RxSwift/RxSwift/Event.swift deleted file mode 100644 index 9193e35..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Event.swift +++ /dev/null @@ -1,106 +0,0 @@ -// -// Event.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a sequence event. -/// -/// Sequence grammar: -/// **next\* (error | completed)** -public enum Event { - /// Next element is produced. - case next(Element) - - /// Sequence terminated with an error. - case error(Swift.Error) - - /// Sequence completed successfully. - case completed -} - -extension Event : CustomDebugStringConvertible { - /// Description of event. - public var debugDescription: String { - switch self { - case .next(let value): - return "next(\(value))" - case .error(let error): - return "error(\(error))" - case .completed: - return "completed" - } - } -} - -extension Event { - /// Is `completed` or `error` event. - public var isStopEvent: Bool { - switch self { - case .next: return false - case .error, .completed: return true - } - } - - /// If `next` event, returns element value. - public var element: Element? { - if case .next(let value) = self { - return value - } - return nil - } - - /// If `error` event, returns error. - public var error: Swift.Error? { - if case .error(let error) = self { - return error - } - return nil - } - - /// If `completed` event, returns `true`. - public var isCompleted: Bool { - if case .completed = self { - return true - } - return false - } -} - -extension Event { - /// Maps sequence elements using transform. If error happens during the transform, `.error` - /// will be returned as value. - public func map(_ transform: (Element) throws -> Result) -> Event { - do { - switch self { - case let .next(element): - return .next(try transform(element)) - case let .error(error): - return .error(error) - case .completed: - return .completed - } - } - catch let e { - return .error(e) - } - } -} - -/// A type that can be converted to `Event`. -public protocol EventConvertible { - /// Type of element in event - associatedtype ElementType - - /// Event representation of this instance - var event: Event { get } -} - -extension Event : EventConvertible { - /// Event representation of this instance - public var event: Event { - return self - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift b/Demo/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift deleted file mode 100644 index 748578d..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// Bag+Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/19/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - - -// MARK: forEach - -@inline(__always) -func dispatch(_ bag: Bag<(Event) -> ()>, _ event: Event) { - bag._value0?(event) - - if bag._onlyFastPath { - return - } - - let pairs = bag._pairs - for i in 0 ..< pairs.count { - pairs[i].value(event) - } - - if let dictionary = bag._dictionary { - for element in dictionary.values { - element(event) - } - } -} - -/// Dispatches `dispose` to all disposables contained inside bag. -func disposeAll(in bag: Bag) { - bag._value0?.dispose() - - if bag._onlyFastPath { - return - } - - let pairs = bag._pairs - for i in 0 ..< pairs.count { - pairs[i].value.dispose() - } - - if let dictionary = bag._dictionary { - for element in dictionary.values { - element.dispose() - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift b/Demo/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift deleted file mode 100644 index 42ef636..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// String+Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension String { - /// This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)` - func lastIndexOf(_ character: Character) -> Index? { - var index = endIndex - while index > startIndex { - index = self.index(before: index) - if self[index] == character { - return index - } - } - - return nil - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/GroupedObservable.swift b/Demo/Pods/RxSwift/RxSwift/GroupedObservable.swift deleted file mode 100644 index d87e0ba..0000000 --- a/Demo/Pods/RxSwift/RxSwift/GroupedObservable.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// GroupedObservable.swift -// RxSwift -// -// Created by Tomi Koskinen on 01/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents an observable sequence of elements that have a common key. -public struct GroupedObservable : ObservableType { - public typealias E = Element - - /// Gets the common key. - public let key: Key - - private let source: Observable - - /// Initializes grouped observable sequence with key and source observable sequence. - /// - /// - parameter key: Grouped observable sequence key - /// - parameter source: Observable sequence that represents sequence of elements for the key - /// - returns: Grouped observable sequence of elements for the specific key - public init(key: Key, source: Observable) { - self.key = key - self.source = source - } - - /// Subscribes `observer` to receive events for this sequence. - public func subscribe(_ observer: O) -> Disposable where O.E == E { - return self.source.subscribe(observer) - } - - /// Converts `self` to `Observable` sequence. - public func asObservable() -> Observable { - return source - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift b/Demo/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift deleted file mode 100644 index 8dc2a85..0000000 --- a/Demo/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// ImmediateSchedulerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/31/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents an object that immediately schedules units of work. -public protocol ImmediateSchedulerType { - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable -} - -extension ImmediateSchedulerType { - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRecursive(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> ()) -> ()) -> Disposable { - let recursiveScheduler = RecursiveImmediateScheduler(action: action, scheduler: self) - - recursiveScheduler.schedule(state) - - return Disposables.create(with: recursiveScheduler.dispose) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observable.swift b/Demo/Pods/RxSwift/RxSwift/Observable.swift deleted file mode 100644 index f0c55af..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observable.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Observable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// A type-erased `ObservableType`. -/// -/// It represents a push style sequence. -public class Observable : ObservableType { - /// Type of elements in sequence. - public typealias E = Element - - init() { -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - } - - public func subscribe(_ observer: O) -> Disposable where O.E == E { - rxAbstractMethod() - } - - public func asObservable() -> Observable { - return self - } - - deinit { -#if TRACE_RESOURCES - let _ = Resources.decrementTotal() -#endif - } - - // this is kind of ugly I know :( - // Swift compiler reports "Not supported yet" when trying to override protocol extensions, so ¯\_(ツ)_/¯ - - /// Optimizations for map operator - internal func composeMap(_ transform: @escaping (Element) throws -> R) -> Observable { - return _map(source: self, transform: transform) - } -} - diff --git a/Demo/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift b/Demo/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift deleted file mode 100644 index d89c5aa..0000000 --- a/Demo/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ObservableConvertibleType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Type that can be converted to observable sequence (`Observable`). -public protocol ObservableConvertibleType { - /// Type of elements in sequence. - associatedtype E - - /// Converts `self` to `Observable` sequence. - /// - /// - returns: Observable sequence that represents `self`. - func asObservable() -> Observable -} diff --git a/Demo/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift b/Demo/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift deleted file mode 100644 index 29ed8a2..0000000 --- a/Demo/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// ObservableType+Extensions.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if DEBUG - import Foundation -#endif - -extension ObservableType { - /** - Subscribes an event handler to an observable sequence. - - - parameter on: Action to invoke for each event in the observable sequence. - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - public func subscribe(_ on: @escaping (Event) -> Void) - -> Disposable { - let observer = AnonymousObserver { e in - on(e) - } - return self.asObservable().subscribe(observer) - } - - - /** - Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable sequence. - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has - gracefully completed, errored, or if the generation is canceled by disposing subscription). - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - public func subscribe(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) - -> Disposable { - let disposable: Disposable - - if let disposed = onDisposed { - disposable = Disposables.create(with: disposed) - } - else { - disposable = Disposables.create() - } - - #if DEBUG - let synchronizationTracker = SynchronizationTracker() - #endif - - let callStack = Hooks.recordCallStackOnError ? Hooks.customCaptureSubscriptionCallstack() : [] - - let observer = AnonymousObserver { event in - - #if DEBUG - synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { synchronizationTracker.unregister() } - #endif - - switch event { - case .next(let value): - onNext?(value) - case .error(let error): - if let onError = onError { - onError(error) - } - else { - Hooks.defaultErrorHandler(callStack, error) - } - disposable.dispose() - case .completed: - onCompleted?() - disposable.dispose() - } - } - return Disposables.create( - self.asObservable().subscribe(observer), - disposable - ) - } -} - -import class Foundation.NSRecursiveLock - -extension Hooks { - public typealias DefaultErrorHandler = (_ subscriptionCallStack: [String], _ error: Error) -> () - public typealias CustomCaptureSubscriptionCallstack = () -> [String] - - fileprivate static let _lock = RecursiveLock() - fileprivate static var _defaultErrorHandler: DefaultErrorHandler = { subscriptionCallStack, error in - #if DEBUG - let serializedCallStack = subscriptionCallStack.joined(separator: "\n") - print("Unhandled error happened: \(error)\n subscription called from:\n\(serializedCallStack)") - #endif - } - fileprivate static var _customCaptureSubscriptionCallstack: CustomCaptureSubscriptionCallstack = { - #if DEBUG - return Thread.callStackSymbols - #else - return [] - #endif - } - - /// Error handler called in case onError handler wasn't provided. - public static var defaultErrorHandler: DefaultErrorHandler { - get { - _lock.lock(); defer { _lock.unlock() } - return _defaultErrorHandler - } - set { - _lock.lock(); defer { _lock.unlock() } - _defaultErrorHandler = newValue - } - } - - /// Subscription callstack block to fetch custom callstack information. - public static var customCaptureSubscriptionCallstack: CustomCaptureSubscriptionCallstack { - get { - _lock.lock(); defer { _lock.unlock() } - return _customCaptureSubscriptionCallstack - } - set { - _lock.lock(); defer { _lock.unlock() } - _customCaptureSubscriptionCallstack = newValue - } - } -} - diff --git a/Demo/Pods/RxSwift/RxSwift/ObservableType.swift b/Demo/Pods/RxSwift/RxSwift/ObservableType.swift deleted file mode 100644 index e41a36a..0000000 --- a/Demo/Pods/RxSwift/RxSwift/ObservableType.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// ObservableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a push style sequence. -public protocol ObservableType : ObservableConvertibleType { - /** - Subscribes `observer` to receive events for this sequence. - - ### Grammar - - **Next\* (Error | Completed)?** - - * sequences can produce zero or more elements so zero or more `Next` events can be sent to `observer` - * once an `Error` or `Completed` event is sent, the sequence terminates and can't produce any other elements - - It is possible that events are sent from different threads, but no two events can be sent concurrently to - `observer`. - - ### Resource Management - - When sequence sends `Complete` or `Error` event all internal resources that compute sequence elements - will be freed. - - To cancel production of sequence elements and free resources immediately, call `dispose` on returned - subscription. - - - returns: Subscription for `observer` that can be used to cancel production of sequence elements and free resources. - */ - func subscribe(_ observer: O) -> Disposable where O.E == E -} - -extension ObservableType { - - /// Default implementation of converting `ObservableType` to `Observable`. - public func asObservable() -> Observable { - // temporary workaround - //return Observable.create(subscribe: self.subscribe) - return Observable.create { o in - return self.subscribe(o) - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/AddRef.swift b/Demo/Pods/RxSwift/RxSwift/Observables/AddRef.swift deleted file mode 100644 index b782c13..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/AddRef.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// AddRef.swift -// RxSwift -// -// Created by Junior B. on 30/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class AddRefSink : Sink, ObserverType { - typealias Element = O.E - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(_): - forwardOn(event) - case .completed, .error(_): - forwardOn(event) - dispose() - } - } -} - -final class AddRef : Producer { - typealias EventHandler = (Event) throws -> Void - - private let _source: Observable - private let _refCount: RefCountDisposable - - init(source: Observable, refCount: RefCountDisposable) { - _source = source - _refCount = refCount - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let releaseDisposable = _refCount.retain() - let sink = AddRefSink(observer: observer, cancel: cancel) - let subscription = Disposables.create(releaseDisposable, _source.subscribe(sink)) - - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Amb.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Amb.swift deleted file mode 100644 index 08ec04e..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Amb.swift +++ /dev/null @@ -1,157 +0,0 @@ -// -// Amb.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - returns: An observable sequence that surfaces any of the given sequences, whichever reacted first. - */ - public static func amb(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return sequence.reduce(Observable.never()) { a, o in - return a.amb(o.asObservable()) - } - } -} - -extension ObservableType { - - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - parameter right: Second observable sequence. - - returns: An observable sequence that surfaces either of the given sequences, whichever reacted first. - */ - public func amb - (_ right: O2) - -> Observable where O2.E == E { - return Amb(left: asObservable(), right: right.asObservable()) - } -} - -fileprivate enum AmbState { - case neither - case left - case right -} - -final fileprivate class AmbObserver : ObserverType { - typealias Element = O.E - typealias Parent = AmbSink - typealias This = AmbObserver - typealias Sink = (This, Event) -> Void - - fileprivate let _parent: Parent - fileprivate var _sink: Sink - fileprivate var _cancel: Disposable - - init(parent: Parent, cancel: Disposable, sink: @escaping Sink) { -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - - _parent = parent - _sink = sink - _cancel = cancel - } - - func on(_ event: Event) { - _sink(self, event) - if event.isStopEvent { - _cancel.dispose() - } - } - - deinit { -#if TRACE_RESOURCES - let _ = Resources.decrementTotal() -#endif - } -} - -final fileprivate class AmbSink : Sink { - typealias ElementType = O.E - typealias Parent = Amb - typealias AmbObserverType = AmbObserver - - private let _parent: Parent - - private let _lock = RecursiveLock() - // state - private var _choice = AmbState.neither - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let disposeAll = Disposables.create(subscription1, subscription2) - - let forwardEvent = { (o: AmbObserverType, event: Event) -> Void in - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - - let decide = { (o: AmbObserverType, event: Event, me: AmbState, otherSubscription: Disposable) in - self._lock.performLocked { - if self._choice == .neither { - self._choice = me - o._sink = forwardEvent - o._cancel = disposeAll - otherSubscription.dispose() - } - - if self._choice == me { - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - } - } - - let sink1 = AmbObserver(parent: self, cancel: subscription1) { o, e in - decide(o, e, .left, subscription2) - } - - let sink2 = AmbObserver(parent: self, cancel: subscription1) { o, e in - decide(o, e, .right, subscription1) - } - - subscription1.setDisposable(_parent._left.subscribe(sink1)) - subscription2.setDisposable(_parent._right.subscribe(sink2)) - - return disposeAll - } -} - -final fileprivate class Amb: Producer { - fileprivate let _left: Observable - fileprivate let _right: Observable - - init(left: Observable, right: Observable) { - _left = left - _right = right - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AmbSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift b/Demo/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift deleted file mode 100644 index 36fa685..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// AsMaybe.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class AsMaybeSink : Sink, ObserverType { - typealias ElementType = O.E - typealias E = ElementType - - private var _element: Event? = nil - - func on(_ event: Event) { - switch event { - case .next: - if _element != nil { - forwardOn(.error(RxError.moreThanOneElement)) - dispose() - } - - _element = event - case .error: - forwardOn(event) - dispose() - case .completed: - if let element = _element { - forwardOn(element) - } - forwardOn(.completed) - dispose() - } - } -} - -final class AsMaybe: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AsMaybeSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/AsSingle.swift b/Demo/Pods/RxSwift/RxSwift/Observables/AsSingle.swift deleted file mode 100644 index 080aa8e..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/AsSingle.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// AsSingle.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class AsSingleSink : Sink, ObserverType { - typealias ElementType = O.E - typealias E = ElementType - - private var _element: Event? = nil - - func on(_ event: Event) { - switch event { - case .next: - if _element != nil { - forwardOn(.error(RxError.moreThanOneElement)) - dispose() - } - - _element = event - case .error: - forwardOn(event) - dispose() - case .completed: - if let element = _element { - forwardOn(element) - forwardOn(.completed) - } - else { - forwardOn(.error(RxError.noElements)) - } - dispose() - } - } -} - -final class AsSingle: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AsSingleSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Buffer.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Buffer.swift deleted file mode 100644 index b8c33ae..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Buffer.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// Buffer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence into a buffer that's sent out when either it's full or a given amount of time has elapsed, using the specified scheduler to run timers. - - A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are taken, or at the scheduled time of departure, whichever event occurs first. - - - seealso: [buffer operator on reactivex.io](http://reactivex.io/documentation/operators/buffer.html) - - - parameter timeSpan: Maximum time length of a buffer. - - parameter count: Maximum element count of a buffer. - - parameter scheduler: Scheduler to run buffering timers on. - - returns: An observable sequence of buffers. - */ - public func buffer(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable<[E]> { - return BufferTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -final fileprivate class BufferTimeCount : Producer<[Element]> { - - fileprivate let _timeSpan: RxTimeInterval - fileprivate let _count: Int - fileprivate let _scheduler: SchedulerType - fileprivate let _source: Observable - - init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { - _source = source - _timeSpan = timeSpan - _count = count - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [Element] { - let sink = BufferTimeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class BufferTimeCountSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where O.E == [Element] { - typealias Parent = BufferTimeCount - typealias E = Element - - private let _parent: Parent - - let _lock = RecursiveLock() - - // state - private let _timerD = SerialDisposable() - private var _buffer = [Element]() - private var _windowID = 0 - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - createTimer(_windowID) - return Disposables.create(_timerD, _parent._source.subscribe(self)) - } - - func startNewWindowAndSendCurrentOne() { - _windowID = _windowID &+ 1 - let windowID = _windowID - - let buffer = _buffer - _buffer = [] - forwardOn(.next(buffer)) - - createTimer(windowID) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - _buffer.append(element) - - if _buffer.count == _parent._count { - startNewWindowAndSendCurrentOne() - } - - case .error(let error): - _buffer = [] - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.next(_buffer)) - forwardOn(.completed) - dispose() - } - } - - func createTimer(_ windowID: Int) { - if _timerD.isDisposed { - return - } - - if _windowID != windowID { - return - } - - let nextTimer = SingleAssignmentDisposable() - - _timerD.disposable = nextTimer - - let disposable = _parent._scheduler.scheduleRelative(windowID, dueTime: _parent._timeSpan) { previousWindowID in - self._lock.performLocked { - if previousWindowID != self._windowID { - return - } - - self.startNewWindowAndSendCurrentOne() - } - - return Disposables.create() - } - - nextTimer.setDisposable(disposable) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Catch.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Catch.swift deleted file mode 100644 index 187eb8a..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Catch.swift +++ /dev/null @@ -1,235 +0,0 @@ -// -// Catch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Continues an observable sequence that is terminated by an error with the observable sequence produced by the handler. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - parameter handler: Error handler function, producing another observable sequence. - - returns: An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an error occurred. - */ - public func catchError(_ handler: @escaping (Swift.Error) throws -> Observable) - -> Observable { - return Catch(source: asObservable(), handler: handler) - } - - /** - Continues an observable sequence that is terminated by an error with a single element. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - parameter element: Last element in an observable sequence in case error occurs. - - returns: An observable sequence containing the source sequence's elements, followed by the `element` in case an error occurred. - */ - public func catchErrorJustReturn(_ element: E) - -> Observable { - return Catch(source: asObservable(), handler: { _ in Observable.just(element) }) - } - -} - -extension ObservableType { - /** - Continues an observable sequence that is terminated by an error with the next observable sequence. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. - */ - public static func catchError(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return CatchSequence(sources: sequence) - } -} - -extension ObservableType { - - /** - Repeats the source observable sequence until it successfully terminates. - - **This could potentially create an infinite sequence.** - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - returns: Observable sequence to repeat until it successfully terminates. - */ - public func retry() -> Observable { - return CatchSequence(sources: InfiniteSequence(repeatedValue: self.asObservable())) - } - - /** - Repeats the source observable sequence the specified number of times in case of an error or until it successfully terminates. - - If you encounter an error and want it to retry once, then you must use `retry(2)` - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter maxAttemptCount: Maximum number of times to repeat the sequence. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. - */ - public func retry(_ maxAttemptCount: Int) - -> Observable { - return CatchSequence(sources: Swift.repeatElement(self.asObservable(), count: maxAttemptCount)) - } -} - -// catch with callback - -final fileprivate class CatchSinkProxy : ObserverType { - typealias E = O.E - typealias Parent = CatchSink - - private let _parent: Parent - - init(parent: Parent) { - _parent = parent - } - - func on(_ event: Event) { - _parent.forwardOn(event) - - switch event { - case .next: - break - case .error, .completed: - _parent.dispose() - } - } -} - -final fileprivate class CatchSink : Sink, ObserverType { - typealias E = O.E - typealias Parent = Catch - - private let _parent: Parent - private let _subscription = SerialDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let d1 = SingleAssignmentDisposable() - _subscription.disposable = d1 - d1.setDisposable(_parent._source.subscribe(self)) - - return _subscription - } - - func on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .completed: - forwardOn(event) - dispose() - case .error(let error): - do { - let catchSequence = try _parent._handler(error) - - let observer = CatchSinkProxy(parent: self) - - _subscription.disposable = catchSequence.subscribe(observer) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - } - } -} - -final fileprivate class Catch : Producer { - typealias Handler = (Swift.Error) throws -> Observable - - fileprivate let _source: Observable - fileprivate let _handler: Handler - - init(source: Observable, handler: @escaping Handler) { - _source = source - _handler = handler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = CatchSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -// catch enumerable - -final fileprivate class CatchSequenceSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Element = O.E - typealias Parent = CatchSequence - - private var _lastError: Swift.Error? - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .error(let error): - _lastError = error - schedule(.moveNext) - case .completed: - forwardOn(event) - dispose() - } - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - return source.subscribe(self) - } - - override func done() { - if let lastError = _lastError { - forwardOn(.error(lastError)) - } - else { - forwardOn(.completed) - } - - self.dispose() - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - if let onError = observable as? CatchSequence { - return (onError.sources.makeIterator(), nil) - } - else { - return nil - } - } -} - -final fileprivate class CatchSequence : Producer where S.Iterator.Element : ObservableConvertibleType { - typealias Element = S.Iterator.Element.E - - let sources: S - - init(sources: S) { - self.sources = sources - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = CatchSequenceSink(observer: observer, cancel: cancel) - let subscription = sink.run((self.sources.makeIterator(), nil)) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift b/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift deleted file mode 100644 index 45e0173..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift +++ /dev/null @@ -1,157 +0,0 @@ -// -// CombineLatest+Collection.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> E) -> Observable - where C.Iterator.Element: ObservableType { - return CombineLatestCollectionType(sources: collection, resultSelector: resultSelector) - } - - /** - Merges the specified observable sequences into one observable sequence whenever any of the observable sequences produces an element. - - - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest(_ collection: C) -> Observable<[E]> - where C.Iterator.Element: ObservableType, C.Iterator.Element.E == E { - return CombineLatestCollectionType(sources: collection, resultSelector: { $0 }) - } -} - -final fileprivate class CombineLatestCollectionTypeSink - : Sink where C.Iterator.Element : ObservableConvertibleType { - typealias R = O.E - typealias Parent = CombineLatestCollectionType - typealias SourceElement = C.Iterator.Element.E - - let _parent: Parent - - let _lock = RecursiveLock() - - // state - var _numberOfValues = 0 - var _values: [SourceElement?] - var _isDone: [Bool] - var _numberOfDone = 0 - var _subscriptions: [SingleAssignmentDisposable] - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _values = [SourceElement?](repeating: nil, count: parent._count) - _isDone = [Bool](repeating: false, count: parent._count) - _subscriptions = Array() - _subscriptions.reserveCapacity(parent._count) - - for _ in 0 ..< parent._count { - _subscriptions.append(SingleAssignmentDisposable()) - } - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event, atIndex: Int) { - _lock.lock(); defer { _lock.unlock() } // { - switch event { - case .next(let element): - if _values[atIndex] == nil { - _numberOfValues += 1 - } - - _values[atIndex] = element - - if _numberOfValues < _parent._count { - let numberOfOthersThatAreDone = self._numberOfDone - (_isDone[atIndex] ? 1 : 0) - if numberOfOthersThatAreDone == self._parent._count - 1 { - forwardOn(.completed) - dispose() - } - return - } - - do { - let result = try _parent._resultSelector(_values.map { $0! }) - forwardOn(.next(result)) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - if _isDone[atIndex] { - return - } - - _isDone[atIndex] = true - _numberOfDone += 1 - - if _numberOfDone == self._parent._count { - forwardOn(.completed) - dispose() - } - else { - _subscriptions[atIndex].dispose() - } - } - // } - } - - func run() -> Disposable { - var j = 0 - for i in _parent._sources { - let index = j - let source = i.asObservable() - let disposable = source.subscribe(AnyObserver { event in - self.on(event, atIndex: index) - }) - - _subscriptions[j].setDisposable(disposable) - - j += 1 - } - - if _parent._sources.isEmpty { - self.forwardOn(.completed) - } - - return Disposables.create(_subscriptions) - } -} - -final fileprivate class CombineLatestCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { - typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R - - let _sources: C - let _resultSelector: ResultSelector - let _count: Int - - init(sources: C, resultSelector: @escaping ResultSelector) { - _sources = sources - _resultSelector = resultSelector - _count = Int(Int64(self._sources.count)) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestCollectionTypeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift b/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift deleted file mode 100644 index aad2255..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift +++ /dev/null @@ -1,843 +0,0 @@ -// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project -// -// CombineLatest+arity.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - - -// 2 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) - -> Observable { - return CombineLatest2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2) - -> Observable<(O1.E, O2.E)> { - return CombineLatest2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: { ($0, $1) } - ) - } -} - -final class CombineLatestSink2_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest2 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 2, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - - return Disposables.create([ - subscription1, - subscription2 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2) - } -} - -final class CombineLatest2 : Producer { - typealias ResultSelector = (E1, E2) throws -> R - - let _source1: Observable - let _source2: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink2_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 3 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) - -> Observable { - return CombineLatest3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3) - -> Observable<(O1.E, O2.E, O3.E)> { - return CombineLatest3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: { ($0, $1, $2) } - ) - } -} - -final class CombineLatestSink3_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest3 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 3, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3) - } -} - -final class CombineLatest3 : Producer { - typealias ResultSelector = (E1, E2, E3) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink3_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 4 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) - -> Observable { - return CombineLatest4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4) - -> Observable<(O1.E, O2.E, O3.E, O4.E)> { - return CombineLatest4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: { ($0, $1, $2, $3) } - ) - } -} - -final class CombineLatestSink4_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest4 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 4, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4) - } -} - -final class CombineLatest4 : Producer { - typealias ResultSelector = (E1, E2, E3, E4) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink4_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 5 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) - -> Observable { - return CombineLatest5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E)> { - return CombineLatest5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4) } - ) - } -} - -final class CombineLatestSink5_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest5 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 5, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - subscription5.setDisposable(_parent._source5.subscribe(observer5)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4, _latestElement5) - } -} - -final class CombineLatest5 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - _source5 = source5 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink5_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 6 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) - -> Observable { - return CombineLatest6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E)> { - return CombineLatest6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5) } - ) - } -} - -final class CombineLatestSink6_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest6 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 6, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: _lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - subscription5.setDisposable(_parent._source5.subscribe(observer5)) - subscription6.setDisposable(_parent._source6.subscribe(observer6)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4, _latestElement5, _latestElement6) - } -} - -final class CombineLatest6 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - _source5 = source5 - _source6 = source6 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink6_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 7 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) - -> Observable { - return CombineLatest7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E)> { - return CombineLatest7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6) } - ) - } -} - -final class CombineLatestSink7_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest7 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - var _latestElement7: E7! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 7, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: _lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - let observer7 = CombineLatestObserver(lock: _lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - subscription5.setDisposable(_parent._source5.subscribe(observer5)) - subscription6.setDisposable(_parent._source6.subscribe(observer6)) - subscription7.setDisposable(_parent._source7.subscribe(observer7)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4, _latestElement5, _latestElement6, _latestElement7) - } -} - -final class CombineLatest7 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - let _source7: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - _source5 = source5 - _source6 = source6 - _source7 = source7 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink7_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 8 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) - -> Observable { - return CombineLatest8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E)> { - return CombineLatest8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6, $7) } - ) - } -} - -final class CombineLatestSink8_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest8 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - var _latestElement7: E7! = nil - var _latestElement8: E8! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 8, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - let subscription8 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: _lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - let observer7 = CombineLatestObserver(lock: _lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - let observer8 = CombineLatestObserver(lock: _lock, parent: self, index: 7, setLatestValue: { (e: E8) -> Void in self._latestElement8 = e }, this: subscription8) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - subscription5.setDisposable(_parent._source5.subscribe(observer5)) - subscription6.setDisposable(_parent._source6.subscribe(observer6)) - subscription7.setDisposable(_parent._source7.subscribe(observer7)) - subscription8.setDisposable(_parent._source8.subscribe(observer8)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7, - subscription8 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4, _latestElement5, _latestElement6, _latestElement7, _latestElement8) - } -} - -final class CombineLatest8 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - let _source7: Observable - let _source8: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - _source5 = source5 - _source6 = source6 - _source7 = source7 - _source8 = source8 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink8_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift b/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift deleted file mode 100644 index 8c03e8c..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// CombineLatest.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol CombineLatestProtocol : class { - func next(_ index: Int) - func fail(_ error: Swift.Error) - func done(_ index: Int) -} - -class CombineLatestSink - : Sink - , CombineLatestProtocol { - typealias Element = O.E - - let _lock = RecursiveLock() - - private let _arity: Int - private var _numberOfValues = 0 - private var _numberOfDone = 0 - private var _hasValue: [Bool] - private var _isDone: [Bool] - - init(arity: Int, observer: O, cancel: Cancelable) { - _arity = arity - _hasValue = [Bool](repeating: false, count: arity) - _isDone = [Bool](repeating: false, count: arity) - - super.init(observer: observer, cancel: cancel) - } - - func getResult() throws -> Element { - rxAbstractMethod() - } - - func next(_ index: Int) { - if !_hasValue[index] { - _hasValue[index] = true - _numberOfValues += 1 - } - - if _numberOfValues == _arity { - do { - let result = try getResult() - forwardOn(.next(result)) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - } - else { - var allOthersDone = true - - for i in 0 ..< _arity { - if i != index && !_isDone[i] { - allOthersDone = false - break - } - } - - if allOthersDone { - forwardOn(.completed) - dispose() - } - } - } - - func fail(_ error: Swift.Error) { - forwardOn(.error(error)) - dispose() - } - - func done(_ index: Int) { - if _isDone[index] { - return - } - - _isDone[index] = true - _numberOfDone += 1 - - if _numberOfDone == _arity { - forwardOn(.completed) - dispose() - } - } -} - -final class CombineLatestObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = ElementType - typealias ValueSetter = (Element) -> Void - - private let _parent: CombineLatestProtocol - - let _lock: RecursiveLock - private let _index: Int - private let _this: Disposable - private let _setLatestValue: ValueSetter - - init(lock: RecursiveLock, parent: CombineLatestProtocol, index: Int, setLatestValue: @escaping ValueSetter, this: Disposable) { - _lock = lock - _parent = parent - _index = index - _this = this - _setLatestValue = setLatestValue - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - _setLatestValue(value) - _parent.next(_index) - case .error(let error): - _this.dispose() - _parent.fail(error) - case .completed: - _this.dispose() - _parent.done(_index) - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Concat.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Concat.swift deleted file mode 100644 index 35ef0e1..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Concat.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// Concat.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Concatenates the second observable sequence to `self` upon successful termination of `self`. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - parameter second: Second observable sequence. - - returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence. - */ - public func concat(_ second: O) -> Observable where O.E == E { - return Observable.concat([self.asObservable(), second.asObservable()]) - } -} - -extension ObservableType { - /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - public static func concat(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return Concat(sources: sequence, count: nil) - } - - /** - Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - public static func concat(_ collection: S) -> Observable - where S.Iterator.Element == Observable { - return Concat(sources: collection, count: Int64(collection.count)) - } - - /** - Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - public static func concat(_ sources: Observable ...) -> Observable { - return Concat(sources: sources, count: Int64(sources.count)) - } -} - -final fileprivate class ConcatSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Element = O.E - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event){ - switch event { - case .next: - forwardOn(event) - case .error: - forwardOn(event) - dispose() - case .completed: - schedule(.moveNext) - } - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - return source.subscribe(self) - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - if let source = observable as? Concat { - return (source._sources.makeIterator(), source._count) - } - else { - return nil - } - } -} - -final fileprivate class Concat : Producer where S.Iterator.Element : ObservableConvertibleType { - typealias Element = S.Iterator.Element.E - - fileprivate let _sources: S - fileprivate let _count: IntMax? - - init(sources: S, count: IntMax?) { - _sources = sources - _count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = ConcatSink(observer: observer, cancel: cancel) - let subscription = sink.run((_sources.makeIterator(), _count)) - return (sink: sink, subscription: subscription) - } -} - diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Create.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Create.swift deleted file mode 100644 index 4a1804a..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Create.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// Create.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - // MARK: create - - /** - Creates an observable sequence from a specified subscribe method implementation. - - - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) - - - parameter subscribe: Implementation of the resulting observable sequence's `subscribe` method. - - returns: The observable sequence with the specified implementation for the `subscribe` method. - */ - public static func create(_ subscribe: @escaping (AnyObserver) -> Disposable) -> Observable { - return AnonymousObservable(subscribe) - } -} - -final fileprivate class AnonymousObservableSink : Sink, ObserverType { - typealias E = O.E - typealias Parent = AnonymousObservable - - // state - private var _isStopped: AtomicInt = 0 - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - #if DEBUG - _synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { _synchronizationTracker.unregister() } - #endif - switch event { - case .next: - if _isStopped == 1 { - return - } - forwardOn(event) - case .error, .completed: - if AtomicCompareAndSwap(0, 1, &_isStopped) { - forwardOn(event) - dispose() - } - } - } - - func run(_ parent: Parent) -> Disposable { - return parent._subscribeHandler(AnyObserver(self)) - } -} - -final fileprivate class AnonymousObservable : Producer { - typealias SubscribeHandler = (AnyObserver) -> Disposable - - let _subscribeHandler: SubscribeHandler - - init(_ subscribeHandler: @escaping SubscribeHandler) { - _subscribeHandler = subscribeHandler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AnonymousObservableSink(observer: observer, cancel: cancel) - let subscription = sink.run(self) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Debounce.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Debounce.swift deleted file mode 100644 index 866427a..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Debounce.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// Debounce.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/11/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers. - - - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - - - parameter dueTime: Throttling duration for each element. - - parameter scheduler: Scheduler to run the throttle timers on. - - returns: The throttled sequence. - */ - public func debounce(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Debounce(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -final fileprivate class DebounceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - typealias ParentType = Debounce - - private let _parent: ParentType - - let _lock = RecursiveLock() - - // state - private var _id = 0 as UInt64 - private var _value: Element? = nil - - let cancellable = SerialDisposable() - - init(parent: ParentType, observer: O, cancel: Cancelable) { - _parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = _parent._source.subscribe(self) - - return Disposables.create(subscription, cancellable) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - _id = _id &+ 1 - let currentId = _id - _value = element - - - let scheduler = _parent._scheduler - let dueTime = _parent._dueTime - - let d = SingleAssignmentDisposable() - self.cancellable.disposable = d - d.setDisposable(scheduler.scheduleRelative(currentId, dueTime: dueTime, action: self.propagate)) - case .error: - _value = nil - forwardOn(event) - dispose() - case .completed: - if let value = _value { - _value = nil - forwardOn(.next(value)) - } - forwardOn(.completed) - dispose() - } - } - - func propagate(_ currentId: UInt64) -> Disposable { - _lock.lock(); defer { _lock.unlock() } // { - let originalValue = _value - - if let value = originalValue, _id == currentId { - _value = nil - forwardOn(.next(value)) - } - // } - return Disposables.create() - } -} - -final fileprivate class Debounce : Producer { - - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - _source = source - _dueTime = dueTime - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DebounceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Debug.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Debug.swift deleted file mode 100644 index 85b8af7..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Debug.swift +++ /dev/null @@ -1,103 +0,0 @@ -// -// Debug.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date -import class Foundation.DateFormatter - -extension ObservableType { - - /** - Prints received events for all observers on standard output. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter identifier: Identifier that is printed together with event description to standard output. - - parameter trimOutput: Should output be trimmed to max 40 characters. - - returns: An observable sequence whose events are printed to standard output. - */ - public func debug(_ identifier: String? = nil, trimOutput: Bool = false, file: String = #file, line: UInt = #line, function: String = #function) - -> Observable { - return Debug(source: self, identifier: identifier, trimOutput: trimOutput, file: file, line: line, function: function) - } -} - -fileprivate let dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" - -fileprivate func logEvent(_ identifier: String, dateFormat: DateFormatter, content: String) { - print("\(dateFormat.string(from: Date())): \(identifier) -> \(content)") -} - -final fileprivate class DebugSink : Sink, ObserverType where O.E == Source.E { - typealias Element = O.E - typealias Parent = Debug - - private let _parent: Parent - private let _timestampFormatter = DateFormatter() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _timestampFormatter.dateFormat = dateFormat - - logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "subscribed") - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - let maxEventTextLength = 40 - let eventText = "\(event)" - - let eventNormalized = (eventText.count > maxEventTextLength) && _parent._trimOutput - ? String(eventText.prefix(maxEventTextLength / 2)) + "..." + String(eventText.suffix(maxEventTextLength / 2)) - : eventText - - logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "Event \(eventNormalized)") - - forwardOn(event) - if event.isStopEvent { - dispose() - } - } - - override func dispose() { - if !self.disposed { - logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "isDisposed") - } - super.dispose() - } -} - -final fileprivate class Debug : Producer { - fileprivate let _identifier: String - fileprivate let _trimOutput: Bool - fileprivate let _source: Source - - init(source: Source, identifier: String?, trimOutput: Bool, file: String, line: UInt, function: String) { - _trimOutput = trimOutput - if let identifier = identifier { - _identifier = identifier - } - else { - let trimmedFile: String - if let lastIndex = file.lastIndexOf("/") { - trimmedFile = String(file[file.index(after: lastIndex) ..< file.endIndex]) - } - else { - trimmedFile = file - } - _identifier = "\(trimmedFile):\(line) (\(function))" - } - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Source.E { - let sink = DebugSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift b/Demo/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift deleted file mode 100644 index 696361f..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// DefaultIfEmpty.swift -// RxSwift -// -// Created by sergdort on 23/12/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Emits elements from the source observable sequence, or a default element if the source observable sequence is empty. - - - seealso: [DefaultIfEmpty operator on reactivex.io](http://reactivex.io/documentation/operators/defaultifempty.html) - - - parameter default: Default element to be sent if the source does not emit any elements - - returns: An observable sequence which emits default element end completes in case the original sequence is empty - */ - public func ifEmpty(default: E) -> Observable { - return DefaultIfEmpty(source: self.asObservable(), default: `default`) - } -} - -final fileprivate class DefaultIfEmptySink: Sink, ObserverType { - typealias E = O.E - private let _default: E - private var _isEmpty = true - - init(default: E, observer: O, cancel: Cancelable) { - _default = `default` - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(_): - _isEmpty = false - forwardOn(event) - case .error(_): - forwardOn(event) - dispose() - case .completed: - if _isEmpty { - forwardOn(.next(_default)) - } - forwardOn(.completed) - dispose() - } - } -} - -final fileprivate class DefaultIfEmpty: Producer { - private let _source: Observable - private let _default: SourceType - - init(source: Observable, `default`: SourceType) { - _source = source - _default = `default` - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { - let sink = DefaultIfEmptySink(default: _default, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Deferred.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Deferred.swift deleted file mode 100644 index 947f604..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Deferred.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// Deferred.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. - - - seealso: [defer operator on reactivex.io](http://reactivex.io/documentation/operators/defer.html) - - - parameter observableFactory: Observable factory function to invoke for each observer that subscribes to the resulting sequence. - - returns: An observable sequence whose observers trigger an invocation of the given observable factory function. - */ - public static func deferred(_ observableFactory: @escaping () throws -> Observable) - -> Observable { - return Deferred(observableFactory: observableFactory) - } -} - -final fileprivate class DeferredSink : Sink, ObserverType where S.E == O.E { - typealias E = O.E - - private let _observableFactory: () throws -> S - - init(observableFactory: @escaping () throws -> S, observer: O, cancel: Cancelable) { - _observableFactory = observableFactory - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let result = try _observableFactory() - return result.subscribe(self) - } - catch let e { - forwardOn(.error(e)) - dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - forwardOn(event) - - switch event { - case .next: - break - case .error: - dispose() - case .completed: - dispose() - } - } -} - -final fileprivate class Deferred : Producer { - typealias Factory = () throws -> S - - private let _observableFactory : Factory - - init(observableFactory: @escaping Factory) { - _observableFactory = observableFactory - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = DeferredSink(observableFactory: _observableFactory, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Delay.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Delay.swift deleted file mode 100644 index 13955a3..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Delay.swift +++ /dev/null @@ -1,181 +0,0 @@ -// -// Delay.swift -// RxSwift -// -// Created by tarunon on 2016/02/09. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -extension ObservableType { - - /** - Returns an observable sequence by the source observable sequence shifted forward in time by a specified delay. Error events from the source observable sequence are not delayed. - - - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) - - - parameter dueTime: Relative time shift of the source by. - - parameter scheduler: Scheduler to run the subscription delay timer on. - - returns: the source Observable shifted in time by the specified delay. - */ - public func delay(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Delay(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -final fileprivate class DelaySink - : Sink - , ObserverType { - typealias E = O.E - typealias Source = Observable - typealias DisposeKey = Bag.KeyType - - private let _lock = RecursiveLock() - - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - private let _sourceSubscription = SingleAssignmentDisposable() - private let _cancelable = SerialDisposable() - - // is scheduled some action - private var _active = false - // is "run loop" on different scheduler running - private var _running = false - private var _errorEvent: Event? = nil - - // state - private var _queue = Queue<(eventTime: RxTime, event: Event)>(capacity: 0) - private var _disposed = false - - init(observer: O, dueTime: RxTimeInterval, scheduler: SchedulerType, cancel: Cancelable) { - _dueTime = dueTime - _scheduler = scheduler - super.init(observer: observer, cancel: cancel) - } - - // All of these complications in this method are caused by the fact that - // error should be propagated immediately. Error can be potentially received on different - // scheduler so this process needs to be synchronized somehow. - // - // Another complication is that scheduler is potentially concurrent so internal queue is used. - func drainQueue(state: (), scheduler: AnyRecursiveScheduler<()>) { - - _lock.lock() // { - let hasFailed = _errorEvent != nil - if !hasFailed { - _running = true - } - _lock.unlock() // } - - if hasFailed { - return - } - - var ranAtLeastOnce = false - - while true { - _lock.lock() // { - let errorEvent = _errorEvent - - let eventToForwardImmediately = ranAtLeastOnce ? nil : _queue.dequeue()?.event - let nextEventToScheduleOriginalTime: Date? = ranAtLeastOnce && !_queue.isEmpty ? _queue.peek().eventTime : nil - - if let _ = errorEvent { - } - else { - if let _ = eventToForwardImmediately { - } - else if let _ = nextEventToScheduleOriginalTime { - _running = false - } - else { - _running = false - _active = false - } - } - _lock.unlock() // { - - if let errorEvent = errorEvent { - self.forwardOn(errorEvent) - self.dispose() - return - } - else { - if let eventToForwardImmediately = eventToForwardImmediately { - ranAtLeastOnce = true - self.forwardOn(eventToForwardImmediately) - if case .completed = eventToForwardImmediately { - self.dispose() - return - } - } - else if let nextEventToScheduleOriginalTime = nextEventToScheduleOriginalTime { - let elapsedTime = _scheduler.now.timeIntervalSince(nextEventToScheduleOriginalTime) - let interval = _dueTime - elapsedTime - let normalizedInterval = interval < 0.0 ? 0.0 : interval - scheduler.schedule((), dueTime: normalizedInterval) - return - } - else { - return - } - } - } - } - - func on(_ event: Event) { - if event.isStopEvent { - _sourceSubscription.dispose() - } - - switch event { - case .error(_): - _lock.lock() // { - let shouldSendImmediately = !_running - _queue = Queue(capacity: 0) - _errorEvent = event - _lock.unlock() // } - - if shouldSendImmediately { - forwardOn(event) - dispose() - } - default: - _lock.lock() // { - let shouldSchedule = !_active - _active = true - _queue.enqueue((_scheduler.now, event)) - _lock.unlock() // } - - if shouldSchedule { - _cancelable.disposable = _scheduler.scheduleRecursive((), dueTime: _dueTime, action: self.drainQueue) - } - } - } - - func run(source: Observable) -> Disposable { - _sourceSubscription.setDisposable(source.subscribe(self)) - return Disposables.create(_sourceSubscription, _cancelable) - } -} - -final fileprivate class Delay: Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - _source = source - _dueTime = dueTime - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DelaySink(observer: observer, dueTime: _dueTime, scheduler: _scheduler, cancel: cancel) - let subscription = sink.run(source: _source) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift b/Demo/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift deleted file mode 100644 index 9225a19..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// DelaySubscription.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Time shifts the observable sequence by delaying the subscription with the specified relative time duration, using the specified scheduler to run timers. - - - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) - - - parameter dueTime: Relative time shift of the subscription. - - parameter scheduler: Scheduler to run the subscription delay timer on. - - returns: Time-shifted sequence. - */ - public func delaySubscription(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return DelaySubscription(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -final fileprivate class DelaySubscriptionSink - : Sink, ObserverType { - typealias E = O.E - typealias Parent = DelaySubscription - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - forwardOn(event) - if event.isStopEvent { - dispose() - } - } - -} - -final fileprivate class DelaySubscription: Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - _source = source - _dueTime = dueTime - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DelaySubscriptionSink(parent: self, observer: observer, cancel: cancel) - let subscription = _scheduler.scheduleRelative((), dueTime: _dueTime) { _ in - return self._source.subscribe(sink) - } - - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift deleted file mode 100644 index d142249..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// Dematerialize.swift -// RxSwift -// -// Created by Jamie Pinkham on 3/13/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where E: EventConvertible { - /** - Convert any previously materialized Observable into it's original form. - - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) - - returns: The dematerialized observable sequence. - */ - public func dematerialize() -> Observable { - return Dematerialize(source: self.asObservable()) - } - -} - -fileprivate final class DematerializeSink: Sink, ObserverType where O.E == Element.ElementType { - fileprivate func on(_ event: Event) { - switch event { - case .next(let element): - forwardOn(element.event) - if element.event.isStopEvent { - dispose() - } - case .completed: - forwardOn(.completed) - dispose() - case .error(let error): - forwardOn(.error(error)) - dispose() - } - } -} - -final fileprivate class Dematerialize: Producer { - private let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element.ElementType { - let sink = DematerializeSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift b/Demo/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift deleted file mode 100644 index f72f520..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift +++ /dev/null @@ -1,125 +0,0 @@ -// -// DistinctUntilChanged.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where E: Equatable { - - /** - Returns an observable sequence that contains only distinct contiguous elements according to equality operator. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - returns: An observable sequence only containing the distinct contiguous elements, based on equality operator, from the source sequence. - */ - public func distinctUntilChanged() - -> Observable { - return self.distinctUntilChanged({ $0 }, comparer: { ($0 == $1) }) - } -} - -extension ObservableType { - /** - Returns an observable sequence that contains only distinct contiguous elements according to the `keySelector`. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter keySelector: A function to compute the comparison key for each element. - - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. - */ - public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K) - -> Observable { - return self.distinctUntilChanged(keySelector, comparer: { $0 == $1 }) - } - - /** - Returns an observable sequence that contains only distinct contiguous elements according to the `comparer`. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter comparer: Equality comparer for computed key values. - - returns: An observable sequence only containing the distinct contiguous elements, based on `comparer`, from the source sequence. - */ - public func distinctUntilChanged(_ comparer: @escaping (E, E) throws -> Bool) - -> Observable { - return self.distinctUntilChanged({ $0 }, comparer: comparer) - } - - /** - Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter keySelector: A function to compute the comparison key for each element. - - parameter comparer: Equality comparer for computed key values. - - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value and the comparer, from the source sequence. - */ - public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K, comparer: @escaping (K, K) throws -> Bool) - -> Observable { - return DistinctUntilChanged(source: self.asObservable(), selector: keySelector, comparer: comparer) - } -} - -final fileprivate class DistinctUntilChangedSink: Sink, ObserverType { - typealias E = O.E - - private let _parent: DistinctUntilChanged - private var _currentKey: Key? = nil - - init(parent: DistinctUntilChanged, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let key = try _parent._selector(value) - var areEqual = false - if let currentKey = _currentKey { - areEqual = try _parent._comparer(currentKey, key) - } - - if areEqual { - return - } - - _currentKey = key - - forwardOn(event) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -final fileprivate class DistinctUntilChanged: Producer { - typealias KeySelector = (Element) throws -> Key - typealias EqualityComparer = (Key, Key) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _selector: KeySelector - fileprivate let _comparer: EqualityComparer - - init(source: Observable, selector: @escaping KeySelector, comparer: @escaping EqualityComparer) { - _source = source - _selector = selector - _comparer = comparer - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DistinctUntilChangedSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Do.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Do.swift deleted file mode 100644 index 2be6d58..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Do.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// Do.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onSubscribe: Action to invoke before subscribing to source observable sequence. - - parameter onSubscribed: Action to invoke after subscribing to source observable sequence. - - parameter onDispose: Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed. - - returns: The source sequence with the side-effecting behavior applied. - */ - public func `do`(onNext: ((E) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> ())? = nil, onSubscribed: (() -> ())? = nil, onDispose: (() -> ())? = nil) - -> Observable { - return Do(source: self.asObservable(), eventHandler: { e in - switch e { - case .next(let element): - try onNext?(element) - case .error(let e): - try onError?(e) - case .completed: - try onCompleted?() - } - }, onSubscribe: onSubscribe, onSubscribed: onSubscribed, onDispose: onDispose) - } -} - -final fileprivate class DoSink : Sink, ObserverType { - typealias Element = O.E - typealias EventHandler = (Event) throws -> Void - - private let _eventHandler: EventHandler - - init(eventHandler: @escaping EventHandler, observer: O, cancel: Cancelable) { - _eventHandler = eventHandler - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - do { - try _eventHandler(event) - forwardOn(event) - if event.isStopEvent { - dispose() - } - } - catch let error { - forwardOn(.error(error)) - dispose() - } - } -} - -final fileprivate class Do : Producer { - typealias EventHandler = (Event) throws -> Void - - fileprivate let _source: Observable - fileprivate let _eventHandler: EventHandler - fileprivate let _onSubscribe: (() -> ())? - fileprivate let _onSubscribed: (() -> ())? - fileprivate let _onDispose: (() -> ())? - - init(source: Observable, eventHandler: @escaping EventHandler, onSubscribe: (() -> ())?, onSubscribed: (() -> ())?, onDispose: (() -> ())?) { - _source = source - _eventHandler = eventHandler - _onSubscribe = onSubscribe - _onSubscribed = onSubscribed - _onDispose = onDispose - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - _onSubscribe?() - let sink = DoSink(eventHandler: _eventHandler, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - _onSubscribed?() - let onDispose = _onDispose - let allSubscriptions = Disposables.create { - subscription.dispose() - onDispose?() - } - return (sink: sink, subscription: allSubscriptions) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/ElementAt.swift b/Demo/Pods/RxSwift/RxSwift/Observables/ElementAt.swift deleted file mode 100644 index 500a044..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/ElementAt.swift +++ /dev/null @@ -1,93 +0,0 @@ -// -// ElementAt.swift -// RxSwift -// -// Created by Junior B. on 21/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a sequence emitting only element _n_ emitted by an Observable - - - seealso: [elementAt operator on reactivex.io](http://reactivex.io/documentation/operators/elementat.html) - - - parameter index: The index of the required element (starting from 0). - - returns: An observable sequence that emits the desired element as its own sole emission. - */ - public func elementAt(_ index: Int) - -> Observable { - return ElementAt(source: asObservable(), index: index, throwOnEmpty: true) - } -} - -final fileprivate class ElementAtSink : Sink, ObserverType { - typealias SourceType = O.E - typealias Parent = ElementAt - - let _parent: Parent - var _i: Int - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _i = parent._index - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(_): - - if (_i == 0) { - forwardOn(event) - forwardOn(.completed) - self.dispose() - } - - do { - let _ = try decrementChecked(&_i) - } catch(let e) { - forwardOn(.error(e)) - dispose() - return - } - - case .error(let e): - forwardOn(.error(e)) - self.dispose() - case .completed: - if (_parent._throwOnEmpty) { - forwardOn(.error(RxError.argumentOutOfRange)) - } else { - forwardOn(.completed) - } - - self.dispose() - } - } -} - -final fileprivate class ElementAt : Producer { - - let _source: Observable - let _throwOnEmpty: Bool - let _index: Int - - init(source: Observable, index: Int, throwOnEmpty: Bool) { - if index < 0 { - rxFatalError("index can't be negative") - } - - self._source = source - self._index = index - self._throwOnEmpty = throwOnEmpty - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { - let sink = ElementAtSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Empty.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Empty.swift deleted file mode 100644 index d2dcdb0..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Empty.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Empty.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message. - - - seealso: [empty operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: An observable sequence with no elements. - */ - public static func empty() -> Observable { - return EmptyProducer() - } -} - -final fileprivate class EmptyProducer : Producer { - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Enumerated.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Enumerated.swift deleted file mode 100644 index 2a6cd98..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Enumerated.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// Enumerated.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/6/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Enumerates the elements of an observable sequence. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - returns: An observable sequence that contains tuples of source sequence elements and their indexes. - */ - public func enumerated() - -> Observable<(index: Int, element: E)> { - return Enumerated(source: self.asObservable()) - } -} - -final fileprivate class EnumeratedSink: Sink, ObserverType where O.E == (index: Int, element: Element) { - typealias E = Element - var index = 0 - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let nextIndex = try incrementChecked(&index) - let next = (index: nextIndex, element: value) - forwardOn(.next(next)) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .completed: - forwardOn(.completed) - dispose() - case .error(let error): - forwardOn(.error(error)) - dispose() - } - } -} - -final fileprivate class Enumerated : Producer<(index: Int, element: Element)> { - private let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == (index: Int, element: Element) { - let sink = EnumeratedSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Error.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Error.swift deleted file mode 100644 index a15942b..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Error.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Error.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns an observable sequence that terminates with an `error`. - - - seealso: [throw operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: The observable sequence that terminates with specified error. - */ - public static func error(_ error: Swift.Error) -> Observable { - return ErrorProducer(error: error) - } -} - -final fileprivate class ErrorProducer : Producer { - private let _error: Swift.Error - - init(error: Swift.Error) { - _error = error - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.error(_error)) - return Disposables.create() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Filter.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Filter.swift deleted file mode 100644 index 05dc8a4..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Filter.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Filter.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Filters the elements of an observable sequence based on a predicate. - - - seealso: [filter operator on reactivex.io](http://reactivex.io/documentation/operators/filter.html) - - - parameter predicate: A function to test each source element for a condition. - - returns: An observable sequence that contains elements from the input sequence that satisfy the condition. - */ - public func filter(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return Filter(source: asObservable(), predicate: predicate) - } -} - -extension ObservableType { - - /** - Skips elements and completes (or errors) when the observable sequence completes (or errors). Equivalent to filter that always returns false. - - - seealso: [ignoreElements operator on reactivex.io](http://reactivex.io/documentation/operators/ignoreelements.html) - - - returns: An observable sequence that skips all elements of the source sequence. - */ - public func ignoreElements() - -> Completable { - return flatMap { _ in - return Observable.empty() - } - .asCompletable() - } -} - -final fileprivate class FilterSink: Sink, ObserverType { - typealias Predicate = (Element) throws -> Bool - typealias Element = O.E - - private let _predicate: Predicate - - init(predicate: @escaping Predicate, observer: O, cancel: Cancelable) { - _predicate = predicate - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let satisfies = try _predicate(value) - if satisfies { - forwardOn(.next(value)) - } - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .completed, .error: - forwardOn(event) - dispose() - } - } -} - -final fileprivate class Filter : Producer { - typealias Predicate = (Element) throws -> Bool - - private let _source: Observable - private let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - _source = source - _predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = FilterSink(predicate: _predicate, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/First.swift b/Demo/Pods/RxSwift/RxSwift/Observables/First.swift deleted file mode 100644 index 4a72ba0..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/First.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// First.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/31/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class FirstSink : Sink, ObserverType where O.E == Element? { - typealias E = Element - typealias Parent = First - - func on(_ event: Event) { - switch event { - case .next(let value): - forwardOn(.next(value)) - forwardOn(.completed) - dispose() - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.next(nil)) - forwardOn(.completed) - dispose() - } - } -} - -final class First: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element? { - let sink = FirstSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Generate.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Generate.swift deleted file mode 100644 index 6469937..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Generate.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// Generate.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler - to run the loop send out observer messages. - - - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) - - - parameter initialState: Initial state. - - parameter condition: Condition to terminate generation (upon returning `false`). - - parameter iterate: Iteration step function. - - parameter scheduler: Scheduler on which to run the generator loop. - - returns: The generated sequence. - */ - public static func generate(initialState: E, condition: @escaping (E) throws -> Bool, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance, iterate: @escaping (E) throws -> E) -> Observable { - return Generate(initialState: initialState, condition: condition, iterate: iterate, resultSelector: { $0 }, scheduler: scheduler) - } -} - -final fileprivate class GenerateSink : Sink { - typealias Parent = Generate - - private let _parent: Parent - - private var _state: S - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _state = parent._initialState - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRecursive(true) { (isFirst, recurse) -> Void in - do { - if !isFirst { - self._state = try self._parent._iterate(self._state) - } - - if try self._parent._condition(self._state) { - let result = try self._parent._resultSelector(self._state) - self.forwardOn(.next(result)) - - recurse(false) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - } - } -} - -final fileprivate class Generate : Producer { - fileprivate let _initialState: S - fileprivate let _condition: (S) throws -> Bool - fileprivate let _iterate: (S) throws -> S - fileprivate let _resultSelector: (S) throws -> E - fileprivate let _scheduler: ImmediateSchedulerType - - init(initialState: S, condition: @escaping (S) throws -> Bool, iterate: @escaping (S) throws -> S, resultSelector: @escaping (S) throws -> E, scheduler: ImmediateSchedulerType) { - _initialState = initialState - _condition = condition - _iterate = iterate - _resultSelector = resultSelector - _scheduler = scheduler - super.init() - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = GenerateSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/GroupBy.swift b/Demo/Pods/RxSwift/RxSwift/Observables/GroupBy.swift deleted file mode 100644 index a8a0e78..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/GroupBy.swift +++ /dev/null @@ -1,134 +0,0 @@ -// -// GroupBy.swift -// RxSwift -// -// Created by Tomi Koskinen on 01/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /* - Groups the elements of an observable sequence according to a specified key selector function. - - - seealso: [groupBy operator on reactivex.io](http://reactivex.io/documentation/operators/groupby.html) - - - parameter keySelector: A function to extract the key for each element. - - returns: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. - */ - public func groupBy(keySelector: @escaping (E) throws -> K) - -> Observable> { - return GroupBy(source: self.asObservable(), selector: keySelector) - } -} - -final fileprivate class GroupedObservableImpl : Observable { - private var _subject: PublishSubject - private var _refCount: RefCountDisposable - - init(key: Key, subject: PublishSubject, refCount: RefCountDisposable) { - _subject = subject - _refCount = refCount - } - - override public func subscribe(_ observer: O) -> Disposable where O.E == E { - let release = _refCount.retain() - let subscription = _subject.subscribe(observer) - return Disposables.create(release, subscription) - } -} - - -final fileprivate class GroupBySink - : Sink - , ObserverType where O.E == GroupedObservable { - typealias E = Element - typealias ResultType = O.E - typealias Parent = GroupBy - - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - private var _refCountDisposable: RefCountDisposable! - private var _groupedSubjectTable: [Key: PublishSubject] - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _groupedSubjectTable = [Key: PublishSubject]() - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - _refCountDisposable = RefCountDisposable(disposable: _subscription) - - _subscription.setDisposable(_parent._source.subscribe(self)) - - return _refCountDisposable - } - - private func onGroupEvent(key: Key, value: Element) { - if let writer = _groupedSubjectTable[key] { - writer.on(.next(value)) - } else { - let writer = PublishSubject() - _groupedSubjectTable[key] = writer - - let group = GroupedObservable( - key: key, - source: GroupedObservableImpl(key: key, subject: writer, refCount: _refCountDisposable) - ) - - forwardOn(.next(group)) - writer.on(.next(value)) - } - } - - final func on(_ event: Event) { - switch event { - case let .next(value): - do { - let groupKey = try _parent._selector(value) - onGroupEvent(key: groupKey, value: value) - } - catch let e { - error(e) - return - } - case let .error(e): - error(e) - case .completed: - forwardOnGroups(event: .completed) - forwardOn(.completed) - _subscription.dispose() - dispose() - } - } - - final func error(_ error: Swift.Error) { - forwardOnGroups(event: .error(error)) - forwardOn(.error(error)) - _subscription.dispose() - dispose() - } - - final func forwardOnGroups(event: Event) { - for writer in _groupedSubjectTable.values { - writer.on(event) - } - } -} - -final fileprivate class GroupBy: Producer> { - typealias KeySelector = (Element) throws -> Key - - fileprivate let _source: Observable - fileprivate let _selector: KeySelector - - init(source: Observable, selector: @escaping KeySelector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == GroupedObservable { - let sink = GroupBySink(parent: self, observer: observer, cancel: cancel) - return (sink: sink, subscription: sink.run()) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Just.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Just.swift deleted file mode 100644 index 4e49059..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Just.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// Just.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns an observable sequence that contains a single element. - - - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) - - - parameter element: Single element in the resulting observable sequence. - - returns: An observable sequence containing the single specified element. - */ - public static func just(_ element: E) -> Observable { - return Just(element: element) - } - - /** - Returns an observable sequence that contains a single element. - - - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) - - - parameter element: Single element in the resulting observable sequence. - - parameter scheduler: Scheduler to send the single element on. - - returns: An observable sequence containing the single specified element. - */ - public static func just(_ element: E, scheduler: ImmediateSchedulerType) -> Observable { - return JustScheduled(element: element, scheduler: scheduler) - } -} - -final fileprivate class JustScheduledSink : Sink { - typealias Parent = JustScheduled - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let scheduler = _parent._scheduler - return scheduler.schedule(_parent._element) { element in - self.forwardOn(.next(element)) - return scheduler.schedule(()) { _ in - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } - } -} - -final fileprivate class JustScheduled : Producer { - fileprivate let _scheduler: ImmediateSchedulerType - fileprivate let _element: Element - - init(element: Element, scheduler: ImmediateSchedulerType) { - _scheduler = scheduler - _element = element - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = JustScheduledSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class Just : Producer { - private let _element: Element - - init(element: Element) { - _element = element - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.next(_element)) - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Map.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Map.swift deleted file mode 100644 index df0e0d1..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Map.swift +++ /dev/null @@ -1,108 +0,0 @@ -// -// Map.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence into a new form. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - parameter transform: A transform function to apply to each source element. - - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. - - */ - public func map(_ transform: @escaping (E) throws -> R) - -> Observable { - return self.asObservable().composeMap(transform) - } -} - -final fileprivate class MapSink : Sink, ObserverType { - typealias Transform = (SourceType) throws -> ResultType - - typealias ResultType = O.E - typealias Element = SourceType - - private let _transform: Transform - - init(transform: @escaping Transform, observer: O, cancel: Cancelable) { - _transform = transform - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - let mappedElement = try _transform(element) - forwardOn(.next(mappedElement)) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } -} - -#if TRACE_RESOURCES - fileprivate var _numberOfMapOperators: AtomicInt = 0 - extension Resources { - public static var numberOfMapOperators: Int32 { - return _numberOfMapOperators.valueSnapshot() - } - } -#endif - -internal func _map(source: Observable, transform: @escaping (Element) throws -> R) -> Observable { - return Map(source: source, transform: transform) -} - -final fileprivate class Map: Producer { - typealias Transform = (SourceType) throws -> ResultType - - private let _source: Observable - - private let _transform: Transform - - init(source: Observable, transform: @escaping Transform) { - _source = source - _transform = transform - -#if TRACE_RESOURCES - let _ = AtomicIncrement(&_numberOfMapOperators) -#endif - } - - override func composeMap(_ selector: @escaping (ResultType) throws -> R) -> Observable { - let originalSelector = _transform - return Map(source: _source, transform: { (s: SourceType) throws -> R in - let r: ResultType = try originalSelector(s) - return try selector(r) - }) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = MapSink(transform: _transform, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - - #if TRACE_RESOURCES - deinit { - let _ = AtomicDecrement(&_numberOfMapOperators) - } - #endif -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Materialize.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Materialize.swift deleted file mode 100644 index cf19b6d..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Materialize.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Materialize.swift -// RxSwift -// -// Created by sergdort on 08/03/2017. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Convert any Observable into an Observable of its events. - - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) - - returns: An observable sequence that wraps events in an Event. The returned Observable never errors, but it does complete after observing all of the events of the underlying Observable. - */ - public func materialize() -> Observable> { - return Materialize(source: self.asObservable()) - } -} - -fileprivate final class MaterializeSink: Sink, ObserverType where O.E == Event { - - func on(_ event: Event) { - forwardOn(.next(event)) - if event.isStopEvent { - forwardOn(.completed) - dispose() - } - } -} - -final fileprivate class Materialize: Producer> { - private let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = MaterializeSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Merge.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Merge.swift deleted file mode 100644 index b2f9a0d..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Merge.swift +++ /dev/null @@ -1,598 +0,0 @@ -// -// Merge.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - - - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. - */ - public func flatMap(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMap(source: asObservable(), selector: selector) - } - -} - -extension ObservableType { - - /** - Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - If element is received while there is some projected observable sequence being merged it will simply be ignored. - - - seealso: [flatMapFirst operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to element that was observed while no observable is executing in parallel. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence that was received while no other sequence was being calculated. - */ - public func flatMapFirst(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMapFirst(source: asObservable(), selector: selector) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public func merge() -> Observable { - return Merge(source: asObservable()) - } - - /** - Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently. - - returns: The observable sequence that merges the elements of the inner sequences. - */ - public func merge(maxConcurrent: Int) - -> Observable { - return MergeLimited(source: asObservable(), maxConcurrent: maxConcurrent) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. - */ - public func concat() -> Observable { - return merge(maxConcurrent: 1) - } -} - -extension ObservableType { - /** - Merges elements from all observable sequences from collection into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Collection of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: C) -> Observable where C.Iterator.Element == Observable { - return MergeArray(sources: Array(sources)) - } - - /** - Merges elements from all observable sequences from array into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Array of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: [Observable]) -> Observable { - return MergeArray(sources: sources) - } - - /** - Merges elements from all observable sequences into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Collection of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: Observable...) -> Observable { - return MergeArray(sources: sources) - } -} - -// MARK: concatMap - -extension ObservableType { - /** - Projects each element of an observable sequence to an observable sequence and concatenates the resulting observable sequences into one observable sequence. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. - */ - - public func concatMap(_ selector: @escaping (E) throws -> O) - -> Observable { - return ConcatMap(source: asObservable(), selector: selector) - } -} - -fileprivate final class MergeLimitedSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where SourceSequence.E == Observer.E { - typealias E = Observer.E - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias Parent = MergeLimitedSink - - private let _parent: Parent - private let _disposeKey: DisposeKey - - var _lock: RecursiveLock { - return _parent._lock - } - - init(parent: Parent, disposeKey: DisposeKey) { - _parent = parent - _disposeKey = disposeKey - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(event) - case .error: - _parent.forwardOn(event) - _parent.dispose() - case .completed: - _parent._group.remove(for: _disposeKey) - if let next = _parent._queue.dequeue() { - _parent.subscribe(next, group: _parent._group) - } - else { - _parent._activeCount = _parent._activeCount - 1 - - if _parent._stopped && _parent._activeCount == 0 { - _parent.forwardOn(.completed) - _parent.dispose() - } - } - } - } -} - -fileprivate final class ConcatMapSink: MergeLimitedSink where Observer.E == SourceSequence.E { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - _selector = selector - super.init(maxConcurrent: 1, observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try _selector(element) - } -} - -fileprivate final class MergeLimitedBasicSink: MergeLimitedSink where Observer.E == SourceSequence.E { - - override func performMap(_ element: SourceSequence) throws -> SourceSequence { - return element - } -} - -fileprivate class MergeLimitedSink - : Sink - , ObserverType where Observer.E == SourceSequence.E { - typealias QueueType = Queue - - let _maxConcurrent: Int - - let _lock = RecursiveLock() - - // state - var _stopped = false - var _activeCount = 0 - var _queue = QueueType(capacity: 2) - - let _sourceSubscription = SingleAssignmentDisposable() - let _group = CompositeDisposable() - - init(maxConcurrent: Int, observer: Observer, cancel: Cancelable) { - _maxConcurrent = maxConcurrent - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let _ = _group.insert(_sourceSubscription) - - let disposable = source.subscribe(self) - _sourceSubscription.setDisposable(disposable) - return _group - } - - func subscribe(_ innerSource: SourceSequence, group: CompositeDisposable) { - let subscription = SingleAssignmentDisposable() - - let key = group.insert(subscription) - - if let key = key { - let observer = MergeLimitedSinkIter(parent: self, disposeKey: key) - - let disposable = innerSource.asObservable().subscribe(observer) - subscription.setDisposable(disposable) - } - } - - func performMap(_ element: SourceElement) throws -> SourceSequence { - rxAbstractMethod() - } - - @inline(__always) - final private func nextElementArrived(element: SourceElement) -> SourceSequence? { - _lock.lock(); defer { _lock.unlock() } // { - let subscribe: Bool - if _activeCount < _maxConcurrent { - _activeCount += 1 - subscribe = true - } - else { - do { - let value = try performMap(element) - _queue.enqueue(value) - } catch { - forwardOn(.error(error)) - dispose() - } - subscribe = false - } - - if subscribe { - do { - return try performMap(element) - } catch { - forwardOn(.error(error)) - dispose() - } - } - - return nil - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let sequence = self.nextElementArrived(element: element) { - self.subscribe(sequence, group: _group) - } - case .error(let error): - _lock.lock(); defer { _lock.unlock() } - - forwardOn(.error(error)) - dispose() - case .completed: - _lock.lock(); defer { _lock.unlock() } - - if _activeCount == 0 { - forwardOn(.completed) - dispose() - } - else { - _sourceSubscription.dispose() - } - - _stopped = true - } - } -} - -final fileprivate class MergeLimited : Producer { - private let _source: Observable - private let _maxConcurrent: Int - - init(source: Observable, maxConcurrent: Int) { - _source = source - _maxConcurrent = maxConcurrent - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = MergeLimitedBasicSink(maxConcurrent: _maxConcurrent, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -// MARK: Merge - -fileprivate final class MergeBasicSink : MergeSink where O.E == S.E { - override func performMap(_ element: S) throws -> S { - return element - } -} - -// MARK: flatMap - -fileprivate final class FlatMapSink : MergeSink where Observer.E == SourceSequence.E { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try _selector(element) - } -} - -// MARK: FlatMapFirst - -fileprivate final class FlatMapFirstSink : MergeSink where Observer.E == SourceSequence.E { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - override var subscribeNext: Bool { - return _activeCount == 0 - } - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try _selector(element) - } -} - -fileprivate final class MergeSinkIter : ObserverType where Observer.E == SourceSequence.E { - typealias Parent = MergeSink - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias E = Observer.E - - private let _parent: Parent - private let _disposeKey: DisposeKey - - init(parent: Parent, disposeKey: DisposeKey) { - _parent = parent - _disposeKey = disposeKey - } - - func on(_ event: Event) { - _parent._lock.lock(); defer { _parent._lock.unlock() } // lock { - switch event { - case .next(let value): - _parent.forwardOn(.next(value)) - case .error(let error): - _parent.forwardOn(.error(error)) - _parent.dispose() - case .completed: - _parent._group.remove(for: _disposeKey) - _parent._activeCount -= 1 - _parent.checkCompleted() - } - // } - } -} - - -fileprivate class MergeSink - : Sink - , ObserverType where Observer.E == SourceSequence.E { - typealias ResultType = Observer.E - typealias Element = SourceElement - - let _lock = RecursiveLock() - - var subscribeNext: Bool { - return true - } - - // state - let _group = CompositeDisposable() - let _sourceSubscription = SingleAssignmentDisposable() - - var _activeCount = 0 - var _stopped = false - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func performMap(_ element: SourceElement) throws -> SourceSequence { - rxAbstractMethod() - } - - @inline(__always) - final private func nextElementArrived(element: SourceElement) -> SourceSequence? { - _lock.lock(); defer { _lock.unlock() } // { - if !subscribeNext { - return nil - } - - do { - let value = try performMap(element) - _activeCount += 1 - return value - } - catch let e { - forwardOn(.error(e)) - dispose() - return nil - } - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let value = nextElementArrived(element: element) { - subscribeInner(value.asObservable()) - } - case .error(let error): - _lock.lock(); defer { _lock.unlock() } - forwardOn(.error(error)) - dispose() - case .completed: - _lock.lock(); defer { _lock.unlock() } - _stopped = true - _sourceSubscription.dispose() - checkCompleted() - } - } - - func subscribeInner(_ source: Observable) { - let iterDisposable = SingleAssignmentDisposable() - if let disposeKey = _group.insert(iterDisposable) { - let iter = MergeSinkIter(parent: self, disposeKey: disposeKey) - let subscription = source.subscribe(iter) - iterDisposable.setDisposable(subscription) - } - } - - func run(_ sources: [Observable]) -> Disposable { - _activeCount += sources.count - - for source in sources { - subscribeInner(source) - } - - _stopped = true - - checkCompleted() - - return _group - } - - @inline(__always) - func checkCompleted() { - if _stopped && _activeCount == 0 { - self.forwardOn(.completed) - self.dispose() - } - } - - func run(_ source: Observable) -> Disposable { - let _ = _group.insert(_sourceSubscription) - - let subscription = source.subscribe(self) - _sourceSubscription.setDisposable(subscription) - - return _group - } -} - -// MARK: Producers - -final fileprivate class FlatMap: Producer { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = FlatMapSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class FlatMapFirst: Producer { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = FlatMapFirstSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final class ConcatMap: Producer { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _source: Observable - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = ConcatMapSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final class Merge : Producer { - private let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { - let sink = MergeBasicSink(observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class MergeArray : Producer { - private let _sources: [Observable] - - init(sources: [Observable]) { - _sources = sources - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = MergeBasicSink, O>(observer: observer, cancel: cancel) - let subscription = sink.run(_sources) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Multicast.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Multicast.swift deleted file mode 100644 index a027c4f..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Multicast.swift +++ /dev/null @@ -1,408 +0,0 @@ -// -// Multicast.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** - Represents an observable wrapper that can be connected and disconnected from its underlying observable sequence. - */ -public class ConnectableObservable - : Observable - , ConnectableObservableType { - - /** - Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. - - - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. - */ - public func connect() -> Disposable { - rxAbstractMethod() - } -} - -extension ObservableType { - - /** - Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. - - Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation. - - For specializations with fixed subject types, see `publish` and `replay`. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter subjectSelector: Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function. - - parameter selector: Selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - */ - public func multicast(_ subjectSelector: @escaping () throws -> S, selector: @escaping (Observable) throws -> Observable) - -> Observable where S.SubjectObserverType.E == E { - return Multicast( - source: self.asObservable(), - subjectSelector: subjectSelector, - selector: selector - ) - } -} - -extension ObservableType { - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence. - - This operator is a specialization of `multicast` using a `PublishSubject`. - - - seealso: [publish operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - public func publish() -> ConnectableObservable { - return self.multicast { PublishSubject() } - } -} - -extension ObservableType { - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize elements. - - This operator is a specialization of `multicast` using a `ReplaySubject`. - - - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - parameter bufferSize: Maximum element count of the replay buffer. - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - public func replay(_ bufferSize: Int) - -> ConnectableObservable { - return self.multicast { ReplaySubject.create(bufferSize: bufferSize) } - } - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all elements. - - This operator is a specialization of `multicast` using a `ReplaySubject`. - - - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - public func replayAll() - -> ConnectableObservable { - return self.multicast { ReplaySubject.createUnbounded() } - } -} - -extension ConnectableObservableType { - - /** - Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - - - seealso: [refCount operator on reactivex.io](http://reactivex.io/documentation/operators/refcount.html) - - - returns: An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - */ - public func refCount() -> Observable { - return RefCount(source: self) - } -} - -extension ObservableType { - - /** - Multicasts the source sequence notifications through the specified subject to the resulting connectable observable. - - Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable. - - For specializations with fixed subject types, see `publish` and `replay`. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter subject: Subject to push source elements into. - - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. - */ - public func multicast(_ subject: S) - -> ConnectableObservable where S.SubjectObserverType.E == E { - return ConnectableObservableAdapter(source: self.asObservable(), makeSubject: { subject }) - } - - /** - Multicasts the source sequence notifications through an instantiated subject to the resulting connectable observable. - - Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable. - - Subject is cleared on connection disposal or in case source sequence produces terminal event. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter makeSubject: Factory function used to instantiate a subject for each connection. - - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. - */ - public func multicast(makeSubject: @escaping () -> S) - -> ConnectableObservable where S.SubjectObserverType.E == E { - return ConnectableObservableAdapter(source: self.asObservable(), makeSubject: makeSubject) - } -} - -final fileprivate class Connection : ObserverType, Disposable { - typealias E = S.SubjectObserverType.E - - private var _lock: RecursiveLock - // state - private var _parent: ConnectableObservableAdapter? - private var _subscription : Disposable? - private var _subjectObserver: S.SubjectObserverType - - private var _disposed: Bool = false - - init(parent: ConnectableObservableAdapter, subjectObserver: S.SubjectObserverType, lock: RecursiveLock, subscription: Disposable) { - _parent = parent - _subscription = subscription - _lock = lock - _subjectObserver = subjectObserver - } - - func on(_ event: Event) { - if _disposed { - return - } - if event.isStopEvent { - self.dispose() - } - _subjectObserver.on(event) - } - - func dispose() { - _lock.lock(); defer { _lock.unlock() } // { - _disposed = true - guard let parent = _parent else { - return - } - - if parent._connection === self { - parent._connection = nil - parent._subject = nil - } - _parent = nil - - _subscription?.dispose() - _subscription = nil - // } - } -} - -final fileprivate class ConnectableObservableAdapter - : ConnectableObservable { - typealias ConnectionType = Connection - - fileprivate let _source: Observable - fileprivate let _makeSubject: () -> S - - fileprivate let _lock = RecursiveLock() - fileprivate var _subject: S? - - // state - fileprivate var _connection: ConnectionType? - - init(source: Observable, makeSubject: @escaping () -> S) { - _source = source - _makeSubject = makeSubject - _subject = nil - _connection = nil - } - - override func connect() -> Disposable { - return _lock.calculateLocked { - if let connection = _connection { - return connection - } - - let singleAssignmentDisposable = SingleAssignmentDisposable() - let connection = Connection(parent: self, subjectObserver: self.lazySubject.asObserver(), lock: _lock, subscription: singleAssignmentDisposable) - _connection = connection - let subscription = _source.subscribe(connection) - singleAssignmentDisposable.setDisposable(subscription) - return connection - } - } - - fileprivate var lazySubject: S { - if let subject = self._subject { - return subject - } - - let subject = _makeSubject() - self._subject = subject - return subject - } - - override func subscribe(_ observer: O) -> Disposable where O.E == S.E { - return self.lazySubject.subscribe(observer) - } -} - -final fileprivate class RefCountSink - : Sink - , ObserverType where CO.E == O.E { - typealias Element = O.E - typealias Parent = RefCount - - private let _parent: Parent - - private var _connectionIdSnapshot: Int64 = -1 - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = _parent._source.subscribe(self) - _parent._lock.lock(); defer { _parent._lock.unlock() } // { - - _connectionIdSnapshot = _parent._connectionId - - if self.disposed { - return Disposables.create() - } - - if _parent._count == 0 { - _parent._count = 1 - _parent._connectableSubscription = _parent._source.connect() - } - else { - _parent._count = _parent._count + 1 - } - // } - - return Disposables.create { - subscription.dispose() - self._parent._lock.lock(); defer { self._parent._lock.unlock() } // { - if self._parent._connectionId != self._connectionIdSnapshot { - return - } - if self._parent._count == 1 { - self._parent._count = 0 - guard let connectableSubscription = self._parent._connectableSubscription else { - return - } - - connectableSubscription.dispose() - self._parent._connectableSubscription = nil - } - else if self._parent._count > 1 { - self._parent._count = self._parent._count - 1 - } - else { - rxFatalError("Something went wrong with RefCount disposing mechanism") - } - // } - } - } - - func on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .error, .completed: - _parent._lock.lock() // { - if _parent._connectionId == self._connectionIdSnapshot { - let connection = _parent._connectableSubscription - defer { connection?.dispose() } - _parent._count = 0 - _parent._connectionId = _parent._connectionId &+ 1 - _parent._connectableSubscription = nil - } - // } - _parent._lock.unlock() - forwardOn(event) - dispose() - } - } -} - -final fileprivate class RefCount: Producer { - fileprivate let _lock = RecursiveLock() - - // state - fileprivate var _count = 0 - fileprivate var _connectionId: Int64 = 0 - fileprivate var _connectableSubscription = nil as Disposable? - - fileprivate let _source: CO - - init(source: CO) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == CO.E { - let sink = RefCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class MulticastSink: Sink, ObserverType { - typealias Element = O.E - typealias ResultType = Element - typealias MutlicastType = Multicast - - private let _parent: MutlicastType - - init(parent: MutlicastType, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let subject = try _parent._subjectSelector() - let connectable = ConnectableObservableAdapter(source: _parent._source, makeSubject: { subject }) - - let observable = try _parent._selector(connectable) - - let subscription = observable.subscribe(self) - let connection = connectable.connect() - - return Disposables.create(subscription, connection) - } - catch let e { - forwardOn(.error(e)) - dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - forwardOn(event) - switch event { - case .next: break - case .error, .completed: - dispose() - } - } -} - -final fileprivate class Multicast: Producer { - typealias SubjectSelectorType = () throws -> S - typealias SelectorType = (Observable) throws -> Observable - - fileprivate let _source: Observable - fileprivate let _subjectSelector: SubjectSelectorType - fileprivate let _selector: SelectorType - - init(source: Observable, subjectSelector: @escaping SubjectSelectorType, selector: @escaping SelectorType) { - _source = source - _subjectSelector = subjectSelector - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = MulticastSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Never.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Never.swift deleted file mode 100644 index d98a7a8..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Never.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// Never.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a non-terminating observable sequence, which can be used to denote an infinite duration. - - - seealso: [never operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: An observable sequence whose observers will never get called. - */ - public static func never() -> Observable { - return NeverProducer() - } -} - -final fileprivate class NeverProducer : Producer { - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - return Disposables.create() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift b/Demo/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift deleted file mode 100644 index ce2a0d4..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift +++ /dev/null @@ -1,229 +0,0 @@ -// -// ObserveOn.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Wraps the source sequence in order to run its observer callbacks on the specified scheduler. - - This only invokes observer callbacks on a `scheduler`. In case the subscription and/or unsubscription - actions have side-effects that require to be run on a scheduler, use `subscribeOn`. - - - seealso: [observeOn operator on reactivex.io](http://reactivex.io/documentation/operators/observeon.html) - - - parameter scheduler: Scheduler to notify observers on. - - returns: The source sequence whose observations happen on the specified scheduler. - */ - public func observeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - if let scheduler = scheduler as? SerialDispatchQueueScheduler { - return ObserveOnSerialDispatchQueue(source: self.asObservable(), scheduler: scheduler) - } - else { - return ObserveOn(source: self.asObservable(), scheduler: scheduler) - } - } -} - -final fileprivate class ObserveOn : Producer { - let scheduler: ImmediateSchedulerType - let source: Observable - - init(source: Observable, scheduler: ImmediateSchedulerType) { - self.scheduler = scheduler - self.source = source - -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObserveOnSink(scheduler: scheduler, observer: observer, cancel: cancel) - let subscription = source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - -#if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - } -#endif -} - -enum ObserveOnState : Int32 { - // pump is not running - case stopped = 0 - // pump is running - case running = 1 -} - -final fileprivate class ObserveOnSink : ObserverBase { - typealias E = O.E - - let _scheduler: ImmediateSchedulerType - - var _lock = SpinLock() - let _observer: O - - // state - var _state = ObserveOnState.stopped - var _queue = Queue>(capacity: 10) - - let _scheduleDisposable = SerialDisposable() - let _cancel: Cancelable - - init(scheduler: ImmediateSchedulerType, observer: O, cancel: Cancelable) { - _scheduler = scheduler - _observer = observer - _cancel = cancel - } - - override func onCore(_ event: Event) { - let shouldStart = _lock.calculateLocked { () -> Bool in - self._queue.enqueue(event) - - switch self._state { - case .stopped: - self._state = .running - return true - case .running: - return false - } - } - - if shouldStart { - _scheduleDisposable.disposable = self._scheduler.scheduleRecursive((), action: self.run) - } - } - - func run(_ state: (), _ recurse: (()) -> ()) { - let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, O) in - if self._queue.count > 0 { - return (self._queue.dequeue(), self._observer) - } - else { - self._state = .stopped - return (nil, self._observer) - } - } - - if let nextEvent = nextEvent, !_cancel.isDisposed { - observer.on(nextEvent) - if nextEvent.isStopEvent { - dispose() - } - } - else { - return - } - - let shouldContinue = _shouldContinue_synchronized() - - if shouldContinue { - recurse(()) - } - } - - func _shouldContinue_synchronized() -> Bool { - _lock.lock(); defer { _lock.unlock() } // { - if self._queue.count > 0 { - return true - } - else { - self._state = .stopped - return false - } - // } - } - - override func dispose() { - super.dispose() - - _cancel.dispose() - _scheduleDisposable.dispose() - } -} - -#if TRACE_RESOURCES - fileprivate var _numberOfSerialDispatchQueueObservables: AtomicInt = 0 - extension Resources { - /** - Counts number of `SerialDispatchQueueObservables`. - - Purposed for unit tests. - */ - public static var numberOfSerialDispatchQueueObservables: Int32 { - return _numberOfSerialDispatchQueueObservables.valueSnapshot() - } - } -#endif - -final fileprivate class ObserveOnSerialDispatchQueueSink : ObserverBase { - let scheduler: SerialDispatchQueueScheduler - let observer: O - - let cancel: Cancelable - - var cachedScheduleLambda: (((sink: ObserveOnSerialDispatchQueueSink, event: Event)) -> Disposable)! - - init(scheduler: SerialDispatchQueueScheduler, observer: O, cancel: Cancelable) { - self.scheduler = scheduler - self.observer = observer - self.cancel = cancel - super.init() - - cachedScheduleLambda = { pair in - pair.sink.observer.on(pair.event) - - if pair.event.isStopEvent { - pair.sink.dispose() - } - - return Disposables.create() - } - } - - override func onCore(_ event: Event) { - let _ = self.scheduler.schedule((self, event), action: cachedScheduleLambda!) - } - - override func dispose() { - super.dispose() - - cancel.dispose() - } -} - -final fileprivate class ObserveOnSerialDispatchQueue : Producer { - let scheduler: SerialDispatchQueueScheduler - let source: Observable - - init(source: Observable, scheduler: SerialDispatchQueueScheduler) { - self.scheduler = scheduler - self.source = source - - #if TRACE_RESOURCES - let _ = Resources.incrementTotal() - let _ = AtomicIncrement(&_numberOfSerialDispatchQueueObservables) - #endif - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObserveOnSerialDispatchQueueSink(scheduler: scheduler, observer: observer, cancel: cancel) - let subscription = source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - - #if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - let _ = AtomicDecrement(&_numberOfSerialDispatchQueueObservables) - } - #endif -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Optional.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Optional.swift deleted file mode 100644 index 8cd6a16..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Optional.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// Optional.swift -// RxSwift -// -// Created by tarunon on 2016/12/13. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - public static func from(optional: E?) -> Observable { - return ObservableOptional(optional: optional) - } - - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - parameter scheduler: Scheduler to send the optional element on. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - public static func from(optional: E?, scheduler: ImmediateSchedulerType) -> Observable { - return ObservableOptionalScheduled(optional: optional, scheduler: scheduler) - } -} - -final fileprivate class ObservableOptionalScheduledSink : Sink { - typealias E = O.E - typealias Parent = ObservableOptionalScheduled - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.schedule(_parent._optional) { (optional: E?) -> Disposable in - if let next = optional { - self.forwardOn(.next(next)) - return self._parent._scheduler.schedule(()) { _ in - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } else { - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } - } -} - -final fileprivate class ObservableOptionalScheduled : Producer { - fileprivate let _optional: E? - fileprivate let _scheduler: ImmediateSchedulerType - - init(optional: E?, scheduler: ImmediateSchedulerType) { - _optional = optional - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObservableOptionalScheduledSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class ObservableOptional: Producer { - private let _optional: E? - - init(optional: E?) { - _optional = optional - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - if let element = _optional { - observer.on(.next(element)) - } - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Producer.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Producer.swift deleted file mode 100644 index 996b011..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Producer.swift +++ /dev/null @@ -1,98 +0,0 @@ -// -// Producer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/20/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class Producer : Observable { - override init() { - super.init() - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - if !CurrentThreadScheduler.isScheduleRequired { - // The returned disposable needs to release all references once it was disposed. - let disposer = SinkDisposer() - let sinkAndSubscription = run(observer, cancel: disposer) - disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) - - return disposer - } - else { - return CurrentThreadScheduler.instance.schedule(()) { _ in - let disposer = SinkDisposer() - let sinkAndSubscription = self.run(observer, cancel: disposer) - disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) - - return disposer - } - } - } - - func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - rxAbstractMethod() - } -} - -fileprivate final class SinkDisposer: Cancelable { - fileprivate enum DisposeState: UInt32 { - case disposed = 1 - case sinkAndSubscriptionSet = 2 - } - - // Jeej, swift API consistency rules - fileprivate enum DisposeStateInt32: Int32 { - case disposed = 1 - case sinkAndSubscriptionSet = 2 - } - - private var _state: AtomicInt = 0 - private var _sink: Disposable? = nil - private var _subscription: Disposable? = nil - - var isDisposed: Bool { - return AtomicFlagSet(DisposeState.disposed.rawValue, &_state) - } - - func setSinkAndSubscription(sink: Disposable, subscription: Disposable) { - _sink = sink - _subscription = subscription - - let previousState = AtomicOr(DisposeState.sinkAndSubscriptionSet.rawValue, &_state) - if (previousState & DisposeStateInt32.sinkAndSubscriptionSet.rawValue) != 0 { - rxFatalError("Sink and subscription were already set") - } - - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { - sink.dispose() - subscription.dispose() - _sink = nil - _subscription = nil - } - } - - func dispose() { - let previousState = AtomicOr(DisposeState.disposed.rawValue, &_state) - - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { - return - } - - if (previousState & DisposeStateInt32.sinkAndSubscriptionSet.rawValue) != 0 { - guard let sink = _sink else { - rxFatalError("Sink not set") - } - guard let subscription = _subscription else { - rxFatalError("Subscription not set") - } - - sink.dispose() - subscription.dispose() - - _sink = nil - _subscription = nil - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Range.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Range.swift deleted file mode 100644 index 9b85554..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Range.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Range.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where E : RxAbstractInteger { - /** - Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages. - - - seealso: [range operator on reactivex.io](http://reactivex.io/documentation/operators/range.html) - - - parameter start: The value of the first integer in the sequence. - - parameter count: The number of sequential integers to generate. - - parameter scheduler: Scheduler to run the generator loop on. - - returns: An observable sequence that contains a range of sequential integral numbers. - */ - public static func range(start: E, count: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RangeProducer(start: start, count: count, scheduler: scheduler) - } -} - -final fileprivate class RangeProducer : Producer { - fileprivate let _start: E - fileprivate let _count: E - fileprivate let _scheduler: ImmediateSchedulerType - - init(start: E, count: E, scheduler: ImmediateSchedulerType) { - if count < 0 { - rxFatalError("count can't be negative") - } - - if start &+ (count - 1) < start { - rxFatalError("overflow of count") - } - - _start = start - _count = count - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = RangeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class RangeSink : Sink where O.E: RxAbstractInteger { - typealias Parent = RangeProducer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRecursive(0 as O.E) { i, recurse in - if i < self._parent._count { - self.forwardOn(.next(self._parent._start + i)) - recurse(i + 1) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Reduce.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Reduce.swift deleted file mode 100644 index 3e4a7b9..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Reduce.swift +++ /dev/null @@ -1,109 +0,0 @@ -// -// Reduce.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - -extension ObservableType { - /** - Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. - - For aggregation behavior with incremental intermediate results, see `scan`. - - - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: A accumulator function to be invoked on each element. - - parameter mapResult: A function to transform the final accumulator value into the result value. - - returns: An observable sequence containing a single element with the final accumulator value. - */ - public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A, mapResult: @escaping (A) throws -> R) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: mapResult) - } - - /** - Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. - - For aggregation behavior with incremental intermediate results, see `scan`. - - - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: A accumulator function to be invoked on each element. - - returns: An observable sequence containing a single element with the final accumulator value. - */ - public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: { $0 }) - } -} - -final fileprivate class ReduceSink : Sink, ObserverType { - typealias ResultType = O.E - typealias Parent = Reduce - - private let _parent: Parent - private var _accumulation: AccumulateType - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _accumulation = parent._seed - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - _accumulation = try _parent._accumulator(_accumulation, value) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let e): - forwardOn(.error(e)) - dispose() - case .completed: - do { - let result = try _parent._mapResult(_accumulation) - forwardOn(.next(result)) - forwardOn(.completed) - dispose() - } - catch let e { - forwardOn(.error(e)) - dispose() - } - } - } -} - -final fileprivate class Reduce : Producer { - typealias AccumulatorType = (AccumulateType, SourceType) throws -> AccumulateType - typealias ResultSelectorType = (AccumulateType) throws -> ResultType - - fileprivate let _source: Observable - fileprivate let _seed: AccumulateType - fileprivate let _accumulator: AccumulatorType - fileprivate let _mapResult: ResultSelectorType - - init(source: Observable, seed: AccumulateType, accumulator: @escaping AccumulatorType, mapResult: @escaping ResultSelectorType) { - _source = source - _seed = seed - _accumulator = accumulator - _mapResult = mapResult - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = ReduceSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Repeat.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Repeat.swift deleted file mode 100644 index 6892ec1..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Repeat.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// Repeat.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Generates an observable sequence that repeats the given element infinitely, using the specified scheduler to send out observer messages. - - - seealso: [repeat operator on reactivex.io](http://reactivex.io/documentation/operators/repeat.html) - - - parameter element: Element to repeat. - - parameter scheduler: Scheduler to run the producer loop on. - - returns: An observable sequence that repeats the given element infinitely. - */ - public static func repeatElement(_ element: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RepeatElement(element: element, scheduler: scheduler) - } -} - -final fileprivate class RepeatElement : Producer { - fileprivate let _element: Element - fileprivate let _scheduler: ImmediateSchedulerType - - init(element: Element, scheduler: ImmediateSchedulerType) { - _element = element - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = RepeatElementSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class RepeatElementSink : Sink { - typealias Parent = RepeatElement - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRecursive(_parent._element) { e, recurse in - self.forwardOn(.next(e)) - recurse(e) - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift b/Demo/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift deleted file mode 100644 index 268b399..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// RetryWhen.swift -// RxSwift -// -// Created by Junior B. on 06/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Repeats the source observable sequence on error when the notifier emits a next value. - If the source observable errors and the notifier completes, it will complete the source sequence. - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. - */ - public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) - -> Observable { - return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) - } - - /** - Repeats the source observable sequence on error when the notifier emits a next value. - If the source observable errors and the notifier completes, it will complete the source sequence. - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. - */ - public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) - -> Observable { - return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) - } -} - -final fileprivate class RetryTriggerSink - : ObserverType where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { - typealias E = TriggerObservable.E - - typealias Parent = RetryWhenSequenceSinkIter - - fileprivate let _parent: Parent - - init(parent: Parent) { - _parent = parent - } - - func on(_ event: Event) { - switch event { - case .next: - _parent._parent._lastError = nil - _parent._parent.schedule(.moveNext) - case .error(let e): - _parent._parent.forwardOn(.error(e)) - _parent._parent.dispose() - case .completed: - _parent._parent.forwardOn(.completed) - _parent._parent.dispose() - } - } -} - -final fileprivate class RetryWhenSequenceSinkIter - : ObserverType - , Disposable where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { - typealias E = O.E - typealias Parent = RetryWhenSequenceSink - - fileprivate let _parent: Parent - fileprivate let _errorHandlerSubscription = SingleAssignmentDisposable() - fileprivate let _subscription: Disposable - - init(parent: Parent, subscription: Disposable) { - _parent = parent - _subscription = subscription - } - - func on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(event) - case .error(let error): - _parent._lastError = error - - if let failedWith = error as? Error { - // dispose current subscription - _subscription.dispose() - - let errorHandlerSubscription = _parent._notifier.subscribe(RetryTriggerSink(parent: self)) - _errorHandlerSubscription.setDisposable(errorHandlerSubscription) - _parent._errorSubject.on(.next(failedWith)) - } - else { - _parent.forwardOn(.error(error)) - _parent.dispose() - } - case .completed: - _parent.forwardOn(event) - _parent.dispose() - } - } - - final func dispose() { - _subscription.dispose() - _errorHandlerSubscription.dispose() - } -} - -final fileprivate class RetryWhenSequenceSink - : TailRecursiveSink where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { - typealias Element = O.E - typealias Parent = RetryWhenSequence - - let _lock = RecursiveLock() - - fileprivate let _parent: Parent - - fileprivate var _lastError: Swift.Error? - fileprivate let _errorSubject = PublishSubject() - fileprivate let _handler: Observable - fileprivate let _notifier = PublishSubject() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _handler = parent._notificationHandler(_errorSubject).asObservable() - super.init(observer: observer, cancel: cancel) - } - - override func done() { - if let lastError = _lastError { - forwardOn(.error(lastError)) - _lastError = nil - } - else { - forwardOn(.completed) - } - - dispose() - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - // It is important to always return `nil` here because there are sideffects in the `run` method - // that are dependant on particular `retryWhen` operator so single operator stack can't be reused in this - // case. - return nil - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - let subscription = SingleAssignmentDisposable() - let iter = RetryWhenSequenceSinkIter(parent: self, subscription: subscription) - subscription.setDisposable(source.subscribe(iter)) - return iter - } - - override func run(_ sources: SequenceGenerator) -> Disposable { - let triggerSubscription = _handler.subscribe(_notifier.asObserver()) - let superSubscription = super.run(sources) - return Disposables.create(superSubscription, triggerSubscription) - } -} - -final fileprivate class RetryWhenSequence : Producer where S.Iterator.Element : ObservableType { - typealias Element = S.Iterator.Element.E - - fileprivate let _sources: S - fileprivate let _notificationHandler: (Observable) -> TriggerObservable - - init(sources: S, notificationHandler: @escaping (Observable) -> TriggerObservable) { - _sources = sources - _notificationHandler = notificationHandler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = RetryWhenSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run((self._sources.makeIterator(), nil)) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Sample.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Sample.swift deleted file mode 100644 index 31f8b62..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Sample.swift +++ /dev/null @@ -1,142 +0,0 @@ -// -// Sample.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Samples the source observable sequence using a sampler observable sequence producing sampling ticks. - - Upon each sampling tick, the latest element (if any) in the source sequence during the last sampling interval is sent to the resulting sequence. - - **In case there were no new elements between sampler ticks, no element is sent to the resulting sequence.** - - - seealso: [sample operator on reactivex.io](http://reactivex.io/documentation/operators/sample.html) - - - parameter sampler: Sampling tick sequence. - - returns: Sampled observable sequence. - */ - public func sample(_ sampler: O) - -> Observable { - return Sample(source: self.asObservable(), sampler: sampler.asObservable()) - } -} - -final fileprivate class SamplerSink - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = SampleType - - typealias Parent = SampleSequenceSink - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return _parent._lock - } - - init(parent: Parent) { - _parent = parent - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - if let element = _parent._element { - _parent._element = nil - _parent.forwardOn(.next(element)) - } - - if _parent._atEnd { - _parent.forwardOn(.completed) - _parent.dispose() - } - case .error(let e): - _parent.forwardOn(.error(e)) - _parent.dispose() - case .completed: - if let element = _parent._element { - _parent._element = nil - _parent.forwardOn(.next(element)) - } - if _parent._atEnd { - _parent.forwardOn(.completed) - _parent.dispose() - } - } - } -} - -final fileprivate class SampleSequenceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - typealias Parent = Sample - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - // state - fileprivate var _element = nil as Element? - fileprivate var _atEnd = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - _sourceSubscription.setDisposable(_parent._source.subscribe(self)) - let samplerSubscription = _parent._sampler.subscribe(SamplerSink(parent: self)) - - return Disposables.create(_sourceSubscription, samplerSubscription) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - _element = element - case .error: - forwardOn(event) - dispose() - case .completed: - _atEnd = true - _sourceSubscription.dispose() - } - } - -} - -final fileprivate class Sample : Producer { - fileprivate let _source: Observable - fileprivate let _sampler: Observable - - init(source: Observable, sampler: Observable) { - _source = source - _sampler = sampler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SampleSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Scan.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Scan.swift deleted file mode 100644 index 39d5e92..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Scan.swift +++ /dev/null @@ -1,101 +0,0 @@ -// -// Scan.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - - For aggregation behavior with no intermediate results, see `reduce`. - - - seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: An accumulator function to be invoked on each element. - - returns: An observable sequence containing the accumulated values. - */ - public func scan(into seed: A, accumulator: @escaping (inout A, E) throws -> ()) - -> Observable { - return Scan(source: self.asObservable(), seed: seed, accumulator: accumulator) - } - - /** - Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - - For aggregation behavior with no intermediate results, see `reduce`. - - - seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: An accumulator function to be invoked on each element. - - returns: An observable sequence containing the accumulated values. - */ - public func scan(_ seed: A, accumulator: @escaping (A, E) throws -> A) - -> Observable { - return Scan(source: self.asObservable(), seed: seed) { acc, element in - let currentAcc = acc - acc = try accumulator(currentAcc, element) - } - } -} - -final fileprivate class ScanSink : Sink, ObserverType { - typealias Accumulate = O.E - typealias Parent = Scan - typealias E = ElementType - - fileprivate let _parent: Parent - fileprivate var _accumulate: Accumulate - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _accumulate = parent._seed - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - try _parent._accumulator(&_accumulate, element) - forwardOn(.next(_accumulate)) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } - -} - -final fileprivate class Scan: Producer { - typealias Accumulator = (inout Accumulate, Element) throws -> () - - fileprivate let _source: Observable - fileprivate let _seed: Accumulate - fileprivate let _accumulator: Accumulator - - init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { - _source = source - _seed = seed - _accumulator = accumulator - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Accumulate { - let sink = ScanSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Sequence.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Sequence.swift deleted file mode 100644 index e141bc7..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Sequence.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// Sequence.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - // MARK: of - - /** - This method creates a new Observable instance with a variable number of elements. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter elements: Elements to generate. - - parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediately on subscription. - - returns: The observable sequence whose elements are pulled from the given arguments. - */ - public static func of(_ elements: E ..., scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: elements, scheduler: scheduler) - } -} - -extension ObservableType { - /** - Converts an array to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - public static func from(_ array: [E], scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: array, scheduler: scheduler) - } - - /** - Converts a sequence to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - public static func from(_ sequence: S, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable where S.Iterator.Element == E { - return ObservableSequence(elements: sequence, scheduler: scheduler) - } -} - -final fileprivate class ObservableSequenceSink : Sink where S.Iterator.Element == O.E { - typealias Parent = ObservableSequence - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRecursive((_parent._elements.makeIterator(), _parent._elements)) { (iterator, recurse) in - var mutableIterator = iterator - if let next = mutableIterator.0.next() { - self.forwardOn(.next(next)) - recurse(mutableIterator) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } -} - -final fileprivate class ObservableSequence : Producer { - fileprivate let _elements: S - fileprivate let _scheduler: ImmediateSchedulerType - - init(elements: S, scheduler: ImmediateSchedulerType) { - _elements = elements - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObservableSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift b/Demo/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift deleted file mode 100644 index 5af102f..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift +++ /dev/null @@ -1,458 +0,0 @@ -// -// ShareReplayScope.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/28/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -/// Subject lifetime scope -public enum SubjectLifetimeScope { - /** - **Each connection will have it's own subject instance to store replay events.** - **Connections will be isolated from each another.** - - Configures the underlying implementation to behave equivalent to. - - ``` - source.multicast(makeSubject: { MySubject() }).refCount() - ``` - - **This is the recommended default.** - - This has the following consequences: - * `retry` or `concat` operators will function as expected because terminating the sequence will clear internal state. - * Each connection to source observable sequence will use it's own subject. - * When the number of subscribers drops from 1 to 0 and connection to source sequence is disposed, subject will be cleared. - - - ``` - let xs = Observable.deferred { () -> Observable in - print("Performing work ...") - return Observable.just(Date().timeIntervalSince1970) - } - .share(replay: 1, scope: .whileConnected) - - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - - ``` - - Notice how time interval is different and `Performing work ...` is printed each time) - - ``` - Performing work ... - next 1495998900.82141 - completed - - Performing work ... - next 1495998900.82359 - completed - - Performing work ... - next 1495998900.82444 - completed - - - ``` - - */ - case whileConnected - - /** - **One subject will store replay events for all connections to source.** - **Connections won't be isolated from each another.** - - Configures the underlying implementation behave equivalent to. - - ``` - source.multicast(MySubject()).refCount() - ``` - - This has the following consequences: - * Using `retry` or `concat` operators after this operator usually isn't advised. - * Each connection to source observable sequence will share the same subject. - * After number of subscribers drops from 1 to 0 and connection to source observable sequence is dispose, this operator will - continue holding a reference to the same subject. - If at some later moment a new observer initiates a new connection to source it can potentially receive - some of the stale events received during previous connection. - * After source sequence terminates any new observer will always immediately receive replayed elements and terminal event. - No new subscriptions to source observable sequence will be attempted. - - ``` - let xs = Observable.deferred { () -> Observable in - print("Performing work ...") - return Observable.just(Date().timeIntervalSince1970) - } - .share(replay: 1, scope: .forever) - - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) - ``` - - Notice how time interval is the same, replayed, and `Performing work ...` is printed only once - - ``` - Performing work ... - next 1495999013.76356 - completed - - next 1495999013.76356 - completed - - next 1495999013.76356 - completed - ``` - - */ - case forever -} - -extension ObservableType { - - /** - Returns an observable sequence that **shares a single subscription to the underlying sequence**, and immediately upon subscription replays elements in buffer. - - This operator is equivalent to: - * `.whileConnected` - ``` - // Each connection will have it's own subject instance to store replay events. - // Connections will be isolated from each another. - source.multicast(makeSubject: { Replay.create(bufferSize: replay) }).refCount() - ``` - * `.forever` - ``` - // One subject will store replay events for all connections to source. - // Connections won't be isolated from each another. - source.multicast(Replay.create(bufferSize: replay)).refCount() - ``` - - It uses optimized versions of the operators for most common operations. - - - parameter replay: Maximum element count of the replay buffer. - - parameter scope: Lifetime scope of sharing subject. For more information see `SubjectLifetimeScope` enum. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - public func share(replay: Int = 0, scope: SubjectLifetimeScope = .whileConnected) - -> Observable { - switch scope { - case .forever: - switch replay { - case 0: return self.multicast(PublishSubject()).refCount() - default: return self.multicast(ReplaySubject.create(bufferSize: replay)).refCount() - } - case .whileConnected: - switch replay { - case 0: return ShareWhileConnected(source: self.asObservable()) - case 1: return ShareReplay1WhileConnected(source: self.asObservable()) - default: return self.multicast(makeSubject: { ReplaySubject.create(bufferSize: replay) }).refCount() - } - } - } -} - -fileprivate final class ShareReplay1WhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { - typealias E = Element - typealias Observers = AnyObserver.s - typealias DisposeKey = Observers.KeyType - - typealias Parent = ShareReplay1WhileConnected - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - - private let _lock: RecursiveLock - private var _disposed: Bool = false - fileprivate var _observers = Observers() - fileprivate var _element: Element? - - init(parent: Parent, lock: RecursiveLock) { - _parent = parent - _lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - _lock.lock() - let observers = _synchronized_on(event) - _lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if _disposed { - return Observers() - } - - switch event { - case .next(let element): - _element = element - return _observers - case .error, .completed: - let observers = _observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - _subscription.setDisposable(_parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == Element { - _lock.lock(); defer { _lock.unlock() } - if let element = _element { - observer.on(.next(element)) - } - - let disposeKey = _observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - _disposed = true - if _parent._connection === self { - _parent._connection = nil - } - _observers = Observers() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - _lock.lock() - let shouldDisconnect = _synchronized_unsubscribe(disposeKey) - _lock.unlock() - if shouldDisconnect { - _subscription.dispose() - } - } - - @inline(__always) - final private func _synchronized_unsubscribe(_ disposeKey: DisposeKey) -> Bool { - // if already unsubscribed, just return - if self._observers.removeKey(disposeKey) == nil { - return false - } - - if _observers.count == 0 { - _synchronized_dispose() - return true - } - - return false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final fileprivate class ShareReplay1WhileConnected - : Observable { - - fileprivate typealias Connection = ShareReplay1WhileConnectedConnection - - fileprivate let _source: Observable - - fileprivate let _lock = RecursiveLock() - - fileprivate var _connection: Connection? - - init(source: Observable) { - self._source = source - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - _lock.lock() - - let connection = _synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - _lock.unlock() - - if count == 0 { - connection.connect() - } - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { - let connection: Connection - - if let existingConnection = _connection { - connection = existingConnection - } - else { - connection = ShareReplay1WhileConnectedConnection( - parent: self, - lock: _lock) - _connection = connection - } - - return connection - } -} - -fileprivate final class ShareWhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { - typealias E = Element - typealias Observers = AnyObserver.s - typealias DisposeKey = Observers.KeyType - - typealias Parent = ShareWhileConnected - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - - private let _lock: RecursiveLock - private var _disposed: Bool = false - fileprivate var _observers = Observers() - - init(parent: Parent, lock: RecursiveLock) { - _parent = parent - _lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - _lock.lock() - let observers = _synchronized_on(event) - _lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if _disposed { - return Observers() - } - - switch event { - case .next: - return _observers - case .error, .completed: - let observers = _observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - _subscription.setDisposable(_parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == Element { - _lock.lock(); defer { _lock.unlock() } - - let disposeKey = _observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - _disposed = true - if _parent._connection === self { - _parent._connection = nil - } - _observers = Observers() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - _lock.lock() - let shouldDisconnect = _synchronized_unsubscribe(disposeKey) - _lock.unlock() - if shouldDisconnect { - _subscription.dispose() - } - } - - @inline(__always) - final private func _synchronized_unsubscribe(_ disposeKey: DisposeKey) -> Bool { - // if already unsubscribed, just return - if self._observers.removeKey(disposeKey) == nil { - return false - } - - if _observers.count == 0 { - _synchronized_dispose() - return true - } - - return false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final fileprivate class ShareWhileConnected - : Observable { - - fileprivate typealias Connection = ShareWhileConnectedConnection - - fileprivate let _source: Observable - - fileprivate let _lock = RecursiveLock() - - fileprivate var _connection: Connection? - - init(source: Observable) { - self._source = source - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - _lock.lock() - - let connection = _synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - _lock.unlock() - - if count == 0 { - connection.connect() - } - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { - let connection: Connection - - if let existingConnection = _connection { - connection = existingConnection - } - else { - connection = ShareWhileConnectedConnection( - parent: self, - lock: _lock) - _connection = connection - } - - return connection - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift b/Demo/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift deleted file mode 100644 index 1419a93..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift +++ /dev/null @@ -1,105 +0,0 @@ -// -// SingleAsync.swift -// RxSwift -// -// Created by Junior B. on 09/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - The single operator is similar to first, but throws a `RxError.noElements` or `RxError.moreThanOneElement` - if the source Observable does not emit exactly one element before successfully completing. - - - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) - - - returns: An observable sequence that emits a single element or throws an exception if more (or none) of them are emitted. - */ - public func single() - -> Observable { - return SingleAsync(source: asObservable()) - } - - /** - The single operator is similar to first, but throws a `RxError.NoElements` or `RxError.MoreThanOneElement` - if the source Observable does not emit exactly one element before successfully completing. - - - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) - - - parameter predicate: A function to test each source element for a condition. - - returns: An observable sequence that emits a single element or throws an exception if more (or none) of them are emitted. - */ - public func single(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return SingleAsync(source: asObservable(), predicate: predicate) - } -} - -fileprivate final class SingleAsyncSink : Sink, ObserverType { - typealias ElementType = O.E - typealias Parent = SingleAsync - typealias E = ElementType - - private let _parent: Parent - private var _seenValue: Bool = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let forward = try _parent._predicate?(value) ?? true - if !forward { - return - } - } - catch let error { - forwardOn(.error(error as Swift.Error)) - dispose() - return - } - - if _seenValue { - forwardOn(.error(RxError.moreThanOneElement)) - dispose() - return - } - - _seenValue = true - forwardOn(.next(value)) - case .error: - forwardOn(event) - dispose() - case .completed: - if (_seenValue) { - forwardOn(.completed) - } else { - forwardOn(.error(RxError.noElements)) - } - dispose() - } - } -} - -final class SingleAsync: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate? - - init(source: Observable, predicate: Predicate? = nil) { - _source = source - _predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SingleAsyncSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Sink.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Sink.swift deleted file mode 100644 index 214cfda..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Sink.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// Sink.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class Sink : Disposable { - fileprivate let _observer: O - fileprivate let _cancel: Cancelable - fileprivate var _disposed: Bool - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - init(observer: O, cancel: Cancelable) { -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - _observer = observer - _cancel = cancel - _disposed = false - } - - final func forwardOn(_ event: Event) { - #if DEBUG - _synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { _synchronizationTracker.unregister() } - #endif - if _disposed { - return - } - _observer.on(event) - } - - final func forwarder() -> SinkForward { - return SinkForward(forward: self) - } - - final var disposed: Bool { - return _disposed - } - - func dispose() { - _disposed = true - _cancel.dispose() - } - - deinit { -#if TRACE_RESOURCES - let _ = Resources.decrementTotal() -#endif - } -} - -final class SinkForward: ObserverType { - typealias E = O.E - - private let _forward: Sink - - init(forward: Sink) { - _forward = forward - } - - final func on(_ event: Event) { - switch event { - case .next: - _forward._observer.on(event) - case .error, .completed: - _forward._observer.on(event) - _forward._cancel.dispose() - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Skip.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Skip.swift deleted file mode 100644 index fcac9d4..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Skip.swift +++ /dev/null @@ -1,159 +0,0 @@ -// -// Skip.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. - - - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) - - - parameter count: The number of elements to skip before returning the remaining elements. - - returns: An observable sequence that contains the elements that occur after the specified index in the input sequence. - */ - public func skip(_ count: Int) - -> Observable { - return SkipCount(source: asObservable(), count: count) - } -} - -extension ObservableType { - - /** - Skips elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. - - - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) - - - parameter duration: Duration for skipping elements from the start of the sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence with the elements skipped during the specified duration from the start of the source sequence. - */ - public func skip(_ duration: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return SkipTime(source: self.asObservable(), duration: duration, scheduler: scheduler) - } -} - -// count version - -final fileprivate class SkipCountSink : Sink, ObserverType { - typealias Element = O.E - typealias Parent = SkipCount - - let parent: Parent - - var remaining: Int - - init(parent: Parent, observer: O, cancel: Cancelable) { - self.parent = parent - self.remaining = parent.count - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - - if remaining <= 0 { - forwardOn(.next(value)) - } - else { - remaining -= 1 - } - case .error: - forwardOn(event) - self.dispose() - case .completed: - forwardOn(event) - self.dispose() - } - } - -} - -final fileprivate class SkipCount: Producer { - let source: Observable - let count: Int - - init(source: Observable, count: Int) { - self.source = source - self.count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = source.subscribe(sink) - - return (sink: sink, subscription: subscription) - } -} - -// time version - -final fileprivate class SkipTimeSink : Sink, ObserverType where O.E == ElementType { - typealias Parent = SkipTime - typealias Element = ElementType - - let parent: Parent - - // state - var open = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - self.parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if open { - forwardOn(.next(value)) - } - case .error: - forwardOn(event) - self.dispose() - case .completed: - forwardOn(event) - self.dispose() - } - } - - func tick() { - open = true - } - - func run() -> Disposable { - let disposeTimer = parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { _ in - self.tick() - return Disposables.create() - } - - let disposeSubscription = parent.source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final fileprivate class SkipTime: Producer { - let source: Observable - let duration: RxTimeInterval - let scheduler: SchedulerType - - init(source: Observable, duration: RxTimeInterval, scheduler: SchedulerType) { - self.source = source - self.scheduler = scheduler - self.duration = duration - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift b/Demo/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift deleted file mode 100644 index f35f1fd..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// SkipUntil.swift -// RxSwift -// -// Created by Yury Korolev on 10/3/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns the elements from the source observable sequence that are emitted after the other observable sequence produces an element. - - - seealso: [skipUntil operator on reactivex.io](http://reactivex.io/documentation/operators/skipuntil.html) - - - parameter other: Observable sequence that starts propagation of elements of the source sequence. - - returns: An observable sequence containing the elements of the source sequence that are emitted after the other sequence emits an item. - */ - public func skipUntil(_ other: O) - -> Observable { - return SkipUntil(source: asObservable(), other: other.asObservable()) - } -} - -final fileprivate class SkipUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = SkipUntilSink - typealias E = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return _parent._lock - } - - let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - _parent = parent - #if TRACE_RESOURCES - let _ = Resources.incrementTotal() - #endif - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - _parent._forwardElements = true - _subscription.dispose() - case .error(let e): - _parent.forwardOn(.error(e)) - _parent.dispose() - case .completed: - _subscription.dispose() - } - } - - #if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - } - #endif - -} - - -final fileprivate class SkipUntilSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = O.E - typealias Parent = SkipUntil - - let _lock = RecursiveLock() - fileprivate let _parent: Parent - fileprivate var _forwardElements = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - if _forwardElements { - forwardOn(event) - } - case .error: - forwardOn(event) - self.dispose() - case .completed: - if _forwardElements { - forwardOn(event) - } - self.dispose() - } - } - - func run() -> Disposable { - let sourceSubscription = _parent._source.subscribe(self) - let otherObserver = SkipUntilSinkOther(parent: self) - let otherSubscription = _parent._other.subscribe(otherObserver) - _sourceSubscription.setDisposable(sourceSubscription) - otherObserver._subscription.setDisposable(otherSubscription) - - return Disposables.create(_sourceSubscription, otherObserver._subscription) - } -} - -final fileprivate class SkipUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - _source = source - _other = other - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift b/Demo/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift deleted file mode 100644 index 4bb394b..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// SkipWhile.swift -// RxSwift -// -// Created by Yury Korolev on 10/9/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - - - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) - - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - public func skipWhile(_ predicate: @escaping (E) throws -> Bool) -> Observable { - return SkipWhile(source: asObservable(), predicate: predicate) - } -} - -final fileprivate class SkipWhileSink : Sink, ObserverType { - - typealias Element = O.E - typealias Parent = SkipWhile - - fileprivate let _parent: Parent - fileprivate var _running = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - do { - _running = try !_parent._predicate(value) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - } - - if _running { - forwardOn(.next(value)) - } - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -final fileprivate class SkipWhile: Producer { - typealias Predicate = (Element) throws -> Bool - typealias PredicateWithIndex = (Element, Int) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - _source = source - _predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/StartWith.swift b/Demo/Pods/RxSwift/RxSwift/Observables/StartWith.swift deleted file mode 100644 index 14776f9..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/StartWith.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// StartWith.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Prepends a sequence of values to an observable sequence. - - - seealso: [startWith operator on reactivex.io](http://reactivex.io/documentation/operators/startwith.html) - - - parameter elements: Elements to prepend to the specified sequence. - - returns: The source sequence prepended with the specified values. - */ - public func startWith(_ elements: E ...) - -> Observable { - return StartWith(source: self.asObservable(), elements: elements) - } -} - -final fileprivate class StartWith: Producer { - let elements: [Element] - let source: Observable - - init(source: Observable, elements: [Element]) { - self.source = source - self.elements = elements - super.init() - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - for e in elements { - observer.on(.next(e)) - } - - return (sink: Disposables.create(), subscription: source.subscribe(observer)) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift b/Demo/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift deleted file mode 100644 index 2a33e03..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// SubscribeOn.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Wraps the source sequence in order to run its subscription and unsubscription logic on the specified - scheduler. - - This operation is not commonly used. - - This only performs the side-effects of subscription and unsubscription on the specified scheduler. - - In order to invoke observer callbacks on a `scheduler`, use `observeOn`. - - - seealso: [subscribeOn operator on reactivex.io](http://reactivex.io/documentation/operators/subscribeon.html) - - - parameter scheduler: Scheduler to perform subscription and unsubscription actions on. - - returns: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. - */ - public func subscribeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - return SubscribeOn(source: self, scheduler: scheduler) - } -} - -final fileprivate class SubscribeOnSink : Sink, ObserverType where Ob.E == O.E { - typealias Element = O.E - typealias Parent = SubscribeOn - - let parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self.parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - forwardOn(event) - - if event.isStopEvent { - self.dispose() - } - } - - func run() -> Disposable { - let disposeEverything = SerialDisposable() - let cancelSchedule = SingleAssignmentDisposable() - - disposeEverything.disposable = cancelSchedule - - let disposeSchedule = parent.scheduler.schedule(()) { (_) -> Disposable in - let subscription = self.parent.source.subscribe(self) - disposeEverything.disposable = ScheduledDisposable(scheduler: self.parent.scheduler, disposable: subscription) - return Disposables.create() - } - - cancelSchedule.setDisposable(disposeSchedule) - - return disposeEverything - } -} - -final fileprivate class SubscribeOn : Producer { - let source: Ob - let scheduler: ImmediateSchedulerType - - init(source: Ob, scheduler: ImmediateSchedulerType) { - self.source = source - self.scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Ob.E { - let sink = SubscribeOnSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Switch.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Switch.swift deleted file mode 100644 index 2da1000..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Switch.swift +++ /dev/null @@ -1,233 +0,0 @@ -// -// Switch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Projects each element of an observable sequence into a new sequence of observable sequences and then - transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - - It is a combination of `map` + `switchLatest` operator - - - seealso: [flatMapLatest operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element. - - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an - Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - public func flatMapLatest(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMapLatest(source: asObservable(), selector: selector) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Transforms an observable sequence of observable sequences into an observable sequence - producing values only from the most recent observable sequence. - - Each time a new inner observable sequence is received, unsubscribe from the - previous inner observable sequence. - - - seealso: [switch operator on reactivex.io](http://reactivex.io/documentation/operators/switch.html) - - - returns: The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - public func switchLatest() -> Observable { - return Switch(source: asObservable()) - } -} - -fileprivate class SwitchSink - : Sink - , ObserverType where S.E == O.E { - typealias E = SourceType - - fileprivate let _subscriptions: SingleAssignmentDisposable = SingleAssignmentDisposable() - fileprivate let _innerSubscription: SerialDisposable = SerialDisposable() - - let _lock = RecursiveLock() - - // state - fileprivate var _stopped = false - fileprivate var _latest = 0 - fileprivate var _hasLatest = false - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let subscription = source.subscribe(self) - _subscriptions.setDisposable(subscription) - return Disposables.create(_subscriptions, _innerSubscription) - } - - func performMap(_ element: SourceType) throws -> S { - rxAbstractMethod() - } - - @inline(__always) - final private func nextElementArrived(element: E) -> (Int, Observable)? { - _lock.lock(); defer { _lock.unlock() } // { - do { - let observable = try performMap(element).asObservable() - _hasLatest = true - _latest = _latest &+ 1 - return (_latest, observable) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - - return nil - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let (latest, observable) = nextElementArrived(element: element) { - let d = SingleAssignmentDisposable() - _innerSubscription.disposable = d - - let observer = SwitchSinkIter(parent: self, id: latest, _self: d) - let disposable = observable.subscribe(observer) - d.setDisposable(disposable) - } - case .error(let error): - _lock.lock(); defer { _lock.unlock() } - forwardOn(.error(error)) - dispose() - case .completed: - _lock.lock(); defer { _lock.unlock() } - _stopped = true - - _subscriptions.dispose() - - if !_hasLatest { - forwardOn(.completed) - dispose() - } - } - } -} - -final fileprivate class SwitchSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { - typealias E = S.E - typealias Parent = SwitchSink - - fileprivate let _parent: Parent - fileprivate let _id: Int - fileprivate let _self: Disposable - - var _lock: RecursiveLock { - return _parent._lock - } - - init(parent: Parent, id: Int, _self: Disposable) { - _parent = parent - _id = id - self._self = _self - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: break - case .error, .completed: - _self.dispose() - } - - if _parent._latest != _id { - return - } - - switch event { - case .next: - _parent.forwardOn(event) - case .error: - _parent.forwardOn(event) - _parent.dispose() - case .completed: - _parent._hasLatest = false - if _parent._stopped { - _parent.forwardOn(event) - _parent.dispose() - } - } - } -} - -// MARK: Specializations - -final fileprivate class SwitchIdentitySink : SwitchSink where O.E == S.E { - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: S) throws -> S { - return element - } -} - -final fileprivate class MapSwitchSink : SwitchSink where O.E == S.E { - typealias Selector = (SourceType) throws -> S - - fileprivate let _selector: Selector - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try _selector(element) - } -} - -// MARK: Producers - -final fileprivate class Switch : Producer { - fileprivate let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = SwitchIdentitySink(observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class FlatMapLatest : Producer { - typealias Selector = (SourceType) throws -> S - - fileprivate let _source: Observable - fileprivate let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = MapSwitchSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift b/Demo/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift deleted file mode 100644 index 0b10dc6..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// SwitchIfEmpty.swift -// RxSwift -// -// Created by sergdort on 23/12/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Returns the elements of the specified sequence or `switchTo` sequence if the sequence is empty. - - - seealso: [DefaultIfEmpty operator on reactivex.io](http://reactivex.io/documentation/operators/defaultifempty.html) - - - parameter switchTo: Observable sequence being returned when source sequence is empty. - - returns: Observable sequence that contains elements from switchTo sequence if source is empty, otherwise returns source sequence elements. - */ - public func ifEmpty(switchTo other: Observable) -> Observable { - return SwitchIfEmpty(source: asObservable(), ifEmpty: other) - } -} - -final fileprivate class SwitchIfEmpty: Producer { - - private let _source: Observable - private let _ifEmpty: Observable - - init(source: Observable, ifEmpty: Observable) { - _source = source - _ifEmpty = ifEmpty - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SwitchIfEmptySink(ifEmpty: _ifEmpty, - observer: observer, - cancel: cancel) - let subscription = sink.run(_source.asObservable()) - - return (sink: sink, subscription: subscription) - } -} - -final fileprivate class SwitchIfEmptySink: Sink - , ObserverType { - typealias E = O.E - - private let _ifEmpty: Observable - private var _isEmpty = true - private let _ifEmptySubscription = SingleAssignmentDisposable() - - init(ifEmpty: Observable, observer: O, cancel: Cancelable) { - _ifEmpty = ifEmpty - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let subscription = source.subscribe(self) - return Disposables.create(subscription, _ifEmptySubscription) - } - - func on(_ event: Event) { - switch event { - case .next: - _isEmpty = false - forwardOn(event) - case .error: - forwardOn(event) - dispose() - case .completed: - guard _isEmpty else { - forwardOn(.completed) - dispose() - return - } - let ifEmptySink = SwitchIfEmptySinkIter(parent: self) - _ifEmptySubscription.setDisposable(_ifEmpty.subscribe(ifEmptySink)) - } - } -} - -final fileprivate class SwitchIfEmptySinkIter - : ObserverType { - typealias E = O.E - typealias Parent = SwitchIfEmptySink - - private let _parent: Parent - - init(parent: Parent) { - _parent = parent - } - - func on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(event) - case .error: - _parent.forwardOn(event) - _parent.dispose() - case .completed: - _parent.forwardOn(event) - _parent.dispose() - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Take.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Take.swift deleted file mode 100644 index 661f858..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Take.swift +++ /dev/null @@ -1,180 +0,0 @@ -// -// Take.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a specified number of contiguous elements from the start of an observable sequence. - - - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) - - - parameter count: The number of elements to return. - - returns: An observable sequence that contains the specified number of elements from the start of the input sequence. - */ - public func take(_ count: Int) - -> Observable { - if count == 0 { - return Observable.empty() - } - else { - return TakeCount(source: asObservable(), count: count) - } - } -} - -extension ObservableType { - - /** - Takes elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. - - - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) - - - parameter duration: Duration for taking elements from the start of the sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence with the elements taken during the specified duration from the start of the source sequence. - */ - public func take(_ duration: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return TakeTime(source: self.asObservable(), duration: duration, scheduler: scheduler) - } -} - -// count version - -final fileprivate class TakeCountSink : Sink, ObserverType { - typealias E = O.E - typealias Parent = TakeCount - - private let _parent: Parent - - private var _remaining: Int - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _remaining = parent._count - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - - if _remaining > 0 { - _remaining -= 1 - - forwardOn(.next(value)) - - if _remaining == 0 { - forwardOn(.completed) - dispose() - } - } - case .error: - forwardOn(event) - dispose() - case .completed: - forwardOn(event) - dispose() - } - } - -} - -final fileprivate class TakeCount: Producer { - fileprivate let _source: Observable - fileprivate let _count: Int - - init(source: Observable, count: Int) { - if count < 0 { - rxFatalError("count can't be negative") - } - _source = source - _count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - -// time version - -final fileprivate class TakeTimeSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where O.E == ElementType { - typealias Parent = TakeTime - typealias E = ElementType - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - forwardOn(.next(value)) - case .error: - forwardOn(event) - dispose() - case .completed: - forwardOn(event) - dispose() - } - } - - func tick() { - _lock.lock(); defer { _lock.unlock() } - - forwardOn(.completed) - dispose() - } - - func run() -> Disposable { - let disposeTimer = _parent._scheduler.scheduleRelative((), dueTime: _parent._duration) { _ in - self.tick() - return Disposables.create() - } - - let disposeSubscription = _parent._source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final fileprivate class TakeTime : Producer { - typealias TimeInterval = RxTimeInterval - - fileprivate let _source: Observable - fileprivate let _duration: TimeInterval - fileprivate let _scheduler: SchedulerType - - init(source: Observable, duration: TimeInterval, scheduler: SchedulerType) { - _source = source - _scheduler = scheduler - _duration = duration - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/TakeLast.swift b/Demo/Pods/RxSwift/RxSwift/Observables/TakeLast.swift deleted file mode 100644 index 7bf1664..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/TakeLast.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// TakeLast.swift -// RxSwift -// -// Created by Tomi Koskinen on 25/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a specified number of contiguous elements from the end of an observable sequence. - - This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. - - - seealso: [takeLast operator on reactivex.io](http://reactivex.io/documentation/operators/takelast.html) - - - parameter count: Number of elements to take from the end of the source sequence. - - returns: An observable sequence containing the specified number of elements from the end of the source sequence. - */ - public func takeLast(_ count: Int) - -> Observable { - return TakeLast(source: asObservable(), count: count) - } -} - -final fileprivate class TakeLastSink : Sink, ObserverType { - typealias E = O.E - typealias Parent = TakeLast - - private let _parent: Parent - - private var _elements: Queue - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _elements = Queue(capacity: parent._count + 1) - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - _elements.enqueue(value) - if _elements.count > self._parent._count { - let _ = _elements.dequeue() - } - case .error: - forwardOn(event) - dispose() - case .completed: - for e in _elements { - forwardOn(.next(e)) - } - forwardOn(.completed) - dispose() - } - } -} - -final fileprivate class TakeLast: Producer { - fileprivate let _source: Observable - fileprivate let _count: Int - - init(source: Observable, count: Int) { - if count < 0 { - rxFatalError("count can't be negative") - } - _source = source - _count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeLastSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift b/Demo/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift deleted file mode 100644 index f2e5f98..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// TakeUntil.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns the elements from the source observable sequence until the other observable sequence produces an element. - - - seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html) - - - parameter other: Observable sequence that terminates propagation of elements of the source sequence. - - returns: An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. - */ - public func takeUntil(_ other: O) - -> Observable { - return TakeUntil(source: asObservable(), other: other.asObservable()) - } -} - -final fileprivate class TakeUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = TakeUntilSink - typealias E = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return _parent._lock - } - - fileprivate let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - _parent = parent -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(.completed) - _parent.dispose() - case .error(let e): - _parent.forwardOn(.error(e)) - _parent.dispose() - case .completed: - _subscription.dispose() - } - } - -#if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - } -#endif -} - -final fileprivate class TakeUntilSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType { - typealias E = O.E - typealias Parent = TakeUntil - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .error: - forwardOn(event) - dispose() - case .completed: - forwardOn(event) - dispose() - } - } - - func run() -> Disposable { - let otherObserver = TakeUntilSinkOther(parent: self) - let otherSubscription = _parent._other.subscribe(otherObserver) - otherObserver._subscription.setDisposable(otherSubscription) - let sourceSubscription = _parent._source.subscribe(self) - - return Disposables.create(sourceSubscription, otherObserver._subscription) - } -} - -final fileprivate class TakeUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - _source = source - _other = other - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift b/Demo/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift deleted file mode 100644 index 2b7b551..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// TakeWhile.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns elements from an observable sequence as long as a specified condition is true. - - - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) - - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - */ - public func takeWhile(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return TakeWhile(source: asObservable(), predicate: predicate) - } -} - -final fileprivate class TakeWhileSink - : Sink - , ObserverType { - typealias Element = O.E - typealias Parent = TakeWhile - - fileprivate let _parent: Parent - - fileprivate var _running = true - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - return - } - - do { - _running = try _parent._predicate(value) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - - if _running { - forwardOn(.next(value)) - } else { - forwardOn(.completed) - dispose() - } - case .error, .completed: - forwardOn(event) - dispose() - } - } - -} - -final fileprivate class TakeWhile: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - _source = source - _predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Throttle.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Throttle.swift deleted file mode 100644 index 0c4ca74..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Throttle.swift +++ /dev/null @@ -1,163 +0,0 @@ -// -// Throttle.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -extension ObservableType { - - /** - Returns an Observable that emits the first and the latest item emitted by the source Observable during sequential time windows of a specified duration. - - This operator makes sure that no two elements are emitted in less then dueTime. - - - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - - - parameter dueTime: Throttling duration for each element. - - parameter latest: Should latest element received in a dueTime wide time window since last element emission be emitted. - - parameter scheduler: Scheduler to run the throttle timers on. - - returns: The throttled sequence. - */ - public func throttle(_ dueTime: RxTimeInterval, latest: Bool = true, scheduler: SchedulerType) - -> Observable { - return Throttle(source: self.asObservable(), dueTime: dueTime, latest: latest, scheduler: scheduler) - } -} - -final fileprivate class ThrottleSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - typealias ParentType = Throttle - - private let _parent: ParentType - - let _lock = RecursiveLock() - - // state - private var _lastUnsentElement: Element? = nil - private var _lastSentTime: Date? = nil - private var _completed: Bool = false - - let cancellable = SerialDisposable() - - init(parent: ParentType, observer: O, cancel: Cancelable) { - _parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = _parent._source.subscribe(self) - - return Disposables.create(subscription, cancellable) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - let now = _parent._scheduler.now - - let timeIntervalSinceLast: RxTimeInterval - - if let lastSendingTime = _lastSentTime { - timeIntervalSinceLast = now.timeIntervalSince(lastSendingTime) - } - else { - timeIntervalSinceLast = _parent._dueTime - } - - let couldSendNow = timeIntervalSinceLast >= _parent._dueTime - - if couldSendNow { - self.sendNow(element: element) - return - } - - if !_parent._latest { - return - } - - let isThereAlreadyInFlightRequest = _lastUnsentElement != nil - - _lastUnsentElement = element - - if isThereAlreadyInFlightRequest { - return - } - - let scheduler = _parent._scheduler - let dueTime = _parent._dueTime - - let d = SingleAssignmentDisposable() - self.cancellable.disposable = d - - d.setDisposable(scheduler.scheduleRelative(0, dueTime: dueTime - timeIntervalSinceLast, action: self.propagate)) - case .error: - _lastUnsentElement = nil - forwardOn(event) - dispose() - case .completed: - if let _ = _lastUnsentElement { - _completed = true - } - else { - forwardOn(.completed) - dispose() - } - } - } - - private func sendNow(element: Element) { - _lastUnsentElement = nil - self.forwardOn(.next(element)) - // in case element processing takes a while, this should give some more room - _lastSentTime = _parent._scheduler.now - } - - func propagate(_: Int) -> Disposable { - _lock.lock(); defer { _lock.unlock() } // { - if let lastUnsentElement = _lastUnsentElement { - sendNow(element: lastUnsentElement) - } - - if _completed { - forwardOn(.completed) - dispose() - } - // } - return Disposables.create() - } -} - -final fileprivate class Throttle : Producer { - - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _latest: Bool - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, latest: Bool, scheduler: SchedulerType) { - _source = source - _dueTime = dueTime - _latest = latest - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = ThrottleSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Timeout.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Timeout.swift deleted file mode 100644 index 7008de8..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Timeout.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// Timeout.swift -// RxSwift -// -// Created by Tomi Koskinen on 13/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Applies a timeout policy for each element in the observable sequence. If the next element isn't received within the specified timeout duration starting from its predecessor, a TimeoutError is propagated to the observer. - - - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) - - - parameter dueTime: Maximum duration between values before a timeout occurs. - - parameter scheduler: Scheduler to run the timeout timer on. - - returns: An observable sequence with a `RxError.timeout` in case of a timeout. - */ - public func timeout(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: Observable.error(RxError.timeout), scheduler: scheduler) - } - - /** - Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. If the next element isn't received within the specified timeout duration starting from its predecessor, the other observable sequence is used to produce future messages from that point on. - - - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) - - - parameter dueTime: Maximum duration between values before a timeout occurs. - - parameter other: Sequence to return in case of a timeout. - - parameter scheduler: Scheduler to run the timeout timer on. - - returns: The source sequence switching to the other sequence in case of a timeout. - */ - public func timeout(_ dueTime: RxTimeInterval, other: O, scheduler: SchedulerType) - -> Observable where E == O.E { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: other.asObservable(), scheduler: scheduler) - } -} - -final fileprivate class TimeoutSink: Sink, LockOwnerType, ObserverType { - typealias E = O.E - typealias Parent = Timeout - - private let _parent: Parent - - let _lock = RecursiveLock() - - private let _timerD = SerialDisposable() - private let _subscription = SerialDisposable() - - private var _id = 0 - private var _switched = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let original = SingleAssignmentDisposable() - _subscription.disposable = original - - _createTimeoutTimer() - - original.setDisposable(_parent._source.subscribe(self)) - - return Disposables.create(_subscription, _timerD) - } - - func on(_ event: Event) { - switch event { - case .next: - var onNextWins = false - - _lock.performLocked() { - onNextWins = !self._switched - if onNextWins { - self._id = self._id &+ 1 - } - } - - if onNextWins { - forwardOn(event) - self._createTimeoutTimer() - } - case .error, .completed: - var onEventWins = false - - _lock.performLocked() { - onEventWins = !self._switched - if onEventWins { - self._id = self._id &+ 1 - } - } - - if onEventWins { - forwardOn(event) - self.dispose() - } - } - } - - private func _createTimeoutTimer() { - if _timerD.isDisposed { - return - } - - let nextTimer = SingleAssignmentDisposable() - _timerD.disposable = nextTimer - - let disposeSchedule = _parent._scheduler.scheduleRelative(_id, dueTime: _parent._dueTime) { state in - - var timerWins = false - - self._lock.performLocked() { - self._switched = (state == self._id) - timerWins = self._switched - } - - if timerWins { - self._subscription.disposable = self._parent._other.subscribe(self.forwarder()) - } - - return Disposables.create() - } - - nextTimer.setDisposable(disposeSchedule) - } -} - - -final fileprivate class Timeout : Producer { - - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _other: Observable - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, other: Observable, scheduler: SchedulerType) { - _source = source - _dueTime = dueTime - _other = other - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TimeoutSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Timer.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Timer.swift deleted file mode 100644 index dec69e1..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Timer.swift +++ /dev/null @@ -1,111 +0,0 @@ -// -// Timer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where E : RxAbstractInteger { - /** - Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. - - - seealso: [interval operator on reactivex.io](http://reactivex.io/documentation/operators/interval.html) - - - parameter period: Period for producing the values in the resulting sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence that produces a value after each period. - */ - public static func interval(_ period: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Timer(dueTime: period, - period: period, - scheduler: scheduler - ) - } -} - -extension ObservableType where E: RxAbstractInteger { - /** - Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers. - - - seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html) - - - parameter dueTime: Relative time at which to produce the first value. - - parameter period: Period to produce subsequent values. - - parameter scheduler: Scheduler to run timers on. - - returns: An observable sequence that produces a value after due time has elapsed and then each period. - */ - public static func timer(_ dueTime: RxTimeInterval, period: RxTimeInterval? = nil, scheduler: SchedulerType) - -> Observable { - return Timer( - dueTime: dueTime, - period: period, - scheduler: scheduler - ) - } -} - -final fileprivate class TimerSink : Sink where O.E : RxAbstractInteger { - typealias Parent = Timer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.schedulePeriodic(0 as O.E, startAfter: _parent._dueTime, period: _parent._period!) { state in - self.forwardOn(.next(state)) - return state &+ 1 - } - } -} - -final fileprivate class TimerOneOffSink : Sink where O.E : RxAbstractInteger { - typealias Parent = Timer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRelative(self, dueTime: _parent._dueTime) { (`self`) -> Disposable in - self.forwardOn(.next(0)) - self.forwardOn(.completed) - self.dispose() - - return Disposables.create() - } - } -} - -final fileprivate class Timer: Producer { - fileprivate let _scheduler: SchedulerType - fileprivate let _dueTime: RxTimeInterval - fileprivate let _period: RxTimeInterval? - - init(dueTime: RxTimeInterval, period: RxTimeInterval?, scheduler: SchedulerType) { - _scheduler = scheduler - _dueTime = dueTime - _period = period - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - if let _ = _period { - let sink = TimerSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - else { - let sink = TimerOneOffSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/ToArray.swift b/Demo/Pods/RxSwift/RxSwift/Observables/ToArray.swift deleted file mode 100644 index 93fcb80..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/ToArray.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// ToArray.swift -// RxSwift -// -// Created by Junior B. on 20/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - -extension ObservableType { - - /** - Converts an Observable into another Observable that emits the whole sequence as a single array and then terminates. - - For aggregation behavior see `reduce`. - - - seealso: [toArray operator on reactivex.io](http://reactivex.io/documentation/operators/to.html) - - - returns: An observable sequence containing all the emitted elements as array. - */ - public func toArray() - -> Observable<[E]> { - return ToArray(source: self.asObservable()) - } -} - -final fileprivate class ToArraySink : Sink, ObserverType where O.E == [SourceType] { - typealias Parent = ToArray - - let _parent: Parent - var _list = Array() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - self._list.append(value) - case .error(let e): - forwardOn(.error(e)) - self.dispose() - case .completed: - forwardOn(.next(_list)) - forwardOn(.completed) - self.dispose() - } - } -} - -final fileprivate class ToArray : Producer<[SourceType]> { - let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [SourceType] { - let sink = ToArraySink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Using.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Using.swift deleted file mode 100644 index 8ea8326..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Using.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Using.swift -// RxSwift -// -// Created by Yury Korolev on 10/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime. - - - seealso: [using operator on reactivex.io](http://reactivex.io/documentation/operators/using.html) - - - parameter resourceFactory: Factory function to obtain a resource object. - - parameter observableFactory: Factory function to obtain an observable sequence that depends on the obtained resource. - - returns: An observable sequence whose lifetime controls the lifetime of the dependent resource object. - */ - public static func using(_ resourceFactory: @escaping () throws -> Resource, observableFactory: @escaping (Resource) throws -> Observable) -> Observable { - return Using(resourceFactory: resourceFactory, observableFactory: observableFactory) - } -} - -final fileprivate class UsingSink : Sink, ObserverType { - typealias SourceType = O.E - typealias Parent = Using - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - var disposable = Disposables.create() - - do { - let resource = try _parent._resourceFactory() - disposable = resource - let source = try _parent._observableFactory(resource) - - return Disposables.create( - source.subscribe(self), - disposable - ) - } catch let error { - return Disposables.create( - Observable.error(error).subscribe(self), - disposable - ) - } - } - - func on(_ event: Event) { - switch event { - case let .next(value): - forwardOn(.next(value)) - case let .error(error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } -} - -final fileprivate class Using: Producer { - - typealias E = SourceType - - typealias ResourceFactory = () throws -> ResourceType - typealias ObservableFactory = (ResourceType) throws -> Observable - - fileprivate let _resourceFactory: ResourceFactory - fileprivate let _observableFactory: ObservableFactory - - - init(resourceFactory: @escaping ResourceFactory, observableFactory: @escaping ObservableFactory) { - _resourceFactory = resourceFactory - _observableFactory = observableFactory - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = UsingSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Window.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Window.swift deleted file mode 100644 index c862dfb..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Window.swift +++ /dev/null @@ -1,170 +0,0 @@ -// -// Window.swift -// RxSwift -// -// Created by Junior B. on 29/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. - - - seealso: [window operator on reactivex.io](http://reactivex.io/documentation/operators/window.html) - - - parameter timeSpan: Maximum time length of a window. - - parameter count: Maximum element count of a window. - - parameter scheduler: Scheduler to run windowing timers on. - - returns: An observable sequence of windows (instances of `Observable`). - */ - public func window(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable> { - return WindowTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -final fileprivate class WindowTimeCountSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where O.E == Observable { - typealias Parent = WindowTimeCount - typealias E = Element - - private let _parent: Parent - - let _lock = RecursiveLock() - - private var _subject = PublishSubject() - private var _count = 0 - private var _windowId = 0 - - private let _timerD = SerialDisposable() - private let _refCountDisposable: RefCountDisposable - private let _groupDisposable = CompositeDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - - let _ = _groupDisposable.insert(_timerD) - - _refCountDisposable = RefCountDisposable(disposable: _groupDisposable) - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - - forwardOn(.next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) - createTimer(_windowId) - - let _ = _groupDisposable.insert(_parent._source.subscribe(self)) - return _refCountDisposable - } - - func startNewWindowAndCompleteCurrentOne() { - _subject.on(.completed) - _subject = PublishSubject() - - forwardOn(.next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - var newWindow = false - var newId = 0 - - switch event { - case .next(let element): - _subject.on(.next(element)) - - do { - let _ = try incrementChecked(&_count) - } catch (let e) { - _subject.on(.error(e as Swift.Error)) - dispose() - } - - if (_count == _parent._count) { - newWindow = true - _count = 0 - _windowId += 1 - newId = _windowId - self.startNewWindowAndCompleteCurrentOne() - } - - case .error(let error): - _subject.on(.error(error)) - forwardOn(.error(error)) - dispose() - case .completed: - _subject.on(.completed) - forwardOn(.completed) - dispose() - } - - if newWindow { - createTimer(newId) - } - } - - func createTimer(_ windowId: Int) { - if _timerD.isDisposed { - return - } - - if _windowId != windowId { - return - } - - let nextTimer = SingleAssignmentDisposable() - - _timerD.disposable = nextTimer - - let scheduledRelative = _parent._scheduler.scheduleRelative(windowId, dueTime: _parent._timeSpan) { previousWindowId in - - var newId = 0 - - self._lock.performLocked { - if previousWindowId != self._windowId { - return - } - - self._count = 0 - self._windowId = self._windowId &+ 1 - newId = self._windowId - self.startNewWindowAndCompleteCurrentOne() - } - - self.createTimer(newId) - - return Disposables.create() - } - - nextTimer.setDisposable(scheduledRelative) - } -} - -final fileprivate class WindowTimeCount : Producer> { - - fileprivate let _timeSpan: RxTimeInterval - fileprivate let _count: Int - fileprivate let _scheduler: SchedulerType - fileprivate let _source: Observable - - init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { - _source = source - _timeSpan = timeSpan - _count = count - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Observable { - let sink = WindowTimeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift b/Demo/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift deleted file mode 100644 index bd22e2f..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// WithLatestFrom.swift -// RxSwift -// -// Created by Yury Korolev on 10/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Merges two observable sequences into one observable sequence by combining each element from self with the latest element from the second source, if any. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter second: Second observable source. - - parameter resultSelector: Function to invoke for each element from the self combined with the latest element from the second source, if any. - - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. - */ - public func withLatestFrom(_ second: SecondO, resultSelector: @escaping (E, SecondO.E) throws -> ResultType) -> Observable { - return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: resultSelector) - } - - /** - Merges two observable sequences into one observable sequence by using latest element from the second sequence every time when `self` emits an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter second: Second observable source. - - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. - */ - public func withLatestFrom(_ second: SecondO) -> Observable { - return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: { $1 }) - } -} - -final fileprivate class WithLatestFromSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias ResultType = O.E - typealias Parent = WithLatestFrom - typealias E = FirstType - - fileprivate let _parent: Parent - - var _lock = RecursiveLock() - fileprivate var _latest: SecondType? - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let sndSubscription = SingleAssignmentDisposable() - let sndO = WithLatestFromSecond(parent: self, disposable: sndSubscription) - - sndSubscription.setDisposable(_parent._second.subscribe(sndO)) - let fstSubscription = _parent._first.subscribe(self) - - return Disposables.create(fstSubscription, sndSubscription) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - guard let latest = _latest else { return } - do { - let res = try _parent._resultSelector(value, latest) - - forwardOn(.next(res)) - } catch let e { - forwardOn(.error(e)) - dispose() - } - case .completed: - forwardOn(.completed) - dispose() - case let .error(error): - forwardOn(.error(error)) - dispose() - } - } -} - -final fileprivate class WithLatestFromSecond - : ObserverType - , LockOwnerType - , SynchronizedOnType { - - typealias ResultType = O.E - typealias Parent = WithLatestFromSink - typealias E = SecondType - - private let _parent: Parent - private let _disposable: Disposable - - var _lock: RecursiveLock { - return _parent._lock - } - - init(parent: Parent, disposable: Disposable) { - _parent = parent - _disposable = disposable - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - _parent._latest = value - case .completed: - _disposable.dispose() - case let .error(error): - _parent.forwardOn(.error(error)) - _parent.dispose() - } - } -} - -final fileprivate class WithLatestFrom: Producer { - typealias ResultSelector = (FirstType, SecondType) throws -> ResultType - - fileprivate let _first: Observable - fileprivate let _second: Observable - fileprivate let _resultSelector: ResultSelector - - init(first: Observable, second: Observable, resultSelector: @escaping ResultSelector) { - _first = first - _second = second - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = WithLatestFromSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift deleted file mode 100644 index 11f25fc..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift +++ /dev/null @@ -1,169 +0,0 @@ -// -// Zip+Collection.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> E) -> Observable - where C.Iterator.Element: ObservableType { - return ZipCollectionType(sources: collection, resultSelector: resultSelector) - } - - /** - Merges the specified observable sequences into one observable sequence whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip(_ collection: C) -> Observable<[E]> - where C.Iterator.Element: ObservableType, C.Iterator.Element.E == E { - return ZipCollectionType(sources: collection, resultSelector: { $0 }) - } - -} - -final fileprivate class ZipCollectionTypeSink - : Sink where C.Iterator.Element : ObservableConvertibleType { - typealias R = O.E - typealias Parent = ZipCollectionType - typealias SourceElement = C.Iterator.Element.E - - private let _parent: Parent - - private let _lock = RecursiveLock() - - // state - private var _numberOfValues = 0 - private var _values: [Queue] - private var _isDone: [Bool] - private var _numberOfDone = 0 - private var _subscriptions: [SingleAssignmentDisposable] - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _values = [Queue](repeating: Queue(capacity: 4), count: parent.count) - _isDone = [Bool](repeating: false, count: parent.count) - _subscriptions = Array() - _subscriptions.reserveCapacity(parent.count) - - for _ in 0 ..< parent.count { - _subscriptions.append(SingleAssignmentDisposable()) - } - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event, atIndex: Int) { - _lock.lock(); defer { _lock.unlock() } // { - switch event { - case .next(let element): - _values[atIndex].enqueue(element) - - if _values[atIndex].count == 1 { - _numberOfValues += 1 - } - - if _numberOfValues < _parent.count { - if _numberOfDone == _parent.count - 1 { - self.forwardOn(.completed) - self.dispose() - } - return - } - - do { - var arguments = [SourceElement]() - arguments.reserveCapacity(_parent.count) - - // recalculate number of values - _numberOfValues = 0 - - for i in 0 ..< _values.count { - arguments.append(_values[i].dequeue()!) - if _values[i].count > 0 { - _numberOfValues += 1 - } - } - - let result = try _parent.resultSelector(arguments) - self.forwardOn(.next(result)) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - if _isDone[atIndex] { - return - } - - _isDone[atIndex] = true - _numberOfDone += 1 - - if _numberOfDone == _parent.count { - self.forwardOn(.completed) - self.dispose() - } - else { - _subscriptions[atIndex].dispose() - } - } - // } - } - - func run() -> Disposable { - var j = 0 - for i in _parent.sources { - let index = j - let source = i.asObservable() - - let disposable = source.subscribe(AnyObserver { event in - self.on(event, atIndex: index) - }) - _subscriptions[j].setDisposable(disposable) - j += 1 - } - - if _parent.sources.isEmpty { - self.forwardOn(.completed) - } - - return Disposables.create(_subscriptions) - } -} - -final fileprivate class ZipCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { - typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R - - let sources: C - let resultSelector: ResultSelector - let count: Int - - init(sources: C, resultSelector: @escaping ResultSelector) { - self.sources = sources - self.resultSelector = resultSelector - self.count = Int(Int64(self.sources.count)) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipCollectionTypeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift deleted file mode 100644 index 04bf68f..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift +++ /dev/null @@ -1,948 +0,0 @@ -// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project -// -// Zip+arity.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - - -// 2 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) - -> Observable { - return Zip2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2) - -> Observable<(O1.E, O2.E)> { - return Zip2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: { ($0, $1) } - ) - } -} - -final class ZipSink2_ : ZipSink { - typealias R = O.E - typealias Parent = Zip2 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 2, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - - return Disposables.create([ - subscription1, - subscription2 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!) - } -} - -final class Zip2 : Producer { - typealias ResultSelector = (E1, E2) throws -> R - - let source1: Observable - let source2: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink2_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 3 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) - -> Observable { - return Zip3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3) - -> Observable<(O1.E, O2.E, O3.E)> { - return Zip3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: { ($0, $1, $2) } - ) - } -} - -final class ZipSink3_ : ZipSink { - typealias R = O.E - typealias Parent = Zip3 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 3, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!) - } -} - -final class Zip3 : Producer { - typealias ResultSelector = (E1, E2, E3) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink3_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 4 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) - -> Observable { - return Zip4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4) - -> Observable<(O1.E, O2.E, O3.E, O4.E)> { - return Zip4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: { ($0, $1, $2, $3) } - ) - } -} - -final class ZipSink4_ : ZipSink { - typealias R = O.E - typealias Parent = Zip4 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 4, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!) - } -} - -final class Zip4 : Producer { - typealias ResultSelector = (E1, E2, E3, E4) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink4_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 5 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) - -> Observable { - return Zip5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E)> { - return Zip5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4) } - ) - } -} - -final class ZipSink5_ : ZipSink { - typealias R = O.E - typealias Parent = Zip5 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 5, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - subscription5.setDisposable(_parent.source5.subscribe(observer5)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!, _values5.dequeue()!) - } -} - -final class Zip5 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink5_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 6 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) - -> Observable { - return Zip6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E)> { - return Zip6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5) } - ) - } -} - -final class ZipSink6_ : ZipSink { - typealias R = O.E - typealias Parent = Zip6 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 6, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: _lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - subscription5.setDisposable(_parent.source5.subscribe(observer5)) - subscription6.setDisposable(_parent.source6.subscribe(observer6)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!, _values5.dequeue()!, _values6.dequeue()!) - } -} - -final class Zip6 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink6_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 7 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) - -> Observable { - return Zip7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E)> { - return Zip7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6) } - ) - } -} - -final class ZipSink7_ : ZipSink { - typealias R = O.E - typealias Parent = Zip7 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - var _values7: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 7, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 - case 6: return _values7.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: _lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - let observer7 = ZipObserver(lock: _lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - subscription5.setDisposable(_parent.source5.subscribe(observer5)) - subscription6.setDisposable(_parent.source6.subscribe(observer6)) - subscription7.setDisposable(_parent.source7.subscribe(observer7)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!, _values5.dequeue()!, _values6.dequeue()!, _values7.dequeue()!) - } -} - -final class Zip7 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - let source7: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - self.source7 = source7 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink7_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 8 - -extension ObservableType { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) - -> Observable { - return Zip8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E)> { - return Zip8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6, $7) } - ) - } -} - -final class ZipSink8_ : ZipSink { - typealias R = O.E - typealias Parent = Zip8 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - var _values7: Queue = Queue(capacity: 2) - var _values8: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 8, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 - case 6: return _values7.count > 0 - case 7: return _values8.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - let subscription8 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: _lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - let observer7 = ZipObserver(lock: _lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - let observer8 = ZipObserver(lock: _lock, parent: self, index: 7, setNextValue: { self._values8.enqueue($0) }, this: subscription8) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - subscription5.setDisposable(_parent.source5.subscribe(observer5)) - subscription6.setDisposable(_parent.source6.subscribe(observer6)) - subscription7.setDisposable(_parent.source7.subscribe(observer7)) - subscription8.setDisposable(_parent.source8.subscribe(observer8)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7, - subscription8 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!, _values5.dequeue()!, _values6.dequeue()!, _values7.dequeue()!, _values8.dequeue()!) - } -} - -final class Zip8 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - let source7: Observable - let source8: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - self.source7 = source7 - self.source8 = source8 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink8_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - diff --git a/Demo/Pods/RxSwift/RxSwift/Observables/Zip.swift b/Demo/Pods/RxSwift/RxSwift/Observables/Zip.swift deleted file mode 100644 index a283bf2..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observables/Zip.swift +++ /dev/null @@ -1,155 +0,0 @@ -// -// Zip.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol ZipSinkProtocol : class -{ - func next(_ index: Int) - func fail(_ error: Swift.Error) - func done(_ index: Int) -} - -class ZipSink : Sink, ZipSinkProtocol { - typealias Element = O.E - - let _arity: Int - - let _lock = RecursiveLock() - - // state - private var _isDone: [Bool] - - init(arity: Int, observer: O, cancel: Cancelable) { - _isDone = [Bool](repeating: false, count: arity) - _arity = arity - - super.init(observer: observer, cancel: cancel) - } - - func getResult() throws -> Element { - rxAbstractMethod() - } - - func hasElements(_ index: Int) -> Bool { - rxAbstractMethod() - } - - func next(_ index: Int) { - var hasValueAll = true - - for i in 0 ..< _arity { - if !hasElements(i) { - hasValueAll = false - break - } - } - - if hasValueAll { - do { - let result = try getResult() - self.forwardOn(.next(result)) - } - catch let e { - self.forwardOn(.error(e)) - dispose() - } - } - else { - var allOthersDone = true - - let arity = _isDone.count - for i in 0 ..< arity { - if i != index && !_isDone[i] { - allOthersDone = false - break - } - } - - if allOthersDone { - forwardOn(.completed) - self.dispose() - } - } - } - - func fail(_ error: Swift.Error) { - forwardOn(.error(error)) - dispose() - } - - func done(_ index: Int) { - _isDone[index] = true - - var allDone = true - - for done in _isDone { - if !done { - allDone = false - break - } - } - - if allDone { - forwardOn(.completed) - dispose() - } - } -} - -final class ZipObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = ElementType - typealias ValueSetter = (ElementType) -> () - - private var _parent: ZipSinkProtocol? - - let _lock: RecursiveLock - - // state - private let _index: Int - private let _this: Disposable - private let _setNextValue: ValueSetter - - init(lock: RecursiveLock, parent: ZipSinkProtocol, index: Int, setNextValue: @escaping ValueSetter, this: Disposable) { - _lock = lock - _parent = parent - _index = index - _this = this - _setNextValue = setNextValue - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - if let _ = _parent { - switch event { - case .next(_): - break - case .error(_): - _this.dispose() - case .completed: - _this.dispose() - } - } - - if let parent = _parent { - switch event { - case .next(let value): - _setNextValue(value) - parent.next(_index) - case .error(let error): - parent.fail(error) - case .completed: - parent.done(_index) - } - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/ObserverType.swift b/Demo/Pods/RxSwift/RxSwift/ObserverType.swift deleted file mode 100644 index e3ed7aa..0000000 --- a/Demo/Pods/RxSwift/RxSwift/ObserverType.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// ObserverType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Supports push-style iteration over an observable sequence. -public protocol ObserverType { - /// The type of elements in sequence that observer can observe. - associatedtype E - - /// Notify observer about sequence event. - /// - /// - parameter event: Event that occurred. - func on(_ event: Event) -} - -/// Convenience API extensions to provide alternate next, error, completed events -extension ObserverType { - - /// Convenience method equivalent to `on(.next(element: E))` - /// - /// - parameter element: Next element to send to observer(s) - public func onNext(_ element: E) { - on(.next(element)) - } - - /// Convenience method equivalent to `on(.completed)` - public func onCompleted() { - on(.completed) - } - - /// Convenience method equivalent to `on(.error(Swift.Error))` - /// - parameter error: Swift.Error to send to observer(s) - public func onError(_ error: Swift.Error) { - on(.error(error)) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift b/Demo/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift deleted file mode 100644 index 54e83f5..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// AnonymousObserver.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class AnonymousObserver : ObserverBase { - typealias Element = ElementType - - typealias EventHandler = (Event) -> Void - - private let _eventHandler : EventHandler - - init(_ eventHandler: @escaping EventHandler) { -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - _eventHandler = eventHandler - } - - override func onCore(_ event: Event) { - return _eventHandler(event) - } - -#if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - } -#endif -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift b/Demo/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift deleted file mode 100644 index 3811565..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// ObserverBase.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class ObserverBase : Disposable, ObserverType { - typealias E = ElementType - - private var _isStopped: AtomicInt = 0 - - func on(_ event: Event) { - switch event { - case .next: - if _isStopped == 0 { - onCore(event) - } - case .error, .completed: - if AtomicCompareAndSwap(0, 1, &_isStopped) { - onCore(event) - } - } - } - - func onCore(_ event: Event) { - rxAbstractMethod() - } - - func dispose() { - _ = AtomicCompareAndSwap(0, 1, &_isStopped) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift b/Demo/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift deleted file mode 100644 index 48a599d..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// TailRecursiveSink.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -enum TailRecursiveSinkCommand { - case moveNext - case dispose -} - -#if DEBUG || TRACE_RESOURCES - public var maxTailRecursiveSinkStackSize = 0 -#endif - -/// This class is usually used with `Generator` version of the operators. -class TailRecursiveSink - : Sink - , InvocableWithValueType where S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Value = TailRecursiveSinkCommand - typealias E = O.E - typealias SequenceGenerator = (generator: S.Iterator, remaining: IntMax?) - - var _generators: [SequenceGenerator] = [] - var _isDisposed = false - var _subscription = SerialDisposable() - - // this is thread safe object - var _gate = AsyncLock>>() - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ sources: SequenceGenerator) -> Disposable { - _generators.append(sources) - - schedule(.moveNext) - - return _subscription - } - - func invoke(_ command: TailRecursiveSinkCommand) { - switch command { - case .dispose: - disposeCommand() - case .moveNext: - moveNextCommand() - } - } - - // simple implementation for now - func schedule(_ command: TailRecursiveSinkCommand) { - _gate.invoke(InvocableScheduledItem(invocable: self, state: command)) - } - - func done() { - forwardOn(.completed) - dispose() - } - - func extract(_ observable: Observable) -> SequenceGenerator? { - rxAbstractMethod() - } - - // should be done on gate locked - - private func moveNextCommand() { - var next: Observable? = nil - - repeat { - guard let (g, left) = _generators.last else { - break - } - - if _isDisposed { - return - } - - _generators.removeLast() - - var e = g - - guard let nextCandidate = e.next()?.asObservable() else { - continue - } - - // `left` is a hint of how many elements are left in generator. - // In case this is the last element, then there is no need to push - // that generator on stack. - // - // This is an optimization used to make sure in tail recursive case - // there is no memory leak in case this operator is used to generate non terminating - // sequence. - - if let knownOriginalLeft = left { - // `- 1` because generator.next() has just been called - if knownOriginalLeft - 1 >= 1 { - _generators.append((e, knownOriginalLeft - 1)) - } - } - else { - _generators.append((e, nil)) - } - - let nextGenerator = extract(nextCandidate) - - if let nextGenerator = nextGenerator { - _generators.append(nextGenerator) - #if DEBUG || TRACE_RESOURCES - if maxTailRecursiveSinkStackSize < _generators.count { - maxTailRecursiveSinkStackSize = _generators.count - } - #endif - } - else { - next = nextCandidate - } - } while next == nil - - guard let existingNext = next else { - done() - return - } - - let disposable = SingleAssignmentDisposable() - _subscription.disposable = disposable - disposable.setDisposable(subscribeToNext(existingNext)) - } - - func subscribeToNext(_ source: Observable) -> Disposable { - rxAbstractMethod() - } - - func disposeCommand() { - _isDisposed = true - _generators.removeAll(keepingCapacity: false) - } - - override func dispose() { - super.dispose() - - _subscription.dispose() - _gate.dispose() - - schedule(.dispose) - } -} - diff --git a/Demo/Pods/RxSwift/RxSwift/Reactive.swift b/Demo/Pods/RxSwift/RxSwift/Reactive.swift deleted file mode 100644 index b873996..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Reactive.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// Reactive.swift -// RxSwift -// -// Created by Yury Korolev on 5/2/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -/** - Use `Reactive` proxy as customization point for constrained protocol extensions. - - General pattern would be: - - // 1. Extend Reactive protocol with constrain on Base - // Read as: Reactive Extension where Base is a SomeType - extension Reactive where Base: SomeType { - // 2. Put any specific reactive extension for SomeType here - } - - With this approach we can have more specialized methods and properties using - `Base` and not just specialized on common base type. - - */ - -public struct Reactive { - /// Base object to extend. - public let base: Base - - /// Creates extensions with base object. - /// - /// - parameter base: Base object. - public init(_ base: Base) { - self.base = base - } -} - -/// A type that has reactive extensions. -public protocol ReactiveCompatible { - /// Extended type - associatedtype CompatibleType - - /// Reactive extensions. - static var rx: Reactive.Type { get set } - - /// Reactive extensions. - var rx: Reactive { get set } -} - -extension ReactiveCompatible { - /// Reactive extensions. - public static var rx: Reactive.Type { - get { - return Reactive.self - } - set { - // this enables using Reactive to "mutate" base type - } - } - - /// Reactive extensions. - public var rx: Reactive { - get { - return Reactive(self) - } - set { - // this enables using Reactive to "mutate" base object - } - } -} - -import class Foundation.NSObject - -/// Extend NSObject with `rx` proxy. -extension NSObject: ReactiveCompatible { } diff --git a/Demo/Pods/RxSwift/RxSwift/Rx.swift b/Demo/Pods/RxSwift/RxSwift/Rx.swift deleted file mode 100644 index 99292ca..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Rx.swift +++ /dev/null @@ -1,142 +0,0 @@ -// -// Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if TRACE_RESOURCES - fileprivate var resourceCount: AtomicInt = 0 - - /// Resource utilization information - public struct Resources { - /// Counts internal Rx resource allocations (Observables, Observers, Disposables, etc.). This provides a simple way to detect leaks during development. - public static var total: Int32 { - return resourceCount.valueSnapshot() - } - - /// Increments `Resources.total` resource count. - /// - /// - returns: New resource count - public static func incrementTotal() -> Int32 { - return AtomicIncrement(&resourceCount) - } - - /// Decrements `Resources.total` resource count - /// - /// - returns: New resource count - public static func decrementTotal() -> Int32 { - return AtomicDecrement(&resourceCount) - } - } -#endif - -/// Swift does not implement abstract methods. This method is used as a runtime check to ensure that methods which intended to be abstract (i.e., they should be implemented in subclasses) are not called directly on the superclass. -func rxAbstractMethod(file: StaticString = #file, line: UInt = #line) -> Swift.Never { - rxFatalError("Abstract method", file: file, line: line) -} - -func rxFatalError(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> Swift.Never { - // The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours. - fatalError(lastMessage(), file: file, line: line) -} - -func rxFatalErrorInDebug(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) { - #if DEBUG - fatalError(lastMessage(), file: file, line: line) - #else - print("\(file):\(line): \(lastMessage())") - #endif -} - -func incrementChecked(_ i: inout Int) throws -> Int { - if i == Int.max { - throw RxError.overflow - } - defer { i += 1 } - return i -} - -func decrementChecked(_ i: inout Int) throws -> Int { - if i == Int.min { - throw RxError.overflow - } - defer { i -= 1 } - return i -} - -#if DEBUG - import class Foundation.Thread - final class SynchronizationTracker { - private let _lock = RecursiveLock() - - public enum SynchronizationErrorMessages: String { - case variable = "Two different threads are trying to assign the same `Variable.value` unsynchronized.\n This is undefined behavior because the end result (variable value) is nondeterministic and depends on the \n operating system thread scheduler. This will cause random behavior of your program.\n" - case `default` = "Two different unsynchronized threads are trying to send some event simultaneously.\n This is undefined behavior because the ordering of the effects caused by these events is nondeterministic and depends on the \n operating system thread scheduler. This will result in a random behavior of your program.\n" - } - - private var _threads = Dictionary() - - private func synchronizationError(_ message: String) { - #if FATAL_SYNCHRONIZATION - rxFatalError(message) - #else - print(message) - #endif - } - - func register(synchronizationErrorMessage: SynchronizationErrorMessages) { - _lock.lock(); defer { _lock.unlock() } - let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() - let count = (_threads[pointer] ?? 0) + 1 - - if count > 1 { - synchronizationError( - "⚠️ Reentrancy anomaly was detected.\n" + - " > Debugging: To debug this issue you can set a breakpoint in \(#file):\(#line) and observe the call stack.\n" + - " > Problem: This behavior is breaking the observable sequence grammar. `next (error | completed)?`\n" + - " This behavior breaks the grammar because there is overlapping between sequence events.\n" + - " Observable sequence is trying to send an event before sending of previous event has finished.\n" + - " > Interpretation: This could mean that there is some kind of unexpected cyclic dependency in your code,\n" + - " or that the system is not behaving in the expected way.\n" + - " > Remedy: If this is the expected behavior this message can be suppressed by adding `.observeOn(MainScheduler.asyncInstance)`\n" + - " or by enqueing sequence events in some other way.\n" - ) - } - - _threads[pointer] = count - - if _threads.count > 1 { - synchronizationError( - "⚠️ Synchronization anomaly was detected.\n" + - " > Debugging: To debug this issue you can set a breakpoint in \(#file):\(#line) and observe the call stack.\n" + - " > Problem: This behavior is breaking the observable sequence grammar. `next (error | completed)?`\n" + - " This behavior breaks the grammar because there is overlapping between sequence events.\n" + - " Observable sequence is trying to send an event before sending of previous event has finished.\n" + - " > Interpretation: " + synchronizationErrorMessage.rawValue + - " > Remedy: If this is the expected behavior this message can be suppressed by adding `.observeOn(MainScheduler.asyncInstance)`\n" + - " or by synchronizing sequence events in some other way.\n" - ) - } - } - - func unregister() { - _lock.lock(); defer { _lock.unlock() } - let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() - _threads[pointer] = (_threads[pointer] ?? 1) - 1 - if _threads[pointer] == 0 { - _threads[pointer] = nil - } - } - } - -#endif - -/// RxSwift global hooks -public enum Hooks { - - // Should capture call stack - public static var recordCallStackOnError: Bool = false - -} diff --git a/Demo/Pods/RxSwift/RxSwift/RxMutableBox.swift b/Demo/Pods/RxSwift/RxSwift/RxMutableBox.swift deleted file mode 100644 index 7f3c333..0000000 --- a/Demo/Pods/RxSwift/RxSwift/RxMutableBox.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// RxMutableBox.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Creates mutable reference wrapper for any type. -final class RxMutableBox : CustomDebugStringConvertible { - /// Wrapped value - var value : T - - /// Creates reference wrapper for `value`. - /// - /// - parameter value: Value to wrap. - init (_ value: T) { - self.value = value - } -} - -extension RxMutableBox { - /// - returns: Box description. - var debugDescription: String { - return "MutatingBox(\(self.value))" - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/SchedulerType.swift b/Demo/Pods/RxSwift/RxSwift/SchedulerType.swift deleted file mode 100644 index bdfcf8b..0000000 --- a/Demo/Pods/RxSwift/RxSwift/SchedulerType.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// SchedulerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.TimeInterval -import struct Foundation.Date - -// Type that represents time interval in the context of RxSwift. -public typealias RxTimeInterval = TimeInterval - -/// Type that represents absolute time in the context of RxSwift. -public typealias RxTime = Date - -/// Represents an object that schedules units of work. -public protocol SchedulerType: ImmediateSchedulerType { - - /// - returns: Current time. - var now : RxTime { - get - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable -} - -extension SchedulerType { - - /** - Periodic task will be emulated using recursive scheduling. - - - parameter state: Initial state passed to the action upon the first iteration. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - returns: The disposable object used to cancel the scheduled recurring action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - let schedule = SchedulePeriodicRecursive(scheduler: self, startAfter: startAfter, period: period, action: action, state: state) - - return schedule.start() - } - - func scheduleRecursive(_ state: State, dueTime: RxTimeInterval, action: @escaping (State, AnyRecursiveScheduler) -> ()) -> Disposable { - let scheduler = AnyRecursiveScheduler(scheduler: self, action: action) - - scheduler.schedule(state, dueTime: dueTime) - - return Disposables.create(with: scheduler.dispose) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift deleted file mode 100644 index aa1f480..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// ConcurrentDispatchQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/5/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date -import struct Foundation.TimeInterval -import Dispatch - -/// Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. You can also pass a serial dispatch queue, it shouldn't cause any problems. -/// -/// This scheduler is suitable when some work needs to be performed in background. -public class ConcurrentDispatchQueueScheduler: SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - public var now : Date { - return Date() - } - - let configuration: DispatchQueueConfiguration - - /// Constructs new `ConcurrentDispatchQueueScheduler` that wraps `queue`. - /// - /// - parameter queue: Target dispatch queue. - /// - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - public init(queue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - configuration = DispatchQueueConfiguration(queue: queue, leeway: leeway) - } - - /// Convenience init for scheduler that wraps one of the global concurrent dispatch queues. - /// - /// - parameter qos: Target global dispatch queue, by quality of service class. - /// - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - @available(iOS 8, OSX 10.10, *) - public convenience init(qos: DispatchQoS, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - self.init(queue: DispatchQueue( - label: "rxswift.queue.\(qos)", - qos: qos, - attributes: [DispatchQueue.Attributes.concurrent], - target: nil), - leeway: leeway - ) - } - - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.schedule(state, action: action) - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift deleted file mode 100644 index a98ad21..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// ConcurrentMainScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date -import struct Foundation.TimeInterval -import Dispatch - -/** -Abstracts work that needs to be performed on `MainThread`. In case `schedule` methods are called from main thread, it will perform action immediately without scheduling. - -This scheduler is optimized for `subscribeOn` operator. If you want to observe observable sequence elements on main thread using `observeOn` operator, -`MainScheduler` is more suitable for that purpose. -*/ -public final class ConcurrentMainScheduler : SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - private let _mainScheduler: MainScheduler - private let _mainQueue: DispatchQueue - - /// - returns: Current time. - public var now : Date { - return _mainScheduler.now as Date - } - - private init(mainScheduler: MainScheduler) { - _mainQueue = DispatchQueue.main - _mainScheduler = mainScheduler - } - - /// Singleton instance of `ConcurrentMainScheduler` - public static let instance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance) - - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - if DispatchQueue.isMain { - return action(state) - } - - let cancel = SingleAssignmentDisposable() - - _mainQueue.async { - if cancel.isDisposed { - return - } - - cancel.setDisposable(action(state)) - } - - return cancel - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return _mainScheduler.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return _mainScheduler.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift deleted file mode 100644 index 0676444..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift +++ /dev/null @@ -1,144 +0,0 @@ -// -// CurrentThreadScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSObject -import protocol Foundation.NSCopying -import class Foundation.Thread -import Dispatch - -#if os(Linux) - import struct Foundation.pthread_key_t - import func Foundation.pthread_setspecific - import func Foundation.pthread_getspecific - import func Foundation.pthread_key_create - - fileprivate enum CurrentThreadSchedulerQueueKey { - fileprivate static let instance = "RxSwift.CurrentThreadScheduler.Queue" - } -#else - fileprivate class CurrentThreadSchedulerQueueKey: NSObject, NSCopying { - static let instance = CurrentThreadSchedulerQueueKey() - private override init() { - super.init() - } - - override var hash: Int { - return 0 - } - - public func copy(with zone: NSZone? = nil) -> Any { - return self - } - } -#endif - -/// Represents an object that schedules units of work on the current thread. -/// -/// This is the default scheduler for operators that generate elements. -/// -/// This scheduler is also sometimes called `trampoline scheduler`. -public class CurrentThreadScheduler : ImmediateSchedulerType { - typealias ScheduleQueue = RxMutableBox> - - /// The singleton instance of the current thread scheduler. - public static let instance = CurrentThreadScheduler() - - private static var isScheduleRequiredKey: pthread_key_t = { () -> pthread_key_t in - let key = UnsafeMutablePointer.allocate(capacity: 1) - defer { -#if swift(>=4.1) - key.deallocate() -#else - key.deallocate(capacity: 1) -#endif - } - - guard pthread_key_create(key, nil) == 0 else { - rxFatalError("isScheduleRequired key creation failed") - } - - return key.pointee - }() - - private static var scheduleInProgressSentinel: UnsafeRawPointer = { () -> UnsafeRawPointer in - return UnsafeRawPointer(UnsafeMutablePointer.allocate(capacity: 1)) - }() - - static var queue : ScheduleQueue? { - get { - return Thread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerQueueKey.instance) - } - set { - Thread.setThreadLocalStorageValue(newValue, forKey: CurrentThreadSchedulerQueueKey.instance) - } - } - - /// Gets a value that indicates whether the caller must call a `schedule` method. - public static fileprivate(set) var isScheduleRequired: Bool { - get { - return pthread_getspecific(CurrentThreadScheduler.isScheduleRequiredKey) == nil - } - set(isScheduleRequired) { - if pthread_setspecific(CurrentThreadScheduler.isScheduleRequiredKey, isScheduleRequired ? nil : scheduleInProgressSentinel) != 0 { - rxFatalError("pthread_setspecific failed") - } - } - } - - /** - Schedules an action to be executed as soon as possible on current thread. - - If this method is called on some thread that doesn't have `CurrentThreadScheduler` installed, scheduler will be - automatically installed and uninstalled after all work is performed. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - if CurrentThreadScheduler.isScheduleRequired { - CurrentThreadScheduler.isScheduleRequired = false - - let disposable = action(state) - - defer { - CurrentThreadScheduler.isScheduleRequired = true - CurrentThreadScheduler.queue = nil - } - - guard let queue = CurrentThreadScheduler.queue else { - return disposable - } - - while let latest = queue.value.dequeue() { - if latest.isDisposed { - continue - } - latest.invoke() - } - - return disposable - } - - let existingQueue = CurrentThreadScheduler.queue - - let queue: RxMutableBox> - if let existingQueue = existingQueue { - queue = existingQueue - } - else { - queue = RxMutableBox(Queue(capacity: 1)) - CurrentThreadScheduler.queue = queue - } - - let scheduledItem = ScheduledItem(action: action, state: state) - queue.value.enqueue(scheduledItem) - - return scheduledItem - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift deleted file mode 100644 index 11af238..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// HistoricalScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -/// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time. -public class HistoricalScheduler : VirtualTimeScheduler { - - /** - Creates a new historical scheduler with initial clock value. - - - parameter initialClock: Initial value for virtual clock. - */ - public init(initialClock: RxTime = Date(timeIntervalSince1970: 0)) { - super.init(initialClock: initialClock, converter: HistoricalSchedulerTimeConverter()) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift deleted file mode 100644 index 930ca37..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// HistoricalSchedulerTimeConverter.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -/// Converts historical virtual time into real time. -/// -/// Since historical virtual time is also measured in `Date`, this converter is identity function. -public struct HistoricalSchedulerTimeConverter : VirtualTimeConverterType { - /// Virtual time unit used that represents ticks of virtual clock. - public typealias VirtualTimeUnit = RxTime - - /// Virtual time unit used to represent differences of virtual times. - public typealias VirtualTimeIntervalUnit = RxTimeInterval - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime { - return virtualTime - } - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit { - return time - } - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval { - return virtualTimeInterval - } - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertToVirtualTimeInterval(_ timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit { - return timeInterval - } - - /** - Offsets `Date` by time interval. - - - parameter time: Time. - - parameter timeInterval: Time interval offset. - - returns: Time offsetted by time interval. - */ - public func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit { - return time.addingTimeInterval(offset) - } - - /// Compares two `Date`s. - public func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison { - switch lhs.compare(rhs as Date) { - case .orderedAscending: - return .lessThan - case .orderedSame: - return .equal - case .orderedDescending: - return .greaterThan - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift deleted file mode 100644 index b82f011..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift +++ /dev/null @@ -1,112 +0,0 @@ -// -// DispatchQueueConfiguration.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/23/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import Dispatch -import struct Foundation.TimeInterval - -struct DispatchQueueConfiguration { - let queue: DispatchQueue - let leeway: DispatchTimeInterval -} - -private func dispatchInterval(_ interval: Foundation.TimeInterval) -> DispatchTimeInterval { - precondition(interval >= 0.0) - // TODO: Replace 1000 with something that actually works - // NSEC_PER_MSEC returns 1000000 - return DispatchTimeInterval.milliseconds(Int(interval * 1000.0)) -} - -extension DispatchQueueConfiguration { - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - queue.async { - if cancel.isDisposed { - return - } - - - cancel.setDisposable(action(state)) - } - - return cancel - } - - func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let deadline = DispatchTime.now() + dispatchInterval(dueTime) - - let compositeDisposable = CompositeDisposable() - - let timer = DispatchSource.makeTimerSource(queue: queue) - #if swift(>=4.0) - timer.schedule(deadline: deadline, leeway: leeway) - #else - timer.scheduleOneshot(deadline: deadline, leeway: leeway) - #endif - - // TODO: - // This looks horrible, and yes, it is. - // It looks like Apple has made a conceputal change here, and I'm unsure why. - // Need more info on this. - // It looks like just setting timer to fire and not holding a reference to it - // until deadline causes timer cancellation. - var timerReference: DispatchSourceTimer? = timer - let cancelTimer = Disposables.create { - timerReference?.cancel() - timerReference = nil - } - - timer.setEventHandler(handler: { - if compositeDisposable.isDisposed { - return - } - _ = compositeDisposable.insert(action(state)) - cancelTimer.dispose() - }) - timer.resume() - - _ = compositeDisposable.insert(cancelTimer) - - return compositeDisposable - } - - func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - let initial = DispatchTime.now() + dispatchInterval(startAfter) - - var timerState = state - - let timer = DispatchSource.makeTimerSource(queue: queue) - #if swift(>=4.0) - timer.schedule(deadline: initial, repeating: dispatchInterval(period), leeway: leeway) - #else - timer.scheduleRepeating(deadline: initial, interval: dispatchInterval(period), leeway: leeway) - #endif - - // TODO: - // This looks horrible, and yes, it is. - // It looks like Apple has made a conceputal change here, and I'm unsure why. - // Need more info on this. - // It looks like just setting timer to fire and not holding a reference to it - // until deadline causes timer cancellation. - var timerReference: DispatchSourceTimer? = timer - let cancelTimer = Disposables.create { - timerReference?.cancel() - timerReference = nil - } - - timer.setEventHandler(handler: { - if cancelTimer.isDisposed { - return - } - timerState = action(timerState) - }) - timer.resume() - - return cancelTimer - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift deleted file mode 100644 index 90445f8..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// InvocableScheduledItem.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct InvocableScheduledItem : InvocableType { - - let _invocable: I - let _state: I.Value - - init(invocable: I, state: I.Value) { - _invocable = invocable - _state = state - } - - func invoke() { - _invocable.invoke(_state) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift deleted file mode 100644 index 0dba433..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// InvocableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol InvocableType { - func invoke() -} - -protocol InvocableWithValueType { - associatedtype Value - - func invoke(_ value: Value) -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift deleted file mode 100644 index 454fb34..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// ScheduledItem.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct ScheduledItem - : ScheduledItemType - , InvocableType { - typealias Action = (T) -> Disposable - - private let _action: Action - private let _state: T - - private let _disposable = SingleAssignmentDisposable() - - var isDisposed: Bool { - return _disposable.isDisposed - } - - init(action: @escaping Action, state: T) { - _action = action - _state = state - } - - func invoke() { - _disposable.setDisposable(_action(_state)) - } - - func dispose() { - _disposable.dispose() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift deleted file mode 100644 index d2b16ca..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// ScheduledItemType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol ScheduledItemType - : Cancelable - , InvocableType { - func invoke() -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift deleted file mode 100644 index e219e4e..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// MainScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Dispatch - -/** -Abstracts work that needs to be performed on `DispatchQueue.main`. In case `schedule` methods are called from `DispatchQueue.main`, it will perform action immediately without scheduling. - -This scheduler is usually used to perform UI work. - -Main scheduler is a specialization of `SerialDispatchQueueScheduler`. - -This scheduler is optimized for `observeOn` operator. To ensure observable sequence is subscribed on main thread using `subscribeOn` -operator please use `ConcurrentMainScheduler` because it is more optimized for that purpose. -*/ -public final class MainScheduler : SerialDispatchQueueScheduler { - - private let _mainQueue: DispatchQueue - - var numberEnqueued: AtomicInt = 0 - - /// Initializes new instance of `MainScheduler`. - public init() { - _mainQueue = DispatchQueue.main - super.init(serialQueue: _mainQueue) - } - - /// Singleton instance of `MainScheduler` - public static let instance = MainScheduler() - - /// Singleton instance of `MainScheduler` that always schedules work asynchronously - /// and doesn't perform optimizations for calls scheduled from main queue. - public static let asyncInstance = SerialDispatchQueueScheduler(serialQueue: DispatchQueue.main) - - /// In case this method is called on a background thread it will throw an exception. - public class func ensureExecutingOnScheduler(errorMessage: String? = nil) { - if !DispatchQueue.isMain { - rxFatalError(errorMessage ?? "Executing on background thread. Please use `MainScheduler.instance.schedule` to schedule work on main thread.") - } - } - - override func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let currentNumberEnqueued = AtomicIncrement(&numberEnqueued) - - if DispatchQueue.isMain && currentNumberEnqueued == 1 { - let disposable = action(state) - _ = AtomicDecrement(&numberEnqueued) - return disposable - } - - let cancel = SingleAssignmentDisposable() - - _mainQueue.async { - if !cancel.isDisposed { - _ = action(state) - } - - _ = AtomicDecrement(&self.numberEnqueued) - } - - return cancel - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift deleted file mode 100644 index 81ba59f..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// OperationQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/4/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.Operation -import class Foundation.OperationQueue -import class Foundation.BlockOperation -import Dispatch - -/// Abstracts the work that needs to be performed on a specific `NSOperationQueue`. -/// -/// This scheduler is suitable for cases when there is some bigger chunk of work that needs to be performed in background and you want to fine tune concurrent processing using `maxConcurrentOperationCount`. -public class OperationQueueScheduler: ImmediateSchedulerType { - public let operationQueue: OperationQueue - public let queuePriority: Operation.QueuePriority - - /// Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. - /// - /// - parameter operationQueue: Operation queue targeted to perform work on. - /// - parameter queuePriority: Queue priority which will be assigned to new operations. - public init(operationQueue: OperationQueue, queuePriority: Operation.QueuePriority = .normal) { - self.operationQueue = operationQueue - self.queuePriority = queuePriority - } - - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - let operation = BlockOperation { - if cancel.isDisposed { - return - } - - - cancel.setDisposable(action(state)) - } - - operation.queuePriority = self.queuePriority - - self.operationQueue.addOperation(operation) - - return cancel - } - -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift deleted file mode 100644 index 24d19cc..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift +++ /dev/null @@ -1,226 +0,0 @@ -// -// RecursiveScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -fileprivate enum ScheduleState { - case initial - case added(CompositeDisposable.DisposeKey) - case done -} - -/// Type erased recursive scheduler. -final class AnyRecursiveScheduler { - - typealias Action = (State, AnyRecursiveScheduler) -> Void - - private let _lock = RecursiveLock() - - // state - private let _group = CompositeDisposable() - - private var _scheduler: SchedulerType - private var _action: Action? - - init(scheduler: SchedulerType, action: @escaping Action) { - _action = action - _scheduler = scheduler - } - - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the recursive action. - */ - func schedule(_ state: State, dueTime: RxTimeInterval) { - var scheduleState: ScheduleState = .initial - - let d = _scheduler.scheduleRelative(state, dueTime: dueTime) { (state) -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self) - } - - return Disposables.create() - } - - _lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - break - case .initial: - if let removeKey = _group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - break - case .done: - break - } - } - } - - /// Schedules an action to be executed recursively. - /// - /// - parameter state: State passed to the action to be executed. - func schedule(_ state: State) { - var scheduleState: ScheduleState = .initial - - let d = _scheduler.schedule(state) { (state) -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self) - } - - return Disposables.create() - } - - _lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - break - case .initial: - if let removeKey = _group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - break - case .done: - break - } - } - } - - func dispose() { - _lock.performLocked { - _action = nil - } - _group.dispose() - } -} - -/// Type erased recursive scheduler. -final class RecursiveImmediateScheduler { - typealias Action = (_ state: State, _ recurse: (State) -> Void) -> Void - - private var _lock = SpinLock() - private let _group = CompositeDisposable() - - private var _action: Action? - private let _scheduler: ImmediateSchedulerType - - init(action: @escaping Action, scheduler: ImmediateSchedulerType) { - _action = action - _scheduler = scheduler - } - - // immediate scheduling - - /// Schedules an action to be executed recursively. - /// - /// - parameter state: State passed to the action to be executed. - func schedule(_ state: State) { - var scheduleState: ScheduleState = .initial - - let d = _scheduler.schedule(state) { (state) -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self.schedule) - } - - return Disposables.create() - } - - _lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - break - case .initial: - if let removeKey = _group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - break - case .done: - break - } - } - } - - func dispose() { - _lock.performLocked { - _action = nil - } - _group.dispose() - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift deleted file mode 100644 index 41f2947..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// SchedulerServices+Emulation.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -enum SchedulePeriodicRecursiveCommand { - case tick - case dispatchStart -} - -final class SchedulePeriodicRecursive { - typealias RecursiveAction = (State) -> State - typealias RecursiveScheduler = AnyRecursiveScheduler - - private let _scheduler: SchedulerType - private let _startAfter: RxTimeInterval - private let _period: RxTimeInterval - private let _action: RecursiveAction - - private var _state: State - private var _pendingTickCount: AtomicInt = 0 - - init(scheduler: SchedulerType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping RecursiveAction, state: State) { - _scheduler = scheduler - _startAfter = startAfter - _period = period - _action = action - _state = state - } - - func start() -> Disposable { - return _scheduler.scheduleRecursive(SchedulePeriodicRecursiveCommand.tick, dueTime: _startAfter, action: self.tick) - } - - func tick(_ command: SchedulePeriodicRecursiveCommand, scheduler: RecursiveScheduler) -> Void { - // Tries to emulate periodic scheduling as best as possible. - // The problem that could arise is if handling periodic ticks take too long, or - // tick interval is short. - switch command { - case .tick: - scheduler.schedule(.tick, dueTime: _period) - - // The idea is that if on tick there wasn't any item enqueued, schedule to perform work immediately. - // Else work will be scheduled after previous enqueued work completes. - if AtomicIncrement(&_pendingTickCount) == 1 { - self.tick(.dispatchStart, scheduler: scheduler) - } - - case .dispatchStart: - _state = _action(_state) - // Start work and schedule check is this last batch of work - if AtomicDecrement(&_pendingTickCount) > 0 { - // This gives priority to scheduler emulation, it's not perfect, but helps - scheduler.schedule(SchedulePeriodicRecursiveCommand.dispatchStart) - } - } - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift deleted file mode 100644 index 1a38a73..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// SerialDispatchQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.TimeInterval -import struct Foundation.Date -import Dispatch - -/** -Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. It will make sure -that even if concurrent dispatch queue is passed, it's transformed into a serial one. - -It is extremely important that this scheduler is serial, because -certain operator perform optimizations that rely on that property. - -Because there is no way of detecting is passed dispatch queue serial or -concurrent, for every queue that is being passed, worst case (concurrent) -will be assumed, and internal serial proxy dispatch queue will be created. - -This scheduler can also be used with internal serial queue alone. - -In case some customization need to be made on it before usage, -internal serial queue can be customized using `serialQueueConfiguration` -callback. -*/ -public class SerialDispatchQueueScheduler : SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - /// - returns: Current time. - public var now : Date { - return Date() - } - - let configuration: DispatchQueueConfiguration - - /** - Constructs new `SerialDispatchQueueScheduler` that wraps `serialQueue`. - - - parameter serialQueue: Target dispatch queue. - - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - */ - init(serialQueue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - configuration = DispatchQueueConfiguration(queue: serialQueue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` with internal serial queue named `internalSerialQueueName`. - - Additional dispatch queue properties can be set after dispatch queue is created using `serialQueueConfiguration`. - - - parameter internalSerialQueueName: Name of internal serial dispatch queue. - - parameter serialQueueConfiguration: Additional configuration of internal serial dispatch queue. - - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - */ - public convenience init(internalSerialQueueName: String, serialQueueConfiguration: ((DispatchQueue) -> Void)? = nil, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - let queue = DispatchQueue(label: internalSerialQueueName, attributes: []) - serialQueueConfiguration?(queue) - self.init(serialQueue: queue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` named `internalSerialQueueName` that wraps `queue`. - - - parameter queue: Possibly concurrent dispatch queue used to perform work. - - parameter internalSerialQueueName: Name of internal serial dispatch queue proxy. - - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - */ - public convenience init(queue: DispatchQueue, internalSerialQueueName: String, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - // Swift 3.0 IUO - let serialQueue = DispatchQueue(label: internalSerialQueueName, - attributes: [], - target: queue) - self.init(serialQueue: serialQueue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` that wraps on of the global concurrent dispatch queues. - - - parameter qos: Identifier for global dispatch queue with specified quality of service class. - - parameter internalSerialQueueName: Custom name for internal serial dispatch queue proxy. - - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. - */ - @available(iOS 8, OSX 10.10, *) - public convenience init(qos: DispatchQoS, internalSerialQueueName: String = "rx.global_dispatch_queue.serial", leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - self.init(queue: DispatchQueue.global(qos: qos.qosClass), internalSerialQueueName: internalSerialQueueName, leeway: leeway) - } - - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.scheduleInternal(state, action: action) - } - - func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.schedule(state, action: action) - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift deleted file mode 100644 index a17475a..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// VirtualTimeConverterType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Parametrization for virtual time used by `VirtualTimeScheduler`s. -public protocol VirtualTimeConverterType { - /// Virtual time unit used that represents ticks of virtual clock. - associatedtype VirtualTimeUnit - - /// Virtual time unit used to represent differences of virtual times. - associatedtype VirtualTimeIntervalUnit - - /** - Converts virtual time to real time. - - - parameter virtualTime: Virtual time to convert to `Date`. - - returns: `Date` corresponding to virtual time. - */ - func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime - - /** - Converts real time to virtual time. - - - parameter time: `Date` to convert to virtual time. - - returns: Virtual time corresponding to `Date`. - */ - func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit - - /** - Converts from virtual time interval to `NSTimeInterval`. - - - parameter virtualTimeInterval: Virtual time interval to convert to `NSTimeInterval`. - - returns: `NSTimeInterval` corresponding to virtual time interval. - */ - func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval - - /** - Converts from `NSTimeInterval` to virtual time interval. - - - parameter timeInterval: `NSTimeInterval` to convert to virtual time interval. - - returns: Virtual time interval corresponding to time interval. - */ - func convertToVirtualTimeInterval(_ timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit - - /** - Offsets virtual time by virtual time interval. - - - parameter time: Virtual time. - - parameter offset: Virtual time interval. - - returns: Time corresponding to time offsetted by virtual time interval. - */ - func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit - - /** - This is additional abstraction because `Date` is unfortunately not comparable. - Extending `Date` with `Comparable` would be too risky because of possible collisions with other libraries. - */ - func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison -} - -/** - Virtual time comparison result. - - This is additional abstraction because `Date` is unfortunately not comparable. - Extending `Date` with `Comparable` would be too risky because of possible collisions with other libraries. -*/ -public enum VirtualTimeComparison { - /// lhs < rhs. - case lessThan - /// lhs == rhs. - case equal - /// lhs > rhs. - case greaterThan -} - -extension VirtualTimeComparison { - /// lhs < rhs. - var lessThen: Bool { - return self == .lessThan - } - - /// lhs > rhs - var greaterThan: Bool { - return self == .greaterThan - } - - /// lhs == rhs - var equal: Bool { - return self == .equal - } -} diff --git a/Demo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift b/Demo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift deleted file mode 100644 index c0e1aa5..0000000 --- a/Demo/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift +++ /dev/null @@ -1,269 +0,0 @@ -// -// VirtualTimeScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Base class for virtual time schedulers using a priority queue for scheduled items. -open class VirtualTimeScheduler - : SchedulerType { - - public typealias VirtualTime = Converter.VirtualTimeUnit - public typealias VirtualTimeInterval = Converter.VirtualTimeIntervalUnit - - private var _running : Bool - - private var _clock: VirtualTime - - fileprivate var _schedulerQueue : PriorityQueue> - private var _converter: Converter - - private var _nextId = 0 - - /// - returns: Current time. - public var now: RxTime { - return _converter.convertFromVirtualTime(clock) - } - - /// - returns: Scheduler's absolute time clock value. - public var clock: VirtualTime { - return _clock - } - - /// Creates a new virtual time scheduler. - /// - /// - parameter initialClock: Initial value for the clock. - public init(initialClock: VirtualTime, converter: Converter) { - _clock = initialClock - _running = false - _converter = converter - _schedulerQueue = PriorityQueue(hasHigherPriority: { - switch converter.compareVirtualTime($0.time, $1.time) { - case .lessThan: - return true - case .equal: - return $0.id < $1.id - case .greaterThan: - return false - } - }, isEqual: { $0 === $1 }) - #if TRACE_RESOURCES - let _ = Resources.incrementTotal() - #endif - } - - /** - Schedules an action to be executed immediately. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.scheduleRelative(state, dueTime: 0.0) { a in - return action(a) - } - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let time = self.now.addingTimeInterval(dueTime) - let absoluteTime = _converter.convertToVirtualTime(time) - let adjustedTime = self.adjustScheduledTime(absoluteTime) - return scheduleAbsoluteVirtual(state, time: adjustedTime, action: action) - } - - /** - Schedules an action to be executed after relative time has passed. - - - parameter state: State passed to the action to be executed. - - parameter time: Absolute time when to execute the action. If this is less or equal then `now`, `now + 1` will be used. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRelativeVirtual(_ state: StateType, dueTime: VirtualTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let time = _converter.offsetVirtualTime(self.clock, offset: dueTime) - return scheduleAbsoluteVirtual(state, time: time, action: action) - } - - /** - Schedules an action to be executed at absolute virtual time. - - - parameter state: State passed to the action to be executed. - - parameter time: Absolute time when to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleAbsoluteVirtual(_ state: StateType, time: Converter.VirtualTimeUnit, action: @escaping (StateType) -> Disposable) -> Disposable { - MainScheduler.ensureExecutingOnScheduler() - - let compositeDisposable = CompositeDisposable() - - let item = VirtualSchedulerItem(action: { - let dispose = action(state) - return dispose - }, time: time, id: _nextId) - - _nextId += 1 - - _schedulerQueue.enqueue(item) - - _ = compositeDisposable.insert(item) - - return compositeDisposable - } - - /// Adjusts time of scheduling before adding item to schedule queue. - open func adjustScheduledTime(_ time: Converter.VirtualTimeUnit) -> Converter.VirtualTimeUnit { - return time - } - - /// Starts the virtual time scheduler. - public func start() { - MainScheduler.ensureExecutingOnScheduler() - - if _running { - return - } - - _running = true - repeat { - guard let next = findNext() else { - break - } - - if _converter.compareVirtualTime(next.time, self.clock).greaterThan { - _clock = next.time - } - - next.invoke() - _schedulerQueue.remove(next) - } while _running - - _running = false - } - - func findNext() -> VirtualSchedulerItem? { - while let front = _schedulerQueue.peek() { - if front.isDisposed { - _schedulerQueue.remove(front) - continue - } - - return front - } - - return nil - } - - /// Advances the scheduler's clock to the specified time, running all work till that point. - /// - /// - parameter virtualTime: Absolute time to advance the scheduler's clock to. - public func advanceTo(_ virtualTime: VirtualTime) { - MainScheduler.ensureExecutingOnScheduler() - - if _running { - fatalError("Scheduler is already running") - } - - _running = true - repeat { - guard let next = findNext() else { - break - } - - if _converter.compareVirtualTime(next.time, virtualTime).greaterThan { - break - } - - if _converter.compareVirtualTime(next.time, self.clock).greaterThan { - _clock = next.time - } - - next.invoke() - _schedulerQueue.remove(next) - } while _running - - _clock = virtualTime - _running = false - } - - /// Advances the scheduler's clock by the specified relative time. - public func sleep(_ virtualInterval: VirtualTimeInterval) { - MainScheduler.ensureExecutingOnScheduler() - - let sleepTo = _converter.offsetVirtualTime(clock, offset: virtualInterval) - if _converter.compareVirtualTime(sleepTo, clock).lessThen { - fatalError("Can't sleep to past.") - } - - _clock = sleepTo - } - - /// Stops the virtual time scheduler. - public func stop() { - MainScheduler.ensureExecutingOnScheduler() - - _running = false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// MARK: description - -extension VirtualTimeScheduler: CustomDebugStringConvertible { - /// A textual representation of `self`, suitable for debugging. - public var debugDescription: String { - return self._schedulerQueue.debugDescription - } -} - -final class VirtualSchedulerItem