diff --git a/.jazzy.yaml b/.jazzy.yaml index 32faad72..57a603c4 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -9,7 +9,7 @@ exclude: - "Source/SiestaUI/SiestaUI-ObjC.swift" # ditto - "Source/Siesta/Support/Ω_Deprecations.swift" # ditto -copyright: '© 2016 [Bust Out Solutions](http://bustoutsolutions.com) under [open source license](https://github.com/bustoutsolutions/siesta/blob/master/LICENSE).' +copyright: '© 2018 [Bust Out Solutions](http://bustoutsolutions.com) under [open source license](https://github.com/bustoutsolutions/siesta/blob/master/LICENSE).' swift_version: 4.1.2 @@ -39,6 +39,9 @@ custom_categories: - RequestError - Response - ResponseInfo + + - name: Request Customization + children: - RequestChainAction - RequestDelegate - RequestCompletionHandler @@ -55,6 +58,10 @@ custom_categories: - TextResponseTransformer(_:) - ImageResponseTransformer(_:) + - name: Logging + children: + - SiestaLog + - name: Caching children: - EntityCache @@ -74,8 +81,3 @@ custom_categories: - URLSessionProvider - SessionTaskContainer - AlamofireProvider - - - name: Logging - children: - - LogCategory - - logger diff --git a/Cartfile.private b/Cartfile.private index 7541123f..d9ea7ce8 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -5,6 +5,6 @@ github "Alamofire/Alamofire" ~> 4.0 # Testing -github "pcantrell/Quick" "expose-current-spec-swift3" # fork for Swift 3, use of XCTestExpectation +github "Quick/Quick" github "Quick/Nimble" github "pcantrell/Nocilla" "siesta" # fork adds delay() / go(), nullability annotations diff --git a/Cartfile.resolved b/Cartfile.resolved index 2ee56558..fcf82642 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,4 @@ -github "Alamofire/Alamofire" "4.5.1" -github "Quick/Nimble" "v7.0.2" +github "Alamofire/Alamofire" "4.7.2" +github "Quick/Nimble" "v7.1.2" +github "Quick/Quick" "v1.3.0" github "pcantrell/Nocilla" "bd7ec7caa0576f08c00bbbf993a9204f93be16e3" -github "pcantrell/Quick" "ea7d540048645e84748310854e10c19ad8a1b404" diff --git a/Docs/logging.md b/Docs/logging.md index c1bd5bb5..74e973af 100644 --- a/Docs/logging.md +++ b/Docs/logging.md @@ -32,8 +32,8 @@ For example, if you want to drive yourself and everyone around you into a wild r ```swift let speechSynth = AVSpeechSynthesizer() -let originalLogger = Siesta.logger -Siesta.logger = { category, message in +let originalLogger = SiestaLog.messageHandler +SiestaLog.messageHandler = { category, message in originalLogger(category, message) speechSynth.speak(AVSpeechUtterance(string: message)) } diff --git a/Docs/security.md b/Docs/security.md index 24494653..6d2437a3 100644 --- a/Docs/security.md +++ b/Docs/security.md @@ -73,7 +73,7 @@ A more drastic measure is to forcibly cut off all requests that attempt to reach service.configure(whenURLMatches: { $0.host != "api.example.com" }) { $0.decorateRequests { _,_ in Resource.failedRequest( - RequestError( + returning: RequestError( userMessage: "Attempted to connect to unauthorized server", cause: UnauthorizedServer())) } diff --git a/Examples/GithubBrowser/GithubBrowser.xcodeproj/project.pbxproj b/Examples/GithubBrowser/GithubBrowser.xcodeproj/project.pbxproj index ac92d8cf..857a2184 100644 --- a/Examples/GithubBrowser/GithubBrowser.xcodeproj/project.pbxproj +++ b/Examples/GithubBrowser/GithubBrowser.xcodeproj/project.pbxproj @@ -170,7 +170,6 @@ DA7462361B4C768B00406D67 /* Frameworks */, DA7462371B4C768B00406D67 /* Resources */, ABBC5F5CF6B83AF37EB2D67F /* [CP] Embed Pods Frameworks */, - DD66E6435D504CAF585B7E20 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -264,21 +263,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GithubBrowser/Pods-GithubBrowser-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - DD66E6435D504CAF585B7E20 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GithubBrowser/Pods-GithubBrowser-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/Examples/GithubBrowser/Podfile.lock b/Examples/GithubBrowser/Podfile.lock index 755a38ac..ba565b74 100644 --- a/Examples/GithubBrowser/Podfile.lock +++ b/Examples/GithubBrowser/Podfile.lock @@ -1,6 +1,6 @@ PODS: - - Siesta/Core (1.3.1) - - Siesta/UI (1.3.1): + - Siesta/Core (1.4.0) + - Siesta/UI (1.4.0): - Siesta/Core DEPENDENCIES: @@ -8,11 +8,11 @@ DEPENDENCIES: EXTERNAL SOURCES: Siesta: - :path: ../.. + :path: "../.." SPEC CHECKSUMS: - Siesta: afb4ac3ff3f7701ccd5539c7fcd9e15a05509540 + Siesta: 25cfcc0aebc514af30291e62ece8ea0379539c84 PODFILE CHECKSUM: ae415ad9ad375272eab63ab45853da2148a7aa21 -COCOAPODS: 1.3.1 +COCOAPODS: 1.5.3 diff --git a/Examples/GithubBrowser/Source/API/GithubAPI.swift b/Examples/GithubBrowser/Source/API/GithubAPI.swift index ce323fb7..006074d0 100644 --- a/Examples/GithubBrowser/Source/API/GithubAPI.swift +++ b/Examples/GithubBrowser/Source/API/GithubAPI.swift @@ -80,7 +80,7 @@ class _GitHubAPI { service.configureTransformer("/search/repositories") { try jsonDecoder.decode(SearchResults.self, from: $0.content) - .items + .items // Transformers can do arbitrary post-processing } service.configureTransformer("/repos/*/*") { @@ -92,7 +92,7 @@ class _GitHubAPI { } service.configureTransformer("/repos/*/*/languages") { - // For the request, GitHub gives a response of the form {"Swift": 421956, "Objective-C": 11000, ...}. + // For this request, GitHub gives a response of the form {"Swift": 421956, "Objective-C": 11000, ...}. // Instead of using a custom model class for this one, we just model it as a raw dictionary. try jsonDecoder.decode([String:Int].self, from: $0.content) } diff --git a/Extensions/SwiftyJSON/Siesta+SwiftyJSON.swift b/Extensions/SwiftyJSON/Siesta+SwiftyJSON.swift index 8ebc7aaa..e6788429 100644 --- a/Extensions/SwiftyJSON/Siesta+SwiftyJSON.swift +++ b/Extensions/SwiftyJSON/Siesta+SwiftyJSON.swift @@ -1,4 +1,3 @@ -@@ -1,23 +0,0 @@ // // Siesta+SwiftyJSON.swift // GithubBrowser diff --git a/LICENSE b/LICENSE index 5f73c5d1..7b799783 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016 Bust Out Solutions, Inc. http://bustoutsolutions.com +Copyright (c) 2018 Bust Out Solutions, Inc. http://bustoutsolutions.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Siesta.podspec b/Siesta.podspec index a82fb2a3..ee34c3d7 100644 --- a/Siesta.podspec +++ b/Siesta.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Siesta" - s.version = "1.3.1" + s.version = "1.4.0" s.summary = "Swift REST client library" s.description = <<-DESC @@ -69,7 +69,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = "8.0" s.osx.deployment_target = "10.11" - s.source = { :git => "https://github.com/bustoutsolutions/siesta.git", :tag => "1.3.1" } + s.source = { :git => "https://github.com/bustoutsolutions/siesta.git", :tag => "1.4.0" } s.subspec "Core" do |s| s.source_files = "Source/Siesta/**/*" diff --git a/Source/Info-macOS.plist b/Source/Info-macOS.plist index 2e29125a..43488bd9 100644 --- a/Source/Info-macOS.plist +++ b/Source/Info-macOS.plist @@ -21,7 +21,7 @@ CFBundleVersion $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright - Copyright © 2016 Bust Out Solutions, under MIT license + Copyright © 2018 Bust Out Solutions, under MIT license NSPrincipalClass