Skip to content

Commit

Permalink
- now using ObjectMapper 0.14
Browse files Browse the repository at this point in the history
- updated documentation
- updated tests
  • Loading branch information
tristanhimmelman committed Jul 27, 2015
1 parent 0126911 commit 1e668c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
12 changes: 4 additions & 8 deletions AlamofireObjectMapperTests/AlamofireObjectMapperTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,8 @@ class WeatherResponse: Mappable {
var location: String?
var threeDayForecast: [Forecast]?

init() {}

required init?(_ map: Map) {
mapping(map)
class func newInstance() -> Mappable {
return WeatherResponse()
}

func mapping(map: Map) {
Expand All @@ -140,10 +138,8 @@ class Forecast: Mappable {
var temperature: Int?
var conditions: String?

init() {}

required init?(_ map: Map) {
mapping(map)
class func newInstance() -> Mappable {
return Forecast()
}

func mapping(map: Map) {
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Alamofire/Alamofire" >= 1.3
github "Hearst-DD/ObjectMapper" >= 0.10
github "Hearst-DD/ObjectMapper" >= 0.14
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Alamofire/Alamofire" "1.3.0"
github "Hearst-DD/ObjectMapper" "0.12"
github "Hearst-DD/ObjectMapper" "0.14"
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class WeatherResponse: Mappable {
var location: String?
var threeDayForecast: [Forecast]?

init() {}

required init?(_ map: Map) {
mapping(map)
class func newInstance() -> Mappable {
return WeatherResponse()
}

func mapping(map: Map) {
Expand All @@ -70,10 +68,8 @@ class Forecast: Mappable {
var temperature: Int?
var conditions: String?

init() {}

required init?(_ map: Map) {
mapping(map)
class func newInstance() -> Mappable {
return Forecast()
}

func mapping(map: Map) {
Expand Down Expand Up @@ -148,10 +144,10 @@ Alamofire.request(.GET, URL, parameters: nil)
#Installation
AlamofireObjectMapper can be added to your project using [Cocoapods](https://cocoapods.org/) by adding the following line to your Podfile:
```
pod 'AlamofireObjectMapper', '~> 0.6'
pod 'AlamofireObjectMapper', '~> 0.7'
```

If your using [Carthage](https://github.com/Carthage/Carthage) you can add a dependency on AlamofireObjectMapper by adding it to your Cartfile:
```
github "tristanhimmelman/AlamofireObjectMapper" ~> 0.6
github "tristanhimmelman/AlamofireObjectMapper" ~> 0.7
```

0 comments on commit 1e668c8

Please sign in to comment.