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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f29bb57ce9aacac80bfd8ae44df90d480b72ee86
4
- data.tar.gz: 65db4f708cff4ebc2cce1cc1c65d8e6449ac6009
3
+ metadata.gz: dd71f63adfb5490716f9b63c891384fc7fcba427
4
+ data.tar.gz: 5b0b13758856e72f404249560ea21e224f9246a7
5
5
  SHA512:
6
- metadata.gz: 463b499813a1115e5d9c5943d8cc6a7e29e9b96ed3bcfb5930010f2cf12304bc12319cc74e505481e6d0d1bd6fb339221468d1b5b5571e573465e1519573bd6f
7
- data.tar.gz: 08f709541888189c1ed8992bd492483303965848de68b5fb65c4a87e4530b803c7b68a94b141e97d60724245cbca5c64f1b541d01d6a5ab8222a7dbdb6492691
6
+ metadata.gz: d524c5e81a645550bcea768ed691f0029aab8e1bf0af67e6377bfd8d70a0fd42a7f71100759c818665bd5bae99cc7af104899c7221e2f1b7c010f4591996d027
7
+ data.tar.gz: a9d5d99405bec0bedb51ccce73c21c650d79ab3a3000babc4c8ec192d1e75f61a735e6556f2fd478c90a87811a7e5d228604180a2c9883015b76702db2456d20
data/AFMotion.gemspec CHANGED
@@ -16,6 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ["lib"]
17
17
 
18
18
  s.add_dependency "motion-cocoapods", "~> 1.4.0"
19
- s.add_dependency "motion-require", "~> 0.0.7"
19
+ s.add_dependency "motion-require", "~> 0.1.0"
20
20
  s.add_development_dependency 'rake'
21
21
  end
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- afmotion (2.1.0)
4
+ afmotion (2.1.1)
5
5
  motion-cocoapods (~> 1.4.0)
6
- motion-require (~> 0.0.7)
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.7)
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
+ ```
@@ -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
- dsl.instance_eval(&block)
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
@@ -1,5 +1,5 @@
1
1
  module AFMotion
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
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.1.0
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-01-30 00:00:00.000000000 Z
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.7
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.7
40
+ version: 0.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement