diff --git a/Cartfile.resolved b/Cartfile.resolved index fe4efefb..2f59c33f 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -github "antitypical/Result" "2.0.0" -github "SwiftyJSON/SwiftyJSON" "2.3.3" -github "Thomvis/BrightFutures" "v4.0.1" +github "antitypical/Result" "2.1.3" +github "SwiftyJSON/SwiftyJSON" "2.4.0" +github "Thomvis/BrightFutures" "v4.1.1" diff --git a/Spine.xcodeproj/project.pbxproj b/Spine.xcodeproj/project.pbxproj index 97835778..bfd18906 100644 --- a/Spine.xcodeproj/project.pbxproj +++ b/Spine.xcodeproj/project.pbxproj @@ -611,9 +611,11 @@ }; D373F78719B2249900275AFC = { CreatedOnToolsVersion = 6.0; + LastSwiftMigration = 0800; }; D373F79219B2249900275AFC = { CreatedOnToolsVersion = 6.0; + LastSwiftMigration = 0800; }; }; }; @@ -1170,6 +1172,7 @@ PRODUCT_NAME = Spine; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 2.3; }; name = Debug; }; @@ -1191,6 +1194,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.wardvanteijlingen.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = Spine; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; }; name = Release; }; @@ -1210,6 +1214,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.wardvanteijlingen.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 2.3; }; name = Debug; }; @@ -1225,6 +1230,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.wardvanteijlingen.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 2.3; }; name = Release; }; diff --git a/Spine/Routing.swift b/Spine/Routing.swift index 8904dafd..a3db5b6f 100644 --- a/Spine/Routing.swift +++ b/Spine/Routing.swift @@ -66,7 +66,7 @@ public class JSONAPIRouter: Router { public init() { } public func URLForResourceType(type: ResourceType) -> NSURL { - return baseURL.URLByAppendingPathComponent(type) + return baseURL.URLByAppendingPathComponent(type)! } public func URLForRelationship(relationship: Relationship, ofResource resource: T) -> NSURL { @@ -76,8 +76,8 @@ public class JSONAPIRouter: Router { let resourceURL = resource.URL ?? URLForResourceType(resource.resourceType).URLByAppendingPathComponent("/\(resource.id!)") let key = keyFormatter.format(relationship) - let urlString = resourceURL.URLByAppendingPathComponent("/relationships/\(key)").absoluteString - return NSURL(string: urlString, relativeToURL: baseURL) + let urlString = resourceURL!.URLByAppendingPathComponent("/relationships/\(key)")!.absoluteString + return NSURL(string: urlString!, relativeToURL: baseURL)! } @@ -137,9 +137,9 @@ public class JSONAPIRouter: Router { let fieldName = filter.leftExpression.keyPath var item: NSURLQueryItem? if let field = T.fieldNamed(fieldName) { - item = queryItemForFilter(field, value: filter.rightExpression.constantValue, operatorType: filter.predicateOperatorType) + item = queryItemForFilter(field, value: filter.rightExpression.constantValue!, operatorType: filter.predicateOperatorType) } else { - item = queryItemForFilterName(fieldName, value: filter.rightExpression.constantValue, operatorType: filter.predicateOperatorType) + item = queryItemForFilterName(fieldName, value: filter.rightExpression.constantValue!, operatorType: filter.predicateOperatorType) } setQueryItem(item!, forQueryItems: &queryItems) } diff --git a/Spine/ValueFormatter.swift b/Spine/ValueFormatter.swift index 14ec125e..bab326d3 100644 --- a/Spine/ValueFormatter.swift +++ b/Spine/ValueFormatter.swift @@ -145,7 +145,7 @@ private struct URLValueFormatter: ValueFormatter { } func format(value: NSURL, attribute: URLAttribute) -> AnyObject { - return value.absoluteString + return value.absoluteString ?? "" } }