sandofsky-typhoeus 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/typhoeus/Makefile +157 -0
- data/ext/typhoeus/extconf.rb +64 -0
- data/ext/typhoeus/native.c +11 -0
- data/ext/typhoeus/native.h +14 -0
- data/ext/typhoeus/typhoeus_easy.c +207 -0
- data/ext/typhoeus/typhoeus_easy.h +19 -0
- data/ext/typhoeus/typhoeus_multi.c +218 -0
- data/ext/typhoeus/typhoeus_multi.h +16 -0
- data/lib/typhoeus.rb +55 -0
- data/lib/typhoeus/easy.rb +211 -0
- data/lib/typhoeus/filter.rb +28 -0
- data/lib/typhoeus/hydra.rb +176 -0
- data/lib/typhoeus/multi.rb +34 -0
- data/lib/typhoeus/remote.rb +306 -0
- data/lib/typhoeus/remote_method.rb +108 -0
- data/lib/typhoeus/remote_proxy_object.rb +48 -0
- data/lib/typhoeus/request.rb +88 -0
- data/lib/typhoeus/response.rb +19 -0
- data/spec/servers/delay_fixture_server.rb +66 -0
- data/spec/servers/method_server.rb +51 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +29 -0
- data/spec/typhoeus/easy_spec.rb +148 -0
- data/spec/typhoeus/filter_spec.rb +35 -0
- data/spec/typhoeus/multi_spec.rb +82 -0
- data/spec/typhoeus/remote_method_spec.rb +141 -0
- data/spec/typhoeus/remote_proxy_object_spec.rb +73 -0
- data/spec/typhoeus/remote_spec.rb +699 -0
- data/spec/typhoeus/response_spec.rb +36 -0
- metadata +93 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe Typhoeus::Response do
|
4
|
+
describe "initialize" do
|
5
|
+
it "should store response_code" do
|
6
|
+
Typhoeus::Response.new(:code => 200).code.should == 200
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should store response_headers" do
|
10
|
+
Typhoeus::Response.new(:headers => "a header!").headers.should == "a header!"
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should store response_body" do
|
14
|
+
Typhoeus::Response.new(:body => "a body!").body.should == "a body!"
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should store request_time" do
|
18
|
+
Typhoeus::Response.new(:time => 1.23).time.should == 1.23
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should store requested_url" do
|
22
|
+
response = Typhoeus::Response.new(:requested_url => "http://test.com")
|
23
|
+
response.requested_url.should == "http://test.com"
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should store requested_http_method" do
|
27
|
+
response = Typhoeus::Response.new(:requested_http_method => :delete)
|
28
|
+
response.requested_http_method.should == :delete
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should store an associated request object" do
|
32
|
+
response = Typhoeus::Response.new(:request => "whatever")
|
33
|
+
response.request.should == "whatever"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sandofsky-typhoeus
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Paul Dix
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-07-03 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rack
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.9.0
|
24
|
+
version:
|
25
|
+
description:
|
26
|
+
email: paul@pauldix.net
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions:
|
30
|
+
- ext/typhoeus/extconf.rb
|
31
|
+
extra_rdoc_files: []
|
32
|
+
|
33
|
+
files:
|
34
|
+
- ext/typhoeus/extconf.rb
|
35
|
+
- ext/typhoeus/typhoeus_easy.h
|
36
|
+
- ext/typhoeus/typhoeus_easy.c
|
37
|
+
- ext/typhoeus/typhoeus_multi.h
|
38
|
+
- ext/typhoeus/typhoeus_multi.c
|
39
|
+
- ext/typhoeus/Makefile
|
40
|
+
- ext/typhoeus/native.h
|
41
|
+
- ext/typhoeus/native.c
|
42
|
+
- lib/typhoeus.rb
|
43
|
+
- lib/typhoeus/easy.rb
|
44
|
+
- lib/typhoeus/multi.rb
|
45
|
+
- lib/typhoeus/remote.rb
|
46
|
+
- lib/typhoeus/remote_proxy_object.rb
|
47
|
+
- lib/typhoeus/filter.rb
|
48
|
+
- lib/typhoeus/remote_method.rb
|
49
|
+
- lib/typhoeus/response.rb
|
50
|
+
- lib/typhoeus/hydra.rb
|
51
|
+
- lib/typhoeus/request.rb
|
52
|
+
- spec/spec.opts
|
53
|
+
- spec/spec_helper.rb
|
54
|
+
- spec/typhoeus/easy_spec.rb
|
55
|
+
- spec/typhoeus/multi_spec.rb
|
56
|
+
- spec/typhoeus/remote_spec.rb
|
57
|
+
- spec/typhoeus/remote_proxy_object_spec.rb
|
58
|
+
- spec/typhoeus/filter_spec.rb
|
59
|
+
- spec/typhoeus/remote_method_spec.rb
|
60
|
+
- spec/typhoeus/response_spec.rb
|
61
|
+
- spec/servers/delay_fixture_server.rb
|
62
|
+
- spec/servers/method_server.rb
|
63
|
+
has_rdoc: true
|
64
|
+
homepage: http://github.com/pauldix/typhoeus
|
65
|
+
licenses: []
|
66
|
+
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
- ext
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: "0"
|
78
|
+
version:
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: "0"
|
84
|
+
version:
|
85
|
+
requirements: []
|
86
|
+
|
87
|
+
rubyforge_project:
|
88
|
+
rubygems_version: 1.3.5
|
89
|
+
signing_key:
|
90
|
+
specification_version: 2
|
91
|
+
summary: A library for interacting with web services (and building SOAs) at blinding speed.
|
92
|
+
test_files: []
|
93
|
+
|