Skip to content

Commit

Permalink
Merge pull request #149 from ishkawa/feature/xcode73
Browse files Browse the repository at this point in the history
Xcode 7.3 and Swift 2.2 support for 2.x
  • Loading branch information
ishkawa committed Mar 27, 2016
2 parents 7d0fd22 + 22e184c commit 810ef4f
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 11 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 @@ -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;
Expand Down Expand Up @@ -342,6 +352,7 @@
buildRules = (
);
dependencies = (
7F4A73AD1CA839AE002554B1 /* PBXTargetDependency */,
);
name = Tests;
productName = APIKitTests;
Expand All @@ -355,7 +366,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 @@ -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;
Expand Down Expand Up @@ -472,6 +491,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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
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) throws -> Response`
public protocol RequestType {
/// The response type associated with this request.
typealias Response
associatedtype Response

/// The base URL.
var baseURL: NSURL { get }
Expand Down
2 changes: 1 addition & 1 deletion Sources/Serializations/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 @@ -41,7 +41,7 @@ class RequestTypeTests: XCTestCase {
let URLRequest = try? request.buildURLRequest()
XCTAssertNotNil(URLRequest?.HTTPBody)

let json = URLRequest?.HTTPBody.flatMap { try? NSJSONSerialization.JSONObjectWithData($0, options: []) }
let json = URLRequest?.HTTPBody.flatMap { try? NSJSONSerialization.JSONObjectWithData($0, options: []) } as? [AnyObject]
XCTAssertEqual(json?.count, 3)
XCTAssertEqual(json?[0]["id"], "1")
XCTAssertEqual(json?[1]["id"], "2")
Expand Down

0 comments on commit 810ef4f

Please sign in to comment.