Skip to content

Commit 29f3e83

Browse files
committed
[master] - Release v1.3.1
1 parent 7da54bd commit 29f3e83

File tree

9 files changed

+46
-33
lines changed

9 files changed

+46
-33
lines changed

AlamoRecord.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Pod::Spec.new do |s|
33
s.name = 'AlamoRecord'
4-
s.version = '1.3.0'
4+
s.version = '1.3.1'
55
s.summary = 'An elegant Alamofire wrapper inspired by ActiveRecord.'
66
s.description = <<-DESC
77
AlamoRecord is a powerful yet simple framework that eliminates the often complex networking layer that exists between your networking framework and your application. AlamoRecord uses the power of AlamoFire, AlamofireObjectMapper and the concepts behind the ActiveRecord pattern to create a networking layer that makes interacting with your API easier than ever.

AlamoRecord/Classes/AlamoRecordObject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Alamofire
2020
import AlamofireObjectMapper
2121
import ObjectMapper
2222

23-
open class AlamoRecordObject<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject, Mappable {
23+
open class AlamoRecordObject<U: AlamoRecordURL, E: AlamoRecordError, IDType>: NSObject, Mappable {
2424

2525
/// Key to encode/decode the id variable
2626
private let idKey: String = "id"
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616

1717
*/
1818

19-
public protocol URLProtocol {
19+
public protocol AlamoRecordURL {
2020

2121
/// The entire url of a particular instance. Example: https://www.domain.com/objects/id
2222
var absolute: String { get }
2323

2424
init(url: String)
25+
init(url: String, isCompletePath: Bool)
2526
}

AlamoRecord/Classes/RequestManager.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Alamofire
2020
import AlamofireObjectMapper
2121
import ObjectMapper
2222

23-
open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject {
23+
open class RequestManager<U: AlamoRecordURL, E: AlamoRecordError, IDType>: NSObject {
2424

2525
public typealias Parameters = [String: Any]
2626

@@ -48,7 +48,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
4848
/**
4949
Makes a request to the given URL. Each request goes through this method first.
5050
- parameter method: The HTTP method
51-
- parameter url: The URL that conforms to URLProtocol
51+
- parameter url: The URL that conforms to AlamoRecordURL
5252
- parameter parameters: The parameters. `nil` by default
5353
- parameter encoding: The parameter encoding. `URLEncoding.default` by default
5454
- parameter headers: The HTTP headers. `nil` by default
@@ -72,7 +72,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
7272
/**
7373
Makes a request to the given URL
7474
- parameter method: The HTTP method
75-
- parameter url: The URL that conforms to URLProtocol
75+
- parameter url: The URL that conforms to AlamoRecordURL
7676
- parameter parameters: The parameters. `nil` by default
7777
- parameter encoding: The parameter encoding. `URLEncoding.default` by default
7878
- parameter headers: The HTTP headers. `nil` by default
@@ -121,7 +121,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
121121
/**
122122
Makes a request and maps an object that conforms to the Mappable protocol
123123
- parameter method: The HTTP method
124-
- parameter url: The URL that conforms to URLProtocol
124+
- parameter url: The URL that conforms to AlamoRecordURL
125125
- parameter parameters: The parameters. `nil` by default
126126
- parameter keyPath: The keyPath to use when deserializing the JSON. `nil` by default.
127127
- parameter encoding: The parameter encoding. `URLEncoding.default` by default.
@@ -159,7 +159,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
159159
/**
160160
Makes a request and maps an array of objects that conform to the Mappable protocol
161161
- parameter method: The HTTP method
162-
- parameter url: The URL that conforms to URLProtocol
162+
- parameter url: The URL that conforms to AlamoRecordURL
163163
- parameter parameters: The parameters. `nil` by default
164164
- parameter keyPath: The keyPath to use when deserializing the JSON. `nil` by default.
165165
- parameter encoding: The parameter encoding. `URLEncoding.default` by default.
@@ -224,7 +224,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
224224

225225
/**
226226
Makes a request and maps an AlamoRecordObject
227-
- parameter url: The URL that conforms to URLProtocol
227+
- parameter url: The URL that conforms to AlamoRecordURL
228228
- parameter parameters: The parameters. `nil` by default
229229
- parameter keyPath: The keyPath to use when deserializing the JSON. `nil` by default.
230230
- parameter encoding: The parameter encoding. `URLEncoding.default` by default.
@@ -253,7 +253,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
253253

254254
/**
255255
Makes a request and maps an array of AlamoRecordObjects
256-
- parameter url: The URL that conforms to URLProtocol
256+
- parameter url: The URL that conforms to AlamoRecordURL
257257
- parameter parameters: The parameters. `nil` by default
258258
- parameter keyPath: The keyPath to use when deserializing the JSON. `nil` by default.
259259
- parameter encoding: The parameter encoding. `URLEncoding.default` by default.
@@ -308,7 +308,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
308308

309309
/**
310310
Makes a request and creates an AlamoRecordObject
311-
- paramter url: The URL that conforms to URLProtocol
311+
- paramter url: The URL that conforms to AlamoRecordURL
312312
- parameter parameters: The parameters. `nil` by default
313313
- parameter keyPath: The keyPath to use when deserializing the JSON. `nil` by default.
314314
- parameter encoding: The parameter encoding. `URLEncoding.default` by default.
@@ -390,7 +390,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
390390

391391
/**
392392
Makes a request and updates an AlamoRecordObject
393-
- parameter url: The URL that conforms to URLProtocol
393+
- parameter url: The URL that conforms to AlamoRecordURL
394394
- parameter parameters: The parameters. `nil` by default
395395
- parameter keyPath: The keyPath to use when deserializing the JSON. `nil` by default.
396396
- parameter encoding: The parameter encoding. `URLEncoding.default` by default.
@@ -419,7 +419,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
419419

420420
/**
421421
Makes a request and updates an AlamoRecordObject
422-
- parameter url: The URL that conforms to URLProtocol
422+
- parameter url: The URL that conforms to AlamoRecordURL
423423
- parameter parameters: The parameters. `nil` by default
424424
- parameter keyPath: The keyPath to use when deserializing the JSON. `nil` by default.
425425
- parameter encoding: The parameter encoding. `URLEncoding.default` by default.
@@ -446,7 +446,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
446446

447447
/**
448448
Makes a request and destroys an AlamoRecordObject
449-
- parameter url: The URL that conforms to URLProtocol
449+
- parameter url: The URL that conforms to AlamoRecordURL
450450
- parameter parameters: The parameters. `nil` by default
451451
- parameter encoding: The parameter encoding. `URLEncoding.default` by default.
452452
- parameter headers: The HTTP headers. `nil` by default.
@@ -473,7 +473,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
473473

474474
/**
475475
Makes an upload request
476-
- parameter url: The URL that conforms to URLProtocol
476+
- parameter url: The URL that conforms to AlamoRecordURL
477477
- parameter keyPath: The keyPath to use when deserializing the JSON. `nil` by default.
478478
- parameter headers: The HTTP headers. `nil` by default.
479479
- parameter multipartFormData: The data to append
@@ -511,7 +511,7 @@ open class RequestManager<U: URLProtocol, E: AlamoRecordError, IDType>: NSObject
511511

512512
/**
513513
Makes a download request
514-
- parameter url: The URL that conforms to URLProtocol
514+
- parameter url: The URL that conforms to AlamoRecordURL
515515
- parameter destination: The destination to download the file to. If it is nil, then a default one will be assigned.
516516
- parameter progress: The progress handler of the download request
517517
- parameter success: The block to execute if the request succeeds

Example/AlamoRecord.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
5C94C3061F08707F00762CFC /* RequestManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2F81F08707F00762CFC /* RequestManager.swift */; };
2929
5C94C3081F08707F00762CFC /* RequestObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2F91F08707F00762CFC /* RequestObserver.swift */; };
3030
5C94C30A1F08707F00762CFC /* StatusCodeObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2FA1F08707F00762CFC /* StatusCodeObserver.swift */; };
31-
5C94C30C1F08707F00762CFC /* URLProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2FB1F08707F00762CFC /* URLProtocol.swift */; };
3231
5C96D98D1F0ECC39005FF25E /* PostsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C96D98C1F0ECC39005FF25E /* PostsModel.swift */; };
3332
5C96D98F1F0ECC43005FF25E /* PostsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C96D98E1F0ECC43005FF25E /* PostsView.swift */; };
3433
5C96D9911F0ECC4E005FF25E /* PostsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C96D9901F0ECC4E005FF25E /* PostsViewController.swift */; };
3534
5C96D9931F0ED260005FF25E /* PostCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C96D9921F0ED260005FF25E /* PostCell.swift */; };
3635
5C96D9951F0ED316005FF25E /* BaseTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C96D9941F0ED316005FF25E /* BaseTableViewCell.swift */; };
3736
5C96D9971F0EDB71005FF25E /* ColorsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C96D9961F0EDB71005FF25E /* ColorsExtension.swift */; };
37+
5CA0A94F21825DA3002BA69A /* AlamoRecordURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CA0A94E21825DA3002BA69A /* AlamoRecordURL.swift */; };
38+
5CA0A95021825DA3002BA69A /* AlamoRecordURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CA0A94E21825DA3002BA69A /* AlamoRecordURL.swift */; };
3839
5CCB20951F17064E0027BA56 /* Comment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CE6C8151F102C5200965235 /* Comment.swift */; };
3940
5CCB20961F1706880027BA56 /* AlamoRecordError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C86407E1F09D5E6001E8320 /* AlamoRecordError.swift */; };
4041
5CCB20971F1706880027BA56 /* AlamoRecordObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2F31F08707F00762CFC /* AlamoRecordObject.swift */; };
@@ -44,7 +45,6 @@
4445
5CCB209B1F1706880027BA56 /* RequestManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2F81F08707F00762CFC /* RequestManager.swift */; };
4546
5CCB209C1F1706880027BA56 /* RequestObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2F91F08707F00762CFC /* RequestObserver.swift */; };
4647
5CCB209D1F1706880027BA56 /* StatusCodeObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2FA1F08707F00762CFC /* StatusCodeObserver.swift */; };
47-
5CCB209E1F1706880027BA56 /* URLProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C94C2FB1F08707F00762CFC /* URLProtocol.swift */; };
4848
5CE6C8101F102B6900965235 /* CommentsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CE6C80F1F102B6900965235 /* CommentsModel.swift */; };
4949
5CE6C8121F102B7E00965235 /* CommentsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CE6C8111F102B7E00965235 /* CommentsViewController.swift */; };
5050
5CE6C8141F102B8F00965235 /* CommentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CE6C8131F102B8F00965235 /* CommentsView.swift */; };
@@ -90,13 +90,13 @@
9090
5C94C2F81F08707F00762CFC /* RequestManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RequestManager.swift; path = ../../AlamoRecord/Classes/RequestManager.swift; sourceTree = "<group>"; };
9191
5C94C2F91F08707F00762CFC /* RequestObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RequestObserver.swift; path = ../../AlamoRecord/Classes/RequestObserver.swift; sourceTree = "<group>"; };
9292
5C94C2FA1F08707F00762CFC /* StatusCodeObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = StatusCodeObserver.swift; path = ../../AlamoRecord/Classes/StatusCodeObserver.swift; sourceTree = "<group>"; };
93-
5C94C2FB1F08707F00762CFC /* URLProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = URLProtocol.swift; path = ../../AlamoRecord/Classes/URLProtocol.swift; sourceTree = "<group>"; };
9493
5C96D98C1F0ECC39005FF25E /* PostsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostsModel.swift; sourceTree = "<group>"; };
9594
5C96D98E1F0ECC43005FF25E /* PostsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostsView.swift; sourceTree = "<group>"; };
9695
5C96D9901F0ECC4E005FF25E /* PostsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostsViewController.swift; sourceTree = "<group>"; };
9796
5C96D9921F0ED260005FF25E /* PostCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostCell.swift; sourceTree = "<group>"; };
9897
5C96D9941F0ED316005FF25E /* BaseTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseTableViewCell.swift; sourceTree = "<group>"; };
9998
5C96D9961F0EDB71005FF25E /* ColorsExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorsExtension.swift; sourceTree = "<group>"; };
99+
5CA0A94E21825DA3002BA69A /* AlamoRecordURL.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AlamoRecordURL.swift; path = ../../AlamoRecord/Classes/AlamoRecordURL.swift; sourceTree = "<group>"; };
100100
5CE6C80F1F102B6900965235 /* CommentsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommentsModel.swift; sourceTree = "<group>"; };
101101
5CE6C8111F102B7E00965235 /* CommentsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommentsViewController.swift; sourceTree = "<group>"; };
102102
5CE6C8131F102B8F00965235 /* CommentsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommentsView.swift; sourceTree = "<group>"; };
@@ -207,13 +207,13 @@
207207
children = (
208208
5C86407E1F09D5E6001E8320 /* AlamoRecordError.swift */,
209209
5C94C2F31F08707F00762CFC /* AlamoRecordObject.swift */,
210+
5CA0A94E21825DA3002BA69A /* AlamoRecordURL.swift */,
210211
5C94C2F41F08707F00762CFC /* Configuration.swift */,
211212
5C94C2F51F08707F00762CFC /* ErrorParser.swift */,
212213
5C94C2F71F08707F00762CFC /* Logger.swift */,
213214
5C94C2F81F08707F00762CFC /* RequestManager.swift */,
214215
5C94C2F91F08707F00762CFC /* RequestObserver.swift */,
215216
5C94C2FA1F08707F00762CFC /* StatusCodeObserver.swift */,
216-
5C94C2FB1F08707F00762CFC /* URLProtocol.swift */,
217217
);
218218
name = Source;
219219
sourceTree = "<group>";
@@ -499,8 +499,8 @@
499499
5C6347081F0B088200158A80 /* AlamoRecordTests.swift in Sources */,
500500
5CCB20991F1706880027BA56 /* ErrorParser.swift in Sources */,
501501
5C63470D1F0B09B900158A80 /* ApplicationRequestManager.swift in Sources */,
502+
5CA0A95021825DA3002BA69A /* AlamoRecordURL.swift in Sources */,
502503
5CCB20961F1706880027BA56 /* AlamoRecordError.swift in Sources */,
503-
5CCB209E1F1706880027BA56 /* URLProtocol.swift in Sources */,
504504
5C6347091F0B088200158A80 /* Post.swift in Sources */,
505505
5C63470A1F0B088200158A80 /* ApplicationURL.swift in Sources */,
506506
);
@@ -510,7 +510,6 @@
510510
isa = PBXSourcesBuildPhase;
511511
buildActionMask = 2147483647;
512512
files = (
513-
5C94C30C1F08707F00762CFC /* URLProtocol.swift in Sources */,
514513
5C94C2FE1F08707F00762CFC /* Configuration.swift in Sources */,
515514
5CE6C8121F102B7E00965235 /* CommentsViewController.swift in Sources */,
516515
5C6347161F0B3D3E00158A80 /* ApplicationRequestManager.swift in Sources */,
@@ -522,6 +521,7 @@
522521
5C94C3041F08707F00762CFC /* Logger.swift in Sources */,
523522
5C96D98D1F0ECC39005FF25E /* PostsModel.swift in Sources */,
524523
5C6347151F0B3D3E00158A80 /* ApplicationError.swift in Sources */,
524+
5CA0A94F21825DA3002BA69A /* AlamoRecordURL.swift in Sources */,
525525
5C6347141F0B3D3E00158A80 /* Post.swift in Sources */,
526526
5CE6C8141F102B8F00965235 /* CommentsView.swift in Sources */,
527527
5C4141961F12CE7800A18674 /* CreatePostView.swift in Sources */,

Example/AlamoRecord/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
"idiom" : "iphone",
4040
"size" : "60x60",
4141
"scale" : "3x"
42+
},
43+
{
44+
"idiom" : "ios-marketing",
45+
"size" : "1024x1024",
46+
"scale" : "1x"
4247
}
4348
],
4449
"info" : {

0 commit comments

Comments
 (0)