ethon 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,15 @@
2
2
 
3
3
  ## Master
4
4
 
5
- [Full Changelog](http://github.com/typhoeus/ethon/compare/v0.4.3...master)
5
+ [Full Changelog](http://github.com/typhoeus/ethon/compare/v0.4.4...master)
6
+
7
+ ## 0.4.4
8
+
9
+ [Full Changelog](http://github.com/typhoeus/ethon/compare/v0.4.3...v0.4.4)
6
10
 
7
11
  Enhancements:
8
12
 
9
- Bugfixes:
13
+ * Prepare multi explicit like easy
10
14
 
11
15
  ## 0.4.3
12
16
 
@@ -28,6 +28,54 @@ module Ethon
28
28
  # Create a new multi. Initialize curl in case
29
29
  # it didn't happen before.
30
30
  #
31
+ # @example Create a new Multi.
32
+ # Multi.new
33
+ #
34
+ # @param [ Hash ] options The options.
35
+ #
36
+ # @option options :socketdata [String]
37
+ # Pass a pointer to whatever you want passed to the
38
+ # curl_socket_callback's forth argument, the userp pointer. This is not
39
+ # used by libcurl but only passed-thru as-is. Set the callback pointer
40
+ # with CURLMOPT_SOCKETFUNCTION.
41
+ # @option options :pipelining [Boolean]
42
+ # Pass a long set to 1 to enable or 0 to disable. Enabling pipelining
43
+ # on a multi handle will make it attempt to perform HTTP Pipelining as
44
+ # far as possible for transfers using this handle. This means that if
45
+ # you add a second request that can use an already existing connection,
46
+ # the second request will be "piped" on the same connection rather than
47
+ # being executed in parallel. (Added in 7.16.0)
48
+ # @option options :timerfunction [Proc]
49
+ # Pass a pointer to a function matching the curl_multi_timer_callback
50
+ # prototype. This function will then be called when the timeout value
51
+ # changes. The timeout value is at what latest time the application
52
+ # should call one of the "performing" functions of the multi interface
53
+ # (curl_multi_socket_action(3) and curl_multi_perform(3)) - to allow
54
+ # libcurl to keep timeouts and retries etc to work. A timeout value of
55
+ # -1 means that there is no timeout at all, and 0 means that the
56
+ # timeout is already reached. Libcurl attempts to limit calling this
57
+ # only when the fixed future timeout time actually changes. See also
58
+ # CURLMOPT_TIMERDATA. This callback can be used instead of, or in
59
+ # addition to, curl_multi_timeout(3). (Added in 7.16.0)
60
+ # @option options :timerdata [String]
61
+ # Pass a pointer to whatever you want passed to the
62
+ # curl_multi_timer_callback's third argument, the userp pointer. This
63
+ # is not used by libcurl but only passed-thru as-is. Set the callback
64
+ # pointer with CURLMOPT_TIMERFUNCTION. (Added in 7.16.0)
65
+ # @option options :maxconnects [Integer]
66
+ # Pass a long. The set number will be used as the maximum amount of
67
+ # simultaneously open connections that libcurl may cache. Default is
68
+ # 10, and libcurl will enlarge the size for each added easy handle to
69
+ # make it fit 4 times the number of added easy handles.
70
+ # By setting this option, you can prevent the cache size from growing
71
+ # beyond the limit set by you.
72
+ # When the cache is full, curl closes the oldest one in the cache to
73
+ # prevent the number of open connections from increasing.
74
+ # This option is for the multi handle's use only, when using the easy
75
+ # interface you should instead use the CURLOPT_MAXCONNECTS option.
76
+ # (Added in 7.16.3)
77
+ #
78
+ #
31
79
  # @return [ Multi ] The new multi.
32
80
  def initialize(options = {})
33
81
  Curl.init
@@ -41,8 +89,6 @@ module Ethon
41
89
  # @example Set options.
42
90
  # multi.set_attributes(options)
43
91
  #
44
- # @param [ Hash ] options The options.
45
- #
46
92
  # @raise InvalidOption
47
93
  #
48
94
  # @see initialize
@@ -43,7 +43,6 @@ module Ethon
43
43
  # @example Perform multi.
44
44
  # multi.perform
45
45
  def perform
46
- set_options
47
46
  Ethon.logger.debug("ETHON: started MULTI") if Ethon.logger
48
47
  while ongoing?
49
48
  run
@@ -56,6 +55,14 @@ module Ethon
56
55
  nil
57
56
  end
58
57
 
58
+ # Prepare multi.
59
+ #
60
+ # @example Prepare multi.
61
+ # multi.prepare
62
+ def prepare
63
+ set_options
64
+ end
65
+
59
66
  # Get timeout.
60
67
  #
61
68
  # @example Get timeout.
@@ -1,5 +1,5 @@
1
1
  module Ethon
2
2
 
3
3
  # Ethon version.
4
- VERSION = '0.4.3'
4
+ VERSION = '0.4.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-09 00:00:00.000000000 Z
12
+ date: 2012-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi
@@ -121,7 +121,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
121
121
  version: '0'
122
122
  segments:
123
123
  - 0
124
- hash: 1139806787949437669
124
+ hash: 3523421791018447107
125
125
  required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  none: false
127
127
  requirements: