typhoeus 0.2.0 → 0.2.4

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.
Files changed (50) hide show
  1. data/CHANGELOG.markdown +26 -1
  2. data/Gemfile +2 -0
  3. data/Gemfile.lock +2 -0
  4. data/LICENSE +20 -0
  5. data/README.textile +44 -5
  6. data/Rakefile +8 -5
  7. data/VERSION +1 -1
  8. data/examples/file.rb +12 -0
  9. data/examples/times.rb +40 -0
  10. data/ext/typhoeus/.gitignore +2 -1
  11. data/ext/typhoeus/native.c +1 -0
  12. data/ext/typhoeus/native.h +1 -0
  13. data/ext/typhoeus/typhoeus_easy.c +32 -7
  14. data/ext/typhoeus/typhoeus_easy.h +1 -0
  15. data/ext/typhoeus/typhoeus_form.c +59 -0
  16. data/ext/typhoeus/typhoeus_form.h +13 -0
  17. data/ext/typhoeus/typhoeus_multi.c +15 -29
  18. data/lib/typhoeus/easy.rb +74 -48
  19. data/lib/typhoeus/form.rb +32 -0
  20. data/lib/typhoeus/hydra/connect_options.rb +19 -3
  21. data/lib/typhoeus/hydra.rb +40 -7
  22. data/lib/typhoeus/multi.rb +7 -5
  23. data/lib/typhoeus/remote.rb +1 -1
  24. data/lib/typhoeus/remote_proxy_object.rb +2 -0
  25. data/lib/typhoeus/request.rb +17 -14
  26. data/lib/typhoeus/response.rb +16 -1
  27. data/lib/typhoeus/utils.rb +38 -0
  28. data/lib/typhoeus.rb +1 -0
  29. data/spec/fixtures/placeholder.gif +0 -0
  30. data/spec/fixtures/placeholder.txt +1 -0
  31. data/spec/fixtures/placeholder.ukn +0 -0
  32. data/spec/servers/app.rb +10 -0
  33. data/spec/spec.opts +1 -0
  34. data/spec/spec_helper.rb +3 -0
  35. data/spec/typhoeus/easy_spec.rb +74 -7
  36. data/spec/typhoeus/filter_spec.rb +2 -2
  37. data/spec/typhoeus/form_spec.rb +107 -0
  38. data/spec/typhoeus/hydra_mock_spec.rb +1 -1
  39. data/spec/typhoeus/hydra_spec.rb +108 -38
  40. data/spec/typhoeus/multi_spec.rb +1 -1
  41. data/spec/typhoeus/normalized_header_hash_spec.rb +1 -1
  42. data/spec/typhoeus/remote_method_spec.rb +2 -2
  43. data/spec/typhoeus/remote_proxy_object_spec.rb +1 -1
  44. data/spec/typhoeus/remote_spec.rb +1 -1
  45. data/spec/typhoeus/request_spec.rb +50 -5
  46. data/spec/typhoeus/response_spec.rb +13 -1
  47. data/spec/typhoeus/utils_spec.rb +1 -1
  48. data/typhoeus.gemspec +93 -75
  49. metadata +70 -28
  50. data/.gitignore +0 -3
data/typhoeus.gemspec CHANGED
@@ -1,98 +1,110 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{typhoeus}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Paul Dix"]
12
- s.date = %q{2010-11-11}
11
+ s.authors = ["Paul Dix", "David Balatero"]
12
+ s.date = %q{2011-02-24}
13
13
  s.description = %q{Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.}
14
- s.email = %q{paul@pauldix.net}
14
+ s.email = %q{dbalatero@gmail.com}
15
15
  s.extensions = ["ext/typhoeus/extconf.rb"]
16
16
  s.extra_rdoc_files = [
17
+ "LICENSE",
17
18
  "README.textile"
18
19
  ]
19
20
  s.files = [
20
- ".gitignore",
21
- "CHANGELOG.markdown",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "README.textile",
25
- "Rakefile",
26
- "VERSION",
27
- "benchmarks/profile.rb",
28
- "benchmarks/vs_nethttp.rb",
29
- "examples/twitter.rb",
30
- "ext/typhoeus/.gitignore",
31
- "ext/typhoeus/extconf.rb",
32
- "ext/typhoeus/native.c",
33
- "ext/typhoeus/native.h",
34
- "ext/typhoeus/typhoeus_easy.c",
35
- "ext/typhoeus/typhoeus_easy.h",
36
- "ext/typhoeus/typhoeus_multi.c",
37
- "ext/typhoeus/typhoeus_multi.h",
38
- "lib/typhoeus.rb",
39
- "lib/typhoeus/.gitignore",
40
- "lib/typhoeus/easy.rb",
41
- "lib/typhoeus/filter.rb",
42
- "lib/typhoeus/hydra.rb",
43
- "lib/typhoeus/hydra/callbacks.rb",
44
- "lib/typhoeus/hydra/connect_options.rb",
45
- "lib/typhoeus/hydra/stubbing.rb",
46
- "lib/typhoeus/hydra_mock.rb",
47
- "lib/typhoeus/multi.rb",
48
- "lib/typhoeus/normalized_header_hash.rb",
49
- "lib/typhoeus/remote.rb",
50
- "lib/typhoeus/remote_method.rb",
51
- "lib/typhoeus/remote_proxy_object.rb",
52
- "lib/typhoeus/request.rb",
53
- "lib/typhoeus/response.rb",
54
- "lib/typhoeus/service.rb",
55
- "lib/typhoeus/utils.rb",
56
- "profilers/valgrind.rb",
57
- "spec/fixtures/result_set.xml",
58
- "spec/servers/app.rb",
59
- "spec/spec.opts",
60
- "spec/spec_helper.rb",
61
- "spec/typhoeus/easy_spec.rb",
62
- "spec/typhoeus/filter_spec.rb",
63
- "spec/typhoeus/hydra_mock_spec.rb",
64
- "spec/typhoeus/hydra_spec.rb",
65
- "spec/typhoeus/multi_spec.rb",
66
- "spec/typhoeus/normalized_header_hash_spec.rb",
67
- "spec/typhoeus/remote_method_spec.rb",
68
- "spec/typhoeus/remote_proxy_object_spec.rb",
69
- "spec/typhoeus/remote_spec.rb",
70
- "spec/typhoeus/request_spec.rb",
71
- "spec/typhoeus/response_spec.rb",
72
- "spec/typhoeus/utils_spec.rb",
73
- "typhoeus.gemspec"
21
+ "CHANGELOG.markdown",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE",
25
+ "README.textile",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "benchmarks/profile.rb",
29
+ "benchmarks/vs_nethttp.rb",
30
+ "examples/file.rb",
31
+ "examples/times.rb",
32
+ "examples/twitter.rb",
33
+ "ext/typhoeus/.gitignore",
34
+ "ext/typhoeus/extconf.rb",
35
+ "ext/typhoeus/native.c",
36
+ "ext/typhoeus/native.h",
37
+ "ext/typhoeus/typhoeus_easy.c",
38
+ "ext/typhoeus/typhoeus_easy.h",
39
+ "ext/typhoeus/typhoeus_form.c",
40
+ "ext/typhoeus/typhoeus_form.h",
41
+ "ext/typhoeus/typhoeus_multi.c",
42
+ "ext/typhoeus/typhoeus_multi.h",
43
+ "lib/typhoeus.rb",
44
+ "lib/typhoeus/.gitignore",
45
+ "lib/typhoeus/easy.rb",
46
+ "lib/typhoeus/filter.rb",
47
+ "lib/typhoeus/form.rb",
48
+ "lib/typhoeus/hydra.rb",
49
+ "lib/typhoeus/hydra/callbacks.rb",
50
+ "lib/typhoeus/hydra/connect_options.rb",
51
+ "lib/typhoeus/hydra/stubbing.rb",
52
+ "lib/typhoeus/hydra_mock.rb",
53
+ "lib/typhoeus/multi.rb",
54
+ "lib/typhoeus/normalized_header_hash.rb",
55
+ "lib/typhoeus/remote.rb",
56
+ "lib/typhoeus/remote_method.rb",
57
+ "lib/typhoeus/remote_proxy_object.rb",
58
+ "lib/typhoeus/request.rb",
59
+ "lib/typhoeus/response.rb",
60
+ "lib/typhoeus/service.rb",
61
+ "lib/typhoeus/utils.rb",
62
+ "profilers/valgrind.rb",
63
+ "spec/fixtures/placeholder.gif",
64
+ "spec/fixtures/placeholder.txt",
65
+ "spec/fixtures/placeholder.ukn",
66
+ "spec/fixtures/result_set.xml",
67
+ "spec/servers/app.rb",
68
+ "spec/spec.opts",
69
+ "spec/spec_helper.rb",
70
+ "spec/typhoeus/easy_spec.rb",
71
+ "spec/typhoeus/filter_spec.rb",
72
+ "spec/typhoeus/form_spec.rb",
73
+ "spec/typhoeus/hydra_mock_spec.rb",
74
+ "spec/typhoeus/hydra_spec.rb",
75
+ "spec/typhoeus/multi_spec.rb",
76
+ "spec/typhoeus/normalized_header_hash_spec.rb",
77
+ "spec/typhoeus/remote_method_spec.rb",
78
+ "spec/typhoeus/remote_proxy_object_spec.rb",
79
+ "spec/typhoeus/remote_spec.rb",
80
+ "spec/typhoeus/request_spec.rb",
81
+ "spec/typhoeus/response_spec.rb",
82
+ "spec/typhoeus/utils_spec.rb",
83
+ "typhoeus.gemspec"
74
84
  ]
75
- s.homepage = %q{http://github.com/pauldix/typhoeus}
76
- s.rdoc_options = ["--charset=UTF-8"]
85
+ s.homepage = %q{http://github.com/dbalatero/typhoeus}
77
86
  s.require_paths = ["lib"]
78
87
  s.rubygems_version = %q{1.3.7}
79
88
  s.summary = %q{A library for interacting with web services (and building SOAs) at blinding speed.}
80
89
  s.test_files = [
90
+ "examples/file.rb",
91
+ "examples/times.rb",
92
+ "examples/twitter.rb",
81
93
  "spec/servers/app.rb",
82
- "spec/spec_helper.rb",
83
- "spec/typhoeus/easy_spec.rb",
84
- "spec/typhoeus/filter_spec.rb",
85
- "spec/typhoeus/hydra_mock_spec.rb",
86
- "spec/typhoeus/hydra_spec.rb",
87
- "spec/typhoeus/multi_spec.rb",
88
- "spec/typhoeus/normalized_header_hash_spec.rb",
89
- "spec/typhoeus/remote_method_spec.rb",
90
- "spec/typhoeus/remote_proxy_object_spec.rb",
91
- "spec/typhoeus/remote_spec.rb",
92
- "spec/typhoeus/request_spec.rb",
93
- "spec/typhoeus/response_spec.rb",
94
- "spec/typhoeus/utils_spec.rb",
95
- "examples/twitter.rb"
94
+ "spec/spec_helper.rb",
95
+ "spec/typhoeus/easy_spec.rb",
96
+ "spec/typhoeus/filter_spec.rb",
97
+ "spec/typhoeus/form_spec.rb",
98
+ "spec/typhoeus/hydra_mock_spec.rb",
99
+ "spec/typhoeus/hydra_spec.rb",
100
+ "spec/typhoeus/multi_spec.rb",
101
+ "spec/typhoeus/normalized_header_hash_spec.rb",
102
+ "spec/typhoeus/remote_method_spec.rb",
103
+ "spec/typhoeus/remote_proxy_object_spec.rb",
104
+ "spec/typhoeus/remote_spec.rb",
105
+ "spec/typhoeus/request_spec.rb",
106
+ "spec/typhoeus/response_spec.rb",
107
+ "spec/typhoeus/utils_spec.rb"
96
108
  ]
97
109
 
98
110
  if s.respond_to? :specification_version then
@@ -100,12 +112,16 @@ Gem::Specification.new do |s|
100
112
  s.specification_version = 3
101
113
 
102
114
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
115
+ s.add_runtime_dependency(%q<mime-types>, [">= 0"])
116
+ s.add_runtime_dependency(%q<mime-types>, [">= 0"])
103
117
  s.add_development_dependency(%q<rspec>, [">= 0"])
104
118
  s.add_development_dependency(%q<jeweler>, [">= 0"])
105
119
  s.add_development_dependency(%q<diff-lcs>, [">= 0"])
106
120
  s.add_development_dependency(%q<sinatra>, [">= 0"])
107
121
  s.add_development_dependency(%q<json>, [">= 0"])
108
122
  else
123
+ s.add_dependency(%q<mime-types>, [">= 0"])
124
+ s.add_dependency(%q<mime-types>, [">= 0"])
109
125
  s.add_dependency(%q<rspec>, [">= 0"])
110
126
  s.add_dependency(%q<jeweler>, [">= 0"])
111
127
  s.add_dependency(%q<diff-lcs>, [">= 0"])
@@ -113,6 +129,8 @@ Gem::Specification.new do |s|
113
129
  s.add_dependency(%q<json>, [">= 0"])
114
130
  end
115
131
  else
132
+ s.add_dependency(%q<mime-types>, [">= 0"])
133
+ s.add_dependency(%q<mime-types>, [">= 0"])
116
134
  s.add_dependency(%q<rspec>, [">= 0"])
117
135
  s.add_dependency(%q<jeweler>, [">= 0"])
118
136
  s.add_dependency(%q<diff-lcs>, [">= 0"])
metadata CHANGED
@@ -1,27 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typhoeus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Dix
14
+ - David Balatero
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-11-11 00:00:00 -08:00
19
+ date: 2011-02-24 00:00:00 -08:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
- name: rspec
23
+ type: :runtime
23
24
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
26
  none: false
26
27
  requirements:
27
28
  - - ">="
@@ -30,12 +31,12 @@ dependencies:
30
31
  segments:
31
32
  - 0
32
33
  version: "0"
33
- type: :development
34
- version_requirements: *id001
34
+ name: mime-types
35
+ requirement: *id001
35
36
  - !ruby/object:Gem::Dependency
36
- name: jeweler
37
+ type: :runtime
37
38
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
40
  none: false
40
41
  requirements:
41
42
  - - ">="
@@ -44,12 +45,12 @@ dependencies:
44
45
  segments:
45
46
  - 0
46
47
  version: "0"
47
- type: :development
48
- version_requirements: *id002
48
+ name: mime-types
49
+ requirement: *id002
49
50
  - !ruby/object:Gem::Dependency
50
- name: diff-lcs
51
+ type: :development
51
52
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
53
54
  none: false
54
55
  requirements:
55
56
  - - ">="
@@ -58,12 +59,12 @@ dependencies:
58
59
  segments:
59
60
  - 0
60
61
  version: "0"
61
- type: :development
62
- version_requirements: *id003
62
+ name: rspec
63
+ requirement: *id003
63
64
  - !ruby/object:Gem::Dependency
64
- name: sinatra
65
+ type: :development
65
66
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
67
+ version_requirements: &id004 !ruby/object:Gem::Requirement
67
68
  none: false
68
69
  requirements:
69
70
  - - ">="
@@ -72,12 +73,26 @@ dependencies:
72
73
  segments:
73
74
  - 0
74
75
  version: "0"
76
+ name: jeweler
77
+ requirement: *id004
78
+ - !ruby/object:Gem::Dependency
75
79
  type: :development
76
- version_requirements: *id004
80
+ prerelease: false
81
+ version_requirements: &id005 !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ hash: 3
87
+ segments:
88
+ - 0
89
+ version: "0"
90
+ name: diff-lcs
91
+ requirement: *id005
77
92
  - !ruby/object:Gem::Dependency
78
- name: json
93
+ type: :development
79
94
  prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
95
+ version_requirements: &id006 !ruby/object:Gem::Requirement
81
96
  none: false
82
97
  requirements:
83
98
  - - ">="
@@ -86,26 +101,43 @@ dependencies:
86
101
  segments:
87
102
  - 0
88
103
  version: "0"
104
+ name: sinatra
105
+ requirement: *id006
106
+ - !ruby/object:Gem::Dependency
89
107
  type: :development
90
- version_requirements: *id005
108
+ prerelease: false
109
+ version_requirements: &id007 !ruby/object:Gem::Requirement
110
+ none: false
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ hash: 3
115
+ segments:
116
+ - 0
117
+ version: "0"
118
+ name: json
119
+ requirement: *id007
91
120
  description: Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic.
92
- email: paul@pauldix.net
121
+ email: dbalatero@gmail.com
93
122
  executables: []
94
123
 
95
124
  extensions:
96
125
  - ext/typhoeus/extconf.rb
97
126
  extra_rdoc_files:
127
+ - LICENSE
98
128
  - README.textile
99
129
  files:
100
- - .gitignore
101
130
  - CHANGELOG.markdown
102
131
  - Gemfile
103
132
  - Gemfile.lock
133
+ - LICENSE
104
134
  - README.textile
105
135
  - Rakefile
106
136
  - VERSION
107
137
  - benchmarks/profile.rb
108
138
  - benchmarks/vs_nethttp.rb
139
+ - examples/file.rb
140
+ - examples/times.rb
109
141
  - examples/twitter.rb
110
142
  - ext/typhoeus/.gitignore
111
143
  - ext/typhoeus/extconf.rb
@@ -113,12 +145,15 @@ files:
113
145
  - ext/typhoeus/native.h
114
146
  - ext/typhoeus/typhoeus_easy.c
115
147
  - ext/typhoeus/typhoeus_easy.h
148
+ - ext/typhoeus/typhoeus_form.c
149
+ - ext/typhoeus/typhoeus_form.h
116
150
  - ext/typhoeus/typhoeus_multi.c
117
151
  - ext/typhoeus/typhoeus_multi.h
118
152
  - lib/typhoeus.rb
119
153
  - lib/typhoeus/.gitignore
120
154
  - lib/typhoeus/easy.rb
121
155
  - lib/typhoeus/filter.rb
156
+ - lib/typhoeus/form.rb
122
157
  - lib/typhoeus/hydra.rb
123
158
  - lib/typhoeus/hydra/callbacks.rb
124
159
  - lib/typhoeus/hydra/connect_options.rb
@@ -134,12 +169,16 @@ files:
134
169
  - lib/typhoeus/service.rb
135
170
  - lib/typhoeus/utils.rb
136
171
  - profilers/valgrind.rb
172
+ - spec/fixtures/placeholder.gif
173
+ - spec/fixtures/placeholder.txt
174
+ - spec/fixtures/placeholder.ukn
137
175
  - spec/fixtures/result_set.xml
138
176
  - spec/servers/app.rb
139
177
  - spec/spec.opts
140
178
  - spec/spec_helper.rb
141
179
  - spec/typhoeus/easy_spec.rb
142
180
  - spec/typhoeus/filter_spec.rb
181
+ - spec/typhoeus/form_spec.rb
143
182
  - spec/typhoeus/hydra_mock_spec.rb
144
183
  - spec/typhoeus/hydra_spec.rb
145
184
  - spec/typhoeus/multi_spec.rb
@@ -152,12 +191,12 @@ files:
152
191
  - spec/typhoeus/utils_spec.rb
153
192
  - typhoeus.gemspec
154
193
  has_rdoc: true
155
- homepage: http://github.com/pauldix/typhoeus
194
+ homepage: http://github.com/dbalatero/typhoeus
156
195
  licenses: []
157
196
 
158
197
  post_install_message:
159
- rdoc_options:
160
- - --charset=UTF-8
198
+ rdoc_options: []
199
+
161
200
  require_paths:
162
201
  - lib
163
202
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -186,10 +225,14 @@ signing_key:
186
225
  specification_version: 3
187
226
  summary: A library for interacting with web services (and building SOAs) at blinding speed.
188
227
  test_files:
228
+ - examples/file.rb
229
+ - examples/times.rb
230
+ - examples/twitter.rb
189
231
  - spec/servers/app.rb
190
232
  - spec/spec_helper.rb
191
233
  - spec/typhoeus/easy_spec.rb
192
234
  - spec/typhoeus/filter_spec.rb
235
+ - spec/typhoeus/form_spec.rb
193
236
  - spec/typhoeus/hydra_mock_spec.rb
194
237
  - spec/typhoeus/hydra_spec.rb
195
238
  - spec/typhoeus/multi_spec.rb
@@ -200,4 +243,3 @@ test_files:
200
243
  - spec/typhoeus/request_spec.rb
201
244
  - spec/typhoeus/response_spec.rb
202
245
  - spec/typhoeus/utils_spec.rb
203
- - examples/twitter.rb
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- .*.sw?
2
- *.gem
3
- .bundle