diff --git a/.travis.yml b/.travis.yml index a6064ba6..82dbd116 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode7.2 +osx_image: xcode7.3 env: global: diff --git a/APIKit.podspec b/APIKit.podspec index b95df8f6..b458aa34 100644 --- a/APIKit.podspec +++ b/APIKit.podspec @@ -33,5 +33,5 @@ Pod::Spec.new do |s| LICENSE } - s.dependency "Result", "~> 1.0.1" + s.dependency "Result", "~> 2.0.0" end diff --git a/APIKit.xcodeproj/project.pbxproj b/APIKit.xcodeproj/project.pbxproj index 0ddf47d2..b881de61 100644 --- a/APIKit.xcodeproj/project.pbxproj +++ b/APIKit.xcodeproj/project.pbxproj @@ -43,6 +43,16 @@ 7FAC40341C8F2C900098C4B2 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FAC40331C8F2C900098C4B2 /* Box.swift */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 7F4A73AC1CA839AE002554B1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7F45FCD41A94D02C006863BB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 141F12161C1C9ABE0026D415; + remoteInfo = APIKit; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 141F12351C1C9AC70026D415 /* Copy Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -342,6 +352,7 @@ buildRules = ( ); dependencies = ( + 7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */, ); name = Tests; productName = APIKitTests; @@ -355,7 +366,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Yosuke Ishikawa"; }; buildConfigurationList = 7F45FCD71A94D02C006863BB /* Build configuration list for PBXProject "APIKit" */; @@ -439,6 +450,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 141F12161C1C9ABE0026D415 /* APIKit */; + targetProxy = 7F4A73AC1CA839AE002554B1 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 141F12241C1C9ABE0026D415 /* Debug */ = { isa = XCBuildConfiguration; @@ -472,6 +491,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 141F12101C1C96820026D415 /* Debug.xcconfig */; buildSettings = { + ENABLE_TESTABILITY = YES; + ONLY_ACTIVE_ARCH = YES; }; name = Debug; }; diff --git a/APIKit.xcodeproj/xcshareddata/xcschemes/APIKit.xcscheme b/APIKit.xcodeproj/xcshareddata/xcschemes/APIKit.xcscheme index 2235c35a..5c921853 100644 --- a/APIKit.xcodeproj/xcshareddata/xcschemes/APIKit.xcscheme +++ b/APIKit.xcodeproj/xcshareddata/xcschemes/APIKit.xcscheme @@ -1,6 +1,6 @@ 1.0.1 +github "antitypical/Result" ~> 2.0.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 613df587..8d6262f8 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ github "AliSoftware/OHHTTPStubs" "4.6.0" -github "antitypical/Result" "1.0.1" +github "antitypical/Result" "2.0.0" diff --git a/README.md b/README.md index ec38b6db..cf63e5f8 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Session.sendRequest(request) { result in ## Requirements -- Swift 2.1+ +- Swift 2.2+ - iOS 8.0+ / Mac OS 10.10+ / watchOS 2.0+ / tvOS 9.0+ ## Installation diff --git a/Sources/Info.plist b/Sources/Info.plist index 28a6057e..dc9750ea 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.3.0 CFBundleSignature ???? CFBundleVersion diff --git a/Sources/RequestType.swift b/Sources/RequestType.swift index bf377ff1..2642bd43 100644 --- a/Sources/RequestType.swift +++ b/Sources/RequestType.swift @@ -10,7 +10,7 @@ import Result /// - `func responseFromObject(object: AnyObject, URLResponse: NSHTTPURLResponse) throws -> Response` public protocol RequestType { /// The response type associated with this request. - typealias Response + associatedtype Response /// The base URL. var baseURL: NSURL { get } diff --git a/Sources/Serializations/URLEncodedSerialization.swift b/Sources/Serializations/URLEncodedSerialization.swift index e8cc37f1..44b8f36c 100644 --- a/Sources/Serializations/URLEncodedSerialization.swift +++ b/Sources/Serializations/URLEncodedSerialization.swift @@ -25,7 +25,7 @@ private func escape(string: String) -> String { while index != string.endIndex { let startIndex = index let endIndex = index.advancedBy(batchSize, limit: string.endIndex) - let range = Range(start: startIndex, end: endIndex) + let range = startIndex..