Skip to content

Commit

Permalink
Merge pull request #147 from ishkawa/feature/xcode73
Browse files Browse the repository at this point in the history
Xcode 7.3 and Swift 2.2 support for 1.x
  • Loading branch information
ishkawa committed Mar 27, 2016
2 parents df2b922 + 4ff0ffe commit 5d28976
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7.2
osx_image: xcode7.3

env:
global:
Expand Down
2 changes: 1 addition & 1 deletion APIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ Pod::Spec.new do |s|
LICENSE
}

s.dependency "Result", "~> 1.0.1"
s.dependency "Result", "~> 2.0.0"
end
23 changes: 22 additions & 1 deletion APIKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -222,6 +232,7 @@
buildRules = (
);
dependencies = (
7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */,
);
name = Tests;
productName = APIKitTests;
Expand All @@ -235,7 +246,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0730;
ORGANIZATIONNAME = "Yosuke Ishikawa";
};
buildConfigurationList = 7F45FCD71A94D02C006863BB /* Build configuration list for PBXProject "APIKit" */;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -336,6 +355,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 141F12101C1C96820026D415 /* Debug.xcconfig */;
buildSettings = {
ENABLE_TESTABILITY = YES;
ONLY_ACTIVE_ARCH = YES;
};
name = Debug;
};
Expand Down
2 changes: 1 addition & 1 deletion APIKit.xcodeproj/xcshareddata/xcschemes/APIKit.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "antitypical/Result" ~> 1.0.1
github "antitypical/Result" ~> 2.0.0
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "AliSoftware/OHHTTPStubs" "4.6.0"
github "antitypical/Result" "1.0.1"
github "antitypical/Result" "2.0.0"
2 changes: 1 addition & 1 deletion Sources/RequestType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion Sources/URLEncodedSerialization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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..<endIndex

let substring = string.substringWithRange(range)

Expand Down
2 changes: 1 addition & 1 deletion Tests/APIKit/RequestTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ class RequestTypeTests: XCTestCase {
switch request.buildURLRequest() {
case .Success(let urlReq):
XCTAssert(urlReq.HTTPBody != nil)
let json = try! NSJSONSerialization.JSONObjectWithData(urlReq.HTTPBody!, options: NSJSONReadingOptions.AllowFragments)
let json = try! NSJSONSerialization.JSONObjectWithData(urlReq.HTTPBody!, options: NSJSONReadingOptions.AllowFragments) as! [AnyObject]
XCTAssert(json.count == 3)
XCTAssert(json[0]["id"]! == "1")
XCTAssert(json[1]["id"]! == "2")
Expand Down

0 comments on commit 5d28976

Please sign in to comment.