Skip to content

Commit

Permalink
Bump versions and
Browse files Browse the repository at this point in the history
  • Loading branch information
bmoliveira committed Jan 26, 2020
1 parent f990e28 commit 1f64732
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

11 changes: 6 additions & 5 deletions Moya-ObjectMapper.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Moya-ObjectMapper"
s.version = "2.9"
s.version = "3.0"
s.summary = "ObjectMapper bindings for Moya"
s.description = <<-EOS
[ObjectMapper](https://github.com/Hearst-DD/ObjectMapper) bindings for
Expand All @@ -19,25 +19,26 @@ Pod::Spec.new do |s|
s.tvos.deployment_target = '10.0'
s.source = { :git => "https://github.com/bmoliveira/Moya-ObjectMapper.git", :tag => s.version }
s.default_subspec = "Core"
s.swift_version = '5.0'

s.subspec "Core" do |ss|
ss.source_files = "Source/Core/*.swift"
ss.dependency "Moya"
ss.dependency "ObjectMapper", "~> 3.5.1"
ss.dependency "Moya", '~> 14.0.0-beta.6'
ss.dependency "ObjectMapper"
ss.framework = "Foundation"
end

s.subspec "RxSwift" do |ss|
ss.source_files = "Source/RxSwift/*.swift"
ss.dependency "Moya-ObjectMapper/Core"
ss.dependency "RxSwift", "~> 5"
ss.dependency "RxSwift"
ss.dependency "Moya/RxSwift"
end

s.subspec "ReactiveSwift" do |ss|
ss.source_files = "Source/ReactiveSwift/*.swift"
ss.dependency "Moya-ObjectMapper/Core"
ss.dependency "Moya/ReactiveSwift"
ss.dependency "ReactiveSwift" , "~> 6.0"
ss.dependency "ReactiveSwift"
end
end
18 changes: 9 additions & 9 deletions Sample/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ PODS:
- Moya-ObjectMapper/Core (= 3.0)
- Moya-ObjectMapper/Core (3.0):
- Moya (~> 14.0.0-beta.6)
- ObjectMapper (~> 3.5.1)
- ObjectMapper
- Moya-ObjectMapper/ReactiveSwift (3.0):
- Moya-ObjectMapper/Core
- Moya/ReactiveSwift
- ReactiveSwift (~> 6.0)
- ReactiveSwift
- Moya-ObjectMapper/RxSwift (3.0):
- Moya-ObjectMapper/Core
- Moya/RxSwift
- RxSwift (~> 5.0)
- RxSwift
- Moya/Core (14.0.0-beta.6):
- Alamofire (= 5.0.0-rc.3)
- Moya/ReactiveSwift (14.0.0-beta.6):
Expand All @@ -25,9 +25,9 @@ PODS:
- Moya/Core
- RxSwift (~> 5.0)
- ObjectMapper (3.5.1)
- ReactiveCocoa (10.1.0):
- ReactiveSwift (~> 6.1)
- ReactiveSwift (6.1.0)
- ReactiveCocoa (10.2.0):
- ReactiveSwift (~> 6.2)
- ReactiveSwift (6.2.0)
- RxAlertController (5.0.0):
- RxSwift (~> 5.0)
- RxCocoa (5.0.1):
Expand Down Expand Up @@ -78,10 +78,10 @@ SPEC CHECKSUMS:
Alamofire: ca8c0de6906873be89d6deec5c8de279e00bf872
Differentiator: 886080237d9f87f322641dedbc5be257061b0602
Moya: d4821fbcb3e784f34d2f82869e6855057a0b85d1
Moya-ObjectMapper: cf781507fa621e4f18bcc8f3c747cb3cd8fabea2
Moya-ObjectMapper: c17b20a2ff331643b04f55c8975883ca0e59824b
ObjectMapper: 70187b8941977c62ccfb423caf6b50be405cabf0
ReactiveCocoa: 2f1d942d79072eded6d8c3bc7c2a641d40855a56
ReactiveSwift: b78c7259f8ca46368238c895ae33a6a3bf9f811c
ReactiveCocoa: a123c42f449c552460a4ee217dd49c76a17c8204
ReactiveSwift: 3dc8800378110b13d40b46ab362afa9f6bcffc6c
RxAlertController: ef75925a2a002f0f1fd03378ddeceaa9c1c5558f
RxCocoa: e741b9749968e8a143e2b787f1dfbff2b63d0a5c
RxDataSources: efee07fa4de48477eca0a4611e6d11e2da9c1114
Expand Down
16 changes: 8 additions & 8 deletions Source/Core/Response+ObjectMapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public extension Response {

/// Maps data received from the signal into an object which implements the Mappable protocol.
/// If the conversion fails, the signal errors.
public func mapObject<T: BaseMappable>(_ type: T.Type, context: MapContext? = nil) throws -> T {
func mapObject<T: BaseMappable>(_ type: T.Type, context: MapContext? = nil) throws -> T {
guard let object = Mapper<T>(context: context).map(JSONObject: try mapJSON()) else {
throw MoyaError.jsonMapping(self)
}
Expand All @@ -23,7 +23,7 @@ public extension Response {
/// Maps data received from the signal into an array of objects which implement the Mappable
/// protocol.
/// If the conversion fails, the signal errors.
public func mapArray<T: BaseMappable>(_ type: T.Type, context: MapContext? = nil) throws -> [T] {
func mapArray<T: BaseMappable>(_ type: T.Type, context: MapContext? = nil) throws -> [T] {
guard let array = try mapJSON() as? [[String : Any]] else {
throw MoyaError.jsonMapping(self)
}
Expand All @@ -32,7 +32,7 @@ public extension Response {

/// Maps data received from the signal into an object which implements the Mappable protocol.
/// If the conversion fails, the signal errors.
public func mapObject<T: BaseMappable>(_ type: T.Type, atKeyPath keyPath: String, context: MapContext? = nil) throws -> T {
func mapObject<T: BaseMappable>(_ type: T.Type, atKeyPath keyPath: String, context: MapContext? = nil) throws -> T {
guard let object = Mapper<T>(context: context).map(JSONObject: (try mapJSON() as? NSDictionary)?.value(forKeyPath: keyPath)) else {
throw MoyaError.jsonMapping(self)
}
Expand All @@ -42,7 +42,7 @@ public extension Response {
/// Maps data received from the signal into an array of objects which implement the Mappable
/// protocol.
/// If the conversion fails, the signal errors.
public func mapArray<T: BaseMappable>(_ type: T.Type, atKeyPath keyPath: String, context: MapContext? = nil) throws -> [T] {
func mapArray<T: BaseMappable>(_ type: T.Type, atKeyPath keyPath: String, context: MapContext? = nil) throws -> [T] {
guard let array = (try mapJSON() as? NSDictionary)?.value(forKeyPath: keyPath) as? [[String : Any]] else {
throw MoyaError.jsonMapping(self)
}
Expand All @@ -58,14 +58,14 @@ public extension Response {
/// Maps data received from the signal into an object which implements the ImmutableMappable
/// protocol.
/// If the conversion fails, the signal errors.
public func mapObject<T: ImmutableMappable>(_ type: T.Type, context: MapContext? = nil) throws -> T {
func mapObject<T: ImmutableMappable>(_ type: T.Type, context: MapContext? = nil) throws -> T {
return try Mapper<T>(context: context).map(JSONObject: try mapJSON())
}

/// Maps data received from the signal into an array of objects which implement the ImmutableMappable
/// protocol.
/// If the conversion fails, the signal errors.
public func mapArray<T: ImmutableMappable>(_ type: T.Type, context: MapContext? = nil) throws -> [T] {
func mapArray<T: ImmutableMappable>(_ type: T.Type, context: MapContext? = nil) throws -> [T] {
guard let array = try mapJSON() as? [[String : Any]] else {
throw MoyaError.jsonMapping(self)
}
Expand All @@ -75,7 +75,7 @@ public extension Response {
/// Maps data received from the signal into an object which implements the ImmutableMappable
/// protocol.
/// If the conversion fails, the signal errors.
public func mapObject<T: ImmutableMappable>(_ type: T.Type, atKeyPath keyPath: String, context: MapContext? = nil) throws -> T {
func mapObject<T: ImmutableMappable>(_ type: T.Type, atKeyPath keyPath: String, context: MapContext? = nil) throws -> T {
guard let object = Mapper<T>(context: context).map(JSONObject: (try mapJSON() as? NSDictionary)?.value(forKeyPath: keyPath)) else {
throw MoyaError.jsonMapping(self)
}
Expand All @@ -85,7 +85,7 @@ public extension Response {
/// Maps data received from the signal into an array of objects which implement the ImmutableMappable
/// protocol.
/// If the conversion fails, the signal errors.
public func mapArray<T: ImmutableMappable>(_ type: T.Type, atKeyPath keyPath: String, context: MapContext? = nil) throws -> [T] {
func mapArray<T: ImmutableMappable>(_ type: T.Type, atKeyPath keyPath: String, context: MapContext? = nil) throws -> [T] {
guard let array = (try mapJSON() as? NSDictionary)?.value(forKeyPath: keyPath) as? [[String : Any]] else {
throw MoyaError.jsonMapping(self)
}
Expand Down

0 comments on commit 1f64732

Please sign in to comment.