Skip to content

Commit 810ef4f

Browse files
committed
Merge pull request #149 from ishkawa/feature/xcode73
Xcode 7.3 and Swift 2.2 support for 2.x
2 parents 7d0fd22 + 22e184c commit 810ef4f

File tree

11 files changed

+32
-11
lines changed

11 files changed

+32
-11
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode7.2
2+
osx_image: xcode7.3
33

44
env:
55
global:

APIKit.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ Pod::Spec.new do |s|
3333
LICENSE
3434
}
3535

36-
s.dependency "Result", "~> 1.0.1"
36+
s.dependency "Result", "~> 2.0.0"
3737
end

APIKit.xcodeproj/project.pbxproj

+22-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
7FAC40341C8F2C900098C4B2 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FAC40331C8F2C900098C4B2 /* Box.swift */; };
4444
/* End PBXBuildFile section */
4545

46+
/* Begin PBXContainerItemProxy section */
47+
7F4A73AC1CA839AE002554B1 /* PBXContainerItemProxy */ = {
48+
isa = PBXContainerItemProxy;
49+
containerPortal = 7F45FCD41A94D02C006863BB /* Project object */;
50+
proxyType = 1;
51+
remoteGlobalIDString = 141F12161C1C9ABE0026D415;
52+
remoteInfo = APIKit;
53+
};
54+
/* End PBXContainerItemProxy section */
55+
4656
/* Begin PBXCopyFilesBuildPhase section */
4757
141F12351C1C9AC70026D415 /* Copy Frameworks */ = {
4858
isa = PBXCopyFilesBuildPhase;
@@ -342,6 +352,7 @@
342352
buildRules = (
343353
);
344354
dependencies = (
355+
7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */,
345356
);
346357
name = Tests;
347358
productName = APIKitTests;
@@ -355,7 +366,7 @@
355366
isa = PBXProject;
356367
attributes = {
357368
LastSwiftUpdateCheck = 0700;
358-
LastUpgradeCheck = 0700;
369+
LastUpgradeCheck = 0730;
359370
ORGANIZATIONNAME = "Yosuke Ishikawa";
360371
};
361372
buildConfigurationList = 7F45FCD71A94D02C006863BB /* Build configuration list for PBXProject "APIKit" */;
@@ -439,6 +450,14 @@
439450
};
440451
/* End PBXSourcesBuildPhase section */
441452

453+
/* Begin PBXTargetDependency section */
454+
7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */ = {
455+
isa = PBXTargetDependency;
456+
target = 141F12161C1C9ABE0026D415 /* APIKit */;
457+
targetProxy = 7F4A73AC1CA839AE002554B1 /* PBXContainerItemProxy */;
458+
};
459+
/* End PBXTargetDependency section */
460+
442461
/* Begin XCBuildConfiguration section */
443462
141F12241C1C9ABE0026D415 /* Debug */ = {
444463
isa = XCBuildConfiguration;
@@ -472,6 +491,8 @@
472491
isa = XCBuildConfiguration;
473492
baseConfigurationReference = 141F12101C1C96820026D415 /* Debug.xcconfig */;
474493
buildSettings = {
494+
ENABLE_TESTABILITY = YES;
495+
ONLY_ACTIVE_ARCH = YES;
475496
};
476497
name = Debug;
477498
};

APIKit.xcodeproj/xcshareddata/xcschemes/APIKit.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0720"
3+
LastUpgradeVersion = "0730"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "antitypical/Result" ~> 1.0.1
1+
github "antitypical/Result" ~> 2.0.0

Cartfile.resolved

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "AliSoftware/OHHTTPStubs" "4.6.0"
2-
github "antitypical/Result" "1.0.1"
2+
github "antitypical/Result" "2.0.0"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Session.sendRequest(request) { result in
2424

2525
## Requirements
2626

27-
- Swift 2.1+
27+
- Swift 2.2+
2828
- iOS 8.0+ / Mac OS 10.10+ / watchOS 2.0+ / tvOS 9.0+
2929

3030
## Installation

Sources/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>1.3.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Sources/RequestType.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Result
1010
/// - `func responseFromObject(object: AnyObject, URLResponse: NSHTTPURLResponse) throws -> Response`
1111
public protocol RequestType {
1212
/// The response type associated with this request.
13-
typealias Response
13+
associatedtype Response
1414

1515
/// The base URL.
1616
var baseURL: NSURL { get }

Sources/Serializations/URLEncodedSerialization.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private func escape(string: String) -> String {
2525
while index != string.endIndex {
2626
let startIndex = index
2727
let endIndex = index.advancedBy(batchSize, limit: string.endIndex)
28-
let range = Range(start: startIndex, end: endIndex)
28+
let range = startIndex..<endIndex
2929

3030
let substring = string.substringWithRange(range)
3131

Tests/APIKit/RequestTypeTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class RequestTypeTests: XCTestCase {
4141
let URLRequest = try? request.buildURLRequest()
4242
XCTAssertNotNil(URLRequest?.HTTPBody)
4343

44-
let json = URLRequest?.HTTPBody.flatMap { try? NSJSONSerialization.JSONObjectWithData($0, options: []) }
44+
let json = URLRequest?.HTTPBody.flatMap { try? NSJSONSerialization.JSONObjectWithData($0, options: []) } as? [AnyObject]
4545
XCTAssertEqual(json?.count, 3)
4646
XCTAssertEqual(json?[0]["id"], "1")
4747
XCTAssertEqual(json?[1]["id"], "2")

0 commit comments

Comments
 (0)