afmotion 0.4 → 0.5

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 ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ M2Q2MzUxYjgzZjA0ZDBlZTNkNzRjODQ4MzIxYmQ1MTdhNTMzZTg5Zg==
5
+ data.tar.gz: !binary |-
6
+ ZDVhZTFiNDliYzQ2MWRkYzhjMDQ5Mzg4Mjk3MTc0OTkwMTVjOTA3NQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ZTFmNTNiZTJlMGJjYTdhOGI3OTZmNTVkZTIzMDhhMzBjYzAzYmIyYzQ2YTMx
10
+ MmNjODUyMDg3ZTM2OWI1ZTM3NWU0ZWM3YmQ1NzZhZDQ3MWE0YjFmYTIxYTQ3
11
+ ZTE4NDJhODdiMzI3MWFmMzRiNWQwN2FjOTEwMWY5NGI2YjdlMjU=
12
+ data.tar.gz: !binary |-
13
+ ZmYwMmZhODFmYTU2NGVmOTBmN2JiMzk4NzM4YWRiOWM5ZTAxYzkwNGQ0MDlh
14
+ ZDcwNDNlZjk1ZTlmZTc5YzJjNjc3YjVjNTc0NWUzZDIzNTQzYzY5Yzc3YjFh
15
+ NDBjMTQyNDRmYWM5YTQwZTJmYTVhYmI0OWUzOWY3OWQ2NGFhNjU=
data/Gemfile.lock CHANGED
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- afmotion (0.4)
4
+ afmotion (0.5)
5
5
  motion-cocoapods (>= 1.2.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (3.2.9)
11
- i18n (~> 0.6)
10
+ activesupport (3.2.13)
11
+ i18n (= 0.6.1)
12
12
  multi_json (~> 1.0)
13
- addressable (2.3.2)
13
+ addressable (2.3.4)
14
14
  cocoapods (0.15.2)
15
15
  activesupport (~> 3.2.6)
16
16
  colored (~> 1.2)
@@ -23,23 +23,25 @@ GEM
23
23
  xcodeproj (~> 0.3.5)
24
24
  colored (1.2)
25
25
  escape (0.0.4)
26
- faraday (0.8.4)
26
+ faraday (0.8.7)
27
27
  multipart-post (~> 1.1)
28
28
  faraday_middleware (0.9.0)
29
29
  faraday (>= 0.7.4, < 0.9)
30
- hashie (1.2.0)
30
+ hashie (2.0.5)
31
31
  i18n (0.6.1)
32
- json (1.7.5)
32
+ json (1.7.7)
33
33
  motion-cocoapods (1.2.1)
34
34
  cocoapods (>= 0.14.0)
35
- multi_json (1.5.0)
36
- multipart-post (1.1.5)
37
- octokit (1.19.0)
35
+ multi_json (1.7.3)
36
+ multipart-post (1.2.0)
37
+ netrc (0.7.7)
38
+ octokit (1.24.0)
38
39
  addressable (~> 2.2)
39
40
  faraday (~> 0.8)
40
41
  faraday_middleware (~> 0.9)
41
- hashie (~> 1.2)
42
+ hashie (~> 2.0)
42
43
  multi_json (~> 1.3)
44
+ netrc (~> 0.7.7)
43
45
  open4 (1.3.0)
44
46
  rake (0.9.2.2)
45
47
  xcodeproj (0.3.5)
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ LICENCE
2
+
3
+ MIT: http://clayallsopp.mit-license.org
4
+
5
+ ------------------------------------------------
6
+
7
+ The MIT License (MIT)
8
+ Copyright © 2012 Clay Allsopp <clay.allsopp@gmail.com>
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the “Software”), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
data/README.md CHANGED
@@ -207,11 +207,7 @@ client.multipart.post("avatars") do |result, form_data, progress|
207
207
  elsif progress
208
208
  # 0.0 <= progress <= 1.0
209
209
  my_widget.update_progress(progress)
210
- elsif result.success?
211
- ...
212
- else
213
- ...
214
- end
210
+ ...
215
211
  end
216
212
  ```
217
213
 
@@ -125,16 +125,17 @@ class AFHTTPClient
125
125
  end
126
126
  self.enqueueHTTPRequestOperation(operation)
127
127
  @multipart = nil
128
+ @operation = operation
128
129
  else
129
- fn = "#{method}Path:parameters:success:failure:"
130
- self.send(fn, path, parameters,
131
- lambda {|operation, responseObject|
130
+ request = self.requestWithMethod(method.upcase, path:path, parameters:parameters)
131
+ @operation = self.HTTPRequestOperationWithRequest(request, success: lambda {|operation, responseObject|
132
132
  result = AFMotion::HTTPResult.new(operation, responseObject, nil)
133
133
  callback.call(result)
134
- }, lambda {|operation, error|
134
+ }, failure: lambda {|operation, error|
135
135
  result = AFMotion::HTTPResult.new(operation, nil, error)
136
136
  callback.call(result)
137
137
  })
138
+ self.enqueueHTTPRequestOperation(@operation)
138
139
  end
139
140
  end
140
141
  end
@@ -17,8 +17,8 @@ module AFMotion
17
17
  end
18
18
 
19
19
  def body
20
- if operation && operation.responseData
21
- NSString.stringWithUTF8String(operation.responseData.bytes)
20
+ if operation && operation.responseString
21
+ operation.responseString
22
22
  end
23
23
  end
24
24
  end
@@ -1,5 +1,5 @@
1
1
  module AFMotion
2
- VERSION = "0.4"
2
+ VERSION = "0.5"
3
3
 
4
- HTTP_METHODS = [:get, :post, :put, :delete, :patch]
4
+ HTTP_METHODS = [:get, :post, :put, :delete, :patch, :head]
5
5
  end
data/vendor/Podfile.lock CHANGED
@@ -6,6 +6,6 @@ DEPENDENCIES:
6
6
  - AFNetworking
7
7
 
8
8
  SPEC CHECKSUMS:
9
- AFNetworking: 4c11f857c9a18d65f4257c90a1e74ac49f0ac422
9
+ AFNetworking: 0bce3ae41023e080e96b8a2e0d07c94709f72a81
10
10
 
11
11
  COCOAPODS: 0.15.2
@@ -2,6 +2,7 @@
2
2
  #import <UIKit/UIKit.h>
3
3
  #endif
4
4
 
5
+ #ifdef __OBJC__
5
6
  #import <Availability.h>
6
7
  #if __IPHONE_OS_VERSION_MIN_REQUIRED
7
8
  #import <SystemConfiguration/SystemConfiguration.h>
@@ -10,3 +11,4 @@
10
11
  #import <SystemConfiguration/SystemConfiguration.h>
11
12
  #import <CoreServices/CoreServices.h>
12
13
  #endif
14
+ #endif /* __OBJC__ */
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: afmotion
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
5
- prerelease:
4
+ version: '0.5'
6
5
  platform: ruby
7
6
  authors:
8
7
  - Clay Allsopp
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-17 00:00:00.000000000 Z
11
+ date: 2013-06-17 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: motion-cocoapods
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -54,6 +49,7 @@ files:
54
49
  - AFMotion.gemspec
55
50
  - Gemfile
56
51
  - Gemfile.lock
52
+ - LICENSE
57
53
  - README.md
58
54
  - Rakefile
59
55
  - app/app_delegate.rb
@@ -125,33 +121,26 @@ files:
125
121
  - vendor/Pods/PodsDummy_Pods.m
126
122
  homepage: https://github.com/clayallsopp/AFMotion
127
123
  licenses: []
124
+ metadata: {}
128
125
  post_install_message:
129
126
  rdoc_options: []
130
127
  require_paths:
131
128
  - lib
132
129
  required_ruby_version: !ruby/object:Gem::Requirement
133
- none: false
134
130
  requirements:
135
131
  - - ! '>='
136
132
  - !ruby/object:Gem::Version
137
133
  version: '0'
138
- segments:
139
- - 0
140
- hash: -2510227457395499119
141
134
  required_rubygems_version: !ruby/object:Gem::Requirement
142
- none: false
143
135
  requirements:
144
136
  - - ! '>='
145
137
  - !ruby/object:Gem::Version
146
138
  version: '0'
147
- segments:
148
- - 0
149
- hash: -2510227457395499119
150
139
  requirements: []
151
140
  rubyforge_project:
152
- rubygems_version: 1.8.23
141
+ rubygems_version: 2.0.3
153
142
  signing_key:
154
- specification_version: 3
143
+ specification_version: 4
155
144
  summary: A RubyMotion Wrapper for AFNetworking
156
145
  test_files:
157
146
  - spec/http_client_spec.rb