afmotion 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +25 -19
- data/README.md +4 -2
- data/lib/afmotion.rb +1 -1
- data/lib/afmotion/client_shared.rb +5 -4
- data/lib/afmotion/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29bb57ce9aacac80bfd8ae44df90d480b72ee86
|
4
|
+
data.tar.gz: 65db4f708cff4ebc2cce1cc1c65d8e6449ac6009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 463b499813a1115e5d9c5943d8cc6a7e29e9b96ed3bcfb5930010f2cf12304bc12319cc74e505481e6d0d1bd6fb339221468d1b5b5571e573465e1519573bd6f
|
7
|
+
data.tar.gz: 08f709541888189c1ed8992bd492483303965848de68b5fb65c4a87e4530b803c7b68a94b141e97d60724245cbca5c64f1b541d01d6a5ab8222a7dbdb6492691
|
data/Gemfile.lock
CHANGED
@@ -1,46 +1,52 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
afmotion (2.
|
4
|
+
afmotion (2.1.0)
|
5
5
|
motion-cocoapods (~> 1.4.0)
|
6
6
|
motion-require (~> 0.0.7)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (3.2.
|
11
|
+
activesupport (3.2.16)
|
12
12
|
i18n (~> 0.6, >= 0.6.4)
|
13
13
|
multi_json (~> 1.0)
|
14
|
-
claide (0.
|
15
|
-
cocoapods (0.
|
16
|
-
activesupport (
|
17
|
-
claide (~> 0.
|
18
|
-
cocoapods-core (= 0.
|
19
|
-
cocoapods-downloader (~> 0.
|
14
|
+
claide (0.4.0)
|
15
|
+
cocoapods (0.29.0)
|
16
|
+
activesupport (>= 3.2.15, < 4)
|
17
|
+
claide (~> 0.4.0)
|
18
|
+
cocoapods-core (= 0.29.0)
|
19
|
+
cocoapods-downloader (~> 0.3.0)
|
20
|
+
cocoapods-try-release-fix (~> 0.1.1)
|
20
21
|
colored (~> 1.2)
|
21
22
|
escape (~> 0.0.4)
|
22
|
-
|
23
|
+
json_pure (~> 1.8)
|
24
|
+
nap (~> 0.5)
|
23
25
|
open4 (~> 1.3)
|
24
|
-
xcodeproj (~> 0.
|
25
|
-
cocoapods-core (0.
|
26
|
-
activesupport (
|
27
|
-
|
26
|
+
xcodeproj (~> 0.14.1)
|
27
|
+
cocoapods-core (0.29.0)
|
28
|
+
activesupport (>= 3.2.15, < 4)
|
29
|
+
fuzzy_match (~> 2.0.4)
|
30
|
+
json_pure (~> 1.8)
|
28
31
|
nap (~> 0.5)
|
29
|
-
cocoapods-downloader (0.
|
32
|
+
cocoapods-downloader (0.3.0)
|
33
|
+
cocoapods-try-release-fix (0.1.1)
|
30
34
|
colored (1.2)
|
31
35
|
escape (0.0.4)
|
32
|
-
|
33
|
-
|
36
|
+
fuzzy_match (2.0.4)
|
37
|
+
i18n (0.6.9)
|
38
|
+
json_pure (1.8.1)
|
34
39
|
motion-cocoapods (1.4.0)
|
35
40
|
cocoapods (>= 0.26.2)
|
36
41
|
motion-require (0.0.7)
|
37
|
-
multi_json (1.8.
|
38
|
-
nap (0.
|
42
|
+
multi_json (1.8.4)
|
43
|
+
nap (0.6.0)
|
39
44
|
open4 (1.3.0)
|
40
45
|
rake (10.1.0)
|
41
|
-
xcodeproj (0.
|
46
|
+
xcodeproj (0.14.1)
|
42
47
|
activesupport (~> 3.0)
|
43
48
|
colored (~> 1.2)
|
49
|
+
rake
|
44
50
|
|
45
51
|
PLATFORMS
|
46
52
|
ruby
|
data/README.md
CHANGED
@@ -91,7 +91,9 @@ You can also request arbitrary images:
|
|
91
91
|
|
92
92
|
1. `gem install afmotion`
|
93
93
|
|
94
|
-
2. `require 'afmotion'` or add to your `Gemfile`
|
94
|
+
2. `require 'afmotion'` or add to your `Gemfile` (`gem 'afmotion', '~> 2.1.0'`)
|
95
|
+
|
96
|
+
3. `rake pod:install`
|
95
97
|
|
96
98
|
## Overview
|
97
99
|
|
@@ -259,4 +261,4 @@ The `AFMotion::Client` & `AFMotion::SessionClient` DSLs allows the following pro
|
|
259
261
|
|
260
262
|
For `AFMotion::SessionClient` only:
|
261
263
|
|
262
|
-
- `session_configuration(session_configuration, identifier = nil)`. Allows you to set the [`NSURLSessionConfiguration`](https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionConfiguration_class/Reference/Reference.html#//apple_ref/occ/cl/NSURLSessionConfiguration). Accepts `:default`, `:ephemeral`, `:background` (with the `identifier` as a String), or an instance of `NSURLSessionConfiguration`.
|
264
|
+
- `session_configuration(session_configuration, identifier = nil)`. Allows you to set the [`NSURLSessionConfiguration`](https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionConfiguration_class/Reference/Reference.html#//apple_ref/occ/cl/NSURLSessionConfiguration). Accepts `:default`, `:ephemeral`, `:background` (with the `identifier` as a String), or an instance of `NSURLSessionConfiguration`.
|
data/lib/afmotion.rb
CHANGED
@@ -9,9 +9,10 @@ module AFMotion
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def observeValueForKeyPath(keyPath, ofObject: object, change: change, context: context)
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
if keyPath == "countOfBytesSent"
|
13
|
+
# Could be -1, see https://github.com/AFNetworking/AFNetworking/issues/1354
|
14
|
+
expectation = (object.countOfBytesExpectedToSend > 0) ? object.countOfBytesExpectedToSend.to_f : nil
|
15
|
+
@callback.call(nil, object.countOfBytesSent.to_f, expectation)
|
15
16
|
end
|
16
17
|
|
17
18
|
if keyPath == "state" && object.state == NSURLSessionTaskStateCompleted
|
@@ -89,7 +90,7 @@ module AFMotion
|
|
89
90
|
operation_or_task = self.PUT(path,
|
90
91
|
parameters: parameters,
|
91
92
|
constructingBodyWithBlock: multipart_callback,
|
92
|
-
success: AFMotion::Operation.success_block_for_http_method(:
|
93
|
+
success: AFMotion::Operation.success_block_for_http_method(:post, inner_callback),
|
93
94
|
failure: AFMotion::Operation.failure_block(inner_callback))
|
94
95
|
end
|
95
96
|
if upload_callback
|
data/lib/afmotion/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: afmotion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clay Allsopp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: motion-cocoapods
|