typhoeus 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/{CHANGELOG.markdown → CHANGELOG.md} +21 -12
  2. data/LICENSE +2 -0
  3. data/README.md +455 -0
  4. data/Rakefile +6 -26
  5. data/lib/typhoeus.rb +4 -6
  6. data/lib/typhoeus/curl.rb +453 -0
  7. data/lib/typhoeus/easy.rb +60 -358
  8. data/lib/typhoeus/easy/auth.rb +14 -0
  9. data/lib/typhoeus/easy/callbacks.rb +33 -0
  10. data/lib/typhoeus/easy/ffi_helper.rb +61 -0
  11. data/lib/typhoeus/easy/infos.rb +90 -0
  12. data/lib/typhoeus/easy/options.rb +115 -0
  13. data/lib/typhoeus/easy/proxy.rb +20 -0
  14. data/lib/typhoeus/easy/ssl.rb +82 -0
  15. data/lib/typhoeus/form.rb +30 -1
  16. data/lib/typhoeus/{normalized_header_hash.rb → header.rb} +2 -6
  17. data/lib/typhoeus/hydra.rb +9 -12
  18. data/lib/typhoeus/hydra_mock.rb +2 -2
  19. data/lib/typhoeus/multi.rb +118 -9
  20. data/lib/typhoeus/param_processor.rb +43 -0
  21. data/lib/typhoeus/request.rb +18 -21
  22. data/lib/typhoeus/response.rb +5 -4
  23. data/lib/typhoeus/utils.rb +14 -27
  24. data/lib/typhoeus/version.rb +1 -1
  25. metadata +155 -152
  26. data/Gemfile.lock +0 -37
  27. data/ext/typhoeus/.gitignore +0 -7
  28. data/ext/typhoeus/extconf.rb +0 -65
  29. data/ext/typhoeus/native.c +0 -12
  30. data/ext/typhoeus/native.h +0 -22
  31. data/ext/typhoeus/typhoeus_easy.c +0 -232
  32. data/ext/typhoeus/typhoeus_easy.h +0 -20
  33. data/ext/typhoeus/typhoeus_form.c +0 -59
  34. data/ext/typhoeus/typhoeus_form.h +0 -13
  35. data/ext/typhoeus/typhoeus_multi.c +0 -217
  36. data/ext/typhoeus/typhoeus_multi.h +0 -16
  37. data/lib/typhoeus/.gitignore +0 -1
  38. data/lib/typhoeus/service.rb +0 -20
  39. data/spec/fixtures/placeholder.gif +0 -0
  40. data/spec/fixtures/placeholder.txt +0 -1
  41. data/spec/fixtures/placeholder.ukn +0 -0
  42. data/spec/fixtures/result_set.xml +0 -60
  43. data/spec/servers/app.rb +0 -97
  44. data/spec/spec_helper.rb +0 -19
  45. data/spec/support/typhoeus_localhost_server.rb +0 -58
  46. data/spec/typhoeus/easy_spec.rb +0 -391
  47. data/spec/typhoeus/filter_spec.rb +0 -35
  48. data/spec/typhoeus/form_spec.rb +0 -117
  49. data/spec/typhoeus/hydra_mock_spec.rb +0 -300
  50. data/spec/typhoeus/hydra_spec.rb +0 -602
  51. data/spec/typhoeus/multi_spec.rb +0 -74
  52. data/spec/typhoeus/normalized_header_hash_spec.rb +0 -41
  53. data/spec/typhoeus/remote_method_spec.rb +0 -141
  54. data/spec/typhoeus/remote_proxy_object_spec.rb +0 -65
  55. data/spec/typhoeus/remote_spec.rb +0 -695
  56. data/spec/typhoeus/request_spec.rb +0 -387
  57. data/spec/typhoeus/response_spec.rb +0 -192
  58. data/spec/typhoeus/utils_spec.rb +0 -22
  59. data/typhoeus.gemspec +0 -33
@@ -1,22 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
-
3
- describe Typhoeus::Utils do
4
- # Taken from Rack 1.2.1
5
- describe "#escape" do
6
- it "should escape correctly" do
7
- Typhoeus::Utils.escape("fo<o>bar").should == "fo%3Co%3Ebar"
8
- Typhoeus::Utils.escape("a space").should == "a+space"
9
- Typhoeus::Utils.escape("q1!2\"'w$5&7/z8)?\\").
10
- should == "q1%212%22%27w%245%267%2Fz8%29%3F%5C"
11
- end
12
-
13
- it "should escape correctly for multibyte characters" do
14
- matz_name = "\xE3\x81\xBE\xE3\x81\xA4\xE3\x82\x82\xE3\x81\xA8".unpack("a*")[0] # Matsumoto
15
- matz_name.force_encoding("UTF-8") if matz_name.respond_to? :force_encoding
16
- Typhoeus::Utils.escape(matz_name).should == '%E3%81%BE%E3%81%A4%E3%82%82%E3%81%A8'
17
- matz_name_sep = "\xE3\x81\xBE\xE3\x81\xA4 \xE3\x82\x82\xE3\x81\xA8".unpack("a*")[0] # Matsu moto
18
- matz_name_sep.force_encoding("UTF-8") if matz_name_sep.respond_to? :force_encoding
19
- Typhoeus::Utils.escape(matz_name_sep).should == '%E3%81%BE%E3%81%A4+%E3%82%82%E3%81%A8'
20
- end
21
- end
22
- end
data/typhoeus.gemspec DELETED
@@ -1,33 +0,0 @@
1
- # encoding: utf-8
2
-
3
- $:.unshift File.expand_path('../lib', __FILE__)
4
- require 'typhoeus/version'
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "typhoeus"
8
- s.version = Typhoeus::VERSION
9
- s.authors = ["David Balatero", "Paul Dix"]
10
- s.email = "dbalatero@gmail.com"
11
- s.homepage = "https://github.com/dbalatero/typhoeus"
12
- s.summary = "Parallel HTTP library on top of libcurl multi."
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.extensions = ["ext/typhoeus/extconf.rb"]
15
- s.files = (`git ls-files ext lib spec`.split("\n")) + [
16
- 'CHANGELOG.markdown',
17
- 'Gemfile',
18
- 'Gemfile.lock',
19
- 'LICENSE',
20
- 'Rakefile',
21
- 'typhoeus.gemspec'
22
- ]
23
- s.platform = Gem::Platform::RUBY
24
- s.require_path = 'lib'
25
- s.rubyforge_project = '[none]'
26
-
27
- s.add_runtime_dependency 'mime-types', ['>= 0']
28
- s.add_development_dependency 'rspec', ["~> 2.6"]
29
- s.add_development_dependency 'diff-lcs', [">= 0"]
30
- s.add_development_dependency 'sinatra', [">= 0"]
31
- s.add_development_dependency 'json', [">= 0"]
32
- s.add_development_dependency 'rake', [">= 0"]
33
- end