From 4a1dd72d1b6bcd7a3487642a5b5c7d6c7d968c39 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Sat, 3 Oct 2015 12:29:58 +0100 Subject: [PATCH] quick fix of an unnecessary failable initializer --- Podfile | 2 +- Podfile.lock | 6 +++--- XcodeServerSDK.podspec | 2 +- XcodeServerSDK/XcodeServerConfig.swift | 2 +- XcodeServerSDKTests/XcodeServerConfigTests.swift | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Podfile b/Podfile index 63938aa..eb899fd 100644 --- a/Podfile +++ b/Podfile @@ -2,7 +2,7 @@ use_frameworks! def utils - pod 'BuildaUtils', '~> 0.1.0' + pod 'BuildaUtils', '~> 0.1.3' end def tests diff --git a/Podfile.lock b/Podfile.lock index c68a907..d1bc120 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - BuildaUtils (0.1.0) + - BuildaUtils (0.1.3) - DVR (0.0.4-czechboy0) - Nimble (2.0.0-rc.3) @@ -19,8 +19,8 @@ CHECKOUT OPTIONS: :tag: v0.0.5-czechboy0 SPEC CHECKSUMS: - BuildaUtils: cf7756290492ca286935d996c8bf4a3085662514 + BuildaUtils: a9ece265022c420198d28aed5fc56a5ae019f6f1 DVR: 386f347071f55f3f9105239db6764483009ec875 Nimble: 9dff98ee195ffe7351d3b2fb01d3a1420fd97948 -COCOAPODS: 0.39.0.beta.3 +COCOAPODS: 0.39.0.beta.5 diff --git a/XcodeServerSDK.podspec b/XcodeServerSDK.podspec index a697850..725f51a 100644 --- a/XcodeServerSDK.podspec +++ b/XcodeServerSDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "XcodeServerSDK" - s.version = "0.3.1" + s.version = "0.3.2" s.summary = "Access Xcode Server API with native Swift objects." s.homepage = "https://github.com/czechboy0/XcodeServerSDK" diff --git a/XcodeServerSDK/XcodeServerConfig.swift b/XcodeServerSDK/XcodeServerConfig.swift index 39393e8..d74f2a4 100644 --- a/XcodeServerSDK/XcodeServerConfig.swift +++ b/XcodeServerSDK/XcodeServerConfig.swift @@ -121,7 +121,7 @@ public class XcodeServerConfig : JSONSerializable { - `InvalidHostProvided`: When the host provided doesn't produce a valid `URL` - `InvalidSchemeProvided`: When the provided scheme is not `HTTPS` */ - public required convenience init?(json: NSDictionary) throws { + public required convenience init(json: NSDictionary) throws { guard let host = json.optionalStringForKey("host") else { throw ConfigurationErrors.NoHostProvided } diff --git a/XcodeServerSDKTests/XcodeServerConfigTests.swift b/XcodeServerSDKTests/XcodeServerConfigTests.swift index 80769c7..440edca 100644 --- a/XcodeServerSDKTests/XcodeServerConfigTests.swift +++ b/XcodeServerSDKTests/XcodeServerConfigTests.swift @@ -68,9 +68,9 @@ class XcodeServerConfigTests: XCTestCase { let config = try XcodeServerConfig(json: json) - XCTAssertEqual(config!.host, "https://127.0.0.1", "Should create proper host address") - XCTAssertEqual(config!.user!, "ICanCreateBots") - XCTAssertEqual(config!.password!, "superSecr3t") + XCTAssertEqual(config.host, "https://127.0.0.1", "Should create proper host address") + XCTAssertEqual(config.user!, "ICanCreateBots") + XCTAssertEqual(config.password!, "superSecr3t") } }