afmotion 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AFMotion.gemspec +1 -1
- data/Gemfile.lock +3 -3
- data/README.md +10 -0
- data/lib/afmotion/http_client.rb +6 -1
- data/lib/afmotion/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd71f63adfb5490716f9b63c891384fc7fcba427
|
4
|
+
data.tar.gz: 5b0b13758856e72f404249560ea21e224f9246a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d524c5e81a645550bcea768ed691f0029aab8e1bf0af67e6377bfd8d70a0fd42a7f71100759c818665bd5bae99cc7af104899c7221e2f1b7c010f4591996d027
|
7
|
+
data.tar.gz: a9d5d99405bec0bedb51ccce73c21c650d79ab3a3000babc4c8ec192d1e75f61a735e6556f2fd478c90a87811a7e5d228604180a2c9883015b76702db2456d20
|
data/AFMotion.gemspec
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
afmotion (2.1.
|
4
|
+
afmotion (2.1.1)
|
5
5
|
motion-cocoapods (~> 1.4.0)
|
6
|
-
motion-require (~> 0.0
|
6
|
+
motion-require (~> 0.1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -38,7 +38,7 @@ GEM
|
|
38
38
|
json_pure (1.8.1)
|
39
39
|
motion-cocoapods (1.4.0)
|
40
40
|
cocoapods (>= 0.26.2)
|
41
|
-
motion-require (0.0
|
41
|
+
motion-require (0.1.0)
|
42
42
|
multi_json (1.8.4)
|
43
43
|
nap (0.6.0)
|
44
44
|
open4 (1.3.0)
|
data/README.md
CHANGED
@@ -262,3 +262,13 @@ The `AFMotion::Client` & `AFMotion::SessionClient` DSLs allows the following pro
|
|
262
262
|
For `AFMotion::SessionClient` only:
|
263
263
|
|
264
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`.
|
265
|
+
|
266
|
+
You can also configure your client by passing it as a block argument:
|
267
|
+
|
268
|
+
```ruby
|
269
|
+
client = AFMotion::SessionClient.build("https://alpha-api.app.net/") do |client|
|
270
|
+
client.session_configuration :default
|
271
|
+
|
272
|
+
client.header "Accept", @custom_header
|
273
|
+
end
|
274
|
+
```
|
data/lib/afmotion/http_client.rb
CHANGED
@@ -11,7 +11,12 @@ module AFMotion
|
|
11
11
|
operation_manager = AFHTTPRequestOperationManager.alloc.initWithBaseURL(base_url.to_url)
|
12
12
|
if block
|
13
13
|
dsl = AFMotion::ClientDSL.new(operation_manager)
|
14
|
-
|
14
|
+
case block.arity
|
15
|
+
when 0
|
16
|
+
dsl.instance_eval(&block)
|
17
|
+
when 1
|
18
|
+
block.call(dsl)
|
19
|
+
end
|
15
20
|
end
|
16
21
|
if !operation_manager.operationQueue
|
17
22
|
operation_manager.operationQueue = NSOperationQueue.mainQueue
|
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.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clay Allsopp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: motion-cocoapods
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0
|
33
|
+
version: 0.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0
|
40
|
+
version: 0.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|