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 36bff6a9..47a84ae9 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 39744a9e..b0a0307e 100644 --- a/APIKit.xcodeproj/project.pbxproj +++ b/APIKit.xcodeproj/project.pbxproj @@ -27,6 +27,16 @@ 7F7E8F1D1C8AD4B1008A13A9 /* URLEncodedSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7E8F131C8AD4B1008A13A9 /* URLEncodedSerialization.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; @@ -222,6 +232,7 @@ buildRules = ( ); dependencies = ( + 7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */, ); name = Tests; productName = APIKitTests; @@ -235,7 +246,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Yosuke Ishikawa"; }; buildConfigurationList = 7F45FCD71A94D02C006863BB /* Build configuration list for PBXProject "APIKit" */; @@ -303,6 +314,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; @@ -336,6 +355,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/Carthage/Checkouts/Result b/Carthage/Checkouts/Result index 9f2c108a..5dec9cf2 160000 --- a/Carthage/Checkouts/Result +++ b/Carthage/Checkouts/Result @@ -1 +1 @@ -Subproject commit 9f2c108adeb7427782d69381e2414f7175b373cc +Subproject commit 5dec9cf225d5fa3b0602679fb2638e40191da46b diff --git a/Sources/RequestType.swift b/Sources/RequestType.swift index 69c2ae7a..cf18ab2c 100644 --- a/Sources/RequestType.swift +++ b/Sources/RequestType.swift @@ -10,7 +10,7 @@ import Result /// - func responseFromObject(object: AnyObject, URLResponse: NSHTTPURLResponse) -> Response? public protocol RequestType { /// Type represents a model object - typealias Response + associatedtype Response /// Configurations of request var baseURL: NSURL { get } diff --git a/Sources/URLEncodedSerialization.swift b/Sources/URLEncodedSerialization.swift index e8cc37f1..44b8f36c 100644 --- a/Sources/URLEncodedSerialization.swift +++ b/Sources/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..