diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bd5a803..6d2cba80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog + +### 1.12.0 + +- **Update**: EndpointRequest Body can take a nil value +- **Update**: Parameter value can be nil as well +- **Update**: observe operator of AsyncOperation now accepts callback queue parameter + ### 1.11.1 - **Fix**: `timeoutIntervalForRequest` parameter for `URLSessionConfiguration` in `NetworkServiceConfiguration` added. diff --git a/LeadKit.podspec b/LeadKit.podspec index 2f34fbd5..c533651d 100644 --- a/LeadKit.podspec +++ b/LeadKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKit" - s.version = "1.11.1" + s.version = "1.12.0" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKit" s.license = "Apache License, Version 2.0" diff --git a/TIFoundationUtils/AsyncOperation/Sources/AsyncOperation+Observe.swift b/TIFoundationUtils/AsyncOperation/Sources/AsyncOperation+Observe.swift index b57c55c1..21fb4092 100644 --- a/TIFoundationUtils/AsyncOperation/Sources/AsyncOperation+Observe.swift +++ b/TIFoundationUtils/AsyncOperation/Sources/AsyncOperation+Observe.swift @@ -27,18 +27,25 @@ private final class ClosureObserverOperation: AsyncOpera public init(dependency: AsyncOperation, onSuccess: ((Output) -> Void)? = nil, - onFailure: ((Failure) -> Void)? = nil) { + onFailure: ((Failure) -> Void)? = nil, + callbackQueue: DispatchQueue = .main) { super.init() cancelOnCancellation(of: dependency) - dependencyObservation = dependency.subscribe { [weak self] in - onSuccess?($0) - self?.handle(result: $0) - } onFailure: { [weak self] in - onFailure?($0) - self?.handle(error: $0) + dependencyObservation = dependency.subscribe { [weak self] result in + callbackQueue.async { + onSuccess?(result) + } + + self?.handle(result: result) + } onFailure: { [weak self] error in + callbackQueue.async { + onFailure?(error) + } + + self?.handle(error: error) } addDependency(dependency) // keeps strong reference to dependency as well @@ -49,8 +56,12 @@ private final class ClosureObserverOperation: AsyncOpera public extension AsyncOperation { func observe(onSuccess: ((Output) -> Void)? = nil, - onFailure: ((Failure) -> Void)? = nil) -> AsyncOperation { + onFailure: ((Failure) -> Void)? = nil, + callbackQueue: DispatchQueue = .main) -> AsyncOperation { - ClosureObserverOperation(dependency: self, onSuccess: onSuccess, onFailure: onFailure) + ClosureObserverOperation(dependency: self, + onSuccess: onSuccess, + onFailure: onFailure, + callbackQueue: callbackQueue) } } diff --git a/TIFoundationUtils/AsyncOperation/Sources/CancellableTask.swift b/TIFoundationUtils/AsyncOperation/Sources/CancellableTask.swift index ea88ded5..356e9949 100644 --- a/TIFoundationUtils/AsyncOperation/Sources/CancellableTask.swift +++ b/TIFoundationUtils/AsyncOperation/Sources/CancellableTask.swift @@ -28,5 +28,6 @@ public protocol CancellableTask { @available(iOS 13.0, *) extension Task: CancellableTask {} + extension Operation: CancellableTask {} extension DispatchWorkItem: CancellableTask {} diff --git a/TIFoundationUtils/TIFoundationUtils.podspec b/TIFoundationUtils/TIFoundationUtils.podspec index 464cfb7c..0e30eabf 100644 --- a/TIFoundationUtils/TIFoundationUtils.podspec +++ b/TIFoundationUtils/TIFoundationUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIFoundationUtils' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Set of helpers for Foundation framework classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIKeychainUtils/TIKeychainUtils.podspec b/TIKeychainUtils/TIKeychainUtils.podspec index eb8aaec6..91205d3e 100644 --- a/TIKeychainUtils/TIKeychainUtils.podspec +++ b/TIKeychainUtils/TIKeychainUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIKeychainUtils' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Set of helpers for Keychain classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellable+Factory.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellable+Factory.swift new file mode 100644 index 00000000..2b7ee6f0 --- /dev/null +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/Cancellable+Factory.swift @@ -0,0 +1,34 @@ +// +// Copyright (c) 2022 Touch Instinct +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Moya +import TISwiftUtils + +public extension Cancellable { + static func nonCancellable() -> Cancellable { + NonCancellable() + } + + static func scoped(scopeCancellableClosure: ScopeCancellable.ScopeCancellableClosure) -> Cancellable { + ScopeCancellable(scopeCancellableClosure: scopeCancellableClosure) + } +} diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift new file mode 100644 index 00000000..f059410a --- /dev/null +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/NonCancellable.swift @@ -0,0 +1,31 @@ +// +// Copyright (c) 2022 Touch Instinct +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Moya + +public struct NonCancellable: Cancellable { + public let isCancelled = true + + public func cancel() { + // nothing + } +} diff --git a/TIMoyaNetworking/Sources/NetworkService/Cancellables/ScopeCancellable.swift b/TIMoyaNetworking/Sources/NetworkService/Cancellables/ScopeCancellable.swift index 05ae360c..92b8f082 100644 --- a/TIMoyaNetworking/Sources/NetworkService/Cancellables/ScopeCancellable.swift +++ b/TIMoyaNetworking/Sources/NetworkService/Cancellables/ScopeCancellable.swift @@ -24,7 +24,9 @@ import Moya import TISwiftUtils public final class ScopeCancellable: CancellableBag { - public init(scopeCancellableClosure: Closure) { + public typealias ScopeCancellableClosure = Closure + + public init(scopeCancellableClosure: ScopeCancellableClosure) { super.init() cancellables = [scopeCancellableClosure(self)] diff --git a/TIMoyaNetworking/Sources/RecoverableNetworkService/DefaultRecoverableJsonNetworkService.swift b/TIMoyaNetworking/Sources/RecoverableNetworkService/DefaultRecoverableJsonNetworkService.swift index 46e84efa..98cac35c 100644 --- a/TIMoyaNetworking/Sources/RecoverableNetworkService/DefaultRecoverableJsonNetworkService.swift +++ b/TIMoyaNetworking/Sources/RecoverableNetworkService/DefaultRecoverableJsonNetworkService.swift @@ -28,11 +28,11 @@ import Moya open class DefaultRecoverableJsonNetworkService: DefaultJsonNetworkService { public typealias ErrorHandler = AnyAsyncEventHandler - private var defaultErrorHandlers: [ErrorHandler] = [] + private(set) public var defaultErrorHandlers: [ErrorHandler] = [] public func process(request: EndpointRequest, - prependErrorHandlers: [ErrorHandler] = [], - appendErrorHandlers: [ErrorHandler] = [], + prependErrorHandlers: [ErrorHandler], + appendErrorHandlers: [ErrorHandler], mapMoyaError: @escaping Closure) async -> Result { await process(request: request, @@ -41,7 +41,7 @@ open class DefaultRecoverableJsonNetworkService: De } public func process(request: EndpointRequest, - errorHandlers: [ErrorHandler] = [], + errorHandlers: [ErrorHandler], mapMoyaError: @escaping Closure) async -> Result { let result = await process(request: request, mapMoyaError: mapMoyaError) diff --git a/TIMoyaNetworking/TIMoyaNetworking.podspec b/TIMoyaNetworking/TIMoyaNetworking.podspec index f40c7cf0..0f22fa0c 100644 --- a/TIMoyaNetworking/TIMoyaNetworking.podspec +++ b/TIMoyaNetworking/TIMoyaNetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIMoyaNetworking' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Moya + Swagger network service.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TINetworking/Sources/Mapping/BodySerializer/ApplicationJsonBodySerializer.swift b/TINetworking/Sources/Mapping/BodySerializer/ApplicationJsonBodySerializer.swift index 062ab47b..4607303e 100644 --- a/TINetworking/Sources/Mapping/BodySerializer/ApplicationJsonBodySerializer.swift +++ b/TINetworking/Sources/Mapping/BodySerializer/ApplicationJsonBodySerializer.swift @@ -38,7 +38,13 @@ public struct ApplicationJsonBodySerializer: BodySerializer { } } - public func serialize(body: Body) throws -> ContentTypeData { - (CommonMediaTypes.applicationJson.rawValue, try encodingClosure(body)) + public func serialize(body: Body?) throws -> ContentTypeData { + let mimeType = CommonMediaTypes.applicationJson.rawValue + + guard let body = body else { + return (mimeType, Data()) + } + + return ContentTypeData(mimeType, try encodingClosure(body)) } } diff --git a/TINetworking/Sources/Mapping/BodySerializer/BodySerializer.swift b/TINetworking/Sources/Mapping/BodySerializer/BodySerializer.swift index 7921dcfd..b6442569 100644 --- a/TINetworking/Sources/Mapping/BodySerializer/BodySerializer.swift +++ b/TINetworking/Sources/Mapping/BodySerializer/BodySerializer.swift @@ -27,5 +27,5 @@ public protocol BodySerializer { typealias ContentTypeData = (String, Data) - func serialize(body: Body) throws -> ContentTypeData + func serialize(body: Body?) throws -> ContentTypeData } diff --git a/TINetworking/Sources/Mapping/EmptyBody.swift b/TINetworking/Sources/Mapping/Nothing.swift similarity index 95% rename from TINetworking/Sources/Mapping/EmptyBody.swift rename to TINetworking/Sources/Mapping/Nothing.swift index 798930b2..f4fec063 100644 --- a/TINetworking/Sources/Mapping/EmptyBody.swift +++ b/TINetworking/Sources/Mapping/Nothing.swift @@ -20,8 +20,6 @@ // THE SOFTWARE. // -import Foundation - -public struct EmptyBody: Encodable { +public struct Nothing: Codable { public init() {} } diff --git a/TINetworking/Sources/Parameters/Encoding/BaseUrlParameterEncoding.swift b/TINetworking/Sources/Parameters/Encoding/BaseUrlParameterEncoding.swift index 90a9f75c..7f4878de 100644 --- a/TINetworking/Sources/Parameters/Encoding/BaseUrlParameterEncoding.swift +++ b/TINetworking/Sources/Parameters/Encoding/BaseUrlParameterEncoding.swift @@ -31,11 +31,11 @@ open class BaseUrlParameterEncoding { var filteredComponents: [KeyValueTuple] = [] for key in parameters.keys.sorted(by: <) { - guard let parameter = parameters[key] else { + guard let parameter = parameters[key], let value = parameter.value else { continue } - let components = encoding.queryComponents(fromKey: key, value: parameter.value) + let components = encoding.queryComponents(fromKey: key, value: value) // filter components with empty values if parameter doesn't allow empty value .filter { !$0.1.isEmpty || parameter.allowEmptyValue } diff --git a/TINetworking/Sources/Parameters/Encoding/HeaderParameterEncoding.swift b/TINetworking/Sources/Parameters/Encoding/HeaderParameterEncoding.swift new file mode 100644 index 00000000..d0f4df83 --- /dev/null +++ b/TINetworking/Sources/Parameters/Encoding/HeaderParameterEncoding.swift @@ -0,0 +1,29 @@ +// +// Copyright (c) 2022 Touch Instinct +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the Software), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +open class HeaderParameterEncoding: BaseUrlParameterEncoding, ParameterEncoding { + // MARK: - ParameterEncoding + + open func encode(parameters: [String: Parameter]) -> [String: String] { + return Dictionary(uniqueKeysWithValues: super.encode(parameters: parameters)) + } +} diff --git a/TINetworking/Sources/Parameters/Encoding/QueryStringParameterEncoding.swift b/TINetworking/Sources/Parameters/Encoding/QueryStringParameterEncoding.swift index 7931e26c..c7b90531 100644 --- a/TINetworking/Sources/Parameters/Encoding/QueryStringParameterEncoding.swift +++ b/TINetworking/Sources/Parameters/Encoding/QueryStringParameterEncoding.swift @@ -25,10 +25,10 @@ open class QueryStringParameterEncoding: BaseUrlParameterEncoding, ParameterEnco // MARK: - ParameterEncoding open func encode(parameters: [String: Parameter]) -> [String: Any] { - let includedKeys = Set(super.encode(parameters: parameters).map { $0.key }) + let nonEmptyValueKeys = Set(super.encode(parameters: parameters).map { $0.key }) return parameters - .filter { includedKeys.contains($0.key) } - .mapValues { $0.value } + .filter { nonEmptyValueKeys.contains($0.key) } + .compactMapValues { $0.value } } } diff --git a/TINetworking/Sources/Parameters/Parameter.swift b/TINetworking/Sources/Parameters/Parameter.swift index a1dab8a5..14eae016 100644 --- a/TINetworking/Sources/Parameters/Parameter.swift +++ b/TINetworking/Sources/Parameters/Parameter.swift @@ -21,10 +21,10 @@ // public struct Parameter { - public let value: Any + public let value: Any? public let allowEmptyValue: Bool - public init(value: Any, allowEmptyValue: Bool = false) { + public init(value: Any?, allowEmptyValue: Bool = false) { self.value = value self.allowEmptyValue = allowEmptyValue } diff --git a/TINetworking/Sources/Request/EndpointRequest+Serialization.swift b/TINetworking/Sources/Request/EndpointRequest+Serialization.swift index d3131ee2..74a4283e 100644 --- a/TINetworking/Sources/Request/EndpointRequest+Serialization.swift +++ b/TINetworking/Sources/Request/EndpointRequest+Serialization.swift @@ -30,10 +30,15 @@ public extension EndpointRequest { let baseUrl = try (server ?? defaultServer).url(using: customServerVariables) let path = PathParameterEncoding(templateUrl: templatePath).encode(parameters: pathParameters) let (contentType, bodyData) = try serializer.serialize(body: body) - let queryParameters = QueryStringParameterEncoding().encode(parameters: queryParameters) + let serializedQueryParameters = QueryStringParameterEncoding().encode(parameters: queryParameters) - var headerParameters = headerParameters ?? HTTPHeaders() - headerParameters.add(.contentType(contentType)) + var serializedHeaderParameters: [String: String]? + + if let customHeaderParameters = headerParameters { + serializedHeaderParameters = HeaderParameterEncoding().encode(parameters: customHeaderParameters) + } + + serializedHeaderParameters?[HTTPHeader.contentType(contentType).name] = contentType let cookies: [HTTPCookie] @@ -54,8 +59,8 @@ public extension EndpointRequest { path: path, method: method, bodyData: bodyData, - queryParameters: queryParameters, - headers: headerParameters.dictionary, + queryParameters: serializedQueryParameters, + headers: serializedHeaderParameters, cookies: cookies, acceptableStatusCodes: acceptableStatusCodes) } diff --git a/TINetworking/Sources/Request/EndpointRequest.swift b/TINetworking/Sources/Request/EndpointRequest.swift index 1657bda5..99e2971d 100644 --- a/TINetworking/Sources/Request/EndpointRequest.swift +++ b/TINetworking/Sources/Request/EndpointRequest.swift @@ -25,10 +25,10 @@ import Alamofire public struct EndpointRequest { public var templatePath: String public var method: HTTPMethod - public var body: Body + public var body: Body? public var queryParameters: [String: Parameter] public var pathParameters: [String: Parameter] - public var headerParameters: HTTPHeaders? + public var headerParameters: [String: Parameter]? public var cookieParameters: [String: Parameter] public var acceptableStatusCodes: Set public var server: Server? @@ -36,10 +36,10 @@ public struct EndpointRequest { public init(templatePath: String, method: HTTPMethod, - body: Body, + body: Body?, queryParameters: [String: Parameter] = [:], pathParameters: [String: Parameter] = [:], - headerParameters: HTTPHeaders? = nil, + headerParameters: [String: Parameter]? = nil, cookieParameters: [String: Parameter] = [:], acceptableStatusCodes: Set = HTTPCodes.success.asSet(), server: Server? = nil, diff --git a/TINetworking/Sources/Request/SerializedRequest.swift b/TINetworking/Sources/Request/SerializedRequest.swift index 457242a6..fa7f2f68 100644 --- a/TINetworking/Sources/Request/SerializedRequest.swift +++ b/TINetworking/Sources/Request/SerializedRequest.swift @@ -38,7 +38,7 @@ public struct SerializedRequest { method: HTTPMethod, bodyData: Data, queryParameters: Parameters, - headers: [String: String], + headers: [String: String]?, cookies: [HTTPCookie], acceptableStatusCodes: Set) { diff --git a/TINetworking/TINetworking.podspec b/TINetworking/TINetworking.podspec index b54d8b9b..3ced1dac 100644 --- a/TINetworking/TINetworking.podspec +++ b/TINetworking/TINetworking.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TINetworking' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Swagger-frendly networking layer helpers.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TISwiftUtils/TISwiftUtils.podspec b/TISwiftUtils/TISwiftUtils.podspec index e418cefe..a57e0a37 100644 --- a/TISwiftUtils/TISwiftUtils.podspec +++ b/TISwiftUtils/TISwiftUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TISwiftUtils' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Bunch of useful helpers for Swift development.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITableKitUtils/TITableKitUtils.podspec b/TITableKitUtils/TITableKitUtils.podspec index 5b06381d..65e11e79 100644 --- a/TITableKitUtils/TITableKitUtils.podspec +++ b/TITableKitUtils/TITableKitUtils.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITableKitUtils' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Set of helpers for TableKit classes.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TITransitions/TITransitions.podspec b/TITransitions/TITransitions.podspec index 31ce6064..8f50ef1c 100644 --- a/TITransitions/TITransitions.podspec +++ b/TITransitions/TITransitions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TITransitions' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Set of custom transitions to present controller. ' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIElements/TIUIElements.podspec b/TIUIElements/TIUIElements.podspec index 9fe1ce88..ccaca90f 100644 --- a/TIUIElements/TIUIElements.podspec +++ b/TIUIElements/TIUIElements.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIElements' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Bunch of useful protocols and views.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/TIUIKitCore/TIUIKitCore.podspec b/TIUIKitCore/TIUIKitCore.podspec index f3779d13..38d6ce7e 100644 --- a/TIUIKitCore/TIUIKitCore.podspec +++ b/TIUIKitCore/TIUIKitCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TIUIKitCore' - s.version = '1.11.1' + s.version = '1.12.0' s.summary = 'Core UI elements: protocols, views and helpers.' s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name s.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/project-scripts/push_to_podspecs.sh b/project-scripts/push_to_podspecs.sh index 95491c65..0a86e757 100755 --- a/project-scripts/push_to_podspecs.sh +++ b/project-scripts/push_to_podspecs.sh @@ -5,10 +5,15 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$DIR" -# Push changes -find ../ -name '*.podspec' \ - -not -path "../Carthage/*" \ - -not -path "../*/Carthage/*" \ - -not -path "../Pods/*" \ - -not -path "../*/Pods/*" \ - | xargs -I% pod repo push git@github.com:TouchInstinct/Podspecs % --allow-warnings +ORDERED_PODSPECS="../TISwiftUtils/TISwiftUtils.podspec +../TIFoundationUtils/TIFoundationUtils.podspec +../TIKeychainUtils/TIKeychainUtils.podspec +../TIUIKitCore/TIUIKitCore.podspec +../TIUIElements/TIUIElements.podspec +../TITableKitUtils/TITableKitUtils.podspec +../TINetworking/TINetworking.podspec +../TIMoyaNetworking/TIMoyaNetworking.podspec" + +for podspec_path in ${ORDERED_PODSPECS}; do + pod repo push git@github.com:TouchInstinct/Podspecs ${podspec_path} --allow-warnings +done