From 1fef0726bb127011cb7362da516f3ce3f8ea146f Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 17:31:01 +0900 Subject: [PATCH 01/14] Add .swift-version file --- .swift-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .swift-version diff --git a/.swift-version b/.swift-version new file mode 100644 index 00000000..82393b5b --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +DEVELOPMENT-SNAPSHOT-2016-03-01-a From a54ba0a64cd4d2fa00de2d175656bd553c3bf3ac Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 17:51:13 +0900 Subject: [PATCH 02/14] Move source files to Sources/ --- APIKit.xcodeproj/project.pbxproj | 88 ++++++++++--------- {APIKit => Sources}/APIError.swift | 0 {APIKit => Sources}/APIKit.h | 0 {APIKit => Sources}/HTTPMethod.swift | 0 {APIKit => Sources}/Info.plist | 0 .../MultipartFormDataSerialization.swift | 0 {APIKit => Sources}/RequestBodyBuilder.swift | 0 {APIKit => Sources}/RequestType.swift | 0 {APIKit => Sources}/ResponseBodyParser.swift | 0 {APIKit => Sources}/Session.swift | 0 .../URLEncodedSerialization.swift | 0 11 files changed, 45 insertions(+), 43 deletions(-) rename {APIKit => Sources}/APIError.swift (100%) rename {APIKit => Sources}/APIKit.h (100%) rename {APIKit => Sources}/HTTPMethod.swift (100%) rename {APIKit => Sources}/Info.plist (100%) rename {APIKit => Sources}/MultipartFormDataSerialization.swift (100%) rename {APIKit => Sources}/RequestBodyBuilder.swift (100%) rename {APIKit => Sources}/RequestType.swift (100%) rename {APIKit => Sources}/ResponseBodyParser.swift (100%) rename {APIKit => Sources}/Session.swift (100%) rename {APIKit => Sources}/URLEncodedSerialization.swift (100%) diff --git a/APIKit.xcodeproj/project.pbxproj b/APIKit.xcodeproj/project.pbxproj index d605543d..c03076e1 100644 --- a/APIKit.xcodeproj/project.pbxproj +++ b/APIKit.xcodeproj/project.pbxproj @@ -7,13 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 141F12181C1C9ABE0026D415 /* RequestBodyBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FCBE9DC1A9734880075AFD9 /* RequestBodyBuilder.swift */; }; - 141F12191C1C9ABE0026D415 /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F45FD171A94D085006863BB /* Session.swift */; }; - 141F121A1C1C9ABE0026D415 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F68ABDC1AC4414500688D68 /* HTTPMethod.swift */; }; - 141F121B1C1C9ABE0026D415 /* RequestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F68ABD91AC4412E00688D68 /* RequestType.swift */; }; - 141F121C1C1C9ABE0026D415 /* ResponseBodyParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FCBE9DF1A9734950075AFD9 /* ResponseBodyParser.swift */; }; - 141F121D1C1C9ABE0026D415 /* APIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F5FA6B41B3C58210090B0AF /* APIError.swift */; }; - 141F121E1C1C9ABE0026D415 /* URLEncodedSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F0869A51A978BCA001AD3E1 /* URLEncodedSerialization.swift */; }; 141F12201C1C9ABE0026D415 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD5115241B1FFBA900514240 /* Result.framework */; }; 141F122C1C1C9AC70026D415 /* APITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F1B190A1AA2CA1300C7AFCF /* APITests.swift */; }; 141F122D1C1C9AC70026D415 /* RequestTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19C16B531B83327A001D77CC /* RequestTypeTests.swift */; }; @@ -23,8 +16,15 @@ 141F12321C1C9AC70026D415 /* OHHTTPStubs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */; }; 141F12361C1C9AC70026D415 /* Result.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CD5115241B1FFBA900514240 /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 141F12371C1C9AC70026D415 /* OHHTTPStubs.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 269549D91C66146A00448370 /* MultipartFormDataSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 269549D81C66146A00448370 /* MultipartFormDataSerialization.swift */; }; - 269549DA1C66146A00448370 /* MultipartFormDataSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 269549D81C66146A00448370 /* MultipartFormDataSerialization.swift */; }; + 7F7E8F141C8AD4B1008A13A9 /* APIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F0A1C8AD4B1008A13A9 /* APIError.swift */; }; + 7F7E8F151C8AD4B1008A13A9 /* APIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F7E8F0B1C8AD4B1008A13A9 /* APIKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7F7E8F161C8AD4B1008A13A9 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F0C1C8AD4B1008A13A9 /* HTTPMethod.swift */; }; + 7F7E8F181C8AD4B1008A13A9 /* MultipartFormDataSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F0E1C8AD4B1008A13A9 /* MultipartFormDataSerialization.swift */; }; + 7F7E8F191C8AD4B1008A13A9 /* RequestBodyBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F0F1C8AD4B1008A13A9 /* RequestBodyBuilder.swift */; }; + 7F7E8F1A1C8AD4B1008A13A9 /* RequestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F101C8AD4B1008A13A9 /* RequestType.swift */; }; + 7F7E8F1B1C8AD4B1008A13A9 /* ResponseBodyParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F111C8AD4B1008A13A9 /* ResponseBodyParser.swift */; }; + 7F7E8F1C1C8AD4B1008A13A9 /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F121C8AD4B1008A13A9 /* Session.swift */; }; + 7F7E8F1D1C8AD4B1008A13A9 /* URLEncodedSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F131C8AD4B1008A13A9 /* URLEncodedSerialization.swift */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -51,19 +51,19 @@ 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = APIKit.xcconfig; path = Configurations/APIKit.xcconfig; sourceTree = ""; }; 141F12401C1C9EA30026D415 /* Tests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Tests.xcconfig; path = Configurations/Tests.xcconfig; sourceTree = ""; }; 19C16B531B83327A001D77CC /* RequestTypeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestTypeTests.swift; sourceTree = ""; }; - 269549D81C66146A00448370 /* MultipartFormDataSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultipartFormDataSerialization.swift; sourceTree = ""; }; - 7F0869A51A978BCA001AD3E1 /* URLEncodedSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URLEncodedSerialization.swift; sourceTree = ""; }; 7F1B190A1AA2CA1300C7AFCF /* APITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APITests.swift; sourceTree = ""; }; 7F30A8551A975BD600A8C136 /* RequestBodyBuilderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestBodyBuilderTests.swift; sourceTree = ""; }; - 7F45FCE11A94D02C006863BB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7F45FCE21A94D02C006863BB /* APIKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIKit.h; sourceTree = ""; }; - 7F45FD171A94D085006863BB /* Session.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Session.swift; sourceTree = ""; }; - 7F5FA6B41B3C58210090B0AF /* APIError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIError.swift; sourceTree = ""; }; - 7F68ABD91AC4412E00688D68 /* RequestType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestType.swift; sourceTree = ""; }; - 7F68ABDC1AC4414500688D68 /* HTTPMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPMethod.swift; sourceTree = ""; }; + 7F7E8F0A1C8AD4B1008A13A9 /* APIError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIError.swift; sourceTree = ""; }; + 7F7E8F0B1C8AD4B1008A13A9 /* APIKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIKit.h; sourceTree = ""; }; + 7F7E8F0C1C8AD4B1008A13A9 /* HTTPMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPMethod.swift; sourceTree = ""; }; + 7F7E8F0D1C8AD4B1008A13A9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7F7E8F0E1C8AD4B1008A13A9 /* MultipartFormDataSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MultipartFormDataSerialization.swift; sourceTree = ""; }; + 7F7E8F0F1C8AD4B1008A13A9 /* RequestBodyBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestBodyBuilder.swift; sourceTree = ""; }; + 7F7E8F101C8AD4B1008A13A9 /* RequestType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestType.swift; sourceTree = ""; }; + 7F7E8F111C8AD4B1008A13A9 /* ResponseBodyParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResponseBodyParser.swift; sourceTree = ""; }; + 7F7E8F121C8AD4B1008A13A9 /* Session.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Session.swift; sourceTree = ""; }; + 7F7E8F131C8AD4B1008A13A9 /* URLEncodedSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URLEncodedSerialization.swift; sourceTree = ""; }; 7F8ECDFD1B6A799E00234E04 /* Demo.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Demo.playground; sourceTree = ""; }; - 7FCBE9DC1A9734880075AFD9 /* RequestBodyBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestBodyBuilder.swift; sourceTree = ""; }; - 7FCBE9DF1A9734950075AFD9 /* ResponseBodyParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResponseBodyParser.swift; sourceTree = ""; }; 7FEC5A171A96FE2600B1D3C0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7FEC5A181A96FE2600B1D3C0 /* ResponseBodyParserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResponseBodyParserTests.swift; sourceTree = ""; }; CD5115241B1FFBA900514240 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -107,7 +107,7 @@ isa = PBXGroup; children = ( 7F8ECDFD1B6A799E00234E04 /* Demo.playground */, - 7F45FCDF1A94D02C006863BB /* APIKit */, + 7F7E8F091C8AD4B1008A13A9 /* Sources */, 7FEC5A151A96FE2600B1D3C0 /* APIKitTests */, 141F120E1C1C96690026D415 /* Configurations */, 7F45FCDE1A94D02C006863BB /* Products */, @@ -123,28 +123,28 @@ name = Products; sourceTree = ""; }; - 7F45FCDF1A94D02C006863BB /* APIKit */ = { + 7F7E8F091C8AD4B1008A13A9 /* Sources */ = { isa = PBXGroup; children = ( - 7F45FCE21A94D02C006863BB /* APIKit.h */, - 7F45FD171A94D085006863BB /* Session.swift */, - 7F68ABD91AC4412E00688D68 /* RequestType.swift */, - 7F68ABDC1AC4414500688D68 /* HTTPMethod.swift */, - 7F5FA6B41B3C58210090B0AF /* APIError.swift */, - 7F0869A51A978BCA001AD3E1 /* URLEncodedSerialization.swift */, - 7FCBE9DC1A9734880075AFD9 /* RequestBodyBuilder.swift */, - 7FCBE9DF1A9734950075AFD9 /* ResponseBodyParser.swift */, - 269549D81C66146A00448370 /* MultipartFormDataSerialization.swift */, - 7F45FCE01A94D02C006863BB /* Supporting Files */, + 7F7E8F121C8AD4B1008A13A9 /* Session.swift */, + 7F7E8F101C8AD4B1008A13A9 /* RequestType.swift */, + 7F7E8F0C1C8AD4B1008A13A9 /* HTTPMethod.swift */, + 7F7E8F0A1C8AD4B1008A13A9 /* APIError.swift */, + 7F7E8F0F1C8AD4B1008A13A9 /* RequestBodyBuilder.swift */, + 7F7E8F111C8AD4B1008A13A9 /* ResponseBodyParser.swift */, + 7F7E8F131C8AD4B1008A13A9 /* URLEncodedSerialization.swift */, + 7F7E8F0E1C8AD4B1008A13A9 /* MultipartFormDataSerialization.swift */, + 7F7E8F1E1C8AD4E6008A13A9 /* Supporting Files */, ); - path = APIKit; + path = Sources; sourceTree = ""; }; - 7F45FCE01A94D02C006863BB /* Supporting Files */ = { + 7F7E8F1E1C8AD4E6008A13A9 /* Supporting Files */ = { isa = PBXGroup; children = ( + 7F7E8F0B1C8AD4B1008A13A9 /* APIKit.h */, CD5115241B1FFBA900514240 /* Result.framework */, - 7F45FCE11A94D02C006863BB /* Info.plist */, + 7F7E8F0D1C8AD4B1008A13A9 /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; @@ -177,6 +177,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 7F7E8F151C8AD4B1008A13A9 /* APIKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -270,14 +271,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 141F12181C1C9ABE0026D415 /* RequestBodyBuilder.swift in Sources */, - 141F12191C1C9ABE0026D415 /* Session.swift in Sources */, - 141F121A1C1C9ABE0026D415 /* HTTPMethod.swift in Sources */, - 141F121B1C1C9ABE0026D415 /* RequestType.swift in Sources */, - 141F121C1C1C9ABE0026D415 /* ResponseBodyParser.swift in Sources */, - 269549D91C66146A00448370 /* MultipartFormDataSerialization.swift in Sources */, - 141F121D1C1C9ABE0026D415 /* APIError.swift in Sources */, - 141F121E1C1C9ABE0026D415 /* URLEncodedSerialization.swift in Sources */, + 7F7E8F1A1C8AD4B1008A13A9 /* RequestType.swift in Sources */, + 7F7E8F1B1C8AD4B1008A13A9 /* ResponseBodyParser.swift in Sources */, + 7F7E8F1C1C8AD4B1008A13A9 /* Session.swift in Sources */, + 7F7E8F181C8AD4B1008A13A9 /* MultipartFormDataSerialization.swift in Sources */, + 7F7E8F1D1C8AD4B1008A13A9 /* URLEncodedSerialization.swift in Sources */, + 7F7E8F191C8AD4B1008A13A9 /* RequestBodyBuilder.swift in Sources */, + 7F7E8F161C8AD4B1008A13A9 /* HTTPMethod.swift in Sources */, + 7F7E8F141C8AD4B1008A13A9 /* APIError.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -287,7 +288,6 @@ files = ( 141F122C1C1C9AC70026D415 /* APITests.swift in Sources */, 141F122D1C1C9AC70026D415 /* RequestTypeTests.swift in Sources */, - 269549DA1C66146A00448370 /* MultipartFormDataSerialization.swift in Sources */, 141F122E1C1C9AC70026D415 /* ResponseBodyParserTests.swift in Sources */, 141F122F1C1C9AC70026D415 /* RequestBodyBuilderTests.swift in Sources */, ); @@ -300,6 +300,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */; buildSettings = { + INFOPLIST_FILE = Sources/Info.plist; }; name = Debug; }; @@ -307,6 +308,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */; buildSettings = { + INFOPLIST_FILE = Sources/Info.plist; }; name = Release; }; diff --git a/APIKit/APIError.swift b/Sources/APIError.swift similarity index 100% rename from APIKit/APIError.swift rename to Sources/APIError.swift diff --git a/APIKit/APIKit.h b/Sources/APIKit.h similarity index 100% rename from APIKit/APIKit.h rename to Sources/APIKit.h diff --git a/APIKit/HTTPMethod.swift b/Sources/HTTPMethod.swift similarity index 100% rename from APIKit/HTTPMethod.swift rename to Sources/HTTPMethod.swift diff --git a/APIKit/Info.plist b/Sources/Info.plist similarity index 100% rename from APIKit/Info.plist rename to Sources/Info.plist diff --git a/APIKit/MultipartFormDataSerialization.swift b/Sources/MultipartFormDataSerialization.swift similarity index 100% rename from APIKit/MultipartFormDataSerialization.swift rename to Sources/MultipartFormDataSerialization.swift diff --git a/APIKit/RequestBodyBuilder.swift b/Sources/RequestBodyBuilder.swift similarity index 100% rename from APIKit/RequestBodyBuilder.swift rename to Sources/RequestBodyBuilder.swift diff --git a/APIKit/RequestType.swift b/Sources/RequestType.swift similarity index 100% rename from APIKit/RequestType.swift rename to Sources/RequestType.swift diff --git a/APIKit/ResponseBodyParser.swift b/Sources/ResponseBodyParser.swift similarity index 100% rename from APIKit/ResponseBodyParser.swift rename to Sources/ResponseBodyParser.swift diff --git a/APIKit/Session.swift b/Sources/Session.swift similarity index 100% rename from APIKit/Session.swift rename to Sources/Session.swift diff --git a/APIKit/URLEncodedSerialization.swift b/Sources/URLEncodedSerialization.swift similarity index 100% rename from APIKit/URLEncodedSerialization.swift rename to Sources/URLEncodedSerialization.swift From d71cfc99771ad66e5d5e1e5f195d35316adc2e4f Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 18:05:46 +0900 Subject: [PATCH 03/14] Add Package.swift --- Package.swift | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..d31df29f --- /dev/null +++ b/Package.swift @@ -0,0 +1,8 @@ +import PackageDescription + +let package = Package( + name: "APIKit", + dependencies: [ + .Package(url: "https://github.com/antitypical/Result.git", majorVersion: 1), + ] +) From 72e052c857e159d17586bc26db37f88a9672922a Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 18:47:10 +0900 Subject: [PATCH 04/14] Escape MultipartFormDataSerialization.Parameter.Type to avoid conflict with foo.Type expression --- Sources/MultipartFormDataSerialization.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/MultipartFormDataSerialization.swift b/Sources/MultipartFormDataSerialization.swift index ba5e5fd3..28bef7a5 100644 --- a/Sources/MultipartFormDataSerialization.swift +++ b/Sources/MultipartFormDataSerialization.swift @@ -18,7 +18,7 @@ public final class MultipartFormDataSerialization { } public final class Parameter { - private enum Type { + private enum `Type` { case DataWithMimeType(data: NSData, mimeType: String) case DataWithFileNameMimeType(data: NSData, fileName: String, mimeType: String) case FileURLWithFileNameMimeType(fileURL: NSURL, fileName: String, mimeType: String) From 97b078d471c7537451be78370fd2ede9fee99c27 Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 18:50:47 +0900 Subject: [PATCH 05/14] Import latest gitignore from https://github.com/github/gitignore --- .gitignore | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index fd4ebee4..d8d32c87 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,12 @@ -### https://raw.github.com/github/gitignore/557c62cd54524fe6f7559cab042d91553bb0755e/Swift.gitignore - # Xcode # +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated build/ +DerivedData/ + +## Various settings *.pbxuser !default.pbxuser *.mode1v3 @@ -11,20 +15,32 @@ build/ !default.mode2v3 *.perspectivev3 !default.perspectivev3 -xcuserdata -*.xccheckout +xcuserdata/ + +## Other *.moved-aside -DerivedData -*.hmap -*.ipa *.xcuserstate *.xcscmblueprint +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +Packages/ +.build/ + # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: -# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # # Pods/ @@ -35,4 +51,12 @@ DerivedData Carthage/Build +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md +fastlane/report.xml +fastlane/screenshots From dda3842dc681250363cc86da7ba42999c5507481 Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 19:20:52 +0900 Subject: [PATCH 06/14] Move test files to Tests/APIKit/ --- APIKit.xcodeproj/project.pbxproj | 84 +++++++++++-------- .../APIKit}/APIKitTests.swift | 0 {APIKitTests => Tests/APIKit}/APITests.swift | 0 {APIKitTests => Tests/APIKit}/Info.plist | 0 .../APIKit}/RequestBodyBuilderTests.swift | 0 .../APIKit}/RequestTypeTests.swift | 0 .../APIKit}/ResponseBodyParserTests.swift | 0 7 files changed, 49 insertions(+), 35 deletions(-) rename {APIKitTests => Tests/APIKit}/APIKitTests.swift (100%) rename {APIKitTests => Tests/APIKit}/APITests.swift (100%) rename {APIKitTests => Tests/APIKit}/Info.plist (100%) rename {APIKitTests => Tests/APIKit}/RequestBodyBuilderTests.swift (100%) rename {APIKitTests => Tests/APIKit}/RequestTypeTests.swift (100%) rename {APIKitTests => Tests/APIKit}/ResponseBodyParserTests.swift (100%) diff --git a/APIKit.xcodeproj/project.pbxproj b/APIKit.xcodeproj/project.pbxproj index c03076e1..851517ab 100644 --- a/APIKit.xcodeproj/project.pbxproj +++ b/APIKit.xcodeproj/project.pbxproj @@ -8,14 +8,15 @@ /* Begin PBXBuildFile section */ 141F12201C1C9ABE0026D415 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD5115241B1FFBA900514240 /* Result.framework */; }; - 141F122C1C1C9AC70026D415 /* APITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F1B190A1AA2CA1300C7AFCF /* APITests.swift */; }; - 141F122D1C1C9AC70026D415 /* RequestTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19C16B531B83327A001D77CC /* RequestTypeTests.swift */; }; - 141F122E1C1C9AC70026D415 /* ResponseBodyParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FEC5A181A96FE2600B1D3C0 /* ResponseBodyParserTests.swift */; }; - 141F122F1C1C9AC70026D415 /* RequestBodyBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F30A8551A975BD600A8C136 /* RequestBodyBuilderTests.swift */; }; 141F12311C1C9AC70026D415 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD5115241B1FFBA900514240 /* Result.framework */; }; 141F12321C1C9AC70026D415 /* OHHTTPStubs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */; }; 141F12361C1C9AC70026D415 /* Result.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CD5115241B1FFBA900514240 /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 141F12371C1C9AC70026D415 /* OHHTTPStubs.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 7F09BF8F1C8AE8DB00F4A59A /* APIKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF891C8AE8DB00F4A59A /* APIKitTests.swift */; }; + 7F09BF901C8AE8DB00F4A59A /* APITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF8A1C8AE8DB00F4A59A /* APITests.swift */; }; + 7F09BF921C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF8C1C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift */; }; + 7F09BF931C8AE8DB00F4A59A /* RequestTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF8D1C8AE8DB00F4A59A /* RequestTypeTests.swift */; }; + 7F09BF941C8AE8DB00F4A59A /* ResponseBodyParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF8E1C8AE8DB00F4A59A /* ResponseBodyParserTests.swift */; }; 7F7E8F141C8AD4B1008A13A9 /* APIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F0A1C8AD4B1008A13A9 /* APIError.swift */; }; 7F7E8F151C8AD4B1008A13A9 /* APIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F7E8F0B1C8AD4B1008A13A9 /* APIKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7F7E8F161C8AD4B1008A13A9 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F0C1C8AD4B1008A13A9 /* HTTPMethod.swift */; }; @@ -50,9 +51,12 @@ 141F123C1C1C9AC70026D415 /* APIKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = APIKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = APIKit.xcconfig; path = Configurations/APIKit.xcconfig; sourceTree = ""; }; 141F12401C1C9EA30026D415 /* Tests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Tests.xcconfig; path = Configurations/Tests.xcconfig; sourceTree = ""; }; - 19C16B531B83327A001D77CC /* RequestTypeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestTypeTests.swift; sourceTree = ""; }; - 7F1B190A1AA2CA1300C7AFCF /* APITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APITests.swift; sourceTree = ""; }; - 7F30A8551A975BD600A8C136 /* RequestBodyBuilderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestBodyBuilderTests.swift; sourceTree = ""; }; + 7F09BF891C8AE8DB00F4A59A /* APIKitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIKitTests.swift; sourceTree = ""; }; + 7F09BF8A1C8AE8DB00F4A59A /* APITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APITests.swift; sourceTree = ""; }; + 7F09BF8B1C8AE8DB00F4A59A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7F09BF8C1C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestBodyBuilderTests.swift; sourceTree = ""; }; + 7F09BF8D1C8AE8DB00F4A59A /* RequestTypeTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestTypeTests.swift; sourceTree = ""; }; + 7F09BF8E1C8AE8DB00F4A59A /* ResponseBodyParserTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResponseBodyParserTests.swift; sourceTree = ""; }; 7F7E8F0A1C8AD4B1008A13A9 /* APIError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIError.swift; sourceTree = ""; }; 7F7E8F0B1C8AD4B1008A13A9 /* APIKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIKit.h; sourceTree = ""; }; 7F7E8F0C1C8AD4B1008A13A9 /* HTTPMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPMethod.swift; sourceTree = ""; }; @@ -64,8 +68,6 @@ 7F7E8F121C8AD4B1008A13A9 /* Session.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Session.swift; sourceTree = ""; }; 7F7E8F131C8AD4B1008A13A9 /* URLEncodedSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URLEncodedSerialization.swift; sourceTree = ""; }; 7F8ECDFD1B6A799E00234E04 /* Demo.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Demo.playground; sourceTree = ""; }; - 7FEC5A171A96FE2600B1D3C0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7FEC5A181A96FE2600B1D3C0 /* ResponseBodyParserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResponseBodyParserTests.swift; sourceTree = ""; }; CD5115241B1FFBA900514240 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OHHTTPStubs.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -103,12 +105,42 @@ name = Configurations; sourceTree = ""; }; + 7F09BF751C8AE64200F4A59A /* Tests */ = { + isa = PBXGroup; + children = ( + 7F09BF881C8AE8DB00F4A59A /* APIKit */, + ); + path = Tests; + sourceTree = ""; + }; + 7F09BF881C8AE8DB00F4A59A /* APIKit */ = { + isa = PBXGroup; + children = ( + 7F09BF891C8AE8DB00F4A59A /* APIKitTests.swift */, + 7F09BF8A1C8AE8DB00F4A59A /* APITests.swift */, + 7F09BF8C1C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift */, + 7F09BF8D1C8AE8DB00F4A59A /* RequestTypeTests.swift */, + 7F09BF8E1C8AE8DB00F4A59A /* ResponseBodyParserTests.swift */, + 7F09BF951C8AE8EB00F4A59A /* Supporting Files */, + ); + path = APIKit; + sourceTree = ""; + }; + 7F09BF951C8AE8EB00F4A59A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 7F09BF8B1C8AE8DB00F4A59A /* Info.plist */, + CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; 7F45FCD31A94D02C006863BB = { isa = PBXGroup; children = ( 7F8ECDFD1B6A799E00234E04 /* Demo.playground */, 7F7E8F091C8AD4B1008A13A9 /* Sources */, - 7FEC5A151A96FE2600B1D3C0 /* APIKitTests */, + 7F09BF751C8AE64200F4A59A /* Tests */, 141F120E1C1C96690026D415 /* Configurations */, 7F45FCDE1A94D02C006863BB /* Products */, ); @@ -149,27 +181,6 @@ name = "Supporting Files"; sourceTree = ""; }; - 7FEC5A151A96FE2600B1D3C0 /* APIKitTests */ = { - isa = PBXGroup; - children = ( - 7F1B190A1AA2CA1300C7AFCF /* APITests.swift */, - 19C16B531B83327A001D77CC /* RequestTypeTests.swift */, - 7F30A8551A975BD600A8C136 /* RequestBodyBuilderTests.swift */, - 7FEC5A181A96FE2600B1D3C0 /* ResponseBodyParserTests.swift */, - 7FEC5A161A96FE2600B1D3C0 /* Supporting Files */, - ); - path = APIKitTests; - sourceTree = ""; - }; - 7FEC5A161A96FE2600B1D3C0 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */, - 7FEC5A171A96FE2600B1D3C0 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -286,10 +297,11 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 141F122C1C1C9AC70026D415 /* APITests.swift in Sources */, - 141F122D1C1C9AC70026D415 /* RequestTypeTests.swift in Sources */, - 141F122E1C1C9AC70026D415 /* ResponseBodyParserTests.swift in Sources */, - 141F122F1C1C9AC70026D415 /* RequestBodyBuilderTests.swift in Sources */, + 7F09BF901C8AE8DB00F4A59A /* APITests.swift in Sources */, + 7F09BF931C8AE8DB00F4A59A /* RequestTypeTests.swift in Sources */, + 7F09BF921C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift in Sources */, + 7F09BF941C8AE8DB00F4A59A /* ResponseBodyParserTests.swift in Sources */, + 7F09BF8F1C8AE8DB00F4A59A /* APIKitTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -316,6 +328,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */; buildSettings = { + INFOPLIST_FILE = Tests/APIKit/Info.plist; }; name = Debug; }; @@ -323,6 +336,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */; buildSettings = { + INFOPLIST_FILE = Tests/APIKit/Info.plist; }; name = Release; }; diff --git a/APIKitTests/APIKitTests.swift b/Tests/APIKit/APIKitTests.swift similarity index 100% rename from APIKitTests/APIKitTests.swift rename to Tests/APIKit/APIKitTests.swift diff --git a/APIKitTests/APITests.swift b/Tests/APIKit/APITests.swift similarity index 100% rename from APIKitTests/APITests.swift rename to Tests/APIKit/APITests.swift diff --git a/APIKitTests/Info.plist b/Tests/APIKit/Info.plist similarity index 100% rename from APIKitTests/Info.plist rename to Tests/APIKit/Info.plist diff --git a/APIKitTests/RequestBodyBuilderTests.swift b/Tests/APIKit/RequestBodyBuilderTests.swift similarity index 100% rename from APIKitTests/RequestBodyBuilderTests.swift rename to Tests/APIKit/RequestBodyBuilderTests.swift diff --git a/APIKitTests/RequestTypeTests.swift b/Tests/APIKit/RequestTypeTests.swift similarity index 100% rename from APIKitTests/RequestTypeTests.swift rename to Tests/APIKit/RequestTypeTests.swift diff --git a/APIKitTests/ResponseBodyParserTests.swift b/Tests/APIKit/ResponseBodyParserTests.swift similarity index 100% rename from APIKitTests/ResponseBodyParserTests.swift rename to Tests/APIKit/ResponseBodyParserTests.swift From 813e2620ff1d7196292a480e777f0d742854609b Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 19:27:29 +0900 Subject: [PATCH 07/14] Fix source_files in podspec --- APIKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APIKit.podspec b/APIKit.podspec index 86dec5ef..c70360f1 100644 --- a/APIKit.podspec +++ b/APIKit.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.tvos.deployment_target = "9.0" end - s.source_files = "APIKit/*.swift" + s.source_files = "Sources/*.swift" s.source = { :git => "https://github.com/ishkawa/APIKit.git", :tag => "#{s.version}", From f75510c2b87efcab28dc47a61ef5a9c056d882ba Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 19:38:23 +0900 Subject: [PATCH 08/14] Remove accidentally added test file --- APIKit.xcodeproj/project.pbxproj | 4 ---- Tests/APIKit/APIKitTests.swift | 36 -------------------------------- 2 files changed, 40 deletions(-) delete mode 100644 Tests/APIKit/APIKitTests.swift diff --git a/APIKit.xcodeproj/project.pbxproj b/APIKit.xcodeproj/project.pbxproj index 851517ab..bcb4826f 100644 --- a/APIKit.xcodeproj/project.pbxproj +++ b/APIKit.xcodeproj/project.pbxproj @@ -12,7 +12,6 @@ 141F12321C1C9AC70026D415 /* OHHTTPStubs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */; }; 141F12361C1C9AC70026D415 /* Result.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CD5115241B1FFBA900514240 /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 141F12371C1C9AC70026D415 /* OHHTTPStubs.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = CD51152D1B1FFCC700514240 /* OHHTTPStubs.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 7F09BF8F1C8AE8DB00F4A59A /* APIKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF891C8AE8DB00F4A59A /* APIKitTests.swift */; }; 7F09BF901C8AE8DB00F4A59A /* APITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF8A1C8AE8DB00F4A59A /* APITests.swift */; }; 7F09BF921C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF8C1C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift */; }; 7F09BF931C8AE8DB00F4A59A /* RequestTypeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F09BF8D1C8AE8DB00F4A59A /* RequestTypeTests.swift */; }; @@ -51,7 +50,6 @@ 141F123C1C1C9AC70026D415 /* APIKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = APIKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = APIKit.xcconfig; path = Configurations/APIKit.xcconfig; sourceTree = ""; }; 141F12401C1C9EA30026D415 /* Tests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Tests.xcconfig; path = Configurations/Tests.xcconfig; sourceTree = ""; }; - 7F09BF891C8AE8DB00F4A59A /* APIKitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIKitTests.swift; sourceTree = ""; }; 7F09BF8A1C8AE8DB00F4A59A /* APITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APITests.swift; sourceTree = ""; }; 7F09BF8B1C8AE8DB00F4A59A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7F09BF8C1C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestBodyBuilderTests.swift; sourceTree = ""; }; @@ -116,7 +114,6 @@ 7F09BF881C8AE8DB00F4A59A /* APIKit */ = { isa = PBXGroup; children = ( - 7F09BF891C8AE8DB00F4A59A /* APIKitTests.swift */, 7F09BF8A1C8AE8DB00F4A59A /* APITests.swift */, 7F09BF8C1C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift */, 7F09BF8D1C8AE8DB00F4A59A /* RequestTypeTests.swift */, @@ -301,7 +298,6 @@ 7F09BF931C8AE8DB00F4A59A /* RequestTypeTests.swift in Sources */, 7F09BF921C8AE8DB00F4A59A /* RequestBodyBuilderTests.swift in Sources */, 7F09BF941C8AE8DB00F4A59A /* ResponseBodyParserTests.swift in Sources */, - 7F09BF8F1C8AE8DB00F4A59A /* APIKitTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Tests/APIKit/APIKitTests.swift b/Tests/APIKit/APIKitTests.swift deleted file mode 100644 index c345020c..00000000 --- a/Tests/APIKit/APIKitTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// APIKitTests.swift -// APIKitTests -// -// Created by Yosuke Ishikawa on 2/21/15. -// Copyright (c) 2015 Yosuke Ishikawa. All rights reserved. -// - -import Cocoa -import XCTest - -class APIKitTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measureBlock() { - // Put the code you want to measure the time of here. - } - } - -} From 578b3208b9250bc41ec9bf24a717073a5cdb941f Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 21:07:30 +0900 Subject: [PATCH 09/14] Build instead of testing on tvOS due to occasional failure (maybe apple bug) --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 260480e3..f2b75cb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,9 @@ script: - pod lib lint - set -o pipefail - xcodebuild test -workspace APIKit.xcworkspace -scheme APIKit -sdk iphonesimulator -destination 'name=iPhone 6,OS=9.1' | xcpretty -c - - xcodebuild test -workspace APIKit.xcworkspace -scheme APIKit -sdk appletvsimulator -destination 'name=Apple TV 1080p,OS=9.1' | xcpretty -c - xcodebuild test -workspace APIKit.xcworkspace -scheme APIKit | xcpretty -c + - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk appletvos | xcpretty -c + - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk watchos | xcpretty -c before_deploy: - ./script/import-certificates From a0dfd8f183bd86399c0357ccdde5c90839947bcf Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 21:19:49 +0900 Subject: [PATCH 10/14] Build for simulators, not tvOS and watchOS --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2b75cb8..e8d89e22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,8 +18,8 @@ script: - set -o pipefail - xcodebuild test -workspace APIKit.xcworkspace -scheme APIKit -sdk iphonesimulator -destination 'name=iPhone 6,OS=9.1' | xcpretty -c - xcodebuild test -workspace APIKit.xcworkspace -scheme APIKit | xcpretty -c - - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk appletvos | xcpretty -c - - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk watchos | xcpretty -c + - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk appletvsimulator | xcpretty -c + - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk watchsimulator | xcpretty -c before_deploy: - ./script/import-certificates From 07ba5c0bfb15f6fcea3aa426561cf25aba5b14a1 Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 21:35:13 +0900 Subject: [PATCH 11/14] Destination is required to build for tvOS --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e8d89e22..a6064ba6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,10 +16,9 @@ install: script: - pod lib lint - set -o pipefail - - xcodebuild test -workspace APIKit.xcworkspace -scheme APIKit -sdk iphonesimulator -destination 'name=iPhone 6,OS=9.1' | xcpretty -c - xcodebuild test -workspace APIKit.xcworkspace -scheme APIKit | xcpretty -c - - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk appletvsimulator | xcpretty -c - - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk watchsimulator | xcpretty -c + - xcodebuild test -workspace APIKit.xcworkspace -scheme APIKit -sdk iphonesimulator -destination 'name=iPhone 6,OS=9.1' | xcpretty -c + - xcodebuild build -workspace APIKit.xcworkspace -scheme APIKit -sdk appletvsimulator -destination 'name=Apple TV 1080p,OS=9.1' | xcpretty -c before_deploy: - ./script/import-certificates From ac905f8e65527af25ee7c8dd1495fa90c5f559cb Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 21:53:27 +0900 Subject: [PATCH 12/14] Use xcconfig for Info.plist setting --- APIKit.xcodeproj/project.pbxproj | 4 ---- Configurations/APIKit.xcconfig | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/APIKit.xcodeproj/project.pbxproj b/APIKit.xcodeproj/project.pbxproj index bcb4826f..39744a9e 100644 --- a/APIKit.xcodeproj/project.pbxproj +++ b/APIKit.xcodeproj/project.pbxproj @@ -308,7 +308,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */; buildSettings = { - INFOPLIST_FILE = Sources/Info.plist; }; name = Debug; }; @@ -316,7 +315,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */; buildSettings = { - INFOPLIST_FILE = Sources/Info.plist; }; name = Release; }; @@ -324,7 +322,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/APIKit/Info.plist; }; name = Debug; }; @@ -332,7 +329,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/APIKit/Info.plist; }; name = Release; }; diff --git a/Configurations/APIKit.xcconfig b/Configurations/APIKit.xcconfig index 71014a64..4b059579 100644 --- a/Configurations/APIKit.xcconfig +++ b/Configurations/APIKit.xcconfig @@ -4,7 +4,7 @@ DYLIB_COMPATIBILITY_VERSION = 1 DYLIB_CURRENT_VERSION = 1 DYLIB_INSTALL_NAME_BASE = @rpath FRAMEWORK_VERSION = A -INFOPLIST_FILE = APIKit/Info.plist +INFOPLIST_FILE = Sources/Info.plist PRODUCT_BUNDLE_IDENTIFIER = org.ishkawa.$(PRODUCT_NAME:rfc1034identifier) PRODUCT_NAME = $(PROJECT_NAME) SKIP_INSTALL = YES From dc94040b2ff2ac77ba46e996c5d980b9470f6fdf Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 22:02:07 +0900 Subject: [PATCH 13/14] Restore INFOPLIST_FILE for test target --- APIKit.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/APIKit.xcodeproj/project.pbxproj b/APIKit.xcodeproj/project.pbxproj index 39744a9e..bcb4826f 100644 --- a/APIKit.xcodeproj/project.pbxproj +++ b/APIKit.xcodeproj/project.pbxproj @@ -308,6 +308,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */; buildSettings = { + INFOPLIST_FILE = Sources/Info.plist; }; name = Debug; }; @@ -315,6 +316,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */; buildSettings = { + INFOPLIST_FILE = Sources/Info.plist; }; name = Release; }; @@ -322,6 +324,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */; buildSettings = { + INFOPLIST_FILE = Tests/APIKit/Info.plist; }; name = Debug; }; @@ -329,6 +332,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */; buildSettings = { + INFOPLIST_FILE = Tests/APIKit/Info.plist; }; name = Release; }; From 91d71b257db244048168b8d67bb077c68f20f0d4 Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Sat, 5 Mar 2016 22:11:52 +0900 Subject: [PATCH 14/14] Fix Info.plist setting --- APIKit.xcodeproj/project.pbxproj | 4 ---- Configurations/Tests.xcconfig | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/APIKit.xcodeproj/project.pbxproj b/APIKit.xcodeproj/project.pbxproj index bcb4826f..39744a9e 100644 --- a/APIKit.xcodeproj/project.pbxproj +++ b/APIKit.xcodeproj/project.pbxproj @@ -308,7 +308,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */; buildSettings = { - INFOPLIST_FILE = Sources/Info.plist; }; name = Debug; }; @@ -316,7 +315,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F123F1C1C9EA30026D415 /* APIKit.xcconfig */; buildSettings = { - INFOPLIST_FILE = Sources/Info.plist; }; name = Release; }; @@ -324,7 +322,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/APIKit/Info.plist; }; name = Debug; }; @@ -332,7 +329,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12401C1C9EA30026D415 /* Tests.xcconfig */; buildSettings = { - INFOPLIST_FILE = Tests/APIKit/Info.plist; }; name = Release; }; diff --git a/Configurations/Tests.xcconfig b/Configurations/Tests.xcconfig index 7a5391bb..03e5c182 100644 --- a/Configurations/Tests.xcconfig +++ b/Configurations/Tests.xcconfig @@ -1,5 +1,5 @@ COMBINE_HIDPI_IMAGES = YES -INFOPLIST_FILE = APIKitTests/Info.plist +INFOPLIST_FILE = Tests/APIKit/Info.plist PRODUCT_BUNDLE_IDENTIFIER = org.ishkawa.$(PRODUCT_NAME:rfc1034identifier) PRODUCT_NAME = $(PROJECT_NAME)Tests