afmotion 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a6e54de29aa8a7676a40b47db1880adaa71f6ae
4
- data.tar.gz: 7c92e41fd572c449290f0c5f8a33b6fc2026414c
3
+ metadata.gz: f29bb57ce9aacac80bfd8ae44df90d480b72ee86
4
+ data.tar.gz: 65db4f708cff4ebc2cce1cc1c65d8e6449ac6009
5
5
  SHA512:
6
- metadata.gz: 212fc46c2b20fe4b84a43730883aded57ab2e0990a3b09306bfc76f42336da4dfd13278e41533d772b0efc1443c04fd8dba2d5ff5fbe8be7459b11adfb13ce65
7
- data.tar.gz: e08b9e0cdd9af1716a4c01aecde7af8d9539027a996d9b94c9bcc9ef43b7a3a7680665935eb77ca1e70605c222aaee8e9d9d8e335e70a150be056b8e0e5d2b1b
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.0.0)
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.14)
11
+ activesupport (3.2.16)
12
12
  i18n (~> 0.6, >= 0.6.4)
13
13
  multi_json (~> 1.0)
14
- claide (0.3.2)
15
- cocoapods (0.26.2)
16
- activesupport (~> 3.2)
17
- claide (~> 0.3.2)
18
- cocoapods-core (= 0.26.2)
19
- cocoapods-downloader (~> 0.2.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
- json (~> 1.8)
23
+ json_pure (~> 1.8)
24
+ nap (~> 0.5)
23
25
  open4 (~> 1.3)
24
- xcodeproj (~> 0.13.0)
25
- cocoapods-core (0.26.2)
26
- activesupport (~> 3.0)
27
- json (~> 1.8)
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.2.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
- i18n (0.6.5)
33
- json (1.8.1)
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.0)
38
- nap (0.5.1)
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.13.1)
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
@@ -16,6 +16,6 @@ Motion::Project::App.setup do |app|
16
16
  end
17
17
 
18
18
  app.pods do
19
- pod 'AFNetworking', '~> 2.0.1'
19
+ pod 'AFNetworking', '~> 2.1.0'
20
20
  end
21
21
  end
@@ -9,9 +9,10 @@ module AFMotion
9
9
  end
10
10
 
11
11
  def observeValueForKeyPath(keyPath, ofObject: object, change: change, context: context)
12
- # I've only seen this be -1, so callback might not get called
13
- if keyPath == "countOfBytesSent" && object.countOfBytesExpectedToSend > 0
14
- @callback.call(nil, object.countOfBytesSent.to_f, object.countOfBytesExpectedToSend.to_f)
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(:pust, inner_callback),
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
@@ -1,5 +1,5 @@
1
1
  module AFMotion
2
- VERSION = "2.0.0"
2
+ VERSION = "2.1.0"
3
3
 
4
4
  HTTP_METHODS = [:get, :post, :put, :delete, :patch, :head]
5
5
  end
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.0.0
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: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: motion-cocoapods