diff --git a/.gitignore b/.gitignore index ceffcb85..cd54e37e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Xcode build/ +.build/ *.pbxuser !default.pbxuser *.mode1v3 @@ -18,3 +19,9 @@ IDEWorkspaceChecks.plist # Carthage Carthage/ OHHTTPStubs.framework.zip + +# Rubymine +.idea/ + +# SPM +.swiftpm/ diff --git a/.travis.yml b/.travis.yml index 1e6592f0..edec9e73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,29 +10,69 @@ before_install: matrix: include: - osx_image: xcode9.1 - env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]" + env: RAKETASK="ios[iOS StaticLib,iPhone 7,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]" - osx_image: xcode9.1 - env: RAKETASK="ios[iOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]" + env: RAKETASK="ios[iOS Framework,iPhone 7,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]" - osx_image: xcode9.1 env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]" - osx_image: xcode9.1 env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.0]" + - osx_image: xcode9.1 + env: RAKETASK="build_carthage_frameworks[iOS,3.2]" + - osx_image: xcode9.1 + env: RAKETASK="build_carthage_frameworks[tvOS,3.2]" + - osx_image: xcode9.1 + env: RAKETASK="build_carthage_frameworks[MacOS,4.0]" - osx_image: xcode10.1 - env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]" + env: RAKETASK="ios[iOS StaticLib,iPhone 7,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]" - osx_image: xcode10.1 - env: RAKETASK="ios[iOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]" + env: RAKETASK="ios[iOS Framework,iPhone 7,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]" - osx_image: xcode10.1 env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]" - osx_image: xcode10.1 env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1 SWIFT_VERSION=4.2]" + - osx_image: xcode10.1 + env: RAKETASK="spm_test" + - osx_image: xcode10.1 + env: RAKETASK="build_carthage_frameworks[iOS,4.1]" + - osx_image: xcode10.1 + env: RAKETASK="build_carthage_frameworks[tvOS,4.2]" + - osx_image: xcode10.1 + env: RAKETASK="build_carthage_frameworks[MacOS,4.2]" - osx_image: xcode10.2 - env: RAKETASK="ios[iOS StaticLib,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" + env: RAKETASK="ios[iOS StaticLib,iPhone 7,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" - osx_image: xcode10.2 - env: RAKETASK="ios[iOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" + env: RAKETASK="ios[iOS Framework,iPhone 7,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" - osx_image: xcode10.2 env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" - osx_image: xcode10.2 env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" + - osx_image: xcode10.2 + env: RAKETASK="spm_test" + - osx_image: xcode10.2 + env: RAKETASK="build_carthage_frameworks[iOS,5.0]" + - osx_image: xcode10.2 + env: RAKETASK="build_carthage_frameworks[tvOS,5.0]" + - osx_image: xcode10.2 + env: RAKETASK="build_carthage_frameworks[MacOS,5.0]" + - osx_image: xcode11 + env: RAKETASK="ios[iOS StaticLib,iPhone 8,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" + - osx_image: xcode11 + env: RAKETASK="ios[iOS Framework,iPhone 8,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" + - osx_image: xcode11 + env: RAKETASK="tvos[tvOS Framework,latest,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" + - osx_image: xcode11 + env: RAKETASK="osx[Mac Framework,x86_64,build-for-testing test-without-building,OHHTTPSTUBS_SKIP_TIMING_TESTS=1 OHHTTPSTUBS_SKIP_REDIRECT_TESTS=1]" + - osx_image: xcode11 + env: RAKETASK="spm_test" + - osx_image: xcode11 + env: RAKETASK="build_carthage_frameworks[iOS,5.1]" + - osx_image: xcode11 + env: RAKETASK="build_carthage_frameworks[tvOS,5.1]" + - osx_image: xcode11 + env: RAKETASK="build_carthage_frameworks[MacOS,5.1]" + - osx_image: xcode11 + env: RAKETASK="build_example_apps" script: diff --git a/CHANGELOG.md b/CHANGELOG.md index 868d5ff4..3ceff0b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # OHHTTPStubs — CHANGELOG -## [8.0.0](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/7.0.0) + +## [9.0.0](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/9.0.0) + +* Added support for Swift Package Manager and dropped OH from all class names. + [@jeffctown](https://github.com/jeffctown) + + +## [8.0.0](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/8.0.0) * Update default Swift Version to 5.0 [@croig](https://github.com/CRoig) @@ -214,7 +221,7 @@ _Note that this last change also changed the signature of the `onStubActivation: * Fixed issue with Umbrella Headers. [#127](https://github.com/AliSoftware/OHHTTPStubs/issues/127) [#131](https://github.com/AliSoftware/OHHTTPStubs/pull/131) -* Added methods for creating `OHHTTPStubsResponse`s from `NSURL`s that represent file system resources. +* Added methods for creating `HTTPStubsResponse`s from `NSURL`s that represent file system resources. [@MaxGabriel](https://github.com/MaxGabriel) [#129](https://github.com/AliSoftware/OHHTTPStubs/pull/129) * Bumped Swift subspec compatibility to OSX 10.9 instead of 10.7. @@ -343,7 +350,7 @@ _(I also moved [Travis-CI build system](https://travis-ci.org/AliSoftware/OHHTTP ## [3.1.0](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/3.1.0) -* The `OHHTTPStubsDescriptor` protocol now inherits from the `NSObject` protocol +* The `HTTPStubsDescriptor` protocol now inherits from the `NSObject` protocol ## [3.0.4](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/3.0.4) @@ -383,11 +390,11 @@ Note: **If you have already removed the calls to all `OHHTTPStubs` deprecated AP ## [2.3.1](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/2.3.1) -* Fixed bug with OHHTTPStubsResponse+JSON when `nil` headers dictionary +* Fixed bug with HTTPStubsResponse+JSON when `nil` headers dictionary ## [2.3.0](https://github.com/AliSoftware/OHHTTPStubs/releases/tag/2.3.0) -* Added the ability to give a name to a stub, for debugging purposes (property `name` of `id`) +* Added the ability to give a name to a stub, for debugging purposes (property `name` of `id`) * Added `allStubs` method to list all installed stubs (with their name if they have one, see previous point) * Added `+[OHHTTPStubs onStubActivation:]` method to execute arbitrary code each time a stub is activated. Useful to log which stub is used for each request for example. @@ -398,7 +405,7 @@ Note: **If you have already removed the calls to all `OHHTTPStubs` deprecated AP * Some API changes to make `OHHTTPStubs` to fit the new possibility of setting both `requestTime` and `responseTime`. * Old API is still there but deprecated, and will be removed in next major version * To convert to the new API, you will mainly simply: - * extract the `responseTime:` parameter to a method call of its own (`return [OHHTTPStubsResponse responseWithData:data statusCode:code responseTime:time headers:header];` will become `return [[OHHTTPStubsResponse responseWithData:data statusCode:code headers:headers] responseTime:time];` etc.) + * extract the `responseTime:` parameter to a method call of its own (`return [HTTPStubsResponse responseWithData:data statusCode:code responseTime:time headers:header];` will become `return [[HTTPStubsResponse responseWithData:data statusCode:code headers:headers] responseTime:time];` etc.) * convert `responseWithFile:filename` to `responseWithFileAtPath:OHPathForFileInBundle(filename,nil)` > Note: version `2.1.0-RC`, `2.1.0-rc.1`, `2.2.0-RC` and `2.2.1-RC` were intermediate Release Candidate versions during the big refactoring and migration to `2.2.1`, with the same new features as listed above basicaly, but without the last-minute bugfixes before official release. diff --git a/Examples/ObjC/MainViewController.m b/Examples/ObjC/MainViewController.m index 438168b1..91c1b887 100644 --- a/Examples/ObjC/MainViewController.m +++ b/Examples/ObjC/MainViewController.m @@ -7,8 +7,8 @@ // #import "MainViewController.h" -#import -#import +#import +#import @interface MainViewController () @@ -31,7 +31,7 @@ - (void)viewDidLoad [self installTextStub:self.installTextStubSwitch]; [self installImageStub:self.installImageStubSwitch]; - [OHHTTPStubs onStubActivation:^(NSURLRequest * _Nonnull request, id _Nonnull stub, OHHTTPStubsResponse * _Nonnull responseStub) { + [HTTPStubs onStubActivation:^(NSURLRequest * _Nonnull request, id _Nonnull stub, HTTPStubsResponse * _Nonnull responseStub) { NSLog(@"[OHHTTPStubs] Request to %@ has been stubbed with %@", request.URL, stub.name); }]; } @@ -49,12 +49,12 @@ - (BOOL)shouldUseDelay { - (IBAction)toggleStubs:(UISwitch *)sender { - [OHHTTPStubs setEnabled:sender.on]; + [HTTPStubs setEnabled:sender.on]; self.delaySwitch.enabled = sender.on; self.installTextStubSwitch.enabled = sender.on; self.installImageStubSwitch.enabled = sender.on; - NSLog(@"Installed (%@) stubs: %@", (sender.on?@"and enabled":@"but disabled"), OHHTTPStubs.allStubs); + NSLog(@"Installed (%@) stubs: %@", (sender.on?@"and enabled":@"but disabled"), HTTPStubs.allStubs); } @@ -88,16 +88,16 @@ - (IBAction)downloadText:(UIButton*)sender - (IBAction)installTextStub:(UISwitch *)sender { - static id textStub = nil; // Note: no need to retain this value, it is retained by the OHHTTPStubs itself already + static id textStub = nil; // Note: no need to retain this value, it is retained by the OHHTTPStubs itself already if (sender.on) { // Install - textStub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + textStub = [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { // This stub will only configure stub requests for "*.txt" files return [request.URL.pathExtension isEqualToString:@"txt"]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { // Stub txt files with this - return [[OHHTTPStubsResponse responseWithFileAtPath:OHPathForFile(@"stub.txt", self.class) + return [[HTTPStubsResponse responseWithFileAtPath:OHPathForFile(@"stub.txt", self.class) statusCode:200 headers:@{@"Content-Type":@"text/plain"}] requestTime:[self shouldUseDelay] ? 2.f: 0.f @@ -108,7 +108,7 @@ - (IBAction)installTextStub:(UISwitch *)sender else { // Uninstall - [OHHTTPStubs removeStub:textStub]; + [HTTPStubs removeStub:textStub]; } } @@ -128,23 +128,25 @@ - (IBAction)downloadImage:(UIButton*)sender queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse* resp, NSData* data, NSError* error) { - sender.enabled = YES; - self.imageView.image = [UIImage imageWithData:data]; + dispatch_async(dispatch_get_main_queue(), ^{ + sender.enabled = YES; + self.imageView.image = [UIImage imageWithData:data]; + }); }]; } - (IBAction)installImageStub:(UISwitch *)sender { - static id imageStub = nil; // Note: no need to retain this value, it is retained by the OHHTTPStubs itself already :) + static id imageStub = nil; // Note: no need to retain this value, it is retained by the OHHTTPStubs itself already :) if (sender.on) { // Install - imageStub = [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + imageStub = [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { // This stub will only configure stub requests for "*.png" files return [request.URL.pathExtension isEqualToString:@"png"]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { // Stub jpg files with this - return [[OHHTTPStubsResponse responseWithFileAtPath:OHPathForFile(@"stub.jpg", self.class) + return [[HTTPStubsResponse responseWithFileAtPath:OHPathForFile(@"stub.jpg", self.class) statusCode:200 headers:@{@"Content-Type":@"image/jpeg"}] requestTime:[self shouldUseDelay] ? 2.f: 0.f @@ -155,7 +157,7 @@ - (IBAction)installImageStub:(UISwitch *)sender else { // Uninstall - [OHHTTPStubs removeStub:imageStub]; + [HTTPStubs removeStub:imageStub]; } } @@ -169,3 +171,4 @@ - (IBAction)clearResults } @end + diff --git a/Examples/ObjC/OHHTTPStubsDemo.xcodeproj/project.pbxproj b/Examples/ObjC/OHHTTPStubsDemo.xcodeproj/project.pbxproj index 2619ca25..a0d8bfd5 100644 --- a/Examples/ObjC/OHHTTPStubsDemo.xcodeproj/project.pbxproj +++ b/Examples/ObjC/OHHTTPStubsDemo.xcodeproj/project.pbxproj @@ -14,9 +14,9 @@ 098FBDE015D704E800623941 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 098FBDDF15D704E800623941 /* main.m */; }; 098FBDED15D7056200623941 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 098FBDEB15D7056200623941 /* MainViewController.m */; }; 098FBDEE15D7056200623941 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 098FBDEC15D7056200623941 /* MainViewController.xib */; }; - 098FBDF815D70E2600623941 /* stub.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 098FBDF615D70E2600623941 /* stub.jpg */; }; - 098FBDF915D70E2600623941 /* stub.txt in Resources */ = {isa = PBXBuildFile; fileRef = 098FBDF715D70E2600623941 /* stub.txt */; }; 099C7343169016D800239880 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 099C7342169016D800239880 /* Default-568h@2x.png */; }; + 1F9ADC8C230037EE00F87660 /* stub.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1F9ADC8A230037EE00F87660 /* stub.txt */; }; + 1F9ADC8D230037EE00F87660 /* stub.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 1F9ADC8B230037EE00F87660 /* stub.jpg */; }; E8C65A455EC5B63D1737AF29 /* libPods-OHHTTPStubsDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F2958101F89CBC90FC44F99 /* libPods-OHHTTPStubsDemo.a */; }; /* End PBXBuildFile section */ @@ -32,9 +32,9 @@ 098FBDEA15D7056200623941 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 098FBDEB15D7056200623941 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; 098FBDEC15D7056200623941 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = ""; }; - 098FBDF615D70E2600623941 /* stub.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = stub.jpg; sourceTree = ""; }; - 098FBDF715D70E2600623941 /* stub.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stub.txt; sourceTree = ""; }; 099C7342169016D800239880 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 1F9ADC8A230037EE00F87660 /* stub.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stub.txt; sourceTree = ""; }; + 1F9ADC8B230037EE00F87660 /* stub.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = stub.jpg; sourceTree = ""; }; 48556A011AA6E9FD0074B154 /* libPods-OHHTTPStubs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-OHHTTPStubs.a"; path = "Pods/../build/Debug-iphoneos/libPods-OHHTTPStubs.a"; sourceTree = ""; }; 6F2958101F89CBC90FC44F99 /* libPods-OHHTTPStubsDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OHHTTPStubsDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 801E977139BBDAC0CC11ECAC /* Pods-OHHTTPStubsDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OHHTTPStubsDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo.debug.xcconfig"; sourceTree = ""; }; @@ -94,7 +94,7 @@ 098FBDEA15D7056200623941 /* MainViewController.h */, 098FBDEB15D7056200623941 /* MainViewController.m */, 098FBDEC15D7056200623941 /* MainViewController.xib */, - 098FBDFA15D70E2F00623941 /* Stubs */, + 1F9ADC89230037EE00F87660 /* Stubs */, 098FBDDA15D704E800623941 /* Supporting Files */, ); name = OHHTTPStubsDemo; @@ -111,22 +111,23 @@ path = "Supporting Files"; sourceTree = ""; }; - 098FBDFA15D70E2F00623941 /* Stubs */ = { + 1B8830D2F747CB6ADB7875D1 /* Pods */ = { isa = PBXGroup; children = ( - 098FBDF615D70E2600623941 /* stub.jpg */, - 098FBDF715D70E2600623941 /* stub.txt */, + 801E977139BBDAC0CC11ECAC /* Pods-OHHTTPStubsDemo.debug.xcconfig */, + B6814E1693353E0AADB9895C /* Pods-OHHTTPStubsDemo.release.xcconfig */, ); - path = Stubs; + name = Pods; sourceTree = ""; }; - 1B8830D2F747CB6ADB7875D1 /* Pods */ = { + 1F9ADC89230037EE00F87660 /* Stubs */ = { isa = PBXGroup; children = ( - 801E977139BBDAC0CC11ECAC /* Pods-OHHTTPStubsDemo.debug.xcconfig */, - B6814E1693353E0AADB9895C /* Pods-OHHTTPStubsDemo.release.xcconfig */, + 1F9ADC8A230037EE00F87660 /* stub.txt */, + 1F9ADC8B230037EE00F87660 /* stub.jpg */, ); - name = Pods; + name = Stubs; + path = ../Stubs; sourceTree = ""; }; /* End PBXGroup section */ @@ -188,8 +189,8 @@ buildActionMask = 2147483647; files = ( 098FBDEE15D7056200623941 /* MainViewController.xib in Resources */, - 098FBDF815D70E2600623941 /* stub.jpg in Resources */, - 098FBDF915D70E2600623941 /* stub.txt in Resources */, + 1F9ADC8D230037EE00F87660 /* stub.jpg in Resources */, + 1F9ADC8C230037EE00F87660 /* stub.txt in Resources */, 099C7343169016D800239880 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Examples/ObjC/OHHTTPStubsDemo.xcodeproj/xcshareddata/xcschemes/OHHTTPStubsDemo.xcscheme b/Examples/ObjC/OHHTTPStubsDemo.xcodeproj/xcshareddata/xcschemes/OHHTTPStubsDemo.xcscheme index d962fac7..8144e538 100644 --- a/Examples/ObjC/OHHTTPStubsDemo.xcodeproj/xcshareddata/xcschemes/OHHTTPStubsDemo.xcscheme +++ b/Examples/ObjC/OHHTTPStubsDemo.xcodeproj/xcshareddata/xcschemes/OHHTTPStubsDemo.xcscheme @@ -27,8 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + - - - - - - + + - - CFBundlePackageType FMWK CFBundleShortVersionString - 8.0.0 + 9.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Examples/Swift/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h b/Examples/Swift/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h index 48c9d154..af1232ad 100644 --- a/Examples/Swift/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h +++ b/Examples/Swift/Pods/Target Support Files/OHHTTPStubs/OHHTTPStubs-umbrella.h @@ -10,12 +10,12 @@ #endif #endif +#import "HTTPStubs.h" +#import "HTTPStubsResponse.h" #import "Compatibility.h" -#import "OHHTTPStubs.h" -#import "OHHTTPStubsResponse.h" -#import "OHHTTPStubsResponse+JSON.h" +#import "HTTPStubsResponse+JSON.h" #import "NSURLRequest+HTTPBodyTesting.h" -#import "OHPathHelpers.h" +#import "HTTPStubsPathHelpers.h" #import "Compatibility.h" FOUNDATION_EXPORT double OHHTTPStubsVersionNumber; diff --git a/Examples/Swift/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo-frameworks.sh b/Examples/Swift/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo-frameworks.sh index a3e9cbab..2677f22b 100755 --- a/Examples/Swift/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo-frameworks.sh +++ b/Examples/Swift/Pods/Target Support Files/Pods-OHHTTPStubsDemo/Pods-OHHTTPStubsDemo-frameworks.sh @@ -94,7 +94,7 @@ install_dsym() { binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then strip_invalid_archs "$binary" fi @@ -109,6 +109,14 @@ install_dsym() { fi } +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then diff --git a/Examples/Swift/Stubs/stub.jpg b/Examples/Swift/Stubs/stub.jpg deleted file mode 100644 index c42a21cd..00000000 Binary files a/Examples/Swift/Stubs/stub.jpg and /dev/null differ diff --git a/Examples/Swift/Stubs/stub.txt b/Examples/Swift/Stubs/stub.txt deleted file mode 100644 index e662f91b..00000000 --- a/Examples/Swift/Stubs/stub.txt +++ /dev/null @@ -1,3 +0,0 @@ -This is the text from your stub. - -Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. Ut wisis enim ad minim veniam, quis nostrud exerci tution ullam corper suscipit lobortis nisi ut aliquip ex ea commodo consequat. Duis te feugi facilisi. Duis autem dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit au gue duis dolore te feugat nulla facilisi. diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo.xcodeproj/project.pbxproj b/Examples/SwiftPackageManager/OHHTTPStubsDemo.xcodeproj/project.pbxproj new file mode 100644 index 00000000..603763a0 --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo.xcodeproj/project.pbxproj @@ -0,0 +1,389 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + 1F206B6122FF819000B98E3C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F206B6022FF819000B98E3C /* AppDelegate.swift */; }; + 1F206B6322FF819000B98E3C /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F206B6222FF819000B98E3C /* SceneDelegate.swift */; }; + 1F206B6822FF819000B98E3C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F206B6622FF819000B98E3C /* Main.storyboard */; }; + 1F206B6A22FF819200B98E3C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1F206B6922FF819200B98E3C /* Assets.xcassets */; }; + 1F206B6D22FF819200B98E3C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F206B6B22FF819200B98E3C /* LaunchScreen.storyboard */; }; + 1F206B7522FF8ADF00B98E3C /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F206B7422FF8ADF00B98E3C /* MainViewController.swift */; }; + 1F83D58B22FFB8D80004EE44 /* OHHTTPStubs in Frameworks */ = {isa = PBXBuildFile; productRef = 1F83D58A22FFB8D80004EE44 /* OHHTTPStubs */; }; + 1FDDCA6722FF975200D47058 /* OHHTTPStubsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 1FDDCA6622FF975200D47058 /* OHHTTPStubsSwift */; }; + 1FDF83BD22FF905B00BC47DF /* stub.txt in Resources */ = {isa = PBXBuildFile; fileRef = 1FDF83BB22FF905B00BC47DF /* stub.txt */; }; + 1FDF83BE22FF905B00BC47DF /* stub.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 1FDF83BC22FF905B00BC47DF /* stub.jpg */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1F206B5D22FF819000B98E3C /* OHHTTPStubsDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OHHTTPStubsDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1F206B6022FF819000B98E3C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 1F206B6222FF819000B98E3C /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 1F206B6722FF819000B98E3C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 1F206B6922FF819200B98E3C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 1F206B6C22FF819200B98E3C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 1F206B6E22FF819200B98E3C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1F206B7422FF8ADF00B98E3C /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; + 1F206B7822FF8BED00B98E3C /* OHHTTPStubs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = OHHTTPStubs; path = ../..; sourceTree = ""; }; + 1FDF83BB22FF905B00BC47DF /* stub.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = stub.txt; sourceTree = ""; }; + 1FDF83BC22FF905B00BC47DF /* stub.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = stub.jpg; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1F206B5A22FF819000B98E3C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1FDDCA6722FF975200D47058 /* OHHTTPStubsSwift in Frameworks */, + 1F83D58B22FFB8D80004EE44 /* OHHTTPStubs in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1F206B5422FF819000B98E3C = { + isa = PBXGroup; + children = ( + 1F206B5F22FF819000B98E3C /* OHHTTPStubsDemo */, + 1F206B7822FF8BED00B98E3C /* OHHTTPStubs */, + 1F206B5E22FF819000B98E3C /* Products */, + 1F206B7922FF8C0D00B98E3C /* Frameworks */, + ); + sourceTree = ""; + }; + 1F206B5E22FF819000B98E3C /* Products */ = { + isa = PBXGroup; + children = ( + 1F206B5D22FF819000B98E3C /* OHHTTPStubsDemo.app */, + ); + name = Products; + sourceTree = ""; + }; + 1F206B5F22FF819000B98E3C /* OHHTTPStubsDemo */ = { + isa = PBXGroup; + children = ( + 1F206B6022FF819000B98E3C /* AppDelegate.swift */, + 1F206B6922FF819200B98E3C /* Assets.xcassets */, + 1F206B6E22FF819200B98E3C /* Info.plist */, + 1F206B6B22FF819200B98E3C /* LaunchScreen.storyboard */, + 1F206B6622FF819000B98E3C /* Main.storyboard */, + 1F206B7422FF8ADF00B98E3C /* MainViewController.swift */, + 1F206B6222FF819000B98E3C /* SceneDelegate.swift */, + 1FDF83BA22FF905B00BC47DF /* Stubs */, + ); + path = OHHTTPStubsDemo; + sourceTree = ""; + }; + 1F206B7922FF8C0D00B98E3C /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + 1FDF83BA22FF905B00BC47DF /* Stubs */ = { + isa = PBXGroup; + children = ( + 1FDF83BB22FF905B00BC47DF /* stub.txt */, + 1FDF83BC22FF905B00BC47DF /* stub.jpg */, + ); + name = Stubs; + path = ../../Stubs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1F206B5C22FF819000B98E3C /* OHHTTPStubsDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1F206B7122FF819200B98E3C /* Build configuration list for PBXNativeTarget "OHHTTPStubsDemo" */; + buildPhases = ( + 1F206B5922FF819000B98E3C /* Sources */, + 1F206B5A22FF819000B98E3C /* Frameworks */, + 1F206B5B22FF819000B98E3C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = OHHTTPStubsDemo; + packageProductDependencies = ( + 1FDDCA6622FF975200D47058 /* OHHTTPStubsSwift */, + 1F83D58A22FFB8D80004EE44 /* OHHTTPStubs */, + ); + productName = OHHTTPStubsDemo; + productReference = 1F206B5D22FF819000B98E3C /* OHHTTPStubsDemo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1F206B5522FF819000B98E3C /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1100; + LastUpgradeCheck = 1100; + ORGANIZATIONNAME = AliSoftware; + TargetAttributes = { + 1F206B5C22FF819000B98E3C = { + CreatedOnToolsVersion = 11.0; + }; + }; + }; + buildConfigurationList = 1F206B5822FF819000B98E3C /* Build configuration list for PBXProject "OHHTTPStubsDemo" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 1F206B5422FF819000B98E3C; + productRefGroup = 1F206B5E22FF819000B98E3C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1F206B5C22FF819000B98E3C /* OHHTTPStubsDemo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1F206B5B22FF819000B98E3C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1FDF83BD22FF905B00BC47DF /* stub.txt in Resources */, + 1FDF83BE22FF905B00BC47DF /* stub.jpg in Resources */, + 1F206B6D22FF819200B98E3C /* LaunchScreen.storyboard in Resources */, + 1F206B6A22FF819200B98E3C /* Assets.xcassets in Resources */, + 1F206B6822FF819000B98E3C /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1F206B5922FF819000B98E3C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1F206B6122FF819000B98E3C /* AppDelegate.swift in Sources */, + 1F206B6322FF819000B98E3C /* SceneDelegate.swift in Sources */, + 1F206B7522FF8ADF00B98E3C /* MainViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 1F206B6622FF819000B98E3C /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1F206B6722FF819000B98E3C /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 1F206B6B22FF819200B98E3C /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 1F206B6C22FF819200B98E3C /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1F206B6F22FF819200B98E3C /* 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; + 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 = ( + "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 = 13.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 1F206B7022FF819200B98E3C /* 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; + 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_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 = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 1F206B7222FF819200B98E3C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = NTX63W5EU6; + INFOPLIST_FILE = OHHTTPStubsDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.alisoftware.OHHTTPStubsDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 1F206B7322FF819200B98E3C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = NTX63W5EU6; + INFOPLIST_FILE = OHHTTPStubsDemo/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.alisoftware.OHHTTPStubsDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1F206B5822FF819000B98E3C /* Build configuration list for PBXProject "OHHTTPStubsDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1F206B6F22FF819200B98E3C /* Debug */, + 1F206B7022FF819200B98E3C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1F206B7122FF819200B98E3C /* Build configuration list for PBXNativeTarget "OHHTTPStubsDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1F206B7222FF819200B98E3C /* Debug */, + 1F206B7322FF819200B98E3C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 1F83D58A22FFB8D80004EE44 /* OHHTTPStubs */ = { + isa = XCSwiftPackageProductDependency; + productName = OHHTTPStubs; + }; + 1FDDCA6622FF975200D47058 /* OHHTTPStubsSwift */ = { + isa = XCSwiftPackageProductDependency; + productName = OHHTTPStubsSwift; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 1F206B5522FF819000B98E3C /* Project object */; +} diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/SwiftPackageManager/OHHTTPStubsDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..68ace104 --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo/AppDelegate.swift b/Examples/SwiftPackageManager/OHHTTPStubsDemo/AppDelegate.swift new file mode 100644 index 00000000..a975d11c --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo/AppDelegate.swift @@ -0,0 +1,19 @@ +// +// AppDelegate.swift +// OHHTTPStubsDemo +// +// Created by Olivier Halligon on 18/04/2015. +// Copyright (c) 2015 AliSoftware. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + return true + } +} + diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d8db8d65 --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo/Assets.xcassets/Contents.json b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo/Base.lproj/LaunchScreen.storyboard b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo/Base.lproj/Main.storyboard b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Base.lproj/Main.storyboard new file mode 100644 index 00000000..77c5012c --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Base.lproj/Main.storyboard @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo/Info.plist b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Info.plist new file mode 100644 index 00000000..2a3483c0 --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo/MainViewController.swift b/Examples/SwiftPackageManager/OHHTTPStubsDemo/MainViewController.swift new file mode 100644 index 00000000..64f3e35e --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo/MainViewController.swift @@ -0,0 +1,143 @@ +// +// ViewController.swift +// OHHTTPStubsDemo +// +// Created by Olivier Halligon on 18/04/2015. +// Copyright (c) 2015 AliSoftware. All rights reserved. +// + +import UIKit +import OHHTTPStubs +import OHHTTPStubsSwift + +class MainViewController: UIViewController { + + //////////////////////////////////////////////////////////////////////////////// + // MARK: - Outlets + + @IBOutlet var delaySwitch: UISwitch! + @IBOutlet var textView: UITextView! + @IBOutlet var installTextStubSwitch: UISwitch! + @IBOutlet var imageView: UIImageView! + @IBOutlet var installImageStubSwitch: UISwitch! + + //////////////////////////////////////////////////////////////////////////////// + // MARK: - Init & Dealloc + + override func viewDidLoad() { + super.viewDidLoad() + + installTextStub(self.installTextStubSwitch) + installImageStub(self.installImageStubSwitch) + + HTTPStubs.onStubActivation { (request: URLRequest, stub: HTTPStubsDescriptor, response: HTTPStubsResponse) in + print("[OHHTTPStubs] Request to \(request.url!) has been stubbed with \(String(describing: stub.name))") + } + } + + //////////////////////////////////////////////////////////////////////////////// + // MARK: - Global stubs activation + + @IBAction func toggleStubs(_ sender: UISwitch) { + HTTPStubs.setEnabled(sender.isOn) + self.delaySwitch.isEnabled = sender.isOn + self.installTextStubSwitch.isEnabled = sender.isOn + self.installImageStubSwitch.isEnabled = sender.isOn + + let state = sender.isOn ? "and enabled" : "but disabled" + print("Installed (\(state)) stubs: \(HTTPStubs.allStubs())") + } + + + + //////////////////////////////////////////////////////////////////////////////// + // MARK: - Text Download and Stub + + + @IBAction func downloadText(_ sender: UIButton) { + sender.isEnabled = false + self.textView.text = nil + + let urlString = "http://www.opensource.apple.com/source/Git/Git-26/src/git-htmldocs/git-commit.txt?txt" + let req = URLRequest(url: URL(string: urlString)!) + + URLSession.shared.dataTask(with: req) { [weak self] (data, _, _) in + DispatchQueue.main.async { + guard let self = self else { + return + } + sender.isEnabled = true + if let receivedData = data, let receivedText = NSString(data: receivedData, encoding: String.Encoding.ascii.rawValue) { + self.textView.text = receivedText as String + } + } + }.resume() + } + + weak var textStub: HTTPStubsDescriptor? + @IBAction func installTextStub(_ sender: UISwitch) { + if sender.isOn { + // Install + let stubPath = OHPathForFile("stub.txt", type(of: self)) + textStub = stub(condition: isExtension("txt")) { [weak self] _ in + let useDelay = DispatchQueue.main.sync { self?.delaySwitch.isOn ?? false } + return fixture(filePath: stubPath!, headers: ["Content-Type":"text/plain"]) + .requestTime(useDelay ? 2.0 : 0.0, responseTime:OHHTTPStubsDownloadSpeedWifi) + } + textStub?.name = "Text stub" + } else { + // Uninstall + HTTPStubs.removeStub(textStub!) + } + } + + + //////////////////////////////////////////////////////////////////////////////// + // MARK: - Image Download and Stub + + @IBAction func downloadImage(_ sender: UIButton) { + sender.isEnabled = false + self.imageView.image = nil + + let urlString = "http://images.apple.com/support/assets/images/products/iphone/hero_iphone4-5_wide.png" + let req = URLRequest(url: URL(string: urlString)!) + + URLSession.shared.dataTask(with: req) { [weak self] (data, _, _) in + guard let self = self else { + return + } + DispatchQueue.main.async { + sender.isEnabled = true + if let receivedData = data { + self.imageView.image = UIImage(data: receivedData) + } + } + }.resume() + } + + weak var imageStub: HTTPStubsDescriptor? + @IBAction func installImageStub(_ sender: UISwitch) { + if sender.isOn { + // Install + let stubPath = OHPathForFile("stub.jpg", type(of: self)) + imageStub = stub(condition: isExtension("png") || isExtension("jpg") || isExtension("gif")) { [weak self] _ in + let useDelay = DispatchQueue.main.sync { self?.delaySwitch.isOn ?? false } + return fixture(filePath: stubPath!, headers: ["Content-Type":"image/jpeg"]) + .requestTime(useDelay ? 2.0 : 0.0, responseTime: OHHTTPStubsDownloadSpeedWifi) + } + imageStub?.name = "Image stub" + } else { + // Uninstall + HTTPStubs.removeStub(imageStub!) + } + } + + //////////////////////////////////////////////////////////////////////////////// + // MARK: - Cleaning + + @IBAction func clearResults() { + self.textView.text = "" + self.imageView.image = nil + } + +} diff --git a/Examples/SwiftPackageManager/OHHTTPStubsDemo/SceneDelegate.swift b/Examples/SwiftPackageManager/OHHTTPStubsDemo/SceneDelegate.swift new file mode 100644 index 00000000..2be6139c --- /dev/null +++ b/Examples/SwiftPackageManager/OHHTTPStubsDemo/SceneDelegate.swift @@ -0,0 +1,53 @@ +// +// SceneDelegate.swift +// OHHTTPStubsDemo +// +// Created by Jeff Lett on 8/10/19. +// Copyright © 2019 AliSoftware. All rights reserved. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/OHHTTPStubs.podspec b/OHHTTPStubs.podspec index 5b4470f1..53729b4f 100644 --- a/OHHTTPStubs.podspec +++ b/OHHTTPStubs.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "OHHTTPStubs" - s.version = "8.0.0" + s.version = "9.0.0" s.summary = "Framework to stub your network requests like HTTP and help you write network unit tests with XCTest." s.description = <<-DESC.gsub(/^ +\|/,'') @@ -32,6 +32,7 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.9' s.watchos.deployment_target = '2.0' s.tvos.deployment_target = '9.0' + s.swift_versions = ['3.0', '3.1', '3.2', '4.0', '4.1', '4.2', '5.0', '5.1'] s.default_subspec = 'Default' # Default subspec that includes the most commonly-used components @@ -44,38 +45,34 @@ Pod::Spec.new do |s| # The Core subspec, containing the library core needed in all cases s.subspec 'Core' do |core| - core.source_files = "OHHTTPStubs/Sources/*.{h,m}" - core.public_header_files = "OHHTTPStubs/Sources/*.h" + core.source_files = "Sources/OHHTTPStubs/**/HTTPStubs.{h,m}", "Sources/OHHTTPStubs/**/HTTPStubsResponse.{h,m}", + "Sources/OHHTTPStubs/include/Compatibility.h" end # Optional subspecs s.subspec 'NSURLSession' do |urlsession| urlsession.dependency 'OHHTTPStubs/Core' - urlsession.source_files = "OHHTTPStubs/Sources/NSURLSession/*.{h,m}" - urlsession.private_header_files = "OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h" + urlsession.source_files = "Sources/OHHTTPStubs/**/NSURLRequest+HTTPBodyTesting.{h,m}", "Sources/OHHTTPStubs/**/HTTPStubs+NSURLSessionConfiguration.{h,m}", "Sources/OHHTTPStubs/**/HTTPStubsMethodSwizzling.{h,m}" + urlsession.private_header_files = "Sources/OHHTTPStubs/**/HTTPStubsMethodSwizzling.h" end s.subspec 'JSON' do |json| json.dependency 'OHHTTPStubs/Core' - json.source_files = "OHHTTPStubs/Sources/JSON/*.{h,m}" - json.public_header_files = "OHHTTPStubs/Sources/JSON/*.h" + json.source_files = "Sources/OHHTTPStubs/**/HTTPStubsResponse+JSON.{h,m}" end s.subspec 'HTTPMessage' do |httpmessage| httpmessage.dependency 'OHHTTPStubs/Core' - httpmessage.source_files = "OHHTTPStubs/Sources/HTTPMessage/*.{h,m}" - httpmessage.public_header_files = "OHHTTPStubs/Sources/HTTPMessage/*.h" + httpmessage.source_files = "Sources/HTTPMessage/**/*.{h,m}" end s.subspec 'Mocktail' do |mocktail| mocktail.dependency 'OHHTTPStubs/Core' - mocktail.source_files = "OHHTTPStubs/Sources/Mocktail/*.{h,m}" - mocktail.public_header_files = "OHHTTPStubs/Sources/Mocktail/*.h" + mocktail.source_files = "Sources/Mocktail/**/*.{h,m}" end s.subspec 'OHPathHelpers' do |pathhelper| - pathhelper.source_files = "OHHTTPStubs/Sources/OHPathHelpers/*.{h,m}", "OHHTTPStubs/Sources/Compatibility.h" - pathhelper.public_header_files = "OHHTTPStubs/Sources/OHPathHelpers/*.h", "OHHTTPStubs/Sources/Compatibility.h" + pathhelper.source_files = "Sources/OHHTTPStubs/**/HTTPStubsPathHelpers.{h,m}", "Sources/OHHTTPStubs/include/Compatibility.h" end s.subspec 'Swift' do |swift| @@ -85,7 +82,7 @@ Pod::Spec.new do |s| swift.tvos.deployment_target = '9.0' swift.dependency 'OHHTTPStubs/Default' - swift.source_files = "OHHTTPStubs/Sources/Swift/*.swift" + swift.source_files = "Sources/OHHTTPStubsSwift/*.swift" end end diff --git a/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj b/OHHTTPStubs.xcodeproj/project.pbxproj similarity index 58% rename from OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj rename to OHHTTPStubs.xcodeproj/project.pbxproj index 20023f69..ac4e60a5 100644 --- a/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.pbxproj +++ b/OHHTTPStubs.xcodeproj/project.pbxproj @@ -7,165 +7,157 @@ objects = { /* Begin PBXBuildFile section */ - 0501A1A81C63E0C600B120AE /* OHHTTPStubsSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0955699A1B90E4EA00503ADC /* OHHTTPStubsSwift.swift */; }; - 0501A1A91C63E64600B120AE /* SwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 095925D51BAEC00200DD7F0B /* SwiftHelpersTests.swift */; }; 09110A4519805F4800D175E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09110A4419805F4800D175E4 /* Foundation.framework */; }; 09110A5319805F4800D175E4 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09110A5219805F4800D175E4 /* XCTest.framework */; }; 09110A5419805F4800D175E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09110A4419805F4800D175E4 /* Foundation.framework */; }; 09110A5919805F4800D175E4 /* libOHHTTPStubs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 09110A4119805F4800D175E4 /* libOHHTTPStubs.a */; }; - 09110A6C1980605A00D175E4 /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A6B1980605A00D175E4 /* OHHTTPStubs.m */; }; - 09110A741980606A00D175E4 /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A6F1980606A00D175E4 /* OHHTTPStubsResponse.m */; }; - 09110A751980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A711980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m */; }; - 09110A761980606A00D175E4 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A731980606A00D175E4 /* OHHTTPStubsResponse+JSON.m */; }; - 09110A791980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A781980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m */; }; - 09199FCF1BD974F10014376D /* OHHTTPStubsUmbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 09199FD01BD974F20014376D /* OHHTTPStubsUmbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 09199FD11BD98D1C0014376D /* OHHTTPStubsSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0955699A1B90E4EA00503ADC /* OHHTTPStubsSwift.swift */; }; - 093442E21B80EC4A00A91535 /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814D1980668E00807DBE /* TimingTests.m */; }; - 093442E31B80EC4A00A91535 /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 221C34A41B0CCF0600FCA8FF /* OHPathHelpersTests.m */; }; - 093442E41B80EC4A00A91535 /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814A1980668E00807DBE /* NSURLConnectionDelegateTests.m */; }; - 093442E51B80EC4A00A91535 /* WithContentsOfURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814E1980668E00807DBE /* WithContentsOfURLTests.m */; }; - 093442E61B80EC4A00A91535 /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981481980668E00807DBE /* AFNetworkingTests.m */; }; - 093442E71B80EC4A00A91535 /* MocktailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0F8E7D1B6E31850049A7D2 /* MocktailTests.m */; }; - 093442E81B80EC4A00A91535 /* NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814C1980668E00807DBE /* NSURLSessionTests.m */; }; - 093442E91B80EC4A00A91535 /* NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814B1980668E00807DBE /* NSURLConnectionTests.m */; }; - 093442EA1B80EC4A00A91535 /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981491980668E00807DBE /* NilValuesTests.m */; }; 093442EC1B80EC4A00A91535 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09110A5219805F4800D175E4 /* XCTest.framework */; }; 093442EE1B80EC4A00A91535 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09110A4419805F4800D175E4 /* Foundation.framework */; }; - 093442F11B80EC4A00A91535 /* emptyfile.json in Resources */ = {isa = PBXBuildFile; fileRef = 47AF337A1A37757B00158C9F /* emptyfile.json */; }; - 093442F21B80EC4A00A91535 /* empty.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 221C34A61B0CCF9D00FCA8FF /* empty.bundle */; }; - 093442F31B80EC4A00A91535 /* MocktailFolder in Resources */ = {isa = PBXBuildFile; fileRef = 1D0F8E811B6E31B00049A7D2 /* MocktailFolder */; }; - 093442F41B80EC4A00A91535 /* login.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1D0F8E7F1B6E31A70049A7D2 /* login.tail */; }; 093442FD1B80ED2600A91535 /* OHHTTPStubs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725CD99B1A9EB65100F84C8B /* OHHTTPStubs.framework */; }; - 094906D61B7F4D7100B047DA /* MocktailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0F8E7D1B6E31850049A7D2 /* MocktailTests.m */; }; - 094906D71B7F520200B047DA /* OHHTTPStubs+Mocktail.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D6DB84F1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.m */; }; - 094906D81B7F520200B047DA /* OHHTTPStubs+Mocktail.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D6DB84F1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.m */; }; - 094906D91B7F523500B047DA /* MocktailFolder in Resources */ = {isa = PBXBuildFile; fileRef = 1D0F8E811B6E31B00049A7D2 /* MocktailFolder */; }; - 094906DA1B7F523900B047DA /* login.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1D0F8E7F1B6E31A70049A7D2 /* login.tail */; }; - 094906DB1B7F527A00B047DA /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981481980668E00807DBE /* AFNetworkingTests.m */; }; - 094906DC1B7F60D100B047DA /* OHHTTPStubs+Mocktail.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1D6DB84E1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.h */; }; - 094906DD1B7F60D100B047DA /* OHPathHelpers.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 095B1AD31AE30BA7009D1B56 /* OHPathHelpers.h */; }; - 094906DE1B7F60E200B047DA /* OHHTTPStubs+Mocktail.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D6DB84E1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 094906DF1B7F60EE00B047DA /* OHHTTPStubs+Mocktail.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D6DB84E1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 095925D61BAEC00200DD7F0B /* SwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 095925D51BAEC00200DD7F0B /* SwiftHelpersTests.swift */; }; - 095981881980682800807DBE /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981481980668E00807DBE /* AFNetworkingTests.m */; }; - 095981891980682E00807DBE /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981491980668E00807DBE /* NilValuesTests.m */; }; - 0959818A1980682E00807DBE /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814A1980668E00807DBE /* NSURLConnectionDelegateTests.m */; }; - 0959818B1980682E00807DBE /* NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814B1980668E00807DBE /* NSURLConnectionTests.m */; }; - 0959818C1980682E00807DBE /* NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814C1980668E00807DBE /* NSURLSessionTests.m */; }; - 0959818D1980682E00807DBE /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814D1980668E00807DBE /* TimingTests.m */; }; - 0959818E1980682E00807DBE /* WithContentsOfURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814E1980668E00807DBE /* WithContentsOfURLTests.m */; }; 095981D319806A7900807DBE /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 09110A5219805F4800D175E4 /* XCTest.framework */; }; 095981D719806A7900807DBE /* OHHTTPStubs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 095981C219806A7900807DBE /* OHHTTPStubs.framework */; }; - 095981EF19806AA200807DBE /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981491980668E00807DBE /* NilValuesTests.m */; }; - 095981F019806AA200807DBE /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814A1980668E00807DBE /* NSURLConnectionDelegateTests.m */; }; - 095981F119806AA200807DBE /* NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814B1980668E00807DBE /* NSURLConnectionTests.m */; }; - 095981F219806AA200807DBE /* NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814C1980668E00807DBE /* NSURLSessionTests.m */; }; - 095981F319806AA200807DBE /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814D1980668E00807DBE /* TimingTests.m */; }; - 095981F419806AA200807DBE /* WithContentsOfURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814E1980668E00807DBE /* WithContentsOfURLTests.m */; }; - 095981F619806AAC00807DBE /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A6B1980605A00D175E4 /* OHHTTPStubs.m */; }; - 095981F719806AAC00807DBE /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A6F1980606A00D175E4 /* OHHTTPStubsResponse.m */; }; - 095981F819806AAC00807DBE /* OHHTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A711980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m */; }; - 095981F919806AAC00807DBE /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A731980606A00D175E4 /* OHHTTPStubsResponse+JSON.m */; }; - 095981FA19806AAC00807DBE /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A781980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m */; }; - 095981FB19806AB700807DBE /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A6A1980605A00D175E4 /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 095981FC19806AF300807DBE /* OHHTTPStubs.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 09110A6A1980605A00D175E4 /* OHHTTPStubs.h */; }; - 095981FD19806AF300807DBE /* OHHTTPStubsResponse.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 09110A6E1980606A00D175E4 /* OHHTTPStubsResponse.h */; }; - 095981FE19806AF300807DBE /* OHHTTPStubsResponse+HTTPMessage.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 09110A701980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.h */; }; - 095981FF19806AF300807DBE /* OHHTTPStubsResponse+JSON.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 09110A721980606A00D175E4 /* OHHTTPStubsResponse+JSON.h */; }; - 0959820019806B1700807DBE /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A6E1980606A00D175E4 /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0959820119806B1E00807DBE /* OHHTTPStubsResponse+HTTPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A701980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0959820219806B2200807DBE /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A721980606A00D175E4 /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 095B1AD51AE30BA7009D1B56 /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 095B1AD41AE30BA7009D1B56 /* OHPathHelpers.m */; }; - 095B1AD61AE3138C009D1B56 /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 095B1AD31AE30BA7009D1B56 /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 095B1AD71AE3138C009D1B56 /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 095B1AD31AE30BA7009D1B56 /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 095B1AD81AE31395009D1B56 /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 095B1AD41AE30BA7009D1B56 /* OHPathHelpers.m */; }; - 095B1AD91AE31396009D1B56 /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 095B1AD41AE30BA7009D1B56 /* OHPathHelpers.m */; }; - 09D0D2991B67FED3004E7213 /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 09D0D2981B67FED3004E7213 /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 09D0D29A1B67FED3004E7213 /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 09D0D2981B67FED3004E7213 /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 09D0D29B1B67FF06004E7213 /* Compatibility.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 09D0D2981B67FED3004E7213 /* Compatibility.h */; }; - 09E993A81DBE939C0071EECC /* login_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 09E993A71DBE939C0071EECC /* login_headers.tail */; }; - 09E993A91DBE939C0071EECC /* login_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 09E993A71DBE939C0071EECC /* login_headers.tail */; }; - 09E993AA1DBE939C0071EECC /* login_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 09E993A71DBE939C0071EECC /* login_headers.tail */; }; - 09E993AB1DBE939C0071EECC /* login_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 09E993A71DBE939C0071EECC /* login_headers.tail */; }; 0A17E6601EBA2C3238103F9C /* libPods-TestingPods-OHHTTPStubs iOS Lib Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8506514BF475EFA0F5BB9452 /* libPods-TestingPods-OHHTTPStubs iOS Lib Tests.a */; }; - 1B5632F01CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B5632EE1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h */; }; - 1B5632F11CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B5632EE1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h */; }; - 1B5632F21CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B5632EE1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h */; }; - 1B5632F31CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B5632EF1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m */; }; - 1B5632F41CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B5632EF1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m */; }; - 1B5632F51CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B5632EF1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m */; }; - 1B5632F61CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B5632EF1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m */; }; - 1D0F8E7E1B6E31850049A7D2 /* MocktailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0F8E7D1B6E31850049A7D2 /* MocktailTests.m */; }; - 1D0F8E801B6E31A70049A7D2 /* login.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1D0F8E7F1B6E31A70049A7D2 /* login.tail */; }; - 1D0F8E821B6E31B00049A7D2 /* MocktailFolder in Resources */ = {isa = PBXBuildFile; fileRef = 1D0F8E811B6E31B00049A7D2 /* MocktailFolder */; }; - 1D6DB8501B763B7A00FCF855 /* OHHTTPStubs+Mocktail.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D6DB84F1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.m */; }; - 221C34A51B0CCF0600FCA8FF /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 221C34A41B0CCF0600FCA8FF /* OHPathHelpersTests.m */; }; - 221C34A71B0CCF9D00FCA8FF /* empty.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 221C34A61B0CCF9D00FCA8FF /* empty.bundle */; }; - 221C34A81B0CCF9D00FCA8FF /* empty.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 221C34A61B0CCF9D00FCA8FF /* empty.bundle */; }; - 221C34A91B0CCFF200FCA8FF /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 221C34A41B0CCF0600FCA8FF /* OHPathHelpersTests.m */; }; + 1F462BB322FD9671000B7253 /* MocktailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEE22FD95D700472F5B /* MocktailTests.m */; }; + 1F462BB822FD96C6000B7253 /* MocktailFolder in Resources */ = {isa = PBXBuildFile; fileRef = 1F462BB722FD96C6000B7253 /* MocktailFolder */; }; + 1F462BB922FD96C6000B7253 /* MocktailFolder in Resources */ = {isa = PBXBuildFile; fileRef = 1F462BB722FD96C6000B7253 /* MocktailFolder */; }; + 1F462BBA22FD96C6000B7253 /* MocktailFolder in Resources */ = {isa = PBXBuildFile; fileRef = 1F462BB722FD96C6000B7253 /* MocktailFolder */; }; + 1F462BBB22FD96C6000B7253 /* MocktailFolder in Resources */ = {isa = PBXBuildFile; fileRef = 1F462BB722FD96C6000B7253 /* MocktailFolder */; }; + 1F462BBC22FD96FF000B7253 /* login.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE922FD95D700472F5B /* login.tail */; }; + 1F462BBF22FD9B8F000B7253 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5CD022FD95CC00472F5B /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F462BC022FD9CC8000B7253 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5CD022FD95CC00472F5B /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F51F12422FE4D48003463C1 /* SwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F51F12322FE4C53003463C1 /* SwiftHelpersTests.swift */; }; + 1F51F12522FE52CA003463C1 /* SwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F51F12322FE4C53003463C1 /* SwiftHelpersTests.swift */; }; + 1F51F12622FE52D0003463C1 /* SwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F51F12322FE4C53003463C1 /* SwiftHelpersTests.swift */; }; + 1FB9EFF722FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFE822FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m */; }; + 1FB9EFF822FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFE822FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m */; }; + 1FB9EFF922FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFE822FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m */; }; + 1FB9EFFA22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFE822FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m */; }; + 1FB9EFFB22FFBE670027737A /* HTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFE922FFBE670027737A /* HTTPStubsMethodSwizzling.m */; }; + 1FB9EFFC22FFBE670027737A /* HTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFE922FFBE670027737A /* HTTPStubsMethodSwizzling.m */; }; + 1FB9EFFD22FFBE670027737A /* HTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFE922FFBE670027737A /* HTTPStubsMethodSwizzling.m */; }; + 1FB9EFFE22FFBE670027737A /* HTTPStubsMethodSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFE922FFBE670027737A /* HTTPStubsMethodSwizzling.m */; }; + 1FB9EFFF22FFBE670027737A /* HTTPStubsPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFEA22FFBE670027737A /* HTTPStubsPathHelpers.m */; }; + 1FB9F00022FFBE670027737A /* HTTPStubsPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFEA22FFBE670027737A /* HTTPStubsPathHelpers.m */; }; + 1FB9F00122FFBE670027737A /* HTTPStubsPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFEA22FFBE670027737A /* HTTPStubsPathHelpers.m */; }; + 1FB9F00222FFBE670027737A /* HTTPStubsPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFEA22FFBE670027737A /* HTTPStubsPathHelpers.m */; }; + 1FB9F00322FFBE670027737A /* HTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFEB22FFBE670027737A /* HTTPStubs.m */; }; + 1FB9F00422FFBE670027737A /* HTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFEB22FFBE670027737A /* HTTPStubs.m */; }; + 1FB9F00522FFBE670027737A /* HTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFEB22FFBE670027737A /* HTTPStubs.m */; }; + 1FB9F00622FFBE670027737A /* HTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFEB22FFBE670027737A /* HTTPStubs.m */; }; + 1FB9F00722FFBE670027737A /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFED22FFBE670027737A /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F00822FFBE670027737A /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFED22FFBE670027737A /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F00922FFBE670027737A /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFED22FFBE670027737A /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F00A22FFBE670027737A /* HTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFEE22FFBE670027737A /* HTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F00B22FFBE670027737A /* HTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFEE22FFBE670027737A /* HTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F00C22FFBE670027737A /* HTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFEE22FFBE670027737A /* HTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F00D22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFEF22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F00E22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFEF22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F00F22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFEF22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01022FFBE670027737A /* HTTPStubsPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF022FFBE670027737A /* HTTPStubsPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01122FFBE670027737A /* HTTPStubsPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF022FFBE670027737A /* HTTPStubsPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01222FFBE670027737A /* HTTPStubsPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF022FFBE670027737A /* HTTPStubsPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01322FFBE670027737A /* HTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF122FFBE670027737A /* HTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01422FFBE670027737A /* HTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF122FFBE670027737A /* HTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01522FFBE670027737A /* HTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF122FFBE670027737A /* HTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01622FFBE670027737A /* HTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF222FFBE670027737A /* HTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01722FFBE670027737A /* HTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF222FFBE670027737A /* HTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01822FFBE670027737A /* HTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF222FFBE670027737A /* HTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F01922FFBE670027737A /* HTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF322FFBE670027737A /* HTTPStubsResponse+JSON.m */; }; + 1FB9F01A22FFBE670027737A /* HTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF322FFBE670027737A /* HTTPStubsResponse+JSON.m */; }; + 1FB9F01B22FFBE670027737A /* HTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF322FFBE670027737A /* HTTPStubsResponse+JSON.m */; }; + 1FB9F01C22FFBE670027737A /* HTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF322FFBE670027737A /* HTTPStubsResponse+JSON.m */; }; + 1FB9F01D22FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF422FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m */; }; + 1FB9F01E22FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF422FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m */; }; + 1FB9F01F22FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF422FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m */; }; + 1FB9F02022FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF422FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m */; }; + 1FB9F02122FFBE670027737A /* HTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF522FFBE670027737A /* HTTPStubsMethodSwizzling.h */; }; + 1FB9F02222FFBE670027737A /* HTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF522FFBE670027737A /* HTTPStubsMethodSwizzling.h */; }; + 1FB9F02322FFBE670027737A /* HTTPStubsMethodSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FB9EFF522FFBE670027737A /* HTTPStubsMethodSwizzling.h */; }; + 1FB9F02422FFBE670027737A /* HTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF622FFBE670027737A /* HTTPStubsResponse.m */; }; + 1FB9F02522FFBE670027737A /* HTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF622FFBE670027737A /* HTTPStubsResponse.m */; }; + 1FB9F02622FFBE670027737A /* HTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF622FFBE670027737A /* HTTPStubsResponse.m */; }; + 1FB9F02722FFBE670027737A /* HTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9EFF622FFBE670027737A /* HTTPStubsResponse.m */; }; + 1FB9F02822FFBFB00027737A /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5CD022FD95CC00472F5B /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FB9F03222FFC0CF0027737A /* NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02A22FFC0CF0027737A /* NSURLConnectionTests.m */; }; + 1FB9F03322FFC0CF0027737A /* NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02A22FFC0CF0027737A /* NSURLConnectionTests.m */; }; + 1FB9F03422FFC0CF0027737A /* NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02A22FFC0CF0027737A /* NSURLConnectionTests.m */; }; + 1FB9F03522FFC0CF0027737A /* NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02A22FFC0CF0027737A /* NSURLConnectionTests.m */; }; + 1FB9F03622FFC0CF0027737A /* NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02B22FFC0CF0027737A /* NSURLSessionTests.m */; }; + 1FB9F03722FFC0CF0027737A /* NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02B22FFC0CF0027737A /* NSURLSessionTests.m */; }; + 1FB9F03822FFC0CF0027737A /* NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02B22FFC0CF0027737A /* NSURLSessionTests.m */; }; + 1FB9F03922FFC0CF0027737A /* NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02B22FFC0CF0027737A /* NSURLSessionTests.m */; }; + 1FB9F03A22FFC0CF0027737A /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02C22FFC0CF0027737A /* TimingTests.m */; }; + 1FB9F03B22FFC0CF0027737A /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02C22FFC0CF0027737A /* TimingTests.m */; }; + 1FB9F03C22FFC0CF0027737A /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02C22FFC0CF0027737A /* TimingTests.m */; }; + 1FB9F03D22FFC0CF0027737A /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02C22FFC0CF0027737A /* TimingTests.m */; }; + 1FB9F03E22FFC0CF0027737A /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02D22FFC0CF0027737A /* OHPathHelpersTests.m */; }; + 1FB9F03F22FFC0CF0027737A /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02D22FFC0CF0027737A /* OHPathHelpersTests.m */; }; + 1FB9F04022FFC0CF0027737A /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02D22FFC0CF0027737A /* OHPathHelpersTests.m */; }; + 1FB9F04122FFC0CF0027737A /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02D22FFC0CF0027737A /* OHPathHelpersTests.m */; }; + 1FB9F04222FFC0CF0027737A /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02E22FFC0CF0027737A /* AFNetworkingTests.m */; }; + 1FB9F04322FFC0CF0027737A /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02E22FFC0CF0027737A /* AFNetworkingTests.m */; }; + 1FB9F04422FFC0CF0027737A /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02E22FFC0CF0027737A /* AFNetworkingTests.m */; }; + 1FB9F04522FFC0CF0027737A /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02E22FFC0CF0027737A /* AFNetworkingTests.m */; }; + 1FB9F04622FFC0CF0027737A /* WithContentsOfURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02F22FFC0CF0027737A /* WithContentsOfURLTests.m */; }; + 1FB9F04722FFC0CF0027737A /* WithContentsOfURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02F22FFC0CF0027737A /* WithContentsOfURLTests.m */; }; + 1FB9F04822FFC0CF0027737A /* WithContentsOfURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02F22FFC0CF0027737A /* WithContentsOfURLTests.m */; }; + 1FB9F04922FFC0CF0027737A /* WithContentsOfURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F02F22FFC0CF0027737A /* WithContentsOfURLTests.m */; }; + 1FB9F04A22FFC0CF0027737A /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F03022FFC0CF0027737A /* NSURLConnectionDelegateTests.m */; }; + 1FB9F04B22FFC0CF0027737A /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F03022FFC0CF0027737A /* NSURLConnectionDelegateTests.m */; }; + 1FB9F04C22FFC0CF0027737A /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F03022FFC0CF0027737A /* NSURLConnectionDelegateTests.m */; }; + 1FB9F04D22FFC0CF0027737A /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F03022FFC0CF0027737A /* NSURLConnectionDelegateTests.m */; }; + 1FB9F04E22FFC0CF0027737A /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F03122FFC0CF0027737A /* NilValuesTests.m */; }; + 1FB9F04F22FFC0CF0027737A /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F03122FFC0CF0027737A /* NilValuesTests.m */; }; + 1FB9F05022FFC0CF0027737A /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F03122FFC0CF0027737A /* NilValuesTests.m */; }; + 1FB9F05122FFC0CF0027737A /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FB9F03122FFC0CF0027737A /* NilValuesTests.m */; }; + 1FCC5C9C22FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5C7422FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FCC5C9D22FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5C7422FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FCC5C9E22FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5C7422FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FCC5C9F22FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C7522FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m */; }; + 1FCC5CA022FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C7522FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m */; }; + 1FCC5CA122FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C7522FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m */; }; + 1FCC5CA222FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C7522FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m */; }; + 1FCC5CA322FD95C200472F5B /* HTTPStubs+Mocktail.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5C7822FD95C200472F5B /* HTTPStubs+Mocktail.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FCC5CA422FD95C200472F5B /* HTTPStubs+Mocktail.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5C7822FD95C200472F5B /* HTTPStubs+Mocktail.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FCC5CA522FD95C200472F5B /* HTTPStubs+Mocktail.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCC5C7822FD95C200472F5B /* HTTPStubs+Mocktail.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1FCC5CA622FD95C200472F5B /* HTTPStubs+Mocktail.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C7922FD95C200472F5B /* HTTPStubs+Mocktail.m */; }; + 1FCC5CA722FD95C200472F5B /* HTTPStubs+Mocktail.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C7922FD95C200472F5B /* HTTPStubs+Mocktail.m */; }; + 1FCC5CA822FD95C200472F5B /* HTTPStubs+Mocktail.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C7922FD95C200472F5B /* HTTPStubs+Mocktail.m */; }; + 1FCC5CA922FD95C200472F5B /* HTTPStubs+Mocktail.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C7922FD95C200472F5B /* HTTPStubs+Mocktail.m */; }; + 1FCC5CB922FD95C200472F5B /* OHHTTPStubsSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C8322FD95C200472F5B /* OHHTTPStubsSwift.swift */; }; + 1FCC5CBA22FD95C200472F5B /* OHHTTPStubsSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C8322FD95C200472F5B /* OHHTTPStubsSwift.swift */; }; + 1FCC5CBB22FD95C200472F5B /* OHHTTPStubsSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5C8322FD95C200472F5B /* OHHTTPStubsSwift.swift */; }; + 1FCC5D2122FD95D700472F5B /* emptyfile.json in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE722FD95D700472F5B /* emptyfile.json */; }; + 1FCC5D2222FD95D700472F5B /* emptyfile.json in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE722FD95D700472F5B /* emptyfile.json */; }; + 1FCC5D2322FD95D700472F5B /* emptyfile.json in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE722FD95D700472F5B /* emptyfile.json */; }; + 1FCC5D2422FD95D700472F5B /* emptyfile.json in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE722FD95D700472F5B /* emptyfile.json */; }; + 1FCC5D2522FD95D700472F5B /* empty.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE822FD95D700472F5B /* empty.bundle */; }; + 1FCC5D2622FD95D700472F5B /* empty.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE822FD95D700472F5B /* empty.bundle */; }; + 1FCC5D2722FD95D700472F5B /* empty.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE822FD95D700472F5B /* empty.bundle */; }; + 1FCC5D2822FD95D700472F5B /* empty.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE822FD95D700472F5B /* empty.bundle */; }; + 1FCC5D2A22FD95D700472F5B /* login.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE922FD95D700472F5B /* login.tail */; }; + 1FCC5D2B22FD95D700472F5B /* login.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE922FD95D700472F5B /* login.tail */; }; + 1FCC5D2C22FD95D700472F5B /* login.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CE922FD95D700472F5B /* login.tail */; }; + 1FCC5D2D22FD95D700472F5B /* login_content_type_and_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEA22FD95D700472F5B /* login_content_type_and_headers.tail */; }; + 1FCC5D2E22FD95D700472F5B /* login_content_type_and_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEA22FD95D700472F5B /* login_content_type_and_headers.tail */; }; + 1FCC5D2F22FD95D700472F5B /* login_content_type_and_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEA22FD95D700472F5B /* login_content_type_and_headers.tail */; }; + 1FCC5D3022FD95D700472F5B /* login_content_type_and_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEA22FD95D700472F5B /* login_content_type_and_headers.tail */; }; + 1FCC5D3122FD95D700472F5B /* login_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEB22FD95D700472F5B /* login_headers.tail */; }; + 1FCC5D3222FD95D700472F5B /* login_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEB22FD95D700472F5B /* login_headers.tail */; }; + 1FCC5D3322FD95D700472F5B /* login_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEB22FD95D700472F5B /* login_headers.tail */; }; + 1FCC5D3422FD95D700472F5B /* login_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEB22FD95D700472F5B /* login_headers.tail */; }; + 1FCC5D3522FD95D700472F5B /* login_content_type.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEC22FD95D700472F5B /* login_content_type.tail */; }; + 1FCC5D3622FD95D700472F5B /* login_content_type.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEC22FD95D700472F5B /* login_content_type.tail */; }; + 1FCC5D3722FD95D700472F5B /* login_content_type.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEC22FD95D700472F5B /* login_content_type.tail */; }; + 1FCC5D3822FD95D700472F5B /* login_content_type.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEC22FD95D700472F5B /* login_content_type.tail */; }; + 1FCC5D3A22FD95D700472F5B /* MocktailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEE22FD95D700472F5B /* MocktailTests.m */; }; + 1FCC5D3B22FD95D700472F5B /* MocktailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEE22FD95D700472F5B /* MocktailTests.m */; }; + 1FCC5D3C22FD95D700472F5B /* MocktailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FCC5CEE22FD95D700472F5B /* MocktailTests.m */; }; 27C0764180FF776B29627EB9 /* libPods-TestingPods-OHHTTPStubs iOS Fmk Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 669D2FDD93B6C9E283419C17 /* libPods-TestingPods-OHHTTPStubs iOS Fmk Tests.a */; }; - 46C732961CDAC2DC00CDBCB5 /* login_content_type_and_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 46C732901CDAC2DB00CDBCB5 /* login_content_type_and_headers.tail */; }; - 46C732971CDAC2DC00CDBCB5 /* login_content_type_and_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 46C732901CDAC2DB00CDBCB5 /* login_content_type_and_headers.tail */; }; - 46C732981CDAC2DC00CDBCB5 /* login_content_type_and_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 46C732901CDAC2DB00CDBCB5 /* login_content_type_and_headers.tail */; }; - 46C732991CDAC2DC00CDBCB5 /* login_content_type_and_headers.tail in Resources */ = {isa = PBXBuildFile; fileRef = 46C732901CDAC2DB00CDBCB5 /* login_content_type_and_headers.tail */; }; - 46C7329A1CDAC2DC00CDBCB5 /* login_content_type.tail in Resources */ = {isa = PBXBuildFile; fileRef = 46C732911CDAC2DB00CDBCB5 /* login_content_type.tail */; }; - 46C7329B1CDAC2DC00CDBCB5 /* login_content_type.tail in Resources */ = {isa = PBXBuildFile; fileRef = 46C732911CDAC2DB00CDBCB5 /* login_content_type.tail */; }; - 46C7329C1CDAC2DC00CDBCB5 /* login_content_type.tail in Resources */ = {isa = PBXBuildFile; fileRef = 46C732911CDAC2DB00CDBCB5 /* login_content_type.tail */; }; - 46C7329D1CDAC2DC00CDBCB5 /* login_content_type.tail in Resources */ = {isa = PBXBuildFile; fileRef = 46C732911CDAC2DB00CDBCB5 /* login_content_type.tail */; }; - 47AF337B1A3775B600158C9F /* emptyfile.json in Resources */ = {isa = PBXBuildFile; fileRef = 47AF337A1A37757B00158C9F /* emptyfile.json */; }; - 47AF337C1A3775B600158C9F /* emptyfile.json in Resources */ = {isa = PBXBuildFile; fileRef = 47AF337A1A37757B00158C9F /* emptyfile.json */; }; - 725CD9B41A9EB6F600F84C8B /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A6B1980605A00D175E4 /* OHHTTPStubs.m */; }; - 725CD9B51A9EB6F800F84C8B /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A6F1980606A00D175E4 /* OHHTTPStubsResponse.m */; }; - 725CD9B61A9EB6FA00F84C8B /* OHHTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A711980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m */; }; - 725CD9B71A9EB6FD00F84C8B /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A731980606A00D175E4 /* OHHTTPStubsResponse+JSON.m */; }; - 725CD9B81A9EB70000F84C8B /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A781980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m */; }; - 725CD9B91A9EB71000F84C8B /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A6A1980605A00D175E4 /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 725CD9BA1A9EB71500F84C8B /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A6E1980606A00D175E4 /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 725CD9BB1A9EB71A00F84C8B /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A721980606A00D175E4 /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 725CD9BC1A9EB71D00F84C8B /* OHHTTPStubsResponse+HTTPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A701980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; B1B6E783F3DB19A4DD60CF23 /* libPods-TestingPods-OHHTTPStubs tvOS Fmk Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CA3EE5A02EC251DC1AC3A131 /* libPods-TestingPods-OHHTTPStubs tvOS Fmk Tests.a */; }; - DC4658561CAD192600344232 /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = DC4658541CAD192600344232 /* NSURLRequest+HTTPBodyTesting.m */; }; - DC4658571CAD19A200344232 /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = DC4658541CAD192600344232 /* NSURLRequest+HTTPBodyTesting.m */; }; - DC4658581CAD19A200344232 /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = DC4658541CAD192600344232 /* NSURLRequest+HTTPBodyTesting.m */; }; - DC46585A1CAD19A300344232 /* NSURLRequest+HTTPBodyTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = DC4658541CAD192600344232 /* NSURLRequest+HTTPBodyTesting.m */; }; - DC46585B1CAD245C00344232 /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = DC4658551CAD192600344232 /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DC46585C1CAD245D00344232 /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = DC4658551CAD192600344232 /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DC46585D1CAD245E00344232 /* NSURLRequest+HTTPBodyTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = DC4658551CAD192600344232 /* NSURLRequest+HTTPBodyTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DC46585E1CAD260F00344232 /* NSURLRequest+HTTPBodyTesting.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC4658551CAD192600344232 /* NSURLRequest+HTTPBodyTesting.h */; }; DCC5BE75D7490EBB6625E45C /* libPods-TestingPods-OHHTTPStubs Mac Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F8E695A8205C9F383F637AB /* libPods-TestingPods-OHHTTPStubs Mac Tests.a */; }; EA100ABC1BE15BE400129352 /* OHHTTPStubs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAA436A51BE1598D000E9E99 /* OHHTTPStubs.framework */; }; EA9D27231BE15C740078CAA0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA9D27221BE15C740078CAA0 /* Foundation.framework */; }; - EA9D27241BE15CA00078CAA0 /* empty.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 221C34A61B0CCF9D00FCA8FF /* empty.bundle */; }; - EA9D27251BE15CA00078CAA0 /* emptyfile.json in Resources */ = {isa = PBXBuildFile; fileRef = 47AF337A1A37757B00158C9F /* emptyfile.json */; }; - EA9D27261BE15CA00078CAA0 /* login.tail in Resources */ = {isa = PBXBuildFile; fileRef = 1D0F8E7F1B6E31A70049A7D2 /* login.tail */; }; - EA9D27271BE15CA00078CAA0 /* MocktailFolder in Resources */ = {isa = PBXBuildFile; fileRef = 1D0F8E811B6E31B00049A7D2 /* MocktailFolder */; }; - EA9D27281BE15CB50078CAA0 /* AFNetworkingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981481980668E00807DBE /* AFNetworkingTests.m */; }; - EA9D27291BE15CB50078CAA0 /* MocktailTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D0F8E7D1B6E31850049A7D2 /* MocktailTests.m */; }; - EA9D272A1BE15CB50078CAA0 /* NilValuesTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 095981491980668E00807DBE /* NilValuesTests.m */; }; - EA9D272B1BE15CB50078CAA0 /* NSURLConnectionDelegateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814A1980668E00807DBE /* NSURLConnectionDelegateTests.m */; }; - EA9D272C1BE15CB50078CAA0 /* NSURLConnectionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814B1980668E00807DBE /* NSURLConnectionTests.m */; }; - EA9D272D1BE15CB50078CAA0 /* NSURLSessionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814C1980668E00807DBE /* NSURLSessionTests.m */; }; - EA9D272E1BE15CB50078CAA0 /* OHPathHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 221C34A41B0CCF0600FCA8FF /* OHPathHelpersTests.m */; }; - EA9D272F1BE15CB50078CAA0 /* TimingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814D1980668E00807DBE /* TimingTests.m */; }; - EA9D27301BE15CB50078CAA0 /* WithContentsOfURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0959814E1980668E00807DBE /* WithContentsOfURLTests.m */; }; - EA9D27311BE15CB50078CAA0 /* SwiftHelpersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 095925D51BAEC00200DD7F0B /* SwiftHelpersTests.swift */; }; - EAA4368F1BE1598D000E9E99 /* OHHTTPStubs.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A6B1980605A00D175E4 /* OHHTTPStubs.m */; }; - EAA436901BE1598D000E9E99 /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A781980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m */; }; - EAA436911BE1598D000E9E99 /* OHHTTPStubs+Mocktail.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D6DB84F1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.m */; }; - EAA436921BE1598D000E9E99 /* OHHTTPStubsResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A6F1980606A00D175E4 /* OHHTTPStubsResponse.m */; }; - EAA436931BE1598D000E9E99 /* OHHTTPStubsResponse+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A731980606A00D175E4 /* OHHTTPStubsResponse+JSON.m */; }; - EAA436941BE1598D000E9E99 /* OHHTTPStubsResponse+HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 09110A711980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m */; }; - EAA436951BE1598D000E9E99 /* OHHTTPStubsSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0955699A1B90E4EA00503ADC /* OHHTTPStubsSwift.swift */; }; - EAA436961BE1598D000E9E99 /* OHPathHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 095B1AD41AE30BA7009D1B56 /* OHPathHelpers.m */; }; - EAA436991BE1598D000E9E99 /* Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 09D0D2981B67FED3004E7213 /* Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EAA4369A1BE1598D000E9E99 /* OHHTTPStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A6A1980605A00D175E4 /* OHHTTPStubs.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EAA4369B1BE1598D000E9E99 /* OHHTTPStubsResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A6E1980606A00D175E4 /* OHHTTPStubsResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EAA4369C1BE1598D000E9E99 /* OHHTTPStubsResponse+JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A721980606A00D175E4 /* OHHTTPStubsResponse+JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EAA4369D1BE1598D000E9E99 /* OHHTTPStubsResponse+HTTPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 09110A701980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EAA4369E1BE1598D000E9E99 /* OHHTTPStubs+Mocktail.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D6DB84E1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EAA4369F1BE1598D000E9E99 /* OHPathHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 095B1AD31AE30BA7009D1B56 /* OHPathHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EAA436A01BE1598D000E9E99 /* OHHTTPStubsUmbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -206,14 +198,6 @@ dstPath = "include/$(PRODUCT_NAME)"; dstSubfolderSpec = 16; files = ( - DC46585E1CAD260F00344232 /* NSURLRequest+HTTPBodyTesting.h in CopyFiles */, - 09D0D29B1B67FF06004E7213 /* Compatibility.h in CopyFiles */, - 095981FC19806AF300807DBE /* OHHTTPStubs.h in CopyFiles */, - 095981FD19806AF300807DBE /* OHHTTPStubsResponse.h in CopyFiles */, - 095981FF19806AF300807DBE /* OHHTTPStubsResponse+JSON.h in CopyFiles */, - 095981FE19806AF300807DBE /* OHHTTPStubsResponse+HTTPMessage.h in CopyFiles */, - 094906DC1B7F60D100B047DA /* OHHTTPStubs+Mocktail.h in CopyFiles */, - 094906DD1B7F60D100B047DA /* OHPathHelpers.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -225,54 +209,55 @@ 09110A4419805F4800D175E4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 09110A5119805F4800D175E4 /* OHHTTPStubs iOS Lib Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OHHTTPStubs iOS Lib Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 09110A5219805F4800D175E4 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 09110A6A1980605A00D175E4 /* OHHTTPStubs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OHHTTPStubs.h; sourceTree = ""; }; - 09110A6B1980605A00D175E4 /* OHHTTPStubs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OHHTTPStubs.m; sourceTree = ""; }; - 09110A6E1980606A00D175E4 /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OHHTTPStubsResponse.h; sourceTree = ""; }; - 09110A6F1980606A00D175E4 /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OHHTTPStubsResponse.m; sourceTree = ""; }; - 09110A701980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubsResponse+HTTPMessage.h"; sourceTree = ""; }; - 09110A711980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubsResponse+HTTPMessage.m"; sourceTree = ""; }; - 09110A721980606A00D175E4 /* OHHTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubsResponse+JSON.h"; sourceTree = ""; }; - 09110A731980606A00D175E4 /* OHHTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubsResponse+JSON.m"; sourceTree = ""; }; - 09110A781980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; - 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OHHTTPStubsUmbrella.h; sourceTree = ""; }; - 09199FCE1BD974E80014376D /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; - 093442DC1B80EC3B00A91535 /* OHHTTPStubs iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OHHTTPStubs iOS-Info.plist"; sourceTree = ""; }; 093442F91B80EC4A00A91535 /* OHHTTPStubs iOS Fmk Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OHHTTPStubs iOS Fmk Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 0955699A1B90E4EA00503ADC /* OHHTTPStubsSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OHHTTPStubsSwift.swift; sourceTree = ""; }; - 095925D51BAEC00200DD7F0B /* SwiftHelpersTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftHelpersTests.swift; sourceTree = ""; }; - 095981451980657C00807DBE /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "UnitTests-Info.plist"; sourceTree = ""; }; - 095981471980665400807DBE /* UnitTests-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UnitTests-Prefix.pch"; sourceTree = ""; }; - 095981481980668E00807DBE /* AFNetworkingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkingTests.m; sourceTree = ""; }; - 095981491980668E00807DBE /* NilValuesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NilValuesTests.m; sourceTree = ""; }; - 0959814A1980668E00807DBE /* NSURLConnectionDelegateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLConnectionDelegateTests.m; sourceTree = ""; }; - 0959814B1980668E00807DBE /* NSURLConnectionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLConnectionTests.m; sourceTree = ""; }; - 0959814C1980668E00807DBE /* NSURLSessionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLSessionTests.m; sourceTree = ""; }; - 0959814D1980668E00807DBE /* TimingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TimingTests.m; sourceTree = ""; }; - 0959814E1980668E00807DBE /* WithContentsOfURLTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WithContentsOfURLTests.m; sourceTree = ""; }; 0959819819806A4200807DBE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 0959819919806A4200807DBE /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 0959819A19806A4200807DBE /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 095981C219806A7900807DBE /* OHHTTPStubs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 095981C619806A7900807DBE /* OHHTTPStubs Mac-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OHHTTPStubs Mac-Info.plist"; sourceTree = ""; }; 095981D219806A7900807DBE /* OHHTTPStubs Mac Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OHHTTPStubs Mac Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 095B1AD31AE30BA7009D1B56 /* OHPathHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OHPathHelpers.h; sourceTree = ""; }; - 095B1AD41AE30BA7009D1B56 /* OHPathHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OHPathHelpers.m; sourceTree = ""; }; - 09D0D2981B67FED3004E7213 /* Compatibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compatibility.h; sourceTree = ""; }; - 09E993A71DBE939C0071EECC /* login_headers.tail */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = login_headers.tail; sourceTree = ""; }; - 1B5632EE1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OHHTTPStubsMethodSwizzling.h; sourceTree = ""; }; - 1B5632EF1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OHHTTPStubsMethodSwizzling.m; sourceTree = ""; }; - 1D0F8E7D1B6E31850049A7D2 /* MocktailTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MocktailTests.m; sourceTree = ""; }; - 1D0F8E7F1B6E31A70049A7D2 /* login.tail */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = login.tail; sourceTree = ""; }; - 1D0F8E811B6E31B00049A7D2 /* MocktailFolder */ = {isa = PBXFileReference; lastKnownFileType = folder; path = MocktailFolder; sourceTree = ""; }; - 1D6DB84E1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OHHTTPStubs+Mocktail.h"; sourceTree = ""; }; - 1D6DB84F1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "OHHTTPStubs+Mocktail.m"; sourceTree = ""; }; + 1F462BB722FD96C6000B7253 /* MocktailFolder */ = {isa = PBXFileReference; lastKnownFileType = folder; path = MocktailFolder; sourceTree = ""; }; + 1F51F12322FE4C53003463C1 /* SwiftHelpersTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftHelpersTests.swift; sourceTree = ""; }; + 1FB9EFE822FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURLRequest+HTTPBodyTesting.m"; sourceTree = ""; }; + 1FB9EFE922FFBE670027737A /* HTTPStubsMethodSwizzling.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPStubsMethodSwizzling.m; sourceTree = ""; }; + 1FB9EFEA22FFBE670027737A /* HTTPStubsPathHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPStubsPathHelpers.m; sourceTree = ""; }; + 1FB9EFEB22FFBE670027737A /* HTTPStubs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPStubs.m; sourceTree = ""; }; + 1FB9EFED22FFBE670027737A /* Compatibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compatibility.h; sourceTree = ""; }; + 1FB9EFEE22FFBE670027737A /* HTTPStubsResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPStubsResponse.h; sourceTree = ""; }; + 1FB9EFEF22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURLRequest+HTTPBodyTesting.h"; sourceTree = ""; }; + 1FB9EFF022FFBE670027737A /* HTTPStubsPathHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPStubsPathHelpers.h; sourceTree = ""; }; + 1FB9EFF122FFBE670027737A /* HTTPStubs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPStubs.h; sourceTree = ""; }; + 1FB9EFF222FFBE670027737A /* HTTPStubsResponse+JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HTTPStubsResponse+JSON.h"; sourceTree = ""; }; + 1FB9EFF322FFBE670027737A /* HTTPStubsResponse+JSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HTTPStubsResponse+JSON.m"; sourceTree = ""; }; + 1FB9EFF422FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HTTPStubs+NSURLSessionConfiguration.m"; sourceTree = ""; }; + 1FB9EFF522FFBE670027737A /* HTTPStubsMethodSwizzling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPStubsMethodSwizzling.h; sourceTree = ""; }; + 1FB9EFF622FFBE670027737A /* HTTPStubsResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTTPStubsResponse.m; sourceTree = ""; }; + 1FB9F02A22FFC0CF0027737A /* NSURLConnectionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLConnectionTests.m; sourceTree = ""; }; + 1FB9F02B22FFC0CF0027737A /* NSURLSessionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLSessionTests.m; sourceTree = ""; }; + 1FB9F02C22FFC0CF0027737A /* TimingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TimingTests.m; sourceTree = ""; }; + 1FB9F02D22FFC0CF0027737A /* OHPathHelpersTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OHPathHelpersTests.m; sourceTree = ""; }; + 1FB9F02E22FFC0CF0027737A /* AFNetworkingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkingTests.m; sourceTree = ""; }; + 1FB9F02F22FFC0CF0027737A /* WithContentsOfURLTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WithContentsOfURLTests.m; sourceTree = ""; }; + 1FB9F03022FFC0CF0027737A /* NSURLConnectionDelegateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSURLConnectionDelegateTests.m; sourceTree = ""; }; + 1FB9F03122FFC0CF0027737A /* NilValuesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NilValuesTests.m; sourceTree = ""; }; + 1FCC5C7422FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HTTPStubsResponse+HTTPMessage.h"; sourceTree = ""; }; + 1FCC5C7522FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HTTPStubsResponse+HTTPMessage.m"; sourceTree = ""; }; + 1FCC5C7822FD95C200472F5B /* HTTPStubs+Mocktail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HTTPStubs+Mocktail.h"; sourceTree = ""; }; + 1FCC5C7922FD95C200472F5B /* HTTPStubs+Mocktail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HTTPStubs+Mocktail.m"; sourceTree = ""; }; + 1FCC5C8322FD95C200472F5B /* OHHTTPStubsSwift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OHHTTPStubsSwift.swift; sourceTree = ""; }; + 1FCC5CCF22FD95CC00472F5B /* OHHTTPStubs Mac-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OHHTTPStubs Mac-Info.plist"; sourceTree = ""; }; + 1FCC5CD022FD95CC00472F5B /* OHHTTPStubs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OHHTTPStubs.h; sourceTree = ""; }; + 1FCC5CD122FD95CC00472F5B /* OHHTTPStubs iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OHHTTPStubs iOS-Info.plist"; sourceTree = ""; }; + 1FCC5CD422FD95D700472F5B /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "UnitTests-Info.plist"; sourceTree = ""; }; + 1FCC5CDC22FD95D700472F5B /* UnitTests-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UnitTests-Prefix.pch"; sourceTree = ""; }; + 1FCC5CE722FD95D700472F5B /* emptyfile.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = emptyfile.json; sourceTree = ""; }; + 1FCC5CE822FD95D700472F5B /* empty.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = empty.bundle; sourceTree = ""; }; + 1FCC5CE922FD95D700472F5B /* login.tail */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = login.tail; sourceTree = ""; }; + 1FCC5CEA22FD95D700472F5B /* login_content_type_and_headers.tail */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = login_content_type_and_headers.tail; sourceTree = ""; }; + 1FCC5CEB22FD95D700472F5B /* login_headers.tail */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = login_headers.tail; sourceTree = ""; }; + 1FCC5CEC22FD95D700472F5B /* login_content_type.tail */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = login_content_type.tail; sourceTree = ""; }; + 1FCC5CEE22FD95D700472F5B /* MocktailTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MocktailTests.m; sourceTree = ""; }; 1FE7BADB223157DB00FFF120 /* OHHTTPStubsProject.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = OHHTTPStubsProject.xcconfig; sourceTree = ""; }; - 221C34A41B0CCF0600FCA8FF /* OHPathHelpersTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OHPathHelpersTests.m; sourceTree = ""; }; - 221C34A61B0CCF9D00FCA8FF /* empty.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = empty.bundle; sourceTree = ""; }; 451243C1FC2A423646391951 /* Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests/Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.debug.xcconfig"; sourceTree = ""; }; - 46C732901CDAC2DB00CDBCB5 /* login_content_type_and_headers.tail */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = login_content_type_and_headers.tail; sourceTree = ""; }; - 46C732911CDAC2DB00CDBCB5 /* login_content_type.tail */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = login_content_type.tail; sourceTree = ""; }; - 47AF337A1A37757B00158C9F /* emptyfile.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = emptyfile.json; sourceTree = ""; }; 4F8E695A8205C9F383F637AB /* libPods-TestingPods-OHHTTPStubs Mac Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TestingPods-OHHTTPStubs Mac Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 655D2E61F142E992FA46C016 /* Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.release.xcconfig"; sourceTree = ""; }; 669D2FDD93B6C9E283419C17 /* libPods-TestingPods-OHHTTPStubs iOS Fmk Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TestingPods-OHHTTPStubs iOS Fmk Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -281,8 +266,6 @@ 8506514BF475EFA0F5BB9452 /* libPods-TestingPods-OHHTTPStubs iOS Lib Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TestingPods-OHHTTPStubs iOS Lib Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; A19D7C7DF9A479562786D4AD /* Pods-TestingPods-OHHTTPStubs iOS Lib Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestingPods-OHHTTPStubs iOS Lib Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs iOS Lib Tests/Pods-TestingPods-OHHTTPStubs iOS Lib Tests.debug.xcconfig"; sourceTree = ""; }; CA3EE5A02EC251DC1AC3A131 /* libPods-TestingPods-OHHTTPStubs tvOS Fmk Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TestingPods-OHHTTPStubs tvOS Fmk Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - DC4658541CAD192600344232 /* NSURLRequest+HTTPBodyTesting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURLRequest+HTTPBodyTesting.m"; sourceTree = ""; }; - DC4658551CAD192600344232 /* NSURLRequest+HTTPBodyTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURLRequest+HTTPBodyTesting.h"; sourceTree = ""; }; E8D14171F5CFC33738E0F6A0 /* Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests/Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.debug.xcconfig"; sourceTree = ""; }; EA100AB71BE15BE400129352 /* OHHTTPStubs tvOS Fmk Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OHHTTPStubs tvOS Fmk Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; EA9D27221BE15C740078CAA0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; @@ -370,9 +353,8 @@ isa = PBXGroup; children = ( 1FE7BADB223157DB00FFF120 /* OHHTTPStubsProject.xcconfig */, - 09110A4619805F4800D175E4 /* OHHTTPStubs */, - 095981C519806A7900807DBE /* Supporting Files */, - 09110A5A19805F4800D175E4 /* UnitTests */, + 1FCC5C6A22FD95C200472F5B /* Sources */, + 1FCC5CD322FD95D700472F5B /* Tests */, 09110A4319805F4800D175E4 /* Frameworks */, 09110A4219805F4800D175E4 /* Products */, 71E7CDE1C6A8345F6C70E7D1 /* Pods */, @@ -411,167 +393,175 @@ name = Frameworks; sourceTree = ""; }; - 09110A4619805F4800D175E4 /* OHHTTPStubs */ = { + 0959819719806A4200807DBE /* Other Frameworks */ = { isa = PBXGroup; children = ( - 09D0D2981B67FED3004E7213 /* Compatibility.h */, - 09199FCD1BD9744C0014376D /* OHHTTPStubs */, - 09110A6D1980605D00D175E4 /* OHHTTPStubsResponse */, - 09110A771980607200D175E4 /* NSURLSession Support */, - 1D6DB84D1B763B7A00FCF855 /* Mocktail */, - 093443011B80F88700A91535 /* OHPathHelpers */, - 095569991B90E4EA00503ADC /* Swift */, + 0959819819806A4200807DBE /* Foundation.framework */, + 0959819919806A4200807DBE /* CoreData.framework */, + 0959819A19806A4200807DBE /* AppKit.framework */, ); - name = OHHTTPStubs; - path = Sources; + name = "Other Frameworks"; sourceTree = ""; }; - 09110A5A19805F4800D175E4 /* UnitTests */ = { + 1F462BBD22FD9765000B7253 /* Supporting Files */ = { isa = PBXGroup; children = ( - 47AF33791A37755E00158C9F /* Fixtures */, - 095981461980663000807DBE /* Test Suites */, - 09110A5B19805F4800D175E4 /* Supporting Files */, + 1FCC5CD422FD95D700472F5B /* UnitTests-Info.plist */, + 1FCC5CDC22FD95D700472F5B /* UnitTests-Prefix.pch */, ); - path = UnitTests; + path = "Supporting Files"; sourceTree = ""; }; - 09110A5B19805F4800D175E4 /* Supporting Files */ = { + 1F51F12222FE4C53003463C1 /* OHHTTPStubsSwiftTests */ = { isa = PBXGroup; children = ( - 095981471980665400807DBE /* UnitTests-Prefix.pch */, - 095981451980657C00807DBE /* UnitTests-Info.plist */, + 1F51F12322FE4C53003463C1 /* SwiftHelpersTests.swift */, ); - name = "Supporting Files"; - sourceTree = ""; + name = OHHTTPStubsSwiftTests; + path = Tests/OHHTTPStubsSwiftTests; + sourceTree = SOURCE_ROOT; }; - 09110A6D1980605D00D175E4 /* OHHTTPStubsResponse */ = { + 1FB9EFE722FFBE670027737A /* OHHTTPStubs */ = { isa = PBXGroup; children = ( - 09110A6E1980606A00D175E4 /* OHHTTPStubsResponse.h */, - 09110A6F1980606A00D175E4 /* OHHTTPStubsResponse.m */, - 093442FF1B80F85700A91535 /* JSON */, - 093442FE1B80F84800A91535 /* HTTPMessage */, + 1FB9EFE822FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m */, + 1FB9EFE922FFBE670027737A /* HTTPStubsMethodSwizzling.m */, + 1FB9EFEA22FFBE670027737A /* HTTPStubsPathHelpers.m */, + 1FB9EFEB22FFBE670027737A /* HTTPStubs.m */, + 1FB9EFEC22FFBE670027737A /* include */, + 1FB9EFF322FFBE670027737A /* HTTPStubsResponse+JSON.m */, + 1FB9EFF422FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m */, + 1FB9EFF522FFBE670027737A /* HTTPStubsMethodSwizzling.h */, + 1FB9EFF622FFBE670027737A /* HTTPStubsResponse.m */, ); - name = OHHTTPStubsResponse; + name = OHHTTPStubs; + path = Sources/OHHTTPStubs; + sourceTree = SOURCE_ROOT; + }; + 1FB9EFEC22FFBE670027737A /* include */ = { + isa = PBXGroup; + children = ( + 1FB9EFED22FFBE670027737A /* Compatibility.h */, + 1FB9EFEE22FFBE670027737A /* HTTPStubsResponse.h */, + 1FB9EFEF22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h */, + 1FB9EFF022FFBE670027737A /* HTTPStubsPathHelpers.h */, + 1FB9EFF122FFBE670027737A /* HTTPStubs.h */, + 1FB9EFF222FFBE670027737A /* HTTPStubsResponse+JSON.h */, + ); + path = include; sourceTree = ""; }; - 09110A771980607200D175E4 /* NSURLSession Support */ = { + 1FB9F02922FFC0CF0027737A /* OHHTTPStubsTests */ = { isa = PBXGroup; children = ( - 1B5632EE1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h */, - 1B5632EF1CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m */, - DC4658551CAD192600344232 /* NSURLRequest+HTTPBodyTesting.h */, - DC4658541CAD192600344232 /* NSURLRequest+HTTPBodyTesting.m */, - 09110A781980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m */, - ); - name = "NSURLSession Support"; - path = NSURLSession; + 1FB9F02A22FFC0CF0027737A /* NSURLConnectionTests.m */, + 1FB9F02B22FFC0CF0027737A /* NSURLSessionTests.m */, + 1FB9F02C22FFC0CF0027737A /* TimingTests.m */, + 1FB9F02D22FFC0CF0027737A /* OHPathHelpersTests.m */, + 1FB9F02E22FFC0CF0027737A /* AFNetworkingTests.m */, + 1FB9F02F22FFC0CF0027737A /* WithContentsOfURLTests.m */, + 1FB9F03022FFC0CF0027737A /* NSURLConnectionDelegateTests.m */, + 1FB9F03122FFC0CF0027737A /* NilValuesTests.m */, + ); + path = OHHTTPStubsTests; sourceTree = ""; }; - 09199FCD1BD9744C0014376D /* OHHTTPStubs */ = { + 1FCC5C6A22FD95C200472F5B /* Sources */ = { isa = PBXGroup; children = ( - 09110A6A1980605A00D175E4 /* OHHTTPStubs.h */, - 09110A6B1980605A00D175E4 /* OHHTTPStubs.m */, + 1FCC5C7222FD95C200472F5B /* HTTPMessage */, + 1FCC5C7622FD95C200472F5B /* Mocktail */, + 1FB9EFE722FFBE670027737A /* OHHTTPStubs */, + 1FCC5C8222FD95C200472F5B /* OHHTTPStubsSwift */, + 1FCC5CCE22FD95CC00472F5B /* Supporting Files */, ); - name = OHHTTPStubs; + path = Sources; sourceTree = ""; }; - 093442FE1B80F84800A91535 /* HTTPMessage */ = { + 1FCC5C7222FD95C200472F5B /* HTTPMessage */ = { isa = PBXGroup; children = ( - 09110A701980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.h */, - 09110A711980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m */, + 1FCC5C7322FD95C200472F5B /* include */, + 1FCC5C7522FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m */, ); path = HTTPMessage; sourceTree = ""; }; - 093442FF1B80F85700A91535 /* JSON */ = { + 1FCC5C7322FD95C200472F5B /* include */ = { isa = PBXGroup; children = ( - 09110A721980606A00D175E4 /* OHHTTPStubsResponse+JSON.h */, - 09110A731980606A00D175E4 /* OHHTTPStubsResponse+JSON.m */, + 1FCC5C7422FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h */, ); - path = JSON; + path = include; sourceTree = ""; }; - 093443011B80F88700A91535 /* OHPathHelpers */ = { + 1FCC5C7622FD95C200472F5B /* Mocktail */ = { isa = PBXGroup; children = ( - 095B1AD31AE30BA7009D1B56 /* OHPathHelpers.h */, - 095B1AD41AE30BA7009D1B56 /* OHPathHelpers.m */, + 1FCC5C7722FD95C200472F5B /* include */, + 1FCC5C7922FD95C200472F5B /* HTTPStubs+Mocktail.m */, ); - path = OHPathHelpers; + path = Mocktail; sourceTree = ""; }; - 095569991B90E4EA00503ADC /* Swift */ = { + 1FCC5C7722FD95C200472F5B /* include */ = { isa = PBXGroup; children = ( - 0955699A1B90E4EA00503ADC /* OHHTTPStubsSwift.swift */, + 1FCC5C7822FD95C200472F5B /* HTTPStubs+Mocktail.h */, ); - path = Swift; + path = include; sourceTree = ""; }; - 095981461980663000807DBE /* Test Suites */ = { + 1FCC5C8222FD95C200472F5B /* OHHTTPStubsSwift */ = { isa = PBXGroup; children = ( - 095981481980668E00807DBE /* AFNetworkingTests.m */, - 1D0F8E7D1B6E31850049A7D2 /* MocktailTests.m */, - 095981491980668E00807DBE /* NilValuesTests.m */, - 0959814A1980668E00807DBE /* NSURLConnectionDelegateTests.m */, - 0959814B1980668E00807DBE /* NSURLConnectionTests.m */, - 0959814C1980668E00807DBE /* NSURLSessionTests.m */, - 221C34A41B0CCF0600FCA8FF /* OHPathHelpersTests.m */, - 0959814D1980668E00807DBE /* TimingTests.m */, - 0959814E1980668E00807DBE /* WithContentsOfURLTests.m */, - 095925D51BAEC00200DD7F0B /* SwiftHelpersTests.swift */, - ); - path = "Test Suites"; + 1FCC5C8322FD95C200472F5B /* OHHTTPStubsSwift.swift */, + ); + path = OHHTTPStubsSwift; sourceTree = ""; }; - 0959819719806A4200807DBE /* Other Frameworks */ = { + 1FCC5CCE22FD95CC00472F5B /* Supporting Files */ = { isa = PBXGroup; children = ( - 0959819819806A4200807DBE /* Foundation.framework */, - 0959819919806A4200807DBE /* CoreData.framework */, - 0959819A19806A4200807DBE /* AppKit.framework */, + 1FCC5CCF22FD95CC00472F5B /* OHHTTPStubs Mac-Info.plist */, + 1FCC5CD022FD95CC00472F5B /* OHHTTPStubs.h */, + 1FCC5CD122FD95CC00472F5B /* OHHTTPStubs iOS-Info.plist */, ); - name = "Other Frameworks"; + path = "Supporting Files"; sourceTree = ""; }; - 095981C519806A7900807DBE /* Supporting Files */ = { + 1FCC5CD322FD95D700472F5B /* Tests */ = { isa = PBXGroup; children = ( - 09199FCC1BD973800014376D /* OHHTTPStubsUmbrella.h */, - 09199FCE1BD974E80014376D /* module.modulemap */, - 093442DC1B80EC3B00A91535 /* OHHTTPStubs iOS-Info.plist */, - 095981C619806A7900807DBE /* OHHTTPStubs Mac-Info.plist */, + 1FCC5CE222FD95D700472F5B /* Fixtures */, + 1FCC5CED22FD95D700472F5B /* MocktailTests */, + 1FB9F02922FFC0CF0027737A /* OHHTTPStubsTests */, + 1F51F12222FE4C53003463C1 /* OHHTTPStubsSwiftTests */, + 1F462BBD22FD9765000B7253 /* Supporting Files */, ); - path = "Supporting Files"; + path = Tests; sourceTree = ""; }; - 1D6DB84D1B763B7A00FCF855 /* Mocktail */ = { + 1FCC5CE222FD95D700472F5B /* Fixtures */ = { isa = PBXGroup; children = ( - 1D6DB84E1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.h */, - 1D6DB84F1B763B7A00FCF855 /* OHHTTPStubs+Mocktail.m */, + 1FCC5CE722FD95D700472F5B /* emptyfile.json */, + 1FCC5CE822FD95D700472F5B /* empty.bundle */, + 1FCC5CE922FD95D700472F5B /* login.tail */, + 1FCC5CEA22FD95D700472F5B /* login_content_type_and_headers.tail */, + 1FCC5CEB22FD95D700472F5B /* login_headers.tail */, + 1FCC5CEC22FD95D700472F5B /* login_content_type.tail */, + 1F462BB722FD96C6000B7253 /* MocktailFolder */, ); - path = Mocktail; + path = Fixtures; sourceTree = ""; }; - 47AF33791A37755E00158C9F /* Fixtures */ = { + 1FCC5CED22FD95D700472F5B /* MocktailTests */ = { isa = PBXGroup; children = ( - 1D0F8E7F1B6E31A70049A7D2 /* login.tail */, - 09E993A71DBE939C0071EECC /* login_headers.tail */, - 46C732911CDAC2DB00CDBCB5 /* login_content_type.tail */, - 46C732901CDAC2DB00CDBCB5 /* login_content_type_and_headers.tail */, - 221C34A61B0CCF9D00FCA8FF /* empty.bundle */, - 47AF337A1A37757B00158C9F /* emptyfile.json */, - 1D0F8E811B6E31B00049A7D2 /* MocktailFolder */, + 1FCC5CEE22FD95D700472F5B /* MocktailTests.m */, ); - path = Fixtures; + path = MocktailTests; sourceTree = ""; }; 71E7CDE1C6A8345F6C70E7D1 /* Pods */ = { @@ -596,16 +586,16 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 09D0D29A1B67FED3004E7213 /* Compatibility.h in Headers */, - 095981FB19806AB700807DBE /* OHHTTPStubs.h in Headers */, - 0959820019806B1700807DBE /* OHHTTPStubsResponse.h in Headers */, - 0959820219806B2200807DBE /* OHHTTPStubsResponse+JSON.h in Headers */, - 0959820119806B1E00807DBE /* OHHTTPStubsResponse+HTTPMessage.h in Headers */, - 094906DF1B7F60EE00B047DA /* OHHTTPStubs+Mocktail.h in Headers */, - 095B1AD71AE3138C009D1B56 /* OHPathHelpers.h in Headers */, - DC46585C1CAD245D00344232 /* NSURLRequest+HTTPBodyTesting.h in Headers */, - 1B5632F11CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h in Headers */, - 09199FD01BD974F20014376D /* OHHTTPStubsUmbrella.h in Headers */, + 1FB9F00822FFBE670027737A /* Compatibility.h in Headers */, + 1FB9F01422FFBE670027737A /* HTTPStubs.h in Headers */, + 1FB9F00B22FFBE670027737A /* HTTPStubsResponse.h in Headers */, + 1FB9F01722FFBE670027737A /* HTTPStubsResponse+JSON.h in Headers */, + 1FCC5C9D22FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h in Headers */, + 1FCC5CA422FD95C200472F5B /* HTTPStubs+Mocktail.h in Headers */, + 1FB9F01122FFBE670027737A /* HTTPStubsPathHelpers.h in Headers */, + 1FB9F00E22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h in Headers */, + 1F462BBF22FD9B8F000B7253 /* OHHTTPStubs.h in Headers */, + 1FB9F02222FFBE670027737A /* HTTPStubsMethodSwizzling.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -613,16 +603,16 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 09D0D2991B67FED3004E7213 /* Compatibility.h in Headers */, - 725CD9B91A9EB71000F84C8B /* OHHTTPStubs.h in Headers */, - 725CD9BA1A9EB71500F84C8B /* OHHTTPStubsResponse.h in Headers */, - 725CD9BB1A9EB71A00F84C8B /* OHHTTPStubsResponse+JSON.h in Headers */, - 725CD9BC1A9EB71D00F84C8B /* OHHTTPStubsResponse+HTTPMessage.h in Headers */, - 094906DE1B7F60E200B047DA /* OHHTTPStubs+Mocktail.h in Headers */, - 095B1AD61AE3138C009D1B56 /* OHPathHelpers.h in Headers */, - DC46585B1CAD245C00344232 /* NSURLRequest+HTTPBodyTesting.h in Headers */, - 1B5632F01CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h in Headers */, - 09199FCF1BD974F10014376D /* OHHTTPStubsUmbrella.h in Headers */, + 1FB9F00722FFBE670027737A /* Compatibility.h in Headers */, + 1FB9F01322FFBE670027737A /* HTTPStubs.h in Headers */, + 1FB9F00A22FFBE670027737A /* HTTPStubsResponse.h in Headers */, + 1FB9F01622FFBE670027737A /* HTTPStubsResponse+JSON.h in Headers */, + 1FCC5C9C22FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h in Headers */, + 1FCC5CA322FD95C200472F5B /* HTTPStubs+Mocktail.h in Headers */, + 1FB9F01022FFBE670027737A /* HTTPStubsPathHelpers.h in Headers */, + 1FB9F00D22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h in Headers */, + 1FB9F02822FFBFB00027737A /* OHHTTPStubs.h in Headers */, + 1FB9F02122FFBE670027737A /* HTTPStubsMethodSwizzling.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -630,16 +620,16 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - EAA436991BE1598D000E9E99 /* Compatibility.h in Headers */, - EAA4369A1BE1598D000E9E99 /* OHHTTPStubs.h in Headers */, - EAA4369B1BE1598D000E9E99 /* OHHTTPStubsResponse.h in Headers */, - EAA4369C1BE1598D000E9E99 /* OHHTTPStubsResponse+JSON.h in Headers */, - EAA4369D1BE1598D000E9E99 /* OHHTTPStubsResponse+HTTPMessage.h in Headers */, - EAA4369E1BE1598D000E9E99 /* OHHTTPStubs+Mocktail.h in Headers */, - EAA4369F1BE1598D000E9E99 /* OHPathHelpers.h in Headers */, - DC46585D1CAD245E00344232 /* NSURLRequest+HTTPBodyTesting.h in Headers */, - 1B5632F21CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.h in Headers */, - EAA436A01BE1598D000E9E99 /* OHHTTPStubsUmbrella.h in Headers */, + 1FB9F00922FFBE670027737A /* Compatibility.h in Headers */, + 1FB9F01522FFBE670027737A /* HTTPStubs.h in Headers */, + 1FB9F00C22FFBE670027737A /* HTTPStubsResponse.h in Headers */, + 1FB9F01822FFBE670027737A /* HTTPStubsResponse+JSON.h in Headers */, + 1FCC5C9E22FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.h in Headers */, + 1FCC5CA522FD95C200472F5B /* HTTPStubs+Mocktail.h in Headers */, + 1FB9F01222FFBE670027737A /* HTTPStubsPathHelpers.h in Headers */, + 1FB9F00F22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.h in Headers */, + 1F462BC022FD9CC8000B7253 /* OHHTTPStubs.h in Headers */, + 1FB9F02322FFBE670027737A /* HTTPStubsMethodSwizzling.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -854,13 +844,13 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 46C732961CDAC2DC00CDBCB5 /* login_content_type_and_headers.tail in Resources */, - 47AF337B1A3775B600158C9F /* emptyfile.json in Resources */, - 09E993A81DBE939C0071EECC /* login_headers.tail in Resources */, - 221C34A71B0CCF9D00FCA8FF /* empty.bundle in Resources */, - 1D0F8E821B6E31B00049A7D2 /* MocktailFolder in Resources */, - 1D0F8E801B6E31A70049A7D2 /* login.tail in Resources */, - 46C7329A1CDAC2DC00CDBCB5 /* login_content_type.tail in Resources */, + 1FCC5D2D22FD95D700472F5B /* login_content_type_and_headers.tail in Resources */, + 1FCC5D2122FD95D700472F5B /* emptyfile.json in Resources */, + 1FCC5D3122FD95D700472F5B /* login_headers.tail in Resources */, + 1FCC5D2522FD95D700472F5B /* empty.bundle in Resources */, + 1F462BB822FD96C6000B7253 /* MocktailFolder in Resources */, + 1F462BBC22FD96FF000B7253 /* login.tail in Resources */, + 1FCC5D3522FD95D700472F5B /* login_content_type.tail in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -868,13 +858,13 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 46C732971CDAC2DC00CDBCB5 /* login_content_type_and_headers.tail in Resources */, - 093442F11B80EC4A00A91535 /* emptyfile.json in Resources */, - 09E993A91DBE939C0071EECC /* login_headers.tail in Resources */, - 093442F21B80EC4A00A91535 /* empty.bundle in Resources */, - 093442F31B80EC4A00A91535 /* MocktailFolder in Resources */, - 093442F41B80EC4A00A91535 /* login.tail in Resources */, - 46C7329B1CDAC2DC00CDBCB5 /* login_content_type.tail in Resources */, + 1FCC5D2E22FD95D700472F5B /* login_content_type_and_headers.tail in Resources */, + 1FCC5D2222FD95D700472F5B /* emptyfile.json in Resources */, + 1FCC5D3222FD95D700472F5B /* login_headers.tail in Resources */, + 1FCC5D2622FD95D700472F5B /* empty.bundle in Resources */, + 1F462BB922FD96C6000B7253 /* MocktailFolder in Resources */, + 1FCC5D2A22FD95D700472F5B /* login.tail in Resources */, + 1FCC5D3622FD95D700472F5B /* login_content_type.tail in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -889,13 +879,13 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 46C732981CDAC2DC00CDBCB5 /* login_content_type_and_headers.tail in Resources */, - 094906D91B7F523500B047DA /* MocktailFolder in Resources */, - 09E993AA1DBE939C0071EECC /* login_headers.tail in Resources */, - 47AF337C1A3775B600158C9F /* emptyfile.json in Resources */, - 221C34A81B0CCF9D00FCA8FF /* empty.bundle in Resources */, - 094906DA1B7F523900B047DA /* login.tail in Resources */, - 46C7329C1CDAC2DC00CDBCB5 /* login_content_type.tail in Resources */, + 1FCC5D2F22FD95D700472F5B /* login_content_type_and_headers.tail in Resources */, + 1F462BBA22FD96C6000B7253 /* MocktailFolder in Resources */, + 1FCC5D3322FD95D700472F5B /* login_headers.tail in Resources */, + 1FCC5D2322FD95D700472F5B /* emptyfile.json in Resources */, + 1FCC5D2722FD95D700472F5B /* empty.bundle in Resources */, + 1FCC5D2B22FD95D700472F5B /* login.tail in Resources */, + 1FCC5D3722FD95D700472F5B /* login_content_type.tail in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -910,13 +900,13 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 46C732991CDAC2DC00CDBCB5 /* login_content_type_and_headers.tail in Resources */, - EA9D27241BE15CA00078CAA0 /* empty.bundle in Resources */, - 09E993AB1DBE939C0071EECC /* login_headers.tail in Resources */, - EA9D27251BE15CA00078CAA0 /* emptyfile.json in Resources */, - EA9D27261BE15CA00078CAA0 /* login.tail in Resources */, - EA9D27271BE15CA00078CAA0 /* MocktailFolder in Resources */, - 46C7329D1CDAC2DC00CDBCB5 /* login_content_type.tail in Resources */, + 1FCC5D3022FD95D700472F5B /* login_content_type_and_headers.tail in Resources */, + 1FCC5D2822FD95D700472F5B /* empty.bundle in Resources */, + 1FCC5D3422FD95D700472F5B /* login_headers.tail in Resources */, + 1FCC5D2422FD95D700472F5B /* emptyfile.json in Resources */, + 1FCC5D2C22FD95D700472F5B /* login.tail in Resources */, + 1F462BBB22FD96C6000B7253 /* MocktailFolder in Resources */, + 1FCC5D3822FD95D700472F5B /* login_content_type.tail in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1009,15 +999,15 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DC4658561CAD192600344232 /* NSURLRequest+HTTPBodyTesting.m in Sources */, - 1B5632F31CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m in Sources */, - 09110A6C1980605A00D175E4 /* OHHTTPStubs.m in Sources */, - 09110A791980608600D175E4 /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */, - 1D6DB8501B763B7A00FCF855 /* OHHTTPStubs+Mocktail.m in Sources */, - 09110A741980606A00D175E4 /* OHHTTPStubsResponse.m in Sources */, - 09110A761980606A00D175E4 /* OHHTTPStubsResponse+JSON.m in Sources */, - 09110A751980606A00D175E4 /* OHHTTPStubsResponse+HTTPMessage.m in Sources */, - 095B1AD51AE30BA7009D1B56 /* OHPathHelpers.m in Sources */, + 1FB9EFF722FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m in Sources */, + 1FB9EFFB22FFBE670027737A /* HTTPStubsMethodSwizzling.m in Sources */, + 1FB9F00322FFBE670027737A /* HTTPStubs.m in Sources */, + 1FB9F01D22FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m in Sources */, + 1FCC5CA622FD95C200472F5B /* HTTPStubs+Mocktail.m in Sources */, + 1FB9F02422FFBE670027737A /* HTTPStubsResponse.m in Sources */, + 1FB9F01922FFBE670027737A /* HTTPStubsResponse+JSON.m in Sources */, + 1FCC5C9F22FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m in Sources */, + 1FB9EFFF22FFBE670027737A /* HTTPStubsPathHelpers.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1025,15 +1015,15 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 0959818D1980682E00807DBE /* TimingTests.m in Sources */, - 221C34A51B0CCF0600FCA8FF /* OHPathHelpersTests.m in Sources */, - 0959818A1980682E00807DBE /* NSURLConnectionDelegateTests.m in Sources */, - 0959818E1980682E00807DBE /* WithContentsOfURLTests.m in Sources */, - 095981881980682800807DBE /* AFNetworkingTests.m in Sources */, - 1D0F8E7E1B6E31850049A7D2 /* MocktailTests.m in Sources */, - 0959818C1980682E00807DBE /* NSURLSessionTests.m in Sources */, - 0959818B1980682E00807DBE /* NSURLConnectionTests.m in Sources */, - 095981891980682E00807DBE /* NilValuesTests.m in Sources */, + 1FB9F03A22FFC0CF0027737A /* TimingTests.m in Sources */, + 1FB9F03E22FFC0CF0027737A /* OHPathHelpersTests.m in Sources */, + 1FB9F04A22FFC0CF0027737A /* NSURLConnectionDelegateTests.m in Sources */, + 1FB9F04622FFC0CF0027737A /* WithContentsOfURLTests.m in Sources */, + 1FB9F04222FFC0CF0027737A /* AFNetworkingTests.m in Sources */, + 1F462BB322FD9671000B7253 /* MocktailTests.m in Sources */, + 1FB9F03622FFC0CF0027737A /* NSURLSessionTests.m in Sources */, + 1FB9F03222FFC0CF0027737A /* NSURLConnectionTests.m in Sources */, + 1FB9F04E22FFC0CF0027737A /* NilValuesTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1041,16 +1031,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 093442E21B80EC4A00A91535 /* TimingTests.m in Sources */, - 093442E31B80EC4A00A91535 /* OHPathHelpersTests.m in Sources */, - 093442E41B80EC4A00A91535 /* NSURLConnectionDelegateTests.m in Sources */, - 095925D61BAEC00200DD7F0B /* SwiftHelpersTests.swift in Sources */, - 093442E51B80EC4A00A91535 /* WithContentsOfURLTests.m in Sources */, - 093442E61B80EC4A00A91535 /* AFNetworkingTests.m in Sources */, - 093442E71B80EC4A00A91535 /* MocktailTests.m in Sources */, - 093442E81B80EC4A00A91535 /* NSURLSessionTests.m in Sources */, - 093442E91B80EC4A00A91535 /* NSURLConnectionTests.m in Sources */, - 093442EA1B80EC4A00A91535 /* NilValuesTests.m in Sources */, + 1FB9F03B22FFC0CF0027737A /* TimingTests.m in Sources */, + 1FB9F03F22FFC0CF0027737A /* OHPathHelpersTests.m in Sources */, + 1FB9F04B22FFC0CF0027737A /* NSURLConnectionDelegateTests.m in Sources */, + 1F51F12422FE4D48003463C1 /* SwiftHelpersTests.swift in Sources */, + 1FB9F04722FFC0CF0027737A /* WithContentsOfURLTests.m in Sources */, + 1FB9F04322FFC0CF0027737A /* AFNetworkingTests.m in Sources */, + 1FCC5D3A22FD95D700472F5B /* MocktailTests.m in Sources */, + 1FB9F03722FFC0CF0027737A /* NSURLSessionTests.m in Sources */, + 1FB9F03322FFC0CF0027737A /* NSURLConnectionTests.m in Sources */, + 1FB9F04F22FFC0CF0027737A /* NilValuesTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1058,16 +1048,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 095981F619806AAC00807DBE /* OHHTTPStubs.m in Sources */, - 095981FA19806AAC00807DBE /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */, - 094906D81B7F520200B047DA /* OHHTTPStubs+Mocktail.m in Sources */, - 1B5632F51CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m in Sources */, - 095981F719806AAC00807DBE /* OHHTTPStubsResponse.m in Sources */, - 095981F919806AAC00807DBE /* OHHTTPStubsResponse+JSON.m in Sources */, - 095981F819806AAC00807DBE /* OHHTTPStubsResponse+HTTPMessage.m in Sources */, - 0501A1A81C63E0C600B120AE /* OHHTTPStubsSwift.swift in Sources */, - 095B1AD91AE31396009D1B56 /* OHPathHelpers.m in Sources */, - DC4658581CAD19A200344232 /* NSURLRequest+HTTPBodyTesting.m in Sources */, + 1FB9F00522FFBE670027737A /* HTTPStubs.m in Sources */, + 1FB9F01F22FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m in Sources */, + 1FCC5CA822FD95C200472F5B /* HTTPStubs+Mocktail.m in Sources */, + 1FB9EFFD22FFBE670027737A /* HTTPStubsMethodSwizzling.m in Sources */, + 1FB9F02622FFBE670027737A /* HTTPStubsResponse.m in Sources */, + 1FB9F01B22FFBE670027737A /* HTTPStubsResponse+JSON.m in Sources */, + 1FCC5CA122FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m in Sources */, + 1FCC5CBA22FD95C200472F5B /* OHHTTPStubsSwift.swift in Sources */, + 1FB9F00122FFBE670027737A /* HTTPStubsPathHelpers.m in Sources */, + 1FB9EFF922FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1075,16 +1065,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 095981F119806AA200807DBE /* NSURLConnectionTests.m in Sources */, - 094906D61B7F4D7100B047DA /* MocktailTests.m in Sources */, - 095981F319806AA200807DBE /* TimingTests.m in Sources */, - 0501A1A91C63E64600B120AE /* SwiftHelpersTests.swift in Sources */, - 221C34A91B0CCFF200FCA8FF /* OHPathHelpersTests.m in Sources */, - 095981F419806AA200807DBE /* WithContentsOfURLTests.m in Sources */, - 095981EF19806AA200807DBE /* NilValuesTests.m in Sources */, - 094906DB1B7F527A00B047DA /* AFNetworkingTests.m in Sources */, - 095981F219806AA200807DBE /* NSURLSessionTests.m in Sources */, - 095981F019806AA200807DBE /* NSURLConnectionDelegateTests.m in Sources */, + 1FB9F03422FFC0CF0027737A /* NSURLConnectionTests.m in Sources */, + 1FCC5D3B22FD95D700472F5B /* MocktailTests.m in Sources */, + 1FB9F03C22FFC0CF0027737A /* TimingTests.m in Sources */, + 1F51F12522FE52CA003463C1 /* SwiftHelpersTests.swift in Sources */, + 1FB9F04022FFC0CF0027737A /* OHPathHelpersTests.m in Sources */, + 1FB9F04822FFC0CF0027737A /* WithContentsOfURLTests.m in Sources */, + 1FB9F05022FFC0CF0027737A /* NilValuesTests.m in Sources */, + 1FB9F04422FFC0CF0027737A /* AFNetworkingTests.m in Sources */, + 1FB9F03822FFC0CF0027737A /* NSURLSessionTests.m in Sources */, + 1FB9F04C22FFC0CF0027737A /* NSURLConnectionDelegateTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1092,16 +1082,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 725CD9B41A9EB6F600F84C8B /* OHHTTPStubs.m in Sources */, - 725CD9B81A9EB70000F84C8B /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */, - 094906D71B7F520200B047DA /* OHHTTPStubs+Mocktail.m in Sources */, - 1B5632F41CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m in Sources */, - 725CD9B51A9EB6F800F84C8B /* OHHTTPStubsResponse.m in Sources */, - 725CD9B71A9EB6FD00F84C8B /* OHHTTPStubsResponse+JSON.m in Sources */, - 725CD9B61A9EB6FA00F84C8B /* OHHTTPStubsResponse+HTTPMessage.m in Sources */, - 09199FD11BD98D1C0014376D /* OHHTTPStubsSwift.swift in Sources */, - 095B1AD81AE31395009D1B56 /* OHPathHelpers.m in Sources */, - DC4658571CAD19A200344232 /* NSURLRequest+HTTPBodyTesting.m in Sources */, + 1FB9F00422FFBE670027737A /* HTTPStubs.m in Sources */, + 1FB9F01E22FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m in Sources */, + 1FCC5CA722FD95C200472F5B /* HTTPStubs+Mocktail.m in Sources */, + 1FB9EFFC22FFBE670027737A /* HTTPStubsMethodSwizzling.m in Sources */, + 1FB9F02522FFBE670027737A /* HTTPStubsResponse.m in Sources */, + 1FB9F01A22FFBE670027737A /* HTTPStubsResponse+JSON.m in Sources */, + 1FCC5CA022FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m in Sources */, + 1FCC5CB922FD95C200472F5B /* OHHTTPStubsSwift.swift in Sources */, + 1FB9F00022FFBE670027737A /* HTTPStubsPathHelpers.m in Sources */, + 1FB9EFF822FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1109,16 +1099,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - EA9D272A1BE15CB50078CAA0 /* NilValuesTests.m in Sources */, - EA9D27301BE15CB50078CAA0 /* WithContentsOfURLTests.m in Sources */, - EA9D272D1BE15CB50078CAA0 /* NSURLSessionTests.m in Sources */, - EA9D27311BE15CB50078CAA0 /* SwiftHelpersTests.swift in Sources */, - EA9D272E1BE15CB50078CAA0 /* OHPathHelpersTests.m in Sources */, - EA9D272F1BE15CB50078CAA0 /* TimingTests.m in Sources */, - EA9D272C1BE15CB50078CAA0 /* NSURLConnectionTests.m in Sources */, - EA9D27281BE15CB50078CAA0 /* AFNetworkingTests.m in Sources */, - EA9D27291BE15CB50078CAA0 /* MocktailTests.m in Sources */, - EA9D272B1BE15CB50078CAA0 /* NSURLConnectionDelegateTests.m in Sources */, + 1FB9F05122FFC0CF0027737A /* NilValuesTests.m in Sources */, + 1FB9F04922FFC0CF0027737A /* WithContentsOfURLTests.m in Sources */, + 1FB9F03922FFC0CF0027737A /* NSURLSessionTests.m in Sources */, + 1F51F12622FE52D0003463C1 /* SwiftHelpersTests.swift in Sources */, + 1FB9F04122FFC0CF0027737A /* OHPathHelpersTests.m in Sources */, + 1FB9F03D22FFC0CF0027737A /* TimingTests.m in Sources */, + 1FB9F04D22FFC0CF0027737A /* NSURLConnectionDelegateTests.m in Sources */, + 1FB9F04522FFC0CF0027737A /* AFNetworkingTests.m in Sources */, + 1FCC5D3C22FD95D700472F5B /* MocktailTests.m in Sources */, + 1FB9F03522FFC0CF0027737A /* NSURLConnectionTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1126,16 +1116,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - EAA4368F1BE1598D000E9E99 /* OHHTTPStubs.m in Sources */, - EAA436901BE1598D000E9E99 /* OHHTTPStubs+NSURLSessionConfiguration.m in Sources */, - EAA436911BE1598D000E9E99 /* OHHTTPStubs+Mocktail.m in Sources */, - 1B5632F61CB2A9C200388C9B /* OHHTTPStubsMethodSwizzling.m in Sources */, - EAA436921BE1598D000E9E99 /* OHHTTPStubsResponse.m in Sources */, - EAA436931BE1598D000E9E99 /* OHHTTPStubsResponse+JSON.m in Sources */, - EAA436941BE1598D000E9E99 /* OHHTTPStubsResponse+HTTPMessage.m in Sources */, - EAA436951BE1598D000E9E99 /* OHHTTPStubsSwift.swift in Sources */, - EAA436961BE1598D000E9E99 /* OHPathHelpers.m in Sources */, - DC46585A1CAD19A300344232 /* NSURLRequest+HTTPBodyTesting.m in Sources */, + 1FB9F00622FFBE670027737A /* HTTPStubs.m in Sources */, + 1FB9F02022FFBE670027737A /* HTTPStubs+NSURLSessionConfiguration.m in Sources */, + 1FCC5CA922FD95C200472F5B /* HTTPStubs+Mocktail.m in Sources */, + 1FB9EFFE22FFBE670027737A /* HTTPStubsMethodSwizzling.m in Sources */, + 1FB9F02722FFBE670027737A /* HTTPStubsResponse.m in Sources */, + 1FB9F01C22FFBE670027737A /* HTTPStubsResponse+JSON.m in Sources */, + 1FCC5CA222FD95C200472F5B /* HTTPStubsResponse+HTTPMessage.m in Sources */, + 1FCC5CBB22FD95C200472F5B /* OHHTTPStubsSwift.swift in Sources */, + 1FB9F00222FFBE670027737A /* HTTPStubsPathHelpers.m in Sources */, + 1FB9EFFA22FFBE670027737A /* NSURLRequest+HTTPBodyTesting.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1218,11 +1208,11 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "$(SRCROOT)/Supporting Files/module.modulemap"; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; }; name = Debug; @@ -1273,11 +1263,11 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.9; - MODULEMAP_FILE = "$(SRCROOT)/Supporting Files/module.modulemap"; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; }; @@ -1310,12 +1300,12 @@ baseConfigurationReference = A19D7C7DF9A479562786D4AD /* Pods-TestingPods-OHHTTPStubs iOS Lib Tests.debug.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "UnitTests/UnitTests-Prefix.pch"; + GCC_PREFIX_HEADER = "Tests/Supporting Files/UnitTests-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", "OHHTTPSTUBS_USE_STATIC_LIBRARY=1", ); - INFOPLIST_FILE = "UnitTests/UnitTests-Info.plist"; + INFOPLIST_FILE = "Tests/Supporting Files/UnitTests-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_LDFLAGS = ( "$(inherited)", @@ -1332,13 +1322,13 @@ baseConfigurationReference = 6AE736FB5D3930C8263AAF4D /* Pods-TestingPods-OHHTTPStubs iOS Lib Tests.release.xcconfig */; buildSettings = { GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "UnitTests/UnitTests-Prefix.pch"; + GCC_PREFIX_HEADER = "Tests/Supporting Files/UnitTests-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", "COCOAPODS=1", "OHHTTPSTUBS_USE_STATIC_LIBRARY=1", ); - INFOPLIST_FILE = "UnitTests/UnitTests-Info.plist"; + INFOPLIST_FILE = "Tests/Supporting Files/UnitTests-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_LDFLAGS = ( "$(inherited)", @@ -1354,6 +1344,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 451243C1FC2A423646391951 /* Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -1361,8 +1352,8 @@ "$(DEVELOPER_FRAMEWORKS_DIR)", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "UnitTests/UnitTests-Prefix.pch"; - INFOPLIST_FILE = "UnitTests/UnitTests-Info.plist"; + GCC_PREFIX_HEADER = "Tests/Supporting Files/UnitTests-Prefix.pch"; + INFOPLIST_FILE = "Tests/Supporting Files/UnitTests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -1379,6 +1370,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = F976A15FC6C27BA51150B691 /* Pods-TestingPods-OHHTTPStubs iOS Fmk Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -1386,8 +1378,8 @@ "$(DEVELOPER_FRAMEWORKS_DIR)", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "UnitTests/UnitTests-Prefix.pch"; - INFOPLIST_FILE = "UnitTests/UnitTests-Info.plist"; + GCC_PREFIX_HEADER = "Tests/Supporting Files/UnitTests-Prefix.pch"; + INFOPLIST_FILE = "Tests/Supporting Files/UnitTests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -1413,7 +1405,7 @@ ); FRAMEWORK_VERSION = A; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - INFOPLIST_FILE = "Supporting Files/OHHTTPStubs Mac-Info.plist"; + INFOPLIST_FILE = "Sources/Supporting Files/OHHTTPStubs Mac-Info.plist"; INSTALL_PATH = "@rpath"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.alisoftware.${PRODUCT_NAME:rfc1034identifier}"; @@ -1437,7 +1429,7 @@ ); FRAMEWORK_VERSION = A; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - INFOPLIST_FILE = "Supporting Files/OHHTTPStubs Mac-Info.plist"; + INFOPLIST_FILE = "Sources/Supporting Files/OHHTTPStubs Mac-Info.plist"; INSTALL_PATH = "@rpath"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.alisoftware.${PRODUCT_NAME:rfc1034identifier}"; @@ -1452,6 +1444,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = FADAD1A74682F410A97EE06F /* Pods-TestingPods-OHHTTPStubs Mac Tests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -1460,7 +1453,7 @@ ); GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "UnitTests/UnitTests-Prefix.pch"; + GCC_PREFIX_HEADER = "Tests/Supporting Files/UnitTests-Prefix.pch"; LD_RUNPATH_SEARCH_PATHS = "$inherited @executable_path/../Frameworks @loader_path/../Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -1476,6 +1469,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 070E9B74647A6F3AE67C97A7 /* Pods-TestingPods-OHHTTPStubs Mac Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -1485,7 +1479,7 @@ ); GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "UnitTests/UnitTests-Prefix.pch"; + GCC_PREFIX_HEADER = "Tests/Supporting Files/UnitTests-Prefix.pch"; LD_RUNPATH_SEARCH_PATHS = "$inherited @executable_path/../Frameworks @loader_path/../Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", @@ -1507,14 +1501,13 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = "Supporting Files/OHHTTPStubs iOS-Info.plist"; + INFOPLIST_FILE = "Sources/Supporting Files/OHHTTPStubs iOS-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.alisoftware.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = OHHTTPStubs; SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -1527,7 +1520,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = "Supporting Files/OHHTTPStubs iOS-Info.plist"; + INFOPLIST_FILE = "Sources/Supporting Files/OHHTTPStubs iOS-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; @@ -1535,7 +1528,6 @@ PRODUCT_NAME = OHHTTPStubs; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; @@ -1543,17 +1535,19 @@ isa = XCBuildConfiguration; baseConfigurationReference = E8D14171F5CFC33738E0F6A0 /* Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "UnitTests/UnitTests-Info.plist"; + INFOPLIST_FILE = "Tests/Supporting Files/UnitTests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "alisoftware.OHHTTPStubs-tvOS-Fmk-Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = 3; }; name = Debug; }; @@ -1561,18 +1555,20 @@ isa = XCBuildConfiguration; baseConfigurationReference = 655D2E61F142E992FA46C016 /* Pods-TestingPods-OHHTTPStubs tvOS Fmk Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "UnitTests/UnitTests-Info.plist"; + INFOPLIST_FILE = "Tests/Supporting Files/UnitTests-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "alisoftware.OHHTTPStubs-tvOS-Fmk-Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = 3; }; name = Release; }; @@ -1585,7 +1581,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = "Supporting Files/OHHTTPStubs iOS-Info.plist"; + INFOPLIST_FILE = "Sources/Supporting Files/OHHTTPStubs iOS-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; @@ -1593,6 +1589,7 @@ PRODUCT_NAME = OHHTTPStubs; SDKROOT = appletvos; SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; }; name = Debug; }; @@ -1605,7 +1602,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = "Supporting Files/OHHTTPStubs iOS-Info.plist"; + INFOPLIST_FILE = "Sources/Supporting Files/OHHTTPStubs iOS-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; @@ -1614,6 +1611,7 @@ SDKROOT = appletvos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = 3; }; name = Release; }; diff --git a/OHHTTPStubs/OHHTTPStubs.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/OHHTTPStubs.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from OHHTTPStubs/OHHTTPStubs.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to OHHTTPStubs.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs Mac Framework.xcscheme b/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs Mac Framework.xcscheme similarity index 100% rename from OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs Mac Framework.xcscheme rename to OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs Mac Framework.xcscheme diff --git a/OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS Framework.xcscheme b/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS Framework.xcscheme similarity index 100% rename from OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS Framework.xcscheme rename to OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS Framework.xcscheme diff --git a/OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS StaticLib.xcscheme b/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS StaticLib.xcscheme similarity index 100% rename from OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS StaticLib.xcscheme rename to OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs iOS StaticLib.xcscheme diff --git a/OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs tvOS Framework.xcscheme b/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs tvOS Framework.xcscheme similarity index 100% rename from OHHTTPStubs/OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs tvOS Framework.xcscheme rename to OHHTTPStubs.xcodeproj/xcshareddata/xcschemes/OHHTTPStubs tvOS Framework.xcscheme diff --git a/OHHTTPStubs/OHHTTPStubs.xcworkspace/contents.xcworkspacedata b/OHHTTPStubs.xcworkspace/contents.xcworkspacedata similarity index 63% rename from OHHTTPStubs/OHHTTPStubs.xcworkspace/contents.xcworkspacedata rename to OHHTTPStubs.xcworkspace/contents.xcworkspacedata index e62b177a..b09d4698 100644 --- a/OHHTTPStubs/OHHTTPStubs.xcworkspace/contents.xcworkspacedata +++ b/OHHTTPStubs.xcworkspace/contents.xcworkspacedata @@ -5,23 +5,26 @@ location = "container:" name = "Pod Metadata"> + location = "group:OHHTTPStubs.podspec"> + location = "group:CHANGELOG.md"> + location = "group:README.md"> + location = "group:.travis.yml"> + location = "group:LICENSE"> + + In Objective-C ```objc -[OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { +[HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return [request.URL.host isEqualToString:@"mywebservice.com"]; -} withStubResponse:^OHHTTPStubsResponse*(NSURLRequest *request) { +} withStubResponse:^HTTPStubsResponse*(NSURLRequest *request) { // Stub it with our "wsresponse.json" stub file (which is in same bundle as self) NSString* fixture = OHPathForFile(@"wsresponse.json", self.class); - return [OHHTTPStubsResponse responseWithFileAtPath:fixture + return [HTTPStubsResponse responseWithFileAtPath:fixture statusCode:200 headers:@{@"Content-Type":@"application/json"}]; }]; ``` @@ -44,7 +47,7 @@ It works with `NSURLConnection`, `NSURLSession`, `AFNetworking`, `Alamofire` or
In Swift -This example is using the Swift helpers found in `OHHTTPStubsSwift.swift` provided by the `OHHTTPStubs/Swift` subspec. +This example is using the Swift helpers found in `OHHTTPStubsSwift.swift` provided by the `OHHTTPStubs/Swift` subspec or `OHHTTPStubs` package. ```swift stub(condition: isHost("mywebservice.com")) { _ in @@ -54,7 +57,7 @@ stub(condition: isHost("mywebservice.com")) { _ in } ``` -**Note**: if you're using `OHHTTPStubs`'s Swiftier API (`OHHTTPStubsSwift.swift` and the `Swift` subspec), you can also compose the matcher functions like this: `stub(isScheme("http") && isHost("myhost")) { … }` +**Note**: if you're using `OHHTTPStubs`'s Swiftier API (`OHHTTPStubsSwift.swift` and the `Swift` subspec or `OHTTPStubsSwift` package), you can also compose the matcher functions like this: `stub(isScheme("http") && isHost("myhost")) { … }`
## More examples & Help Topics @@ -73,10 +76,19 @@ _(There are also other ways to perform a similar task, including using `curl -is * `OHHTTPStubs` is compatible with **iOS5+**, **OS X 10.7+**, **tvOS**. * `OHHTTPStubs` also works with `NSURLSession` as well as any network library wrapping them. -* `OHHTTPStubs` is **fully compatible with Swift 3.x, 4.x and Swift 5.0**. +* `OHHTTPStubs` is **fully compatible with Swift 3.x, 4.x and Swift 5.x**. _[Nullability annotations](https://developer.apple.com/swift/blog/?id=25) have also been added to the ObjC API to allow a cleaner API when used from Swift even if you don't use the dedicated Swift API wrapper provided by `OHHTTPStubsSwift.swift`._ +
+Updating to Version 9.0+ + +* All classes dropped the `OH` prefix (`OHHHTTPStubs` -> `HTTPStubs`, `OHHTTPStubsResponse` -> `HTTPStubsResponse`, etc). +* The `OHPathHelpers` class was renamed `HTTPStubsPathHelpers`. +* No method and module names were changed. +
+ + # Installing in your projects ## CocoaPods @@ -118,17 +130,24 @@ Here's a list of which subspecs are included for each of the different lines you +## Swift Package Manager + +`OHHTTPStubs` is compatible with Swift Package Manager, and provides 2 targets for consumption: `OHHTTPStubs` and `OHHTTPStubsSwift`. + +* `OHHTTPStubs` is equivalent to the `OHHTTPStubs` subspec. +* `OHHTTPStubsSwift` is equivalent to the `OHHTTPStubs/Swift` subspec. + +_Note: We currently do not have support for the HTTPMessage or Mocktail subspecs in Swift Package Manager. If you are interested in these, please open an issue to explain your needs._ + ## Carthage `OHHTTPStubs` is also compatible with Carthage. Just add it to your `Cartfile`. _Note: The `OHHTTPStubs.framework` built with Carthage will include **all** features of `OHHTTPStubs` turned on (in other words, all subspecs of the pod), including `NSURLSession` and `JSON` support, `OHPathHelpers`, `HTTPMessage` and `Mocktail` support, and the Swiftier API._ -> Be warned that I don't personally use Carthage, so I won't be able to guarantee much help/support for it. - ## Using the right Swift version for your project -`OHHTTPStubs` supports Swift 3.0 (Xcode 8+), Swift 3.1 (Xcode 8.3+), Swift 3.2 (Xcode 9.0+), Swift 4.0 (Xcode 9.0+), Swift 4.1 (Xcode 9.3+), Swift 4.2 (Xcode 10+) and Swift 5.0 (Xcode 10.2), however we are only testing Swift 4.x (using Xcode 9.1 and 10.1) and Swift 5.x (using Xcode 10.2) in CI. +`OHHTTPStubs` supports Swift 3.0 (Xcode 8+), Swift 3.1 (Xcode 8.3+), Swift 3.2 (Xcode 9.0+), Swift 4.0 (Xcode 9.0+), Swift 4.1 (Xcode 9.3+), Swift 4.2 (Xcode 10+), Swift 5.0 (Xcode 10.2), and Swift 5.1 (Xcode 11) however we are only testing Swift 4.x (using Xcode 9.1 and 10.1) and Swift 5.x (using Xcode 10.2 AND 11) in CI. Here are some details about the correct setup you need depending on how you integrated `OHHTTPStubs` into your project. @@ -147,6 +166,7 @@ The project is set up with `SWIFT_VERSION=5.0` on `master`. This means that the framework on `master` will build using: +* Swift 5.1 on Xcode 11 * Swift 5.0 on Xcode 10.2 * Swift 4.2 on Xcode 10.1 * Swift 4.0 on Xcode 9.1 @@ -156,6 +176,7 @@ If you want Carthage to build the framework with Swift 3.x you can: * either use an older Xcode version * or use the previous version of `OHHTTPStubs` (6.2.0) — whose `master` branch uses `3.0` * or fork the repo just to change the `SWIFT_VERSION` build setting to `3.0` + * or build the framework passing a `SWIFT_VERSION` to carthage via `XCODE_XCCONFIG_FILE= carthage build` @@ -165,7 +186,7 @@ If you want Carthage to build the framework with Swift 3.x you can: `OHHTTPStubs` is ideal to write unit tests that normally would perform network requests. But if you use it in your unit tests, don't forget to: -* remove any stubs you installed after each test — to avoid those stubs to still be installed when executing the next Test Case — by calling `[OHHTTPStubs removeAllStubs]` in your `tearDown` method. [see this wiki page for more info](https://github.com/AliSoftware/OHHTTPStubs/wiki/Remove-stubs-after-each-test) +* remove any stubs you installed after each test — to avoid those stubs to still be installed when executing the next Test Case — by calling `[HTTPStubs removeAllStubs]` in your `tearDown` method. [see this wiki page for more info](https://github.com/AliSoftware/OHHTTPStubs/wiki/Remove-stubs-after-each-test) * be sure to wait until the request has received its response before doing your assertions and letting the test case finish (like for any asynchronous test). [see this wiki page for more info](https://github.com/AliSoftware/OHHTTPStubs/wiki/OHHTTPStubs-and-asynchronous-tests) ## Automatic loading @@ -173,15 +194,15 @@ If you want Carthage to build the framework with Swift 3.x you can: `OHHTTPStubs` is automatically loaded and installed (at the time the library is loaded in memory), both for: * requests made using `NSURLConnection` or `[NSURLSession sharedSession]` — [thanks to this code](https://github.com/AliSoftware/OHHTTPStubs/blob/master/OHHTTPStubs/Sources/OHHTTPStubs.m#L107-L113) -* requests made using a `NSURLSession` that was created via `[NSURLSession sessionWithConfiguration:…]` and using either `[NSURLSessionConfiguration defaultSessionConfiguration]` or `[NSURLSessionConfiguration ephemeralSessionConfiguration]` configuration — thanks to [method swizzling](http://nshipster.com/method-swizzling/) done [here in the code](https://github.com/AliSoftware/OHHTTPStubs/blob/master/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m). +* requests made using a `NSURLSession` that was created via `[NSURLSession sessionWithConfiguration:…]` and using either `[NSURLSessionConfiguration defaultSessionConfiguration]` or `[NSURLSessionConfiguration ephemeralSessionConfiguration]` configuration — thanks to [method swizzling](http://nshipster.com/method-swizzling/) done [here in the code](https://github.com/AliSoftware/OHHTTPStubs/blob/master/OHHTTPStubs/Sources/NSURLSession/HTTPStubs+NSURLSessionConfiguration.m). -If you need to disable (and re-enable) `OHHTTPStubs` — globally or per `NSURLSession` — you can use `[OHHTTPStubs setEnabled:]` / `[OHHTTPStubs setEnabled:forSessionConfiguration:]`. +If you need to disable (and re-enable) `OHHTTPStubs` — globally or per `NSURLSession` — you can use `[HTTPStubs setEnabled:]` / `[HTTPStubs setEnabled:forSessionConfiguration:]`. ## Known limitations * `OHHTTPStubs` **can't work on background sessions** (sessions created using `[NSURLSessionConfiguration backgroundSessionConfiguration]`) because background sessions don't allow the use of custom `NSURLProtocols` and are handled by the iOS Operating System itself. * `OHHTTPStubs` don't simulate data upload. The `NSURLProtocolClient` `@protocol` does not provide a way to signal the delegate that data has been **sent** (only that some has been loaded), so any data in the `HTTPBody` or `HTTPBodyStream` of an `NSURLRequest`, or data provided to `-[NSURLSession uploadTaskWithRequest:fromData:];` will be ignored, and more importantly, the `-URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:` delegate method will never be called when you stub the request using `OHHTTPStubs`. -* `OHTTPStubs` **has a known issue with redirects** that we believe is an Apple bug. It has been discussed [here](https://github.com/AliSoftware/OHHTTPStubs/issues/230) and [here](https://github.com/AliSoftware/OHHTTPStubs/issues/280). The actual result of this bug is that redirects with a zero second delay may undeterministically end up with a null response. +* `OHTTPStubs` **has a known issue with redirects** that we believe is an Apple bug. It has been discussed [here](https://github.com/AliSoftware/OHHTTPStubs/issues/230) and [here](https://github.com/AliSoftware/OHHTTPStubs/issues/280). The actual result of this bug is that redirects with a zero second delay may nondeterministically end up with a null response. _As far as I know, there's nothing we can do about those three limitations. Please let me know if you know a solution that would make that possible anyway._ diff --git a/Rakefile b/Rakefile index 4f1edc37..d62d6164 100644 --- a/Rakefile +++ b/Rakefile @@ -1,8 +1,8 @@ # Build & test OHHTTPStubs lib from the CLI desc 'Build an iOS scheme' -task :ios, [:scheme, :ios_version, :action, :additional_args] do |_,args| - destination = "name=iPhone 7,OS=#{args.ios_version}" +task :ios, [:scheme, :device, :ios_version, :action, :additional_args] do |_,args| + destination = "name=#{args.device},OS=#{args.ios_version}" build("OHHTTPStubs #{args.scheme}", "iphonesimulator", destination, args.action, args.additional_args) end @@ -18,12 +18,52 @@ task :tvos, [:scheme, :tvos_version, :action, :additional_args] do |_,args| build("OHHTTPStubs #{args.scheme}", "appletvsimulator", destination, args.action, args.additional_args) end +desc 'Test Using Swift Package Manager' +task :spm_test do + sh 'swift test -Xcc -DOHHTTPSTUBS_SKIP_REDIRECT_TESTS' +end desc 'List installed simulators' task :simlist do sh 'xcrun simctl list' end +desc 'Build Example Project' +task :build_example_apps do + build_pod_example("Examples/ObjC") + build_pod_example("Examples/Swift") + build_project("Examples/SwiftPackageManager") +end + +desc 'Build Carthage Frameworks' +task :build_carthage_frameworks, [:platform, :swift_version] do |_,args| + puts "Args were: #{args}" + carthage_build(args.platform, args.swift_version) +end + +# Updates Local Pods, Then Builds +def build_pod_example(dir) + sh "pod install --project-directory=#{dir} --verbose" + build_workspace(dir) +end + +# Builds The Example Workspace +def build_workspace(dir) + sh "xcodebuild -workspace #{dir}/OHHTTPStubsDemo.xcworkspace -scheme OHHTTPStubsDemo build CODE_SIGNING_ALLOWED=NO" +end + +# Builds the Example Project +def build_project(dir) + sh "xcodebuild -project #{dir}/OHHTTPStubsDemo.xcodeproj -scheme OHHTTPStubsDemo build CODE_SIGNING_ALLOWED=NO" +end + +# Builds platform using Carthage +def carthage_build(platform, swift_version) + xcconfig = "/tmp/tmp.xcconfig" + config_contents = "SWIFT_VERSION=#{swift_version}" + sh "echo #{config_contents} > #{xcconfig} && XCODE_XCCONFIG_FILE=#{xcconfig} carthage build --platform #{platform} --no-skip-current" +end + desc 'Run all travis env tasks locally' task :travis do require 'YAML' @@ -52,7 +92,7 @@ def build(scheme, sdk, destination, action, additional_args) cmd = %W( xcodebuild - -workspace OHHTTPStubs/OHHTTPStubs.xcworkspace + -workspace OHHTTPStubs.xcworkspace -scheme "#{scheme}" -sdk #{sdk} -configuration Debug diff --git a/OHHTTPStubs/Sources/HTTPMessage/OHHTTPStubsResponse+HTTPMessage.m b/Sources/HTTPMessage/HTTPStubsResponse+HTTPMessage.m similarity index 95% rename from OHHTTPStubs/Sources/HTTPMessage/OHHTTPStubsResponse+HTTPMessage.m rename to Sources/HTTPMessage/HTTPStubsResponse+HTTPMessage.m index 9f3e0275..061f5c3b 100644 --- a/OHHTTPStubs/Sources/HTTPMessage/OHHTTPStubsResponse+HTTPMessage.m +++ b/Sources/HTTPMessage/HTTPStubsResponse+HTTPMessage.m @@ -22,13 +22,12 @@ * ***********************************************************************************/ - -#if __has_include() +#if __has_include() || SWIFT_PACKAGE #import -#import "OHHTTPStubsResponse+HTTPMessage.h" +#import "HTTPStubsResponse+HTTPMessage.h" -@implementation OHHTTPStubsResponse (HTTPMessage) +@implementation HTTPStubsResponse (HTTPMessage) #pragma mark Building response from HTTP Message Data (dump from "curl -is") diff --git a/OHHTTPStubs/Sources/HTTPMessage/OHHTTPStubsResponse+HTTPMessage.h b/Sources/HTTPMessage/include/HTTPStubsResponse+HTTPMessage.h similarity index 86% rename from OHHTTPStubs/Sources/HTTPMessage/OHHTTPStubsResponse+HTTPMessage.h rename to Sources/HTTPMessage/include/HTTPStubsResponse+HTTPMessage.h index 98a6a9df..ccbb51a4 100644 --- a/OHHTTPStubs/Sources/HTTPMessage/OHHTTPStubsResponse+HTTPMessage.h +++ b/Sources/HTTPMessage/include/HTTPStubsResponse+HTTPMessage.h @@ -26,7 +26,7 @@ /* This category is not available on watchOS because CFNetwork is needed for its implementation but isn't available on Nano */ #if __has_include() -#import "OHHTTPStubsResponse.h" +#import "HTTPStubsResponse.h" #import "Compatibility.h" NS_ASSUME_NONNULL_BEGIN @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN * * @note This category is not available on watchOS */ -@interface OHHTTPStubsResponse (HTTPMessage) +@interface HTTPStubsResponse (HTTPMessage) /*! @name Building a response from HTTP Message data */ @@ -46,11 +46,11 @@ NS_ASSUME_NONNULL_BEGIN /** * Builds a response given a message data as returned by `curl -is [url]`, that is containing both the headers and the body. * - * This method will split the headers and the body and build a OHHTTPStubsResponse accordingly + * This method will split the headers and the body and build a HTTPStubsResponse accordingly * * @param responseData The NSData containing the whole HTTP response, including the headers and the body * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub */ +(instancetype)responseWithHTTPMessageData:(NSData*)responseData; @@ -58,14 +58,14 @@ NS_ASSUME_NONNULL_BEGIN * Builds a response given the name of a `"*.response"` file containing both the headers and the body. * * The response file is expected to be in the specified bundle (or the application bundle if nil). - * This method will split the headers and the body and build a OHHTTPStubsResponse accordingly + * This method will split the headers and the body and build a HTTPStubsResponse accordingly * * @param responseName The name of the `"*.response"` file (without extension) containing the whole * HTTP response (including the headers and the body) * @param bundleOrNil The bundle in which the `"*.response"` file is located. If `nil`, the * `[NSBundle bundleForClass:self.class]` will be used. * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub */ +(instancetype)responseNamed:(NSString*)responseName diff --git a/OHHTTPStubs/Sources/Mocktail/OHHTTPStubs+Mocktail.m b/Sources/Mocktail/HTTPStubs+Mocktail.m similarity index 92% rename from OHHTTPStubs/Sources/Mocktail/OHHTTPStubs+Mocktail.m rename to Sources/Mocktail/HTTPStubs+Mocktail.m index 9575947b..f59c103e 100644 --- a/OHHTTPStubs/Sources/Mocktail/OHHTTPStubs+Mocktail.m +++ b/Sources/Mocktail/HTTPStubs+Mocktail.m @@ -25,11 +25,11 @@ //////////////////////////////////////////////////////////////////////////////// -#import "OHHTTPStubs+Mocktail.h" +#import "HTTPStubs+Mocktail.h" NSString* const MocktailErrorDomain = @"Mocktail"; -@implementation OHHTTPStubs (Mocktail) +@implementation HTTPStubs (Mocktail) +(NSArray *)stubRequestsUsingMocktailsAtPath:(NSString *)path inBundle:(nullable NSBundle*)bundleOrNil error:(NSError **)error @@ -80,7 +80,7 @@ +(NSArray *)stubRequestsUsingMocktailsAtPath:(NSString *)path inBundle:(nullable { continue; } - id descriptor = [[self class] stubRequestsUsingMocktail:fileURL error: &bError]; + id descriptor = [[self class] stubRequestsUsingMocktail:fileURL error: &bError]; if (descriptor && !bError) { [descriptorArray addObject:descriptor]; @@ -90,7 +90,7 @@ +(NSArray *)stubRequestsUsingMocktailsAtPath:(NSString *)path inBundle:(nullable return descriptorArray; } -+(id)stubRequestsUsingMocktailNamed:(NSString *)fileName inBundle:(nullable NSBundle*)bundleOrNil error:(NSError **)error ++(id)stubRequestsUsingMocktailNamed:(NSString *)fileName inBundle:(nullable NSBundle*)bundleOrNil error:(NSError **)error { NSURL *responseURL = [bundleOrNil?:[NSBundle bundleForClass:self.class] URLForResource:fileName withExtension:@"tail"]; @@ -108,7 +108,7 @@ +(NSArray *)stubRequestsUsingMocktailsAtPath:(NSString *)path inBundle:(nullable } } -+(id)stubRequestsUsingMocktail:(NSURL *)fileURL error:(NSError **)error ++(id)stubRequestsUsingMocktail:(NSURL *)fileURL error:(NSError **)error { NSError *bError = nil; NSStringEncoding originalEncoding; @@ -220,7 +220,7 @@ +(NSArray *)stubRequestsUsingMocktailsAtPath:(NSString *)path inBundle:(nullable // Handle binary which is base64 encoded NSUInteger bodyOffset = [headerMatter dataUsingEncoding:NSUTF8StringEncoding].length + 2; - return [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + return [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { NSString *absoluteURL = (request.URL).absoluteString; NSString *method = request.HTTPMethod; @@ -233,7 +233,7 @@ +(NSArray *)stubRequestsUsingMocktailsAtPath:(NSString *)path inBundle:(nullable } return NO; - } withStubResponse:^OHHTTPStubsResponse*(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse*(NSURLRequest *request) { if([headers[@"Content-Type"] hasSuffix:@";base64"]) { NSString *type = headers[@"Content-Type"]; @@ -244,13 +244,13 @@ +(NSArray *)stubRequestsUsingMocktailsAtPath:(NSString *)path inBundle:(nullable body = [body subdataWithRange:NSMakeRange(bodyOffset, body.length - bodyOffset)]; body = [[NSData alloc] initWithBase64EncodedData:body options:NSDataBase64DecodingIgnoreUnknownCharacters]; - OHHTTPStubsResponse *response = [OHHTTPStubsResponse responseWithData:body statusCode:(int)statusCode headers:headers]; + HTTPStubsResponse *response = [HTTPStubsResponse responseWithData:body statusCode:(int)statusCode headers:headers]; return response; } else { - OHHTTPStubsResponse *response = [OHHTTPStubsResponse responseWithFileAtPath:fileURL.path - statusCode:(int)statusCode headers:headers]; + HTTPStubsResponse *response = [HTTPStubsResponse responseWithFileAtPath:fileURL.path + statusCode:(int)statusCode headers:headers]; [response.inputStream setProperty:@(bodyOffset) forKey:NSStreamFileCurrentOffsetKey]; return response; } diff --git a/OHHTTPStubs/Sources/Mocktail/OHHTTPStubs+Mocktail.h b/Sources/Mocktail/include/HTTPStubs+Mocktail.h similarity index 93% rename from OHHTTPStubs/Sources/Mocktail/OHHTTPStubs+Mocktail.h rename to Sources/Mocktail/include/HTTPStubs+Mocktail.h index c7ef6afa..e6ee4c5b 100644 --- a/OHHTTPStubs/Sources/Mocktail/OHHTTPStubs+Mocktail.h +++ b/Sources/Mocktail/include/HTTPStubs+Mocktail.h @@ -25,7 +25,7 @@ //////////////////////////////////////////////////////////////////////////////// -#import "OHHTTPStubs.h" +#import "HTTPStubs.h" #import "Compatibility.h" NS_ASSUME_NONNULL_BEGIN @@ -50,7 +50,7 @@ typedef NS_ENUM(NSInteger, OHHTTPStubsMocktailError) { extern NSString* const MocktailErrorDomain; -@interface OHHTTPStubs (Mocktail) +@interface HTTPStubs (Mocktail) /** * Add a stub given a file in the format of Mocktail as defined at https://github.com/square/objc-mocktail. @@ -65,7 +65,7 @@ extern NSString* const MocktailErrorDomain; * @return a stub descriptor that uniquely identifies the stub and can be later used to remove it with * `removeStub:`. */ -+(id)stubRequestsUsingMocktailNamed:(NSString *)fileName inBundle:(nullable NSBundle*)bundleOrNil error:(NSError **)error; ++(id)stubRequestsUsingMocktailNamed:(NSString *)fileName inBundle:(nullable NSBundle*)bundleOrNil error:(NSError **)error; /** * Add a stub given a file URL in the format of Mocktail as defined at https://github.com/square/objc-mocktail. @@ -79,7 +79,7 @@ extern NSString* const MocktailErrorDomain; * @return a stub descriptor that uniquely identifies the stub and can be later used to remove it with * `removeStub:`. */ -+(id)stubRequestsUsingMocktail:(NSURL *)fileURL error:(NSError **)error; ++(id)stubRequestsUsingMocktail:(NSURL *)fileURL error:(NSError **)error; /** * Add stubs using files under a folder in the format of Mocktail as defined at https://github.com/square/objc-mocktail. diff --git a/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m b/Sources/OHHTTPStubs/HTTPStubs+NSURLSessionConfiguration.m similarity index 75% rename from OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m rename to Sources/OHHTTPStubs/HTTPStubs+NSURLSessionConfiguration.m index 6e885152..3a9532ae 100644 --- a/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubs+NSURLSessionConfiguration.m +++ b/Sources/OHHTTPStubs/HTTPStubs+NSURLSessionConfiguration.m @@ -25,15 +25,15 @@ #import #if defined(__IPHONE_7_0) || defined(__MAC_10_9) -#import "OHHTTPStubs.h" -#import "OHHTTPStubsMethodSwizzling.h" +#import "HTTPStubs.h" +#import "HTTPStubsMethodSwizzling.h" ////////////////////////////////////////////////////////////////////////////////////////////////// /** * This helper is used to swizzle NSURLSessionConfiguration constructor methods * defaultSessionConfiguration and ephemeralSessionConfiguration to insert the private - * OHHTTPStubsProtocol into their protocolClasses array so that OHHTTPStubs is automagically + * HTTPStubsProtocol into their protocolClasses array so that OHHTTPStubs is automagically * supported when you create a new NSURLSession based on one of there configurations. */ @@ -41,32 +41,32 @@ static SessionConfigConstructor orig_defaultSessionConfiguration; static SessionConfigConstructor orig_ephemeralSessionConfiguration; -static NSURLSessionConfiguration* OHHTTPStubs_defaultSessionConfiguration(id self, SEL _cmd) +static NSURLSessionConfiguration* HTTPStubs_defaultSessionConfiguration(id self, SEL _cmd) { NSURLSessionConfiguration* config = orig_defaultSessionConfiguration(self,_cmd); // call original method - [OHHTTPStubs setEnabled:YES forSessionConfiguration:config]; //OHHTTPStubsAddProtocolClassToNSURLSessionConfiguration(config); + [HTTPStubs setEnabled:YES forSessionConfiguration:config]; //OHHTTPStubsAddProtocolClassToNSURLSessionConfiguration(config); return config; } -static NSURLSessionConfiguration* OHHTTPStubs_ephemeralSessionConfiguration(id self, SEL _cmd) +static NSURLSessionConfiguration* HTTPStubs_ephemeralSessionConfiguration(id self, SEL _cmd) { NSURLSessionConfiguration* config = orig_ephemeralSessionConfiguration(self,_cmd); // call original method - [OHHTTPStubs setEnabled:YES forSessionConfiguration:config]; //OHHTTPStubsAddProtocolClassToNSURLSessionConfiguration(config); + [HTTPStubs setEnabled:YES forSessionConfiguration:config]; //OHHTTPStubsAddProtocolClassToNSURLSessionConfiguration(config); return config; } -@interface NSURLSessionConfiguration(OHHTTPStubsSupport) @end +@interface NSURLSessionConfiguration(HTTPStubsSupport) @end -@implementation NSURLSessionConfiguration(OHHTTPStubsSupport) +@implementation NSURLSessionConfiguration(HTTPStubsSupport) +(void)load { - orig_defaultSessionConfiguration = (SessionConfigConstructor)OHHTTPStubsReplaceMethod(@selector(defaultSessionConfiguration), - (IMP)OHHTTPStubs_defaultSessionConfiguration, + orig_defaultSessionConfiguration = (SessionConfigConstructor)HTTPStubsReplaceMethod(@selector(defaultSessionConfiguration), + (IMP)HTTPStubs_defaultSessionConfiguration, [NSURLSessionConfiguration class], YES); - orig_ephemeralSessionConfiguration = (SessionConfigConstructor)OHHTTPStubsReplaceMethod(@selector(ephemeralSessionConfiguration), - (IMP)OHHTTPStubs_ephemeralSessionConfiguration, + orig_ephemeralSessionConfiguration = (SessionConfigConstructor)HTTPStubsReplaceMethod(@selector(ephemeralSessionConfiguration), + (IMP)HTTPStubs_ephemeralSessionConfiguration, [NSURLSessionConfiguration class], YES); } diff --git a/OHHTTPStubs/Sources/OHHTTPStubs.m b/Sources/OHHTTPStubs/HTTPStubs.m similarity index 81% rename from OHHTTPStubs/Sources/OHHTTPStubs.m rename to Sources/OHHTTPStubs/HTTPStubs.m index 3a0eaf8f..a423123d 100644 --- a/OHHTTPStubs/Sources/OHHTTPStubs.m +++ b/Sources/OHHTTPStubs/HTTPStubs.m @@ -29,44 +29,44 @@ //////////////////////////////////////////////////////////////////////////////// #pragma mark - Imports -#import "OHHTTPStubs.h" +#import "HTTPStubs.h" //////////////////////////////////////////////////////////////////////////////// #pragma mark - Types & Constants -@interface OHHTTPStubsProtocol : NSURLProtocol @end +@interface HTTPStubsProtocol : NSURLProtocol @end static NSTimeInterval const kSlotTime = 0.25; // Must be >0. We will send a chunk of the data from the stream each 'slotTime' seconds //////////////////////////////////////////////////////////////////////////////// #pragma mark - Private Interfaces -@interface OHHTTPStubs() +@interface HTTPStubs() + (instancetype)sharedInstance; @property(atomic, copy) NSMutableArray* stubDescriptors; @property(atomic, assign) BOOL enabledState; -@property(atomic, copy, nullable) void (^onStubActivationBlock)(NSURLRequest*, id, OHHTTPStubsResponse*); -@property(atomic, copy, nullable) void (^onStubRedirectBlock)(NSURLRequest*, NSURLRequest*, id, OHHTTPStubsResponse*); -@property(atomic, copy, nullable) void (^afterStubFinishBlock)(NSURLRequest*, id, OHHTTPStubsResponse*, NSError*); +@property(atomic, copy, nullable) void (^onStubActivationBlock)(NSURLRequest*, id, HTTPStubsResponse*); +@property(atomic, copy, nullable) void (^onStubRedirectBlock)(NSURLRequest*, NSURLRequest*, id, HTTPStubsResponse*); +@property(atomic, copy, nullable) void (^afterStubFinishBlock)(NSURLRequest*, id, HTTPStubsResponse*, NSError*); @property(atomic, copy, nullable) void (^onStubMissingBlock)(NSURLRequest*); @end -@interface OHHTTPStubsDescriptor : NSObject -@property(atomic, copy) OHHTTPStubsTestBlock testBlock; -@property(atomic, copy) OHHTTPStubsResponseBlock responseBlock; +@interface HTTPStubsDescriptor : NSObject +@property(atomic, copy) HTTPStubsTestBlock testBlock; +@property(atomic, copy) HTTPStubsResponseBlock responseBlock; @end //////////////////////////////////////////////////////////////////////////////// -#pragma mark - OHHTTPStubsDescriptor Implementation +#pragma mark - HTTPStubsDescriptor Implementation -@implementation OHHTTPStubsDescriptor +@implementation HTTPStubsDescriptor @synthesize name = _name; -+(instancetype)stubDescriptorWithTestBlock:(OHHTTPStubsTestBlock)testBlock - responseBlock:(OHHTTPStubsResponseBlock)responseBlock ++(instancetype)stubDescriptorWithTestBlock:(HTTPStubsTestBlock)testBlock + responseBlock:(HTTPStubsResponseBlock)responseBlock { - OHHTTPStubsDescriptor* stub = [OHHTTPStubsDescriptor new]; + HTTPStubsDescriptor* stub = [HTTPStubsDescriptor new]; stub.testBlock = testBlock; stub.responseBlock = responseBlock; return stub; @@ -83,16 +83,16 @@ -(NSString*)description //////////////////////////////////////////////////////////////////////////////// -#pragma mark - OHHTTPStubs Implementation +#pragma mark - HTTPStubs Implementation -@implementation OHHTTPStubs +@implementation HTTPStubs //////////////////////////////////////////////////////////////////////////////// #pragma mark - Singleton methods + (instancetype)sharedInstance { - static OHHTTPStubs *sharedInstance = nil; + static HTTPStubs *sharedInstance = nil; static dispatch_once_t predicate; dispatch_once(&predicate, ^{ @@ -107,7 +107,7 @@ + (instancetype)sharedInstance + (void)initialize { - if (self == [OHHTTPStubs class]) + if (self == [HTTPStubs class]) { [self _setEnable:YES]; } @@ -133,23 +133,23 @@ - (void)dealloc #pragma mark > Adding & Removing stubs -+(id)stubRequestsPassingTest:(OHHTTPStubsTestBlock)testBlock - withStubResponse:(OHHTTPStubsResponseBlock)responseBlock ++(id)stubRequestsPassingTest:(HTTPStubsTestBlock)testBlock + withStubResponse:(HTTPStubsResponseBlock)responseBlock { - OHHTTPStubsDescriptor* stub = [OHHTTPStubsDescriptor stubDescriptorWithTestBlock:testBlock - responseBlock:responseBlock]; - [OHHTTPStubs.sharedInstance addStub:stub]; + HTTPStubsDescriptor* stub = [HTTPStubsDescriptor stubDescriptorWithTestBlock:testBlock + responseBlock:responseBlock]; + [HTTPStubs.sharedInstance addStub:stub]; return stub; } -+(BOOL)removeStub:(id)stubDesc ++(BOOL)removeStub:(id)stubDesc { - return [OHHTTPStubs.sharedInstance removeStub:stubDesc]; + return [HTTPStubs.sharedInstance removeStub:stubDesc]; } +(void)removeAllStubs { - [OHHTTPStubs.sharedInstance removeAllStubs]; + [HTTPStubs.sharedInstance removeAllStubs]; } #pragma mark > Disabling & Re-Enabling stubs @@ -158,22 +158,22 @@ +(void)_setEnable:(BOOL)enable { if (enable) { - [NSURLProtocol registerClass:OHHTTPStubsProtocol.class]; + [NSURLProtocol registerClass:HTTPStubsProtocol.class]; } else { - [NSURLProtocol unregisterClass:OHHTTPStubsProtocol.class]; + [NSURLProtocol unregisterClass:HTTPStubsProtocol.class]; } } +(void)setEnabled:(BOOL)enabled { - [OHHTTPStubs.sharedInstance setEnabled:enabled]; + [HTTPStubs.sharedInstance setEnabled:enabled]; } +(BOOL)isEnabled { - return OHHTTPStubs.sharedInstance.isEnabled; + return HTTPStubs.sharedInstance.isEnabled; } #if defined(__IPHONE_7_0) || defined(__MAC_10_9) @@ -184,7 +184,7 @@ + (void)setEnabled:(BOOL)enable forSessionConfiguration:(NSURLSessionConfigurati && [sessionConfig respondsToSelector:@selector(setProtocolClasses:)]) { NSMutableArray * urlProtocolClasses = [NSMutableArray arrayWithArray:sessionConfig.protocolClasses]; - Class protoCls = OHHTTPStubsProtocol.class; + Class protoCls = HTTPStubsProtocol.class; if (enable && ![urlProtocolClasses containsObject:protoCls]) { [urlProtocolClasses insertObject:protoCls atIndex:0]; @@ -210,7 +210,7 @@ + (BOOL)isEnabledForSessionConfiguration:(NSURLSessionConfiguration *)sessionCon && [sessionConfig respondsToSelector:@selector(setProtocolClasses:)]) { NSMutableArray * urlProtocolClasses = [NSMutableArray arrayWithArray:sessionConfig.protocolClasses]; - Class protoCls = OHHTTPStubsProtocol.class; + Class protoCls = HTTPStubsProtocol.class; return [urlProtocolClasses containsObject:protoCls]; } else @@ -227,27 +227,27 @@ + (BOOL)isEnabledForSessionConfiguration:(NSURLSessionConfiguration *)sessionCon +(NSArray*)allStubs { - return [OHHTTPStubs.sharedInstance stubDescriptors]; + return [HTTPStubs.sharedInstance stubDescriptors]; } -+(void)onStubActivation:( nullable void(^)(NSURLRequest* request, id stub, OHHTTPStubsResponse* responseStub) )block ++(void)onStubActivation:( nullable void(^)(NSURLRequest* request, id stub, HTTPStubsResponse* responseStub) )block { - [OHHTTPStubs.sharedInstance setOnStubActivationBlock:block]; + [HTTPStubs.sharedInstance setOnStubActivationBlock:block]; } -+(void)onStubRedirectResponse:( nullable void(^)(NSURLRequest* request, NSURLRequest* redirectRequest, id stub, OHHTTPStubsResponse* responseStub) )block ++(void)onStubRedirectResponse:( nullable void(^)(NSURLRequest* request, NSURLRequest* redirectRequest, id stub, HTTPStubsResponse* responseStub) )block { - [OHHTTPStubs.sharedInstance setOnStubRedirectBlock:block]; + [HTTPStubs.sharedInstance setOnStubRedirectBlock:block]; } -+(void)afterStubFinish:( nullable void(^)(NSURLRequest* request, id stub, OHHTTPStubsResponse* responseStub, NSError* error) )block ++(void)afterStubFinish:( nullable void(^)(NSURLRequest* request, id stub, HTTPStubsResponse* responseStub, NSError* error) )block { - [OHHTTPStubs.sharedInstance setAfterStubFinishBlock:block]; + [HTTPStubs.sharedInstance setAfterStubFinishBlock:block]; } +(void)onStubMissing:( nullable void(^)(NSURLRequest* request) )block { - [OHHTTPStubs.sharedInstance setOnStubMissingBlock:block]; + [HTTPStubs.sharedInstance setOnStubMissingBlock:block]; } @@ -274,7 +274,7 @@ -(void)setEnabled:(BOOL)enable } } --(void)addStub:(OHHTTPStubsDescriptor*)stubDesc +-(void)addStub:(HTTPStubsDescriptor*)stubDesc { @synchronized(_stubDescriptors) { @@ -282,7 +282,7 @@ -(void)addStub:(OHHTTPStubsDescriptor*)stubDesc } } --(BOOL)removeStub:(id)stubDesc +-(BOOL)removeStub:(id)stubDesc { BOOL handlerFound = NO; @synchronized(_stubDescriptors) @@ -301,12 +301,12 @@ -(void)removeAllStubs } } -- (OHHTTPStubsDescriptor*)firstStubPassingTestForRequest:(NSURLRequest*)request +- (HTTPStubsDescriptor*)firstStubPassingTestForRequest:(NSURLRequest*)request { - OHHTTPStubsDescriptor* foundStub = nil; + HTTPStubsDescriptor* foundStub = nil; @synchronized(_stubDescriptors) { - for(OHHTTPStubsDescriptor* stub in _stubDescriptors.reverseObjectEnumerator) + for(HTTPStubsDescriptor* stub in _stubDescriptors.reverseObjectEnumerator) { if (stub.testBlock(request)) { @@ -332,20 +332,20 @@ - (OHHTTPStubsDescriptor*)firstStubPassingTestForRequest:(NSURLRequest*)request //////////////////////////////////////////////////////////////////////////////// #pragma mark - Private Protocol Class -@interface OHHTTPStubsProtocol() +@interface HTTPStubsProtocol() @property(assign) BOOL stopped; -@property(strong) OHHTTPStubsDescriptor* stub; +@property(strong) HTTPStubsDescriptor* stub; @property(assign) CFRunLoopRef clientRunLoop; - (void)executeOnClientRunLoopAfterDelay:(NSTimeInterval)delayInSeconds block:(dispatch_block_t)block; @end -@implementation OHHTTPStubsProtocol +@implementation HTTPStubsProtocol + (BOOL)canInitWithRequest:(NSURLRequest *)request { - BOOL found = ([OHHTTPStubs.sharedInstance firstStubPassingTestForRequest:request] != nil); - if (!found && OHHTTPStubs.sharedInstance.onStubMissingBlock) { - OHHTTPStubs.sharedInstance.onStubMissingBlock(request); + BOOL found = ([HTTPStubs.sharedInstance firstStubPassingTestForRequest:request] != nil); + if (!found && HTTPStubs.sharedInstance.onStubMissingBlock) { + HTTPStubs.sharedInstance.onStubMissingBlock(request); } return found; } @@ -353,8 +353,8 @@ + (BOOL)canInitWithRequest:(NSURLRequest *)request - (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)response client:(id)client { // Make super sure that we never use a cached response. - OHHTTPStubsProtocol* proto = [super initWithRequest:request cachedResponse:nil client:client]; - proto.stub = [OHHTTPStubs.sharedInstance firstStubPassingTestForRequest:request]; + HTTPStubsProtocol* proto = [super initWithRequest:request cachedResponse:nil client:client]; + proto.stub = [HTTPStubs.sharedInstance firstStubPassingTestForRequest:request]; return proto; } @@ -404,18 +404,18 @@ - (void)startLoading nil]; NSError* error = [NSError errorWithDomain:@"OHHTTPStubs" code:500 userInfo:userInfo]; [client URLProtocol:self didFailWithError:error]; - if (OHHTTPStubs.sharedInstance.afterStubFinishBlock) + if (HTTPStubs.sharedInstance.afterStubFinishBlock) { - OHHTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, nil, error); + HTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, nil, error); } return; } - OHHTTPStubsResponse* responseStub = self.stub.responseBlock(request); + HTTPStubsResponse* responseStub = self.stub.responseBlock(request); - if (OHHTTPStubs.sharedInstance.onStubActivationBlock) + if (HTTPStubs.sharedInstance.onStubActivationBlock) { - OHHTTPStubs.sharedInstance.onStubActivationBlock(request, self.stub, responseStub); + HTTPStubs.sharedInstance.onStubActivationBlock(request, self.stub, responseStub); } if (responseStub.error == nil) @@ -476,9 +476,9 @@ - (void)startLoading } [client URLProtocol:self wasRedirectedToRequest:redirectRequest redirectResponse:urlResponse]; - if (OHHTTPStubs.sharedInstance.onStubRedirectBlock) + if (HTTPStubs.sharedInstance.onStubRedirectBlock) { - OHHTTPStubs.sharedInstance.onStubRedirectBlock(request, redirectRequest, self.stub, responseStub); + HTTPStubs.sharedInstance.onStubRedirectBlock(request, redirectRequest, self.stub, responseStub); } } @@ -503,9 +503,9 @@ - (void)startLoading [client URLProtocol:self didFailWithError:responseStub.error]; blockError = responseStub.error; } - if (OHHTTPStubs.sharedInstance.afterStubFinishBlock) + if (HTTPStubs.sharedInstance.afterStubFinishBlock) { - OHHTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, responseStub, blockError); + HTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, responseStub, blockError); } }]; } @@ -516,9 +516,9 @@ - (void)startLoading if (!self.stopped) { [client URLProtocol:self didFailWithError:responseStub.error]; - if (OHHTTPStubs.sharedInstance.afterStubFinishBlock) + if (HTTPStubs.sharedInstance.afterStubFinishBlock) { - OHHTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, responseStub, responseStub.error); + HTTPStubs.sharedInstance.afterStubFinishBlock(request, self.stub, responseStub, responseStub.error); } } }]; @@ -534,10 +534,10 @@ - (void)stopLoading NSTimeInterval slotTime; double chunkSizePerSlot; double cumulativeChunkSize; -} OHHTTPStubsStreamTimingInfo; +} HTTPStubsStreamTimingInfo; - (void)streamDataForClient:(id)client - withStubResponse:(OHHTTPStubsResponse*)stubResponse + withStubResponse:(HTTPStubsResponse*)stubResponse completion:(void(^)(NSError * error))completion { if (!self.stopped) @@ -546,7 +546,7 @@ - (void)streamDataForClient:(id)client { // Compute timing data once and for all for this stub - OHHTTPStubsStreamTimingInfo timingInfo = { + HTTPStubsStreamTimingInfo timingInfo = { .slotTime = kSlotTime, // Must be >0. We will send a chunk of data from the stream each 'slotTime' seconds .cumulativeChunkSize = 0 }; @@ -587,7 +587,7 @@ - (void)streamDataForClient:(id)client - (void) streamDataForClient:(id)client fromStream:(NSInputStream*)inputStream - timingInfo:(OHHTTPStubsStreamTimingInfo)timingInfo + timingInfo:(HTTPStubsStreamTimingInfo)timingInfo completion:(void(^)(NSError * error))completion { NSParameterAssert(timingInfo.chunkSizePerSlot > 0); diff --git a/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h b/Sources/OHHTTPStubs/HTTPStubsMethodSwizzling.h similarity index 87% rename from OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h rename to Sources/OHHTTPStubs/HTTPStubsMethodSwizzling.h index 443a6800..58eec0c7 100644 --- a/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.h +++ b/Sources/OHHTTPStubs/HTTPStubsMethodSwizzling.h @@ -45,7 +45,7 @@ * implementation and call it when overwriting * the selector. */ -__attribute__((warn_unused_result)) IMP OHHTTPStubsReplaceMethod(SEL selector, - IMP newImpl, - Class affectedClass, - BOOL isClassMethod); +__attribute__((warn_unused_result)) IMP HTTPStubsReplaceMethod(SEL selector, + IMP newImpl, + Class affectedClass, + BOOL isClassMethod); diff --git a/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m b/Sources/OHHTTPStubs/HTTPStubsMethodSwizzling.m similarity index 96% rename from OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m rename to Sources/OHHTTPStubs/HTTPStubsMethodSwizzling.m index 2aefcc7e..b19ce68d 100644 --- a/OHHTTPStubs/Sources/NSURLSession/OHHTTPStubsMethodSwizzling.m +++ b/Sources/OHHTTPStubs/HTTPStubsMethodSwizzling.m @@ -25,12 +25,12 @@ //////////////////////////////////////////////////////////////////////////////// #pragma mark - Imports -#import "OHHTTPStubsMethodSwizzling.h" +#import "HTTPStubsMethodSwizzling.h" ////////////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - Method Swizzling Helpers -IMP OHHTTPStubsReplaceMethod(SEL selector, +IMP HTTPStubsReplaceMethod(SEL selector, IMP newImpl, Class affectedClass, BOOL isClassMethod) diff --git a/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m b/Sources/OHHTTPStubs/HTTPStubsPathHelpers.m similarity index 98% rename from OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m rename to Sources/OHHTTPStubs/HTTPStubsPathHelpers.m index 89d1e055..4d8193b3 100644 --- a/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.m +++ b/Sources/OHHTTPStubs/HTTPStubsPathHelpers.m @@ -23,7 +23,7 @@ ***********************************************************************************/ -#import "OHPathHelpers.h" +#import "HTTPStubsPathHelpers.h" NSString* __nullable OHPathForFile(NSString* fileName, Class inBundleForClass) { diff --git a/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m b/Sources/OHHTTPStubs/HTTPStubsResponse+JSON.m similarity index 96% rename from OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m rename to Sources/OHHTTPStubs/HTTPStubsResponse+JSON.m index 75405df1..679c9032 100644 --- a/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.m +++ b/Sources/OHHTTPStubs/HTTPStubsResponse+JSON.m @@ -23,9 +23,9 @@ ***********************************************************************************/ -#import "OHHTTPStubsResponse+JSON.h" +#import "HTTPStubsResponse+JSON.h" -@implementation OHHTTPStubsResponse (JSON) +@implementation HTTPStubsResponse (JSON) /*! @name Building a response from JSON objects */ diff --git a/OHHTTPStubs/Sources/OHHTTPStubsResponse.m b/Sources/OHHTTPStubs/HTTPStubsResponse.m similarity index 90% rename from OHHTTPStubs/Sources/OHHTTPStubsResponse.m rename to Sources/OHHTTPStubs/HTTPStubsResponse.m index c5d2a701..fb9b9808 100644 --- a/OHHTTPStubs/Sources/OHHTTPStubsResponse.m +++ b/Sources/OHHTTPStubs/HTTPStubsResponse.m @@ -29,7 +29,7 @@ //////////////////////////////////////////////////////////////////////////////// #pragma mark - Imports -#import "OHHTTPStubsResponse.h" +#import "HTTPStubsResponse.h" //////////////////////////////////////////////////////////////////////////////// #pragma mark - Defines & Constants @@ -44,7 +44,7 @@ //////////////////////////////////////////////////////////////////////////////// #pragma mark - Implementation -@implementation OHHTTPStubsResponse +@implementation HTTPStubsResponse //////////////////////////////////////////////////////////////////////////////// #pragma mark - Commodity Constructors @@ -56,9 +56,9 @@ +(instancetype)responseWithData:(NSData*)data statusCode:(int)statusCode headers:(nullable NSDictionary*)httpHeaders { - OHHTTPStubsResponse* response = [[self alloc] initWithData:data - statusCode:statusCode - headers:httpHeaders]; + HTTPStubsResponse* response = [[self alloc] initWithData:data + statusCode:statusCode + headers:httpHeaders]; return response; } @@ -69,9 +69,9 @@ +(instancetype)responseWithFileAtPath:(NSString *)filePath statusCode:(int)statusCode headers:(nullable NSDictionary *)httpHeaders { - OHHTTPStubsResponse* response = [[self alloc] initWithFileAtPath:filePath - statusCode:statusCode - headers:httpHeaders]; + HTTPStubsResponse* response = [[self alloc] initWithFileAtPath:filePath + statusCode:statusCode + headers:httpHeaders]; return response; } @@ -79,9 +79,9 @@ +(instancetype)responseWithFileURL:(NSURL *)fileURL statusCode:(int)statusCode headers:(nullable NSDictionary *)httpHeaders { - OHHTTPStubsResponse* response = [[self alloc] initWithFileURL:fileURL - statusCode:statusCode - headers:httpHeaders]; + HTTPStubsResponse* response = [[self alloc] initWithFileURL:fileURL + statusCode:statusCode + headers:httpHeaders]; return response; } @@ -89,7 +89,7 @@ +(instancetype)responseWithFileURL:(NSURL *)fileURL +(instancetype)responseWithError:(NSError*)error { - OHHTTPStubsResponse* response = [[self alloc] initWithError:error]; + HTTPStubsResponse* response = [[self alloc] initWithError:error]; return response; } diff --git a/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m b/Sources/OHHTTPStubs/NSURLRequest+HTTPBodyTesting.m similarity index 90% rename from OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m rename to Sources/OHHTTPStubs/NSURLRequest+HTTPBodyTesting.m index a2ff7e88..ee3a0049 100644 --- a/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.m +++ b/Sources/OHHTTPStubs/NSURLRequest+HTTPBodyTesting.m @@ -29,7 +29,7 @@ //////////////////////////////////////////////////////////////////////////////// #pragma mark - Imports -#import "OHHTTPStubsMethodSwizzling.h" +#import "HTTPStubsMethodSwizzling.h" //////////////////////////////////////////////////////////////////////////////// #pragma mark - NSURLRequest+CustomHTTPBody @@ -48,8 +48,8 @@ - (NSData*)OHHTTPStubs_HTTPBody //////////////////////////////////////////////////////////////////////////////// #pragma mark - NSMutableURLRequest+HTTPBodyTesting -typedef void(*OHHHTTPStubsSetterIMP)(id, SEL, id); -static OHHHTTPStubsSetterIMP orig_setHTTPBody; +typedef void(*HTTPStubsSetterIMP)(id, SEL, id); +static HTTPStubsSetterIMP orig_setHTTPBody; static void OHHTTPStubs_setHTTPBody(id self, SEL _cmd, NSData* HTTPBody) { @@ -75,10 +75,10 @@ @implementation NSMutableURLRequest (HTTPBodyTesting) + (void)load { - orig_setHTTPBody = (OHHHTTPStubsSetterIMP)OHHTTPStubsReplaceMethod(@selector(setHTTPBody:), - (IMP)OHHTTPStubs_setHTTPBody, - [NSMutableURLRequest class], - NO); + orig_setHTTPBody = (HTTPStubsSetterIMP)HTTPStubsReplaceMethod(@selector(setHTTPBody:), + (IMP)OHHTTPStubs_setHTTPBody, + [NSMutableURLRequest class], + NO); } @end diff --git a/OHHTTPStubs/Sources/Compatibility.h b/Sources/OHHTTPStubs/include/Compatibility.h similarity index 100% rename from OHHTTPStubs/Sources/Compatibility.h rename to Sources/OHHTTPStubs/include/Compatibility.h diff --git a/OHHTTPStubs/Sources/OHHTTPStubs.h b/Sources/OHHTTPStubs/include/HTTPStubs.h similarity index 87% rename from OHHTTPStubs/Sources/OHHTTPStubs.h rename to Sources/OHHTTPStubs/include/HTTPStubs.h index 964ac7ae..b4d08d36 100644 --- a/OHHTTPStubs/Sources/OHHTTPStubs.h +++ b/Sources/OHHTTPStubs/include/HTTPStubs.h @@ -29,15 +29,15 @@ #import #import "Compatibility.h" -#import "OHHTTPStubsResponse.h" +#import "HTTPStubsResponse.h" NS_ASSUME_NONNULL_BEGIN //////////////////////////////////////////////////////////////////////////////// #pragma mark - Types -typedef BOOL(^OHHTTPStubsTestBlock)(NSURLRequest* request); -typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest* request); +typedef BOOL(^HTTPStubsTestBlock)(NSURLRequest* request); +typedef HTTPStubsResponse* __nonnull (^HTTPStubsResponseBlock)( NSURLRequest* request); /** * This opaque type represents an installed stub and is used to uniquely @@ -49,7 +49,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * This type also let you add arbitrary metadata to a stub to differenciate it * more easily when debugging. */ -@protocol OHHTTPStubsDescriptor +@protocol HTTPStubsDescriptor /** * An arbitrary name that you can set and get to describe your stub. * Use it as your own convenience. @@ -66,7 +66,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest /** * Stubs Manager. Use this class to add and remove stubs and stub your network requests. */ -@interface OHHTTPStubs : NSObject +@interface HTTPStubs : NSObject //////////////////////////////////////////////////////////////////////////////// #pragma mark - Adding & Removing stubs @@ -79,19 +79,19 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * @param testBlock Block that should return `YES` if the request passed as parameter * should be stubbed with the response block, and `NO` if it should * hit the real world (or be managed by another stub). - * @param responseBlock Block that will return the `OHHTTPStubsResponse` (response to + * @param responseBlock Block that will return the `HTTPStubsResponse` (response to * use for stubbing) corresponding to the given request * * @return a stub descriptor that uniquely identifies the stub and can be later used to remove it with `removeStub:`. * - * @note The returned stub descriptor is retained (`__strong` reference) by `OHHTTPStubs` + * @note The returned stub descriptor is retained (`__strong` reference) by `HTTPStubs` * until it is removed (with one of the `removeStub:` / `removeAllStubs` * methods); it is thus recommended to keep it in a `__weak` storage (and not `__strong`) * in your app code, to let the stub descriptor be destroyed and let the variable go * back to `nil` automatically when the stub is removed. */ -+(id)stubRequestsPassingTest:(OHHTTPStubsTestBlock)testBlock - withStubResponse:(OHHTTPStubsResponseBlock)responseBlock; ++(id)stubRequestsPassingTest:(HTTPStubsTestBlock)testBlock + withStubResponse:(HTTPStubsResponseBlock)responseBlock; /** * Remove a stub from the list of stubs @@ -102,7 +102,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * @return `YES` if the stub has been successfully removed, `NO` if the parameter was * not a valid stub identifier */ -+(BOOL)removeStub:(id)stubDesc; ++(BOOL)removeStub:(id)stubDesc; /** * Remove all the stubs from the stubs list. @@ -118,7 +118,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * @param enabled If `YES`, enables the stubs. If `NO`, disable all the * stubs and let all the requests hit the real world. * - * @note OHHTTPStubs are enabled by default, so there is no need to call + * @note HTTPStubs are enabled by default, so there is no need to call * this method with `YES` for stubs to work, except if you explicitely * disabled the stubs before. * @@ -143,7 +143,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * If `NO`, disable the stubs and let all the requests hit the real world * @param sessionConfig The NSURLSessionConfiguration on which to enabled/disable the stubs * - * @note OHHTTPStubs are enabled by default on newly created `defaultSessionConfiguration` + * @note HTTPStubs are enabled by default on newly created `defaultSessionConfiguration` * and `ephemeralSessionConfiguration`, so there is no need to call this method with * `YES` for stubs to work. You generally only use this if you want to disable * `OHTTPStubs` per `NSURLSession` by calling it before building the `NSURLSession` @@ -172,7 +172,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest /** * List all the installed stubs * - * @return An array of `id` objects currently installed. Useful for debug. + * @return An array of `id` objects currently installed. Useful for debug. */ +(NSArray*)allStubs; @@ -185,7 +185,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * @param block The block to call each time a request is being stubbed by OHHTTPStubs. * Set it to `nil` to do nothing. Defaults is `nil`. */ -+(void)onStubActivation:( nullable void(^)(NSURLRequest* request, id stub, OHHTTPStubsResponse* responseStub) )block; ++(void)onStubActivation:( nullable void(^)(NSURLRequest* request, id stub, HTTPStubsResponse* responseStub) )block; /** * Setup a block to be called whenever OHHTTPStubs encounters a redirect request. @@ -193,7 +193,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * @param block The block to call each time a redirect request is being stubbed by OHHTTPStubs. * Set it to `nil` to do nothing. Defaults is `nil`. */ -+(void)onStubRedirectResponse:( nullable void(^)(NSURLRequest* request, NSURLRequest* redirectRequest, id stub, OHHTTPStubsResponse* responseStub) )block; ++(void)onStubRedirectResponse:( nullable void(^)(NSURLRequest* request, NSURLRequest* redirectRequest, id stub, HTTPStubsResponse* responseStub) )block; /** * Setup a block to be called each time a stub finishes. Useful if stubs take an insignificant amount @@ -203,7 +203,7 @@ typedef OHHTTPStubsResponse* __nonnull (^OHHTTPStubsResponseBlock)( NSURLRequest * @param block The block to call each time a request is finished being stubbed by OHHTTPStubs. * Set it to `nil` to do nothing. Defaults is `nil`. */ -+(void)afterStubFinish:( nullable void(^)(NSURLRequest* request, id stub, OHHTTPStubsResponse* responseStub, NSError *error) )block; ++(void)afterStubFinish:( nullable void(^)(NSURLRequest* request, id stub, HTTPStubsResponse* responseStub, NSError *error) )block; /** * Setup a block to be called whenever OHHTTPStubs encounters a missing stub. diff --git a/OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h b/Sources/OHHTTPStubs/include/HTTPStubsPathHelpers.h similarity index 100% rename from OHHTTPStubs/Sources/OHPathHelpers/OHPathHelpers.h rename to Sources/OHHTTPStubs/include/HTTPStubsPathHelpers.h diff --git a/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h b/Sources/OHHTTPStubs/include/HTTPStubsResponse+JSON.h similarity index 93% rename from OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h rename to Sources/OHHTTPStubs/include/HTTPStubsResponse+JSON.h index cdcacb5c..c65aa7dc 100644 --- a/OHHTTPStubs/Sources/JSON/OHHTTPStubsResponse+JSON.h +++ b/Sources/OHHTTPStubs/include/HTTPStubsResponse+JSON.h @@ -23,7 +23,7 @@ ***********************************************************************************/ -#import "OHHTTPStubsResponse.h" +#import "HTTPStubsResponse.h" #import "Compatibility.h" NS_ASSUME_NONNULL_BEGIN @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN * Adds convenience methods to manipulate JSON objects directly. * Pass in an `NSDictionary` or `NSArray` to generate a corresponding JSON output. */ -@interface OHHTTPStubsResponse (JSON) +@interface HTTPStubsResponse (JSON) /** * Builds a response given a JSON object for the response body, status code, and headers. @@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN * @param httpHeaders The HTTP Headers to return in the response * If a "Content-Type" header is not included, "Content-Type: application/json" will be added. * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub * * @note This method typically calls `responseWithData:statusCode:headers:`, passing the serialized JSON * object as the data parameter and adding the Content-Type header if necessary. diff --git a/OHHTTPStubs/Sources/OHHTTPStubsResponse.h b/Sources/OHHTTPStubs/include/HTTPStubsResponse.h similarity index 86% rename from OHHTTPStubs/Sources/OHHTTPStubsResponse.h rename to Sources/OHHTTPStubs/include/HTTPStubsResponse.h index f9995fcd..a340a750 100644 --- a/OHHTTPStubs/Sources/OHHTTPStubsResponse.h +++ b/Sources/OHHTTPStubs/include/HTTPStubsResponse.h @@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN * Stubs Response. This describes a stubbed response to be returned by the URL Loading System, * including its HTTP headers, body, statusCode and response time. */ -@interface OHHTTPStubsResponse : NSObject +@interface HTTPStubsResponse : NSObject //////////////////////////////////////////////////////////////////////////////// #pragma mark - Properties @@ -113,7 +113,7 @@ NS_ASSUME_NONNULL_BEGIN * @param data The raw data to return in the response * @param statusCode The HTTP Status Code to use in the response * @param httpHeaders The HTTP Headers to return in the response - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub */ +(instancetype)responseWithData:(NSData*)data statusCode:(int)statusCode @@ -130,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN * @param statusCode The HTTP Status Code to use in the response * @param httpHeaders The HTTP Headers to return in the response * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub * * @note It is encouraged to use the OHPathHelpers functions & macros to build * the filePath parameter easily @@ -147,7 +147,7 @@ NS_ASSUME_NONNULL_BEGIN * @param statusCode The HTTP Status Code to use in the response * @param httpHeaders The HTTP Headers to return in the response * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub * * @note This method applies only to URLs that represent file system resources */ @@ -163,7 +163,7 @@ NS_ASSUME_NONNULL_BEGIN * * @param error The error to use in the stubbed response. * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub * * @note For example you could use an error like `[NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil]` */ @@ -174,27 +174,27 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Commotidy Setters /** - * Set the `responseTime` of the `OHHTTPStubsResponse` and return `self`. Useful for chaining method calls. + * Set the `responseTime` of the `HTTPStubsResponse` and return `self`. Useful for chaining method calls. * * _Usage example:_ - *
return [[OHHTTPStubsResponse responseWithData:data statusCode:200 headers:nil] responseTime:5.0];
+ *
return [[HTTPStubsResponse responseWithData:data statusCode:200 headers:nil] responseTime:5.0];
* * @param responseTime If positive, the amount of time used to send the entire response. * If negative, the rate in KB/s at which to send the response data. * Useful to simulate slow networks for example. You may use the * _OHHTTPStubsDownloadSpeed…_ constants here. * - * @return `self` (= the same `OHHTTPStubsResponse` that was the target of this method). + * @return `self` (= the same `HTTPStubsResponse` that was the target of this method). * Returning `self` is useful for chaining method calls. */ -(instancetype)responseTime:(NSTimeInterval)responseTime; /** - * Set both the `requestTime` and the `responseTime` of the `OHHTTPStubsResponse` at once. + * Set both the `requestTime` and the `responseTime` of the `HTTPStubsResponse` at once. * Useful for chaining method calls. * * _Usage example:_ - *
return [[OHHTTPStubsResponse responseWithData:data statusCode:200 headers:nil]
+ *  
return [[HTTPStubsResponse responseWithData:data statusCode:200 headers:nil]
  *            requestTime:1.0 responseTime:5.0];
* * @param requestTime The time to wait before the response begins to send. This value must be greater than or equal to zero. @@ -203,7 +203,7 @@ NS_ASSUME_NONNULL_BEGIN * Useful to simulate slow networks for example. You may use the * _OHHTTPStubsDownloadSpeed…_ constants here. * - * @return `self` (= the same `OHHTTPStubsResponse` that was the target of this method). Useful for chaining method calls. + * @return `self` (= the same `HTTPStubsResponse` that was the target of this method). Useful for chaining method calls. */ -(instancetype)requestTime:(NSTimeInterval)requestTime responseTime:(NSTimeInterval)responseTime; @@ -215,7 +215,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Designated empty initializer * - * @return An empty `OHHTTPStubsResponse` on which you need to set either an error or a statusCode, httpHeaders, inputStream and dataSize. + * @return An empty `HTTPStubsResponse` on which you need to set either an error or a statusCode, httpHeaders, inputStream and dataSize. * * @note This is not recommended to use this method directly. You should use `initWithInputStream:dataSize:statusCode:headers:` instead. */ @@ -230,7 +230,7 @@ NS_ASSUME_NONNULL_BEGIN * @param statusCode The HTTP Status Code to use in the response * @param httpHeaders The HTTP Headers to return in the response * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub * * @note You will probably never need to call this method yourself. Prefer the other initializers (that will call this method eventually) */ @@ -247,7 +247,7 @@ NS_ASSUME_NONNULL_BEGIN * @param statusCode The HTTP Status Code to use in the response * @param httpHeaders The HTTP Headers to return in the response * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub * * @note This method simply builds the NSInputStream, compute the file size, and then call `-initWithInputStream:dataSize:statusCode:headers:` */ @@ -263,7 +263,7 @@ NS_ASSUME_NONNULL_BEGIN * @param statusCode The HTTP Status Code to use in the response * @param httpHeaders The HTTP Headers to return in the response * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub * * @note This method applies only to URLs that represent file system resources */ @@ -278,7 +278,7 @@ NS_ASSUME_NONNULL_BEGIN * @param statusCode The HTTP Status Code to use in the response * @param httpHeaders The HTTP Headers to return in the response * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub */ -(instancetype)initWithData:(NSData*)data statusCode:(int)statusCode @@ -290,7 +290,7 @@ NS_ASSUME_NONNULL_BEGIN * * @param error The error to use in the stubbed response. * - * @return An `OHHTTPStubsResponse` describing the corresponding response to return by the stub + * @return An `HTTPStubsResponse` describing the corresponding response to return by the stub * * @note For example you could use an error like `[NSError errorWithDomain:NSURLErrorDomain code:kCFURLErrorNotConnectedToInternet userInfo:nil]` */ diff --git a/OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h b/Sources/OHHTTPStubs/include/NSURLRequest+HTTPBodyTesting.h similarity index 100% rename from OHHTTPStubs/Sources/NSURLSession/NSURLRequest+HTTPBodyTesting.h rename to Sources/OHHTTPStubs/include/NSURLRequest+HTTPBodyTesting.h diff --git a/OHHTTPStubs/Sources/Swift/OHHTTPStubsSwift.swift b/Sources/OHHTTPStubsSwift/OHHTTPStubsSwift.swift similarity index 70% rename from OHHTTPStubs/Sources/Swift/OHHTTPStubsSwift.swift rename to Sources/OHHTTPStubsSwift/OHHTTPStubsSwift.swift index 7d9236e4..07069daa 100644 --- a/OHHTTPStubs/Sources/Swift/OHHTTPStubsSwift.swift +++ b/Sources/OHHTTPStubsSwift/OHHTTPStubsSwift.swift @@ -25,11 +25,14 @@ /** * Swift Helpers */ - +import Foundation +#if SWIFT_PACKAGE +import OHHTTPStubs +#endif #if !swift(>=3.0) - extension OHHTTPStubs { - private class func stubRequests(passingTest passingTest: OHHTTPStubsTestBlock, withStubResponse: OHHTTPStubsResponseBlock) -> OHHTTPStubsDescriptor { + extension HTTPStubs { + private class func stubRequests(passingTest: HTTPStubsTestBlock, withStubResponse: HTTPStubsResponseBlock) -> HTTPStubsDescriptor { return stubRequestsPassingTest(passingTest, withStubResponse: withStubResponse) } } @@ -70,22 +73,22 @@ // MARK: Syntaxic Sugar for OHHTTPStubs /** - * Helper to return a `OHHTTPStubsResponse` given a fixture path, status code and optional headers. + * Helper to return a `HTTPStubsResponse` given a fixture path, status code and optional headers. * * - Parameter filePath: the path of the file fixture to use for the response * - Parameter status: the status code to use for the response * - Parameter headers: the HTTP headers to use for the response * - * - Returns: The `OHHTTPStubsResponse` instance that will stub with the given status code + * - Returns: The `HTTPStubsResponse` instance that will stub with the given status code * & headers, and use the file content as the response body. */ #if swift(>=3.0) - public func fixture(filePath: String, status: Int32 = 200, headers: [AnyHashable: Any]?) -> OHHTTPStubsResponse { - return OHHTTPStubsResponse(fileAtPath: filePath, statusCode: status, headers: headers) + public func fixture(filePath: String, status: Int32 = 200, headers: [AnyHashable: Any]?) -> HTTPStubsResponse { + return HTTPStubsResponse(fileAtPath: filePath, statusCode: status, headers: headers) } #else - public func fixture(filePath: String, status: Int32 = 200, headers: [NSObject: AnyObject]?) -> OHHTTPStubsResponse { - return OHHTTPStubsResponse(fileAtPath: filePath, statusCode: status, headers: headers) + public func fixture(filePath: String, status: Int32 = 200, headers: [NSObject: AnyObject]?) -> HTTPStubsResponse { + return HTTPStubsResponse(fileAtPath: filePath, statusCode: status, headers: headers) } #endif @@ -95,81 +98,81 @@ * - Parameter condition: the matcher block that determine if the request will be stubbed * - Parameter response: the stub reponse to use if the request is stubbed * - * - Returns: The opaque `OHHTTPStubsDescriptor` that uniquely identifies the stub + * - Returns: The opaque `HTTPStubsDescriptor` that uniquely identifies the stub * and can be later used to remove it with `removeStub:` */ #if swift(>=3.0) @discardableResult - public func stub(condition: @escaping OHHTTPStubsTestBlock, response: @escaping OHHTTPStubsResponseBlock) -> OHHTTPStubsDescriptor { - return OHHTTPStubs.stubRequests(passingTest: condition, withStubResponse: response) + public func stub(condition: @escaping HTTPStubsTestBlock, response: @escaping HTTPStubsResponseBlock) -> HTTPStubsDescriptor { + return HTTPStubs.stubRequests(passingTest: condition, withStubResponse: response) } #else - public func stub(condition: OHHTTPStubsTestBlock, response: OHHTTPStubsResponseBlock) -> OHHTTPStubsDescriptor { - return OHHTTPStubs.stubRequests(passingTest: condition, withStubResponse: response) + public func stub(condition: HTTPStubsTestBlock, response: HTTPStubsResponseBlock) -> HTTPStubsDescriptor { + return HTTPStubs.stubRequests(passingTest: condition, withStubResponse: response) } #endif -// MARK: Create OHHTTPStubsTestBlock matchers +// MARK: Create HTTPStubsTestBlock matchers /** * Matcher testing that the `NSURLRequest` is using the **GET** `HTTPMethod` * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * is using the GET method */ -public func isMethodGET() -> OHHTTPStubsTestBlock { +public func isMethodGET() -> HTTPStubsTestBlock { return { $0.httpMethod == "GET" } } /** * Matcher testing that the `NSURLRequest` is using the **POST** `HTTPMethod` * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * is using the POST method */ -public func isMethodPOST() -> OHHTTPStubsTestBlock { +public func isMethodPOST() -> HTTPStubsTestBlock { return { $0.httpMethod == "POST" } } /** * Matcher testing that the `NSURLRequest` is using the **PUT** `HTTPMethod` * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * is using the PUT method */ -public func isMethodPUT() -> OHHTTPStubsTestBlock { +public func isMethodPUT() -> HTTPStubsTestBlock { return { $0.httpMethod == "PUT" } } /** * Matcher testing that the `NSURLRequest` is using the **PATCH** `HTTPMethod` * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * is using the PATCH method */ -public func isMethodPATCH() -> OHHTTPStubsTestBlock { +public func isMethodPATCH() -> HTTPStubsTestBlock { return { $0.httpMethod == "PATCH" } } /** * Matcher testing that the `NSURLRequest` is using the **DELETE** `HTTPMethod` * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * is using the DELETE method */ -public func isMethodDELETE() -> OHHTTPStubsTestBlock { +public func isMethodDELETE() -> HTTPStubsTestBlock { return { $0.httpMethod == "DELETE" } } /** * Matcher testing that the `NSURLRequest` is using the **HEAD** `HTTPMethod` * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * is using the HEAD method */ -public func isMethodHEAD() -> OHHTTPStubsTestBlock { +public func isMethodHEAD() -> HTTPStubsTestBlock { return { $0.httpMethod == "HEAD" } } @@ -180,10 +183,10 @@ public func isMethodHEAD() -> OHHTTPStubsTestBlock { * * - Parameter url: The absolute url string to match * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * has the given absolute url */ -public func isAbsoluteURLString(_ url: String) -> OHHTTPStubsTestBlock { +public func isAbsoluteURLString(_ url: String) -> HTTPStubsTestBlock { return { req in req.url?.absoluteString == url } } @@ -194,10 +197,10 @@ public func isAbsoluteURLString(_ url: String) -> OHHTTPStubsTestBlock { * * - Parameter scheme: The scheme to match * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * has the given scheme */ -public func isScheme(_ scheme: String) -> OHHTTPStubsTestBlock { +public func isScheme(_ scheme: String) -> HTTPStubsTestBlock { precondition(!scheme.contains("://"), "The scheme part of an URL never contains '://'. Only use strings like 'https' for this value, and not things like 'https://'") precondition(!scheme.contains("/"), "The scheme part of an URL never contains any slash. Only use strings like 'https' for this value, and not things like 'https://api.example.com/'") return { req in req.url?.scheme == scheme } @@ -210,10 +213,10 @@ public func isScheme(_ scheme: String) -> OHHTTPStubsTestBlock { * * - Parameter host: The host to match (e.g. 'api.example.com') * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * has the given host */ -public func isHost(_ host: String) -> OHHTTPStubsTestBlock { +public func isHost(_ host: String) -> HTTPStubsTestBlock { precondition(!host.contains("/"), "The host part of an URL never contains any slash. Only use strings like 'api.example.com' for this value, and not things like 'https://api.example.com/'") return { req in req.url?.host == host } } @@ -225,13 +228,13 @@ public func isHost(_ host: String) -> OHHTTPStubsTestBlock { * * - Parameter path: The path to match * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request * has exactly the given path * * - Note: URL paths are usually absolute and thus starts with a '/' (which you * should include in the `path` parameter unless you're testing relative URLs) */ -public func isPath(_ path: String) -> OHHTTPStubsTestBlock { +public func isPath(_ path: String) -> HTTPStubsTestBlock { return { req in req.url?.path == path } } @@ -247,13 +250,13 @@ private func getPath(_ req: URLRequest) -> String? { * * - Parameter path: The path to match * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request's + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request's * path starts with the given string * * - Note: URL paths are usually absolute and thus starts with a '/' (which you * should include in the `path` parameter unless you're testing relative URLs) */ -public func pathStartsWith(_ path: String) -> OHHTTPStubsTestBlock { +public func pathStartsWith(_ path: String) -> HTTPStubsTestBlock { return { req in getPath(req)?.hasPrefix(path) ?? false } } @@ -262,10 +265,10 @@ public func pathStartsWith(_ path: String) -> OHHTTPStubsTestBlock { * * - Parameter path: The path to match * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request's + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request's * path ends with the given string */ -public func pathEndsWith(_ path: String) -> OHHTTPStubsTestBlock { +public func pathEndsWith(_ path: String) -> HTTPStubsTestBlock { return { req in getPath(req)?.hasSuffix(path) ?? false } } @@ -274,12 +277,12 @@ public func pathEndsWith(_ path: String) -> OHHTTPStubsTestBlock { * * - Parameter regex: The Regular Expression we want the path to match * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request's + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request's * path matches the given regular expression * * - Note: URL paths are usually absolute and thus starts with a '/' */ -public func pathMatches(_ regex: NSRegularExpression) -> OHHTTPStubsTestBlock { +public func pathMatches(_ regex: NSRegularExpression) -> HTTPStubsTestBlock { return { req in guard let path = getPath(req) else { return false } let range = NSRange(location: 0, length: path.utf16.count) @@ -298,21 +301,21 @@ public func pathMatches(_ regex: NSRegularExpression) -> OHHTTPStubsTestBlock { * - Parameter options: The Regular Expression options to use. * Defaults to no option. Common option includes e.g. `.caseInsensitive`. * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request's + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request's * path matches the given regular expression * * - Note: This is a convenience function building an NSRegularExpression * and calling pathMatches(…) with it */ #if swift(>=3.0) -public func pathMatches(_ regexString: String, options: NSRegularExpression.Options = []) -> OHHTTPStubsTestBlock { +public func pathMatches(_ regexString: String, options: NSRegularExpression.Options = []) -> HTTPStubsTestBlock { guard let regex = try? NSRegularExpression(pattern: regexString, options: options) else { return { _ in false } } return pathMatches(regex) } #else - public func pathMatches(_ regexString: String, options: NSRegularExpressionOptions = []) -> OHHTTPStubsTestBlock { + public func pathMatches(_ regexString: String, options: NSRegularExpressionOptions = []) -> HTTPStubsTestBlock { guard let regex = try? NSRegularExpression(pattern: regexString, options: options) else { return { _ in false } } @@ -325,10 +328,10 @@ public func pathMatches(_ regexString: String, options: NSRegularExpression.Opti * * - Parameter ext: The file extension to match (without the dot) * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds only if the request path + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds only if the request path * ends with the given extension */ -public func isExtension(_ ext: String) -> OHHTTPStubsTestBlock { +public func isExtension(_ ext: String) -> HTTPStubsTestBlock { return { req in req.url?.pathExtension == ext } } @@ -337,7 +340,7 @@ public func isExtension(_ ext: String) -> OHHTTPStubsTestBlock { * * - Parameter params: The dictionary of query parameters to check the presence for * - * - Returns: a matcher (OHHTTPStubsTestBlock) that succeeds if the request contains + * - Returns: a matcher (HTTPStubsTestBlock) that succeeds if the request contains * the given query parameters with the given value. * * - Note: There is a difference between: @@ -345,7 +348,7 @@ public func isExtension(_ ext: String) -> OHHTTPStubsTestBlock { * (2) using `[q:nil]`, which matches a query parameter "?q" without a value at all */ @available(iOS 8.0, OSX 10.10, *) -public func containsQueryParams(_ params: [String:String?]) -> OHHTTPStubsTestBlock { +public func containsQueryParams(_ params: [String:String?]) -> HTTPStubsTestBlock { return { req in if let url = req.url { let comps = NSURLComponents(url: url, resolvingAgainstBaseURL: true) @@ -366,7 +369,7 @@ public func containsQueryParams(_ params: [String:String?]) -> OHHTTPStubsTestBl * * - Returns: a matcher that returns true if the `NSURLRequest`'s headers contain a value for the key name */ -public func hasHeaderNamed(_ name: String) -> OHHTTPStubsTestBlock { +public func hasHeaderNamed(_ name: String) -> HTTPStubsTestBlock { return { (req: URLRequest) -> Bool in return req.value(forHTTPHeaderField: name) != nil } @@ -380,7 +383,7 @@ public func hasHeaderNamed(_ name: String) -> OHHTTPStubsTestBlock { * - Returns: a matcher that returns true if the `NSURLRequest`'s headers contain a value for the key name and it's value * is equal to the parameter value */ -public func hasHeaderNamed(_ name: String, value: String) -> OHHTTPStubsTestBlock { +public func hasHeaderNamed(_ name: String, value: String) -> HTTPStubsTestBlock { return { (req: URLRequest) -> Bool in return req.value(forHTTPHeaderField: name) == value } @@ -393,12 +396,12 @@ public func hasHeaderNamed(_ name: String, value: String) -> OHHTTPStubsTestBloc * - Returns: a matcher that returns true if the `NSURLRequest`'s body is exactly the same as the parameter value */ #if swift(>=3.0) - public func hasBody(_ body: Data) -> OHHTTPStubsTestBlock { + public func hasBody(_ body: Data) -> HTTPStubsTestBlock { return { req in (req as NSURLRequest).ohhttpStubs_HTTPBody() == body } } #else - public func hasBody(_ body: NSData) -> OHHTTPStubsTestBlock { - return { req in req.OHHTTPStubs_HTTPBody() == body } + public func hasBody(_ body: NSData) -> HTTPStubsTestBlock { + return { req in req.OHOHHTTPStubs_HTTPBody() == body } } #endif @@ -409,7 +412,7 @@ public func hasHeaderNamed(_ name: String, value: String) -> OHHTTPStubsTestBloc * - Returns: a matcher that returns true if the `NSURLRequest`'s body contains a JSON object with the same keys and values as the parameter value */ #if swift(>=3.0) -public func hasJsonBody(_ jsonObject: [AnyHashable : Any]) -> OHHTTPStubsTestBlock { +public func hasJsonBody(_ jsonObject: [AnyHashable : Any]) -> HTTPStubsTestBlock { return { req in guard let httpBody = req.ohhttpStubs_httpBody, @@ -422,57 +425,57 @@ public func hasJsonBody(_ jsonObject: [AnyHashable : Any]) -> OHHTTPStubsTestBlo } #endif -// MARK: Operators on OHHTTPStubsTestBlock +// MARK: Operators on HTTPStubsTestBlock /** - * Combine different `OHHTTPStubsTestBlock` matchers with an 'OR' operation. + * Combine different `HTTPStubsTestBlock` matchers with an 'OR' operation. * * - Parameter lhs: the first matcher to test * - Parameter rhs: the second matcher to test * - * - Returns: a matcher (`OHHTTPStubsTestBlock`) that succeeds if either of the given matchers succeeds + * - Returns: a matcher (`HTTPStubsTestBlock`) that succeeds if either of the given matchers succeeds */ #if swift(>=3.0) - public func || (lhs: @escaping OHHTTPStubsTestBlock, rhs: @escaping OHHTTPStubsTestBlock) -> OHHTTPStubsTestBlock { + public func || (lhs: @escaping HTTPStubsTestBlock, rhs: @escaping HTTPStubsTestBlock) -> HTTPStubsTestBlock { return { req in lhs(req) || rhs(req) } } #else - public func || (lhs: OHHTTPStubsTestBlock, rhs: OHHTTPStubsTestBlock) -> OHHTTPStubsTestBlock { + public func || (lhs: HTTPStubsTestBlock, rhs: HTTPStubsTestBlock) -> HTTPStubsTestBlock { return { req in lhs(req) || rhs(req) } } #endif /** - * Combine different `OHHTTPStubsTestBlock` matchers with an 'AND' operation. + * Combine different `HTTPStubsTestBlock` matchers with an 'AND' operation. * * - Parameter lhs: the first matcher to test * - Parameter rhs: the second matcher to test * - * - Returns: a matcher (`OHHTTPStubsTestBlock`) that only succeeds if both of the given matchers succeeds + * - Returns: a matcher (`HTTPStubsTestBlock`) that only succeeds if both of the given matchers succeeds */ #if swift(>=3.0) - public func && (lhs: @escaping OHHTTPStubsTestBlock, rhs: @escaping OHHTTPStubsTestBlock) -> OHHTTPStubsTestBlock { + public func && (lhs: @escaping HTTPStubsTestBlock, rhs: @escaping HTTPStubsTestBlock) -> HTTPStubsTestBlock { return { req in lhs(req) && rhs(req) } } #else - public func && (lhs: OHHTTPStubsTestBlock, rhs: OHHTTPStubsTestBlock) -> OHHTTPStubsTestBlock { + public func && (lhs: HTTPStubsTestBlock, rhs: HTTPStubsTestBlock) -> HTTPStubsTestBlock { return { req in lhs(req) && rhs(req) } } #endif /** - * Create the opposite of a given `OHHTTPStubsTestBlock` matcher. + * Create the opposite of a given `HTTPStubsTestBlock` matcher. * * - Parameter expr: the matcher to negate * - * - Returns: a matcher (OHHTTPStubsTestBlock) that only succeeds if the expr matcher fails + * - Returns: a matcher (HTTPStubsTestBlock) that only succeeds if the expr matcher fails */ #if swift(>=3.0) - public prefix func ! (expr: @escaping OHHTTPStubsTestBlock) -> OHHTTPStubsTestBlock { + public prefix func ! (expr: @escaping HTTPStubsTestBlock) -> HTTPStubsTestBlock { return { req in !expr(req) } } #else - public prefix func ! (expr: OHHTTPStubsTestBlock) -> OHHTTPStubsTestBlock { + public prefix func ! (expr: HTTPStubsTestBlock) -> HTTPStubsTestBlock { return { req in !expr(req) } } #endif diff --git a/OHHTTPStubs/Supporting Files/OHHTTPStubs Mac-Info.plist b/Sources/Supporting Files/OHHTTPStubs Mac-Info.plist similarity index 100% rename from OHHTTPStubs/Supporting Files/OHHTTPStubs Mac-Info.plist rename to Sources/Supporting Files/OHHTTPStubs Mac-Info.plist diff --git a/OHHTTPStubs/Supporting Files/OHHTTPStubs iOS-Info.plist b/Sources/Supporting Files/OHHTTPStubs iOS-Info.plist similarity index 100% rename from OHHTTPStubs/Supporting Files/OHHTTPStubs iOS-Info.plist rename to Sources/Supporting Files/OHHTTPStubs iOS-Info.plist diff --git a/OHHTTPStubs/Supporting Files/OHHTTPStubsUmbrella.h b/Sources/Supporting Files/OHHTTPStubs.h similarity index 87% rename from OHHTTPStubs/Supporting Files/OHHTTPStubsUmbrella.h rename to Sources/Supporting Files/OHHTTPStubs.h index f29f048e..0e10e788 100644 --- a/OHHTTPStubs/Supporting Files/OHHTTPStubsUmbrella.h +++ b/Sources/Supporting Files/OHHTTPStubs.h @@ -24,11 +24,10 @@ #import "Compatibility.h" #import "NSURLRequest+HTTPBodyTesting.h" -#import "OHHTTPStubs.h" -#import "OHHTTPStubsResponse.h" - -#import "OHHTTPStubsResponse+JSON.h" -#import "OHHTTPStubsResponse+HTTPMessage.h" -#import "OHHTTPStubs+Mocktail.h" -#import "OHPathHelpers.h" +#import "HTTPStubs.h" +#import "HTTPStubsResponse.h" +#import "HTTPStubsResponse+JSON.h" +#import "HTTPStubsResponse+HTTPMessage.h" +#import "HTTPStubs+Mocktail.h" +#import "HTTPStubsPathHelpers.h" diff --git a/OHHTTPStubs/UnitTests/Fixtures/MocktailFolder/cards.tail b/Tests/Fixtures/MocktailFolder/cards.tail similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/MocktailFolder/cards.tail rename to Tests/Fixtures/MocktailFolder/cards.tail diff --git a/OHHTTPStubs/UnitTests/Fixtures/MocktailFolder/login.tail b/Tests/Fixtures/MocktailFolder/login.tail similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/MocktailFolder/login.tail rename to Tests/Fixtures/MocktailFolder/login.tail diff --git a/OHHTTPStubs/UnitTests/Fixtures/MocktailFolder/logos_ebay.tail b/Tests/Fixtures/MocktailFolder/logos_ebay.tail similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/MocktailFolder/logos_ebay.tail rename to Tests/Fixtures/MocktailFolder/logos_ebay.tail diff --git a/OHHTTPStubs/UnitTests/Fixtures/empty.bundle/nothingtoseehere.json b/Tests/Fixtures/empty.bundle/nothingtoseehere.json similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/empty.bundle/nothingtoseehere.json rename to Tests/Fixtures/empty.bundle/nothingtoseehere.json diff --git a/OHHTTPStubs/UnitTests/Fixtures/emptyfile.json b/Tests/Fixtures/emptyfile.json similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/emptyfile.json rename to Tests/Fixtures/emptyfile.json diff --git a/OHHTTPStubs/UnitTests/Fixtures/login.tail b/Tests/Fixtures/login.tail similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/login.tail rename to Tests/Fixtures/login.tail diff --git a/OHHTTPStubs/UnitTests/Fixtures/login_content_type.tail b/Tests/Fixtures/login_content_type.tail similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/login_content_type.tail rename to Tests/Fixtures/login_content_type.tail diff --git a/OHHTTPStubs/UnitTests/Fixtures/login_content_type_and_headers.tail b/Tests/Fixtures/login_content_type_and_headers.tail similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/login_content_type_and_headers.tail rename to Tests/Fixtures/login_content_type_and_headers.tail diff --git a/OHHTTPStubs/UnitTests/Fixtures/login_headers.tail b/Tests/Fixtures/login_headers.tail similarity index 100% rename from OHHTTPStubs/UnitTests/Fixtures/login_headers.tail rename to Tests/Fixtures/login_headers.tail diff --git a/OHHTTPStubs/UnitTests/Test Suites/MocktailTests.m b/Tests/MocktailTests/MocktailTests.m similarity index 91% rename from OHHTTPStubs/UnitTests/Test Suites/MocktailTests.m rename to Tests/MocktailTests/MocktailTests.m index 73e09317..b8738bbd 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/MocktailTests.m +++ b/Tests/MocktailTests/MocktailTests.m @@ -27,10 +27,10 @@ #import -#if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" -#import "OHHTTPStubs+Mocktail.h" -#import "OHHTTPStubsResponse+JSON.h" +#if OHHTTPSTUBS_USE_STATIC_LIBRARY || SWIFT_PACKAGE +#import "HTTPStubs.h" +#import "HTTPStubs+Mocktail.h" +#import "HTTPStubsResponse+JSON.h" #else @import OHHTTPStubs; #endif @@ -44,7 +44,7 @@ @implementation MocktailTests - (void)setUp { [super setUp]; - [OHHTTPStubs removeAllStubs]; + [HTTPStubs removeAllStubs]; NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; self.session = [NSURLSession sessionWithConfiguration:configuration delegate:nil delegateQueue:nil]; @@ -61,7 +61,7 @@ - (void)testMocktailLoginSuccess { NSError *error = nil; NSBundle *bundle = [NSBundle bundleForClass:self.class]; - [OHHTTPStubs stubRequestsUsingMocktailNamed:@"login" inBundle:bundle error: &error]; + [HTTPStubs stubRequestsUsingMocktailNamed:@"login" inBundle:bundle error: &error]; XCTAssertNil(error, @"Error while stubbing 'login.tail':%@", [error localizedDescription]); [self runLogin]; } @@ -70,7 +70,7 @@ - (void)testMocktailsAtFolder { NSError *error = nil; NSBundle *bundle = [NSBundle bundleForClass:self.class]; - [OHHTTPStubs stubRequestsUsingMocktailsAtPath:@"MocktailFolder" inBundle:bundle error:&error]; + [HTTPStubs stubRequestsUsingMocktailsAtPath:@"MocktailFolder" inBundle:bundle error:&error]; XCTAssertNil(error, @"Error while stubbing Mocktails at folder 'MocktailFolder': %@", [error localizedDescription]); [self runLogin]; [self runGetCards]; @@ -80,7 +80,7 @@ - (void)testMocktailHeaders { NSError *error = nil; NSBundle *bundle = [NSBundle bundleForClass:self.class]; - [OHHTTPStubs stubRequestsUsingMocktailNamed:@"login_headers" inBundle:bundle error: &error]; + [HTTPStubs stubRequestsUsingMocktailNamed:@"login_headers" inBundle:bundle error: &error]; XCTAssertNil(error, @"Error while stubbing 'login_headers.tail':%@", [error localizedDescription]); NSHTTPURLResponse *response = [self runLogin]; XCTAssertEqualObjects(response.allHeaderFields[@"Connection"], @"Close"); @@ -90,7 +90,7 @@ - (void)testMocktailContentType { NSError *error = nil; NSBundle *bundle = [NSBundle bundleForClass:self.class]; - [OHHTTPStubs stubRequestsUsingMocktailNamed:@"login_content_type" inBundle:bundle error: &error]; + [HTTPStubs stubRequestsUsingMocktailNamed:@"login_content_type" inBundle:bundle error: &error]; XCTAssertNil(error, @"Error while stubbing 'login_content_type.tail':%@", [error localizedDescription]); [self runLogin]; } @@ -99,7 +99,7 @@ - (void)testMocktailContentTypeAndHeaders { NSError *error = nil; NSBundle *bundle = [NSBundle bundleForClass:self.class]; - [OHHTTPStubs stubRequestsUsingMocktailNamed:@"login_content_type_and_headers" inBundle:bundle error: &error]; + [HTTPStubs stubRequestsUsingMocktailNamed:@"login_content_type_and_headers" inBundle:bundle error: &error]; XCTAssertNil(error, @"Error while stubbing 'login_content_type_and_headers.tail':%@", [error localizedDescription]); NSHTTPURLResponse *response = [self runLogin]; XCTAssertEqualObjects(response.allHeaderFields[@"Connection"], @"Close"); diff --git a/OHHTTPStubs/UnitTests/Test Suites/SwiftHelpersTests.swift b/Tests/OHHTTPStubsSwiftTests/SwiftHelpersTests.swift similarity index 98% rename from OHHTTPStubs/UnitTests/Test Suites/SwiftHelpersTests.swift rename to Tests/OHHTTPStubsSwiftTests/SwiftHelpersTests.swift index b76b80f7..9541e9cf 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/SwiftHelpersTests.swift +++ b/Tests/OHHTTPStubsSwiftTests/SwiftHelpersTests.swift @@ -8,7 +8,12 @@ import Foundation import XCTest +#if SWIFT_PACKAGE +@testable import OHHTTPStubsSwift @testable import OHHTTPStubs +#else +@testable import OHHTTPStubs +#endif #if swift(>=3.0) #else @@ -542,8 +547,8 @@ class SwiftHelpersTests : XCTestCase { "path;/foo/bar/baz" ] - let trueMatcher: OHHTTPStubsTestBlock = { _ in return true } - let falseMatcher: OHHTTPStubsTestBlock = { _ in return false } + let trueMatcher: HTTPStubsTestBlock = { _ in return true } + let falseMatcher: HTTPStubsTestBlock = { _ in return false } func testOrOperator() { for url in sampleURLs { diff --git a/OHHTTPStubs/UnitTests/Test Suites/AFNetworkingTests.m b/Tests/OHHTTPStubsTests/AFNetworkingTests.m similarity index 90% rename from OHHTTPStubs/UnitTests/Test Suites/AFNetworkingTests.m rename to Tests/OHHTTPStubsTests/AFNetworkingTests.m index b899946e..e5b4cf03 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/AFNetworkingTests.m +++ b/Tests/OHHTTPStubsTests/AFNetworkingTests.m @@ -22,12 +22,16 @@ * ***********************************************************************************/ +#if SWIFT_PACKAGE +#warning "Skipping AFNetworking tests, due to AFNetworking not supporting Swift Package Manager. +#else + #import #import #if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" -#import "OHHTTPStubsResponse+JSON.h" +#import "HTTPStubs.h" +#import "HTTPStubsResponse+JSON.h" #else @import OHHTTPStubs; #endif @@ -43,7 +47,7 @@ @implementation AFNetworkingTests -(void)setUp { [super setUp]; - [OHHTTPStubs removeAllStubs]; + [HTTPStubs removeAllStubs]; } -(void)test_AFHTTPRequestOperation_success @@ -51,10 +55,10 @@ -(void)test_AFHTTPRequestOperation_success static const NSTimeInterval kRequestTime = 0.05; static const NSTimeInterval kResponseTime = 0.1; NSData* expectedResponse = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil] requestTime:kRequestTime responseTime:kResponseTime]; }]; @@ -83,10 +87,10 @@ -(void)test_AFHTTPRequestOperation_multiple_choices static const NSTimeInterval kRequestTime = 0.05; static const NSTimeInterval kResponseTime = 0.1; NSData* expectedResponse = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:expectedResponse statusCode:300 headers:@{@"Location":@"http://www.iana.org/domains/another/example"}] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:expectedResponse statusCode:300 headers:@{@"Location":@"http://www.iana.org/domains/another/example"}] requestTime:kRequestTime responseTime:kResponseTime]; }]; @@ -126,10 +130,10 @@ -(void)test_AFHTTPRequestOperation_redirect static const NSTimeInterval kResponseTime = 0.1; NSURL* redirectURL = [NSURL URLWithString:@"https://httpbin.org/get"]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:[NSData data] statusCode:302 headers:@{@"Location":redirectURL.absoluteString}] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:[NSData data] statusCode:302 headers:@{@"Location":redirectURL.absoluteString}] requestTime:kRequestTime responseTime:kResponseTime]; }]; @@ -237,10 +241,10 @@ - (void)test_AFHTTPURLSessionCustom static const NSTimeInterval kResponseTime = 0.2; NSDictionary *expectedResponseDict = @{@"Success" : @"Yes"}; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return [request.URL.scheme isEqualToString:@"stubs"]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithJSONObject:expectedResponseDict statusCode:200 headers:nil] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithJSONObject:expectedResponseDict statusCode:200 headers:nil] requestTime:kRequestTime responseTime:kResponseTime]; }]; @@ -280,3 +284,4 @@ - (void)test_AFHTTPURLSessionCustom #warning Unit Tests using NSURLSession were not compiled nor executed, because NSURLSession is only available since iOS7/OSX10.9 SDK. \ -------- Compile using iOS7 or OSX10.9 SDK then launch the tests on the iOS7 simulator or an OSX10.9 target for them to be executed. #endif +#endif diff --git a/OHHTTPStubs/UnitTests/Test Suites/NSURLConnectionDelegateTests.m b/Tests/OHHTTPStubsTests/NSURLConnectionDelegateTests.m similarity index 91% rename from OHHTTPStubs/UnitTests/Test Suites/NSURLConnectionDelegateTests.m rename to Tests/OHHTTPStubsTests/NSURLConnectionDelegateTests.m index 20dbb3ca..14398226 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/NSURLConnectionDelegateTests.m +++ b/Tests/OHHTTPStubsTests/NSURLConnectionDelegateTests.m @@ -28,8 +28,8 @@ #import -#if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" +#if OHHTTPSTUBS_USE_STATIC_LIBRARY || SWIFT_PACKAGE +#import "HTTPStubs.h" #else @import OHHTTPStubs; #endif @@ -57,7 +57,7 @@ -(void)setUp { [super setUp]; _data = [[NSMutableData alloc] init]; - [OHHTTPStubs removeAllStubs]; + [HTTPStubs removeAllStubs]; } -(void)tearDown @@ -125,10 +125,10 @@ -(void)test_NSURLConnectionDelegate_success static const NSTimeInterval kResponseTime = 0.5; NSData* testData = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:testData + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:kRequestTime responseTime:kResponseTime]; @@ -157,10 +157,10 @@ -(void)test_NSURLConnectionDelegate_multiple_choices static const NSTimeInterval kResponseTime = 0.5; NSData* testData = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:testData + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:testData statusCode:300 headers:@{@"Location":@"http://www.iana.org/domains/another/example"}] requestTime:kRequestTime responseTime:kResponseTime]; @@ -188,10 +188,10 @@ -(void)test_NSURLConnectionDelegate_error static const NSTimeInterval kResponseTime = 0.5; NSError* expectedError = [NSError errorWithDomain:NSURLErrorDomain code:404 userInfo:nil]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - OHHTTPStubsResponse* resp = [OHHTTPStubsResponse responseWithError:expectedError]; + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + HTTPStubsResponse* resp = [HTTPStubsResponse responseWithError:expectedError]; resp.responseTime = kResponseTime; return resp; }]; @@ -221,10 +221,10 @@ -(void)test_NSURLConnectionDelegate_error -(void)test_NSURLConnection_cancel { - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:[@"" dataUsingEncoding:NSUTF8StringEncoding] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:[@"" dataUsingEncoding:NSUTF8StringEncoding] statusCode:500 headers:nil] requestTime:0.0 responseTime:1.5]; @@ -260,12 +260,12 @@ -(void)test_NSURLConnection_cookies { NSString* const cookieName = @"SESSIONID"; NSString* const cookieValue = [NSProcessInfo.processInfo globallyUniqueString]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { NSString* cookie = [NSString stringWithFormat:@"%@=%@;", cookieName, cookieValue]; NSDictionary* headers = @{@"Set-Cookie": cookie}; - return [[OHHTTPStubsResponse responseWithData:[@"Yummy cookies" dataUsingEncoding:NSUTF8StringEncoding] + return [[HTTPStubsResponse responseWithData:[@"Yummy cookies" dataUsingEncoding:NSUTF8StringEncoding] statusCode:200 headers:headers] requestTime:0.0 responseTime:0.1]; @@ -330,21 +330,21 @@ - (void)test_NSURLConnection_redirected NSString* endCookieValue = [NSProcessInfo.processInfo globallyUniqueString]; NSURL *endURL = [NSURL URLWithString:@"http://www.google.com/"]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { if ([request.URL isEqual:redirectURL]) { NSString* redirectCookie = [NSString stringWithFormat:@"%@=%@;", redirectCookieName, redirectCookieValue]; NSDictionary* headers = @{ @"Location": endURL.absoluteString, @"Set-Cookie": redirectCookie }; - return [[OHHTTPStubsResponse responseWithData:redirectData + return [[HTTPStubsResponse responseWithData:redirectData statusCode:311 // any 300-level request will do headers:headers] requestTime:kRequestTime responseTime:kResponseTime]; } else { NSString* endCookie = [NSString stringWithFormat:@"%@=%@;", endCookieName, endCookieValue]; NSDictionary* headers = @{ @"Set-Cookie": endCookie }; - return [[OHHTTPStubsResponse responseWithData:testData + return [[HTTPStubsResponse responseWithData:testData statusCode:200 headers:headers] requestTime:kRequestTime responseTime:kResponseTime]; diff --git a/OHHTTPStubs/UnitTests/Test Suites/NSURLConnectionTests.m b/Tests/OHHTTPStubsTests/NSURLConnectionTests.m similarity index 91% rename from OHHTTPStubs/UnitTests/Test Suites/NSURLConnectionTests.m rename to Tests/OHHTTPStubsTests/NSURLConnectionTests.m index 1a5cd592..531d97ba 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/NSURLConnectionTests.m +++ b/Tests/OHHTTPStubsTests/NSURLConnectionTests.m @@ -28,8 +28,8 @@ #import -#if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" +#if OHHTTPSTUBS_USE_STATIC_LIBRARY || SWIFT_PACKAGE +#import "HTTPStubs.h" #else @import OHHTTPStubs; #endif @@ -43,7 +43,7 @@ @implementation NSURLConnectionTests -(void)setUp { [super setUp]; - [OHHTTPStubs removeAllStubs]; + [HTTPStubs removeAllStubs]; } static const NSTimeInterval kRequestTime = 0.1; @@ -57,10 +57,10 @@ -(void)test_NSURLConnection_sendSyncronousRequest_mainQueue { NSData* testData = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:testData + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:kRequestTime responseTime:kResponseTime]; @@ -93,10 +93,10 @@ -(void)_test_NSURLConnection_sendAsyncronousRequest_onOperationQueue:(NSOperatio { NSData* testData = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:testData + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:kRequestTime responseTime:kResponseTime]; @@ -142,12 +142,12 @@ -(void)_test_NSURLConnection_sendMultipleAsyncronousRequestsOnOperationQueue:(NS return [[NSString stringWithFormat:@"",req.URL.absoluteString] dataUsingEncoding:NSUTF8StringEncoding]; }; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { NSData* retData = dataForRequest(request); NSTimeInterval responseTime = [request.URL.lastPathComponent doubleValue]; - return [[OHHTTPStubsResponse responseWithData:retData + return [[HTTPStubsResponse responseWithData:retData statusCode:200 headers:nil] requestTime:responseTime*.1 responseTime:responseTime]; diff --git a/OHHTTPStubs/UnitTests/Test Suites/NSURLSessionTests.m b/Tests/OHHTTPStubsTests/NSURLSessionTests.m similarity index 95% rename from OHHTTPStubs/UnitTests/Test Suites/NSURLSessionTests.m rename to Tests/OHHTTPStubsTests/NSURLSessionTests.m index e5e0a6a3..07914282 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/NSURLSessionTests.m +++ b/Tests/OHHTTPStubsTests/NSURLSessionTests.m @@ -31,9 +31,9 @@ #import -#if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" -#import "OHHTTPStubsResponse+JSON.h" +#if OHHTTPSTUBS_USE_STATIC_LIBRARY || SWIFT_PACKAGE +#import "HTTPStubs.h" +#import "HTTPStubsResponse+JSON.h" #import "NSURLRequest+HTTPBodyTesting.h" #else @import OHHTTPStubs; @@ -53,7 +53,7 @@ @implementation NSURLSessionTests - (void)setUp { [super setUp]; - [OHHTTPStubs removeAllStubs]; + [HTTPStubs removeAllStubs]; } - (void)_test_NSURLSession:(NSURLSession*)session @@ -65,10 +65,10 @@ - (void)_test_NSURLSession:(NSURLSession*)session static const NSTimeInterval kRequestTime = 0.0; static const NSTimeInterval kResponseTime = 0.2; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithJSONObject:json statusCode:200 headers:nil] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithJSONObject:json statusCode:200 headers:nil] requestTime:kRequestTime responseTime:kResponseTime]; }]; @@ -126,20 +126,20 @@ - (void)_test_redirect_NSURLSession:(NSURLSession*)session NSData* requestBody = json ? [NSJSONSerialization dataWithJSONObject:json options:0 error:NULL] : nil; // First request: just return a redirect response (3xx, empty body) - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return [[[request URL] path] isEqualToString:@"/oldlocation"]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *originalRequest) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *originalRequest) { NSDictionary *headers = @{ @"Location": @"foo://unknownhost:666/newlocation" }; - return [[OHHTTPStubsResponse responseWithData:[NSData new] + return [[HTTPStubsResponse responseWithData:[NSData new] statusCode:redirectStatusCode headers:headers] requestTime:requestTime responseTime:responseTime]; }]; // Second request = redirected location: capture method+body of the redirected request + return 200 with the finalJSONResponse - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return [[[request URL] path] isEqualToString:@"/newlocation"]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *redirectedRequest) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *redirectedRequest) { capturedRedirectedRequestMethod = redirectedRequest.HTTPMethod; capturedRedirectedRequestHeaders = redirectedRequest.allHTTPHeaderFields; if (redirectedRequest.OHHTTPStubs_HTTPBody) { @@ -147,7 +147,7 @@ - (void)_test_redirect_NSURLSession:(NSURLSession*)session } else { capturedRedirectedRequestJSONBody = nil; } - return [[OHHTTPStubsResponse responseWithJSONObject:@{ @"RequestBody": json ?: [NSNull null] } + return [[HTTPStubsResponse responseWithJSONObject:@{ @"RequestBody": json ?: [NSNull null] } statusCode:200 headers:nil] requestTime:requestTime responseTime:responseTime]; @@ -445,7 +445,7 @@ - (void)test_NSURLSessionDefaultConfig_Disabled if ([NSURLSessionConfiguration class] && [NSURLSession class]) { NSURLSessionConfiguration* config = [NSURLSessionConfiguration ephemeralSessionConfiguration]; - [OHHTTPStubs setEnabled:NO forSessionConfiguration:config]; // Disable stubs for this session + [HTTPStubs setEnabled:NO forSessionConfiguration:config]; // Disable stubs for this session NSURLSession *session = [NSURLSession sessionWithConfiguration:config]; NSDictionary* json = @{@"Success": @"Yes"}; @@ -477,10 +477,10 @@ - (void)test_NSURLSession_DataTask_DelegateMethods if ([NSURLSessionConfiguration class] && [NSURLSession class]) { NSData* expectedResponse = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return [request.URL.scheme isEqualToString:@"stub"]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil] responseTime:0.5]; }]; @@ -512,11 +512,11 @@ - (void)test_NSURLSessionCustomHTTPBody NSData* expectedResponse = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; NSString* expectedBodyString = @"body"; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { NSData* body = [request OHHTTPStubs_HTTPBody]; return [[[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding] isEqualToString:expectedBodyString]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil] responseTime:0.2]; }]; @@ -560,11 +560,11 @@ - (void)test_NSURLSessionNativeHTTPBody NSData* expectedResponse = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; NSString* expectedBodyString = @"body"; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { NSData* body = [request HTTPBody]; // this is not expected to work correctly return [[[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding] isEqualToString:expectedBodyString]; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil] responseTime:0.2]; }]; diff --git a/OHHTTPStubs/UnitTests/Test Suites/NilValuesTests.m b/Tests/OHHTTPStubsTests/NilValuesTests.m similarity index 81% rename from OHHTTPStubs/UnitTests/Test Suites/NilValuesTests.m rename to Tests/OHHTTPStubsTests/NilValuesTests.m index 83690f64..c4d8ba93 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/NilValuesTests.m +++ b/Tests/OHHTTPStubsTests/NilValuesTests.m @@ -28,9 +28,9 @@ #import -#if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" -#import "OHPathHelpers.h" +#if OHHTTPSTUBS_USE_STATIC_LIBRARY || SWIFT_PACKAGE +#import "HTTPStubs.h" +#import "HTTPStubsPathHelpers.h" #else @import OHHTTPStubs; #endif @@ -44,17 +44,17 @@ @implementation NilValuesTests -(void)setUp { [super setUp]; - [OHHTTPStubs removeAllStubs]; + [HTTPStubs removeAllStubs]; } - (void)test_NilData { - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wnonnull" - return [OHHTTPStubsResponse responseWithData:nil statusCode:400 headers:nil]; + return [HTTPStubsResponse responseWithData:nil statusCode:400 headers:nil]; #pragma clang diagnostic pop }]; @@ -76,10 +76,10 @@ - (void)test_NilData - (void)test_EmptyData { - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:[NSData data] statusCode:400 headers:nil] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:[NSData data] statusCode:400 headers:nil] requestTime:0.01 responseTime:0.01]; }]; @@ -101,12 +101,12 @@ - (void)test_EmptyData - (void)test_NilPath { - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wnonnull" - return [[OHHTTPStubsResponse responseWithFileAtPath:nil statusCode:501 headers:nil] + return [[HTTPStubsResponse responseWithFileAtPath:nil statusCode:501 headers:nil] requestTime:0.01 responseTime:0.01]; #pragma clang diagnostic pop }]; @@ -129,12 +129,12 @@ - (void)test_NilPath - (void)test_NilPathWithURL { - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wnonnull" - return [[OHHTTPStubsResponse responseWithFileURL:nil statusCode:501 headers:nil] + return [[HTTPStubsResponse responseWithFileURL:nil statusCode:501 headers:nil] requestTime:0.01 responseTime:0.01]; #pragma clang diagnostic pop }]; @@ -157,7 +157,7 @@ - (void)test_NilPathWithURL - (void)test_InvalidPath { - XCTAssertThrowsSpecificNamed([OHHTTPStubsResponse responseWithFileAtPath:@"foo/bar" statusCode:501 headers:nil] + XCTAssertThrowsSpecificNamed([HTTPStubsResponse responseWithFileAtPath:@"foo/bar" statusCode:501 headers:nil] , NSException, NSInternalInconsistencyException, @"An exception should be thrown if a non-file URL is given"); } @@ -165,7 +165,7 @@ - (void)test_InvalidPathWithURL { NSURL *httpURL = [NSURL fileURLWithPath:@"foo/bar"]; NSAssert(httpURL, @"If the URL is nil an empty response is sent instead of an exception being thrown"); - XCTAssertThrowsSpecificNamed([OHHTTPStubsResponse responseWithFileURL:httpURL statusCode:501 headers:nil] + XCTAssertThrowsSpecificNamed([HTTPStubsResponse responseWithFileURL:httpURL statusCode:501 headers:nil] , NSException, NSInternalInconsistencyException, @"An exception should be thrown if a non-file URL is given"); } @@ -173,18 +173,18 @@ - (void)test_NonFileURL { NSURL *httpURL = [NSURL URLWithString:@"http://www.iana.org/domains/example/"]; NSAssert(httpURL, @"If the URL is nil an empty response is sent instead of an exception being thrown"); - XCTAssertThrowsSpecificNamed([OHHTTPStubsResponse responseWithFileURL:httpURL statusCode:501 headers:nil] + XCTAssertThrowsSpecificNamed([HTTPStubsResponse responseWithFileURL:httpURL statusCode:501 headers:nil] , NSException, NSInternalInconsistencyException, @"An exception should be thrown if a non-file URL is given"); } - (void)test_EmptyFile { - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { NSString* emptyFile = OHPathForFile(@"emptyfile.json", self.class); - return [[OHHTTPStubsResponse responseWithFileAtPath:emptyFile statusCode:500 headers:nil] + return [[HTTPStubsResponse responseWithFileAtPath:emptyFile statusCode:500 headers:nil] requestTime:0.01 responseTime:0.01]; }]; @@ -206,11 +206,11 @@ - (void)test_EmptyFile - (void)test_EmptyFileWithURL { - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { NSURL *fileURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"emptyfile" withExtension:@"json"]; - return [[OHHTTPStubsResponse responseWithFileURL:fileURL statusCode:500 headers:nil] + return [[HTTPStubsResponse responseWithFileURL:fileURL statusCode:500 headers:nil] requestTime:0.01 responseTime:0.01]; }]; @@ -234,10 +234,10 @@ - (void)_test_NilURLAndCookieHandlingEnabled:(BOOL)handleCookiesEnabled { NSData* expectedResponse = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [OHHTTPStubsResponse responseWithData:expectedResponse + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [HTTPStubsResponse responseWithData:expectedResponse statusCode:200 headers:nil]; }]; diff --git a/OHHTTPStubs/UnitTests/Test Suites/OHPathHelpersTests.m b/Tests/OHHTTPStubsTests/OHPathHelpersTests.m similarity index 69% rename from OHHTTPStubs/UnitTests/Test Suites/OHPathHelpersTests.m rename to Tests/OHHTTPStubsTests/OHPathHelpersTests.m index fc01b2d9..2db6a941 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/OHPathHelpersTests.m +++ b/Tests/OHHTTPStubsTests/OHPathHelpersTests.m @@ -1,16 +1,16 @@ #import -#if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" -#import "OHPathHelpers.h" +#if OHHTTPSTUBS_USE_STATIC_LIBRARY || SWIFT_PACKAGE +#import "HTTPStubs.h" +#import "HTTPStubsPathHelpers.h" #else @import OHHTTPStubs; #endif -@interface OHPathHelpersTests : XCTestCase +@interface HTTPStubsPathHelpersTests : XCTestCase @end -@implementation OHPathHelpersTests +@implementation HTTPStubsPathHelpersTests - (void)testOHResourceBundle { NSBundle *classBundle = [NSBundle bundleForClass:self.class]; diff --git a/OHHTTPStubs/UnitTests/Test Suites/TimingTests.m b/Tests/OHHTTPStubsTests/TimingTests.m similarity index 95% rename from OHHTTPStubs/UnitTests/Test Suites/TimingTests.m rename to Tests/OHHTTPStubsTests/TimingTests.m index df104e71..eb5dffc2 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/TimingTests.m +++ b/Tests/OHHTTPStubsTests/TimingTests.m @@ -32,8 +32,8 @@ #import -#if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" +#if OHHTTPSTUBS_USE_STATIC_LIBRARY || SWIFT_PACKAGE +#import "HTTPStubs.h" #else @import OHHTTPStubs; #endif @@ -59,7 +59,7 @@ -(void)setUp _error = nil; // _didReceiveResponseTS = nil; _didFinishLoadingTS = nil; - [OHHTTPStubs removeAllStubs]; + [HTTPStubs removeAllStubs]; } -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { @@ -95,10 +95,10 @@ -(void)connectionDidFinishLoading:(NSURLConnection *)connection -(void)_testWithData:(NSData*)stubData requestTime:(NSTimeInterval)requestTime responseTime:(NSTimeInterval)responseTime { - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:stubData + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:stubData statusCode:200 headers:nil] requestTime:requestTime responseTime:responseTime]; diff --git a/OHHTTPStubs/UnitTests/Test Suites/WithContentsOfURLTests.m b/Tests/OHHTTPStubsTests/WithContentsOfURLTests.m similarity index 89% rename from OHHTTPStubs/UnitTests/Test Suites/WithContentsOfURLTests.m rename to Tests/OHHTTPStubsTests/WithContentsOfURLTests.m index b5df08d4..e97b84b9 100644 --- a/OHHTTPStubs/UnitTests/Test Suites/WithContentsOfURLTests.m +++ b/Tests/OHHTTPStubsTests/WithContentsOfURLTests.m @@ -25,8 +25,8 @@ #import -#if OHHTTPSTUBS_USE_STATIC_LIBRARY -#import "OHHTTPStubs.h" +#if OHHTTPSTUBS_USE_STATIC_LIBRARY || SWIFT_PACKAGE +#import "HTTPStubs.h" #else @import OHHTTPStubs; #endif @@ -40,7 +40,7 @@ @implementation WithContentsOfURLTests -(void)setUp { [super setUp]; - [OHHTTPStubs removeAllStubs]; + [HTTPStubs removeAllStubs]; } static const NSTimeInterval kRequestTime = 0.1; @@ -54,10 +54,10 @@ -(void)test_NSString_stringWithContentsOfURL_mainQueue { NSString* testString = NSStringFromSelector(_cmd); - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:[testString dataUsingEncoding:NSUTF8StringEncoding] + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:[testString dataUsingEncoding:NSUTF8StringEncoding] statusCode:200 headers:nil] requestTime:kRequestTime responseTime:kResponseTime]; @@ -91,10 +91,10 @@ -(void)test_NSData_dataWithContentsOfURL_mainQueue { NSData* testData = [NSStringFromSelector(_cmd) dataUsingEncoding:NSUTF8StringEncoding]; - [OHHTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { + [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request) { return YES; - } withStubResponse:^OHHTTPStubsResponse *(NSURLRequest *request) { - return [[OHHTTPStubsResponse responseWithData:testData + } withStubResponse:^HTTPStubsResponse *(NSURLRequest *request) { + return [[HTTPStubsResponse responseWithData:testData statusCode:200 headers:nil] requestTime:kRequestTime responseTime:kResponseTime]; diff --git a/OHHTTPStubs/UnitTests/UnitTests-Info.plist b/Tests/Supporting Files/UnitTests-Info.plist similarity index 100% rename from OHHTTPStubs/UnitTests/UnitTests-Info.plist rename to Tests/Supporting Files/UnitTests-Info.plist diff --git a/OHHTTPStubs/UnitTests/UnitTests-Prefix.pch b/Tests/Supporting Files/UnitTests-Prefix.pch similarity index 100% rename from OHHTTPStubs/UnitTests/UnitTests-Prefix.pch rename to Tests/Supporting Files/UnitTests-Prefix.pch