em-http-request 0.2.15 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of em-http-request might be problematic. Click here for more details.
- data/.gitignore +2 -1
- data/.rspec +0 -0
- data/Changelog.md +13 -0
- data/Gemfile +2 -14
- data/README.md +7 -0
- data/Rakefile +6 -35
- data/em-http-request.gemspec +25 -94
- data/ext/buffer/extconf.rb +53 -53
- data/ext/http11_client/ext_help.h +14 -14
- data/ext/http11_client/extconf.rb +6 -6
- data/ext/http11_client/http11_client.c +328 -328
- data/ext/http11_client/http11_parser.h +48 -48
- data/lib/em-http.rb +15 -16
- data/lib/em-http/client.rb +15 -222
- data/lib/em-http/http_encoding.rb +135 -0
- data/lib/em-http/http_header.rb +71 -0
- data/lib/em-http/http_options.rb +4 -3
- data/lib/em-http/request.rb +0 -3
- data/lib/em-http/version.rb +5 -0
- data/spec/encoding_spec.rb +7 -1
- data/spec/mock_spec.rb +1 -1
- data/spec/multi_spec.rb +68 -68
- data/spec/request_spec.rb +125 -75
- data/spec/stallion.rb +1 -0
- metadata +100 -25
- data/LICENSE +0 -58
- data/VERSION +0 -1
- data/autotest/discover.rb +0 -1
data/spec/stallion.rb
CHANGED
@@ -96,6 +96,7 @@ Stallion.saddle :spec do |stable|
|
|
96
96
|
|
97
97
|
elsif stable.request.post?
|
98
98
|
if stable.request.path_info == '/echo_content_type'
|
99
|
+
stable.response["Content-Type"] = stable.request.env["CONTENT_TYPE"] || 'text/html'
|
99
100
|
stable.response.write stable.request.env["CONTENT_TYPE"]
|
100
101
|
else
|
101
102
|
stable.response.write stable.request.body.read
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ilya Grigorik
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-15 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -47,25 +47,104 @@ dependencies:
|
|
47
47
|
version: 2.0.0
|
48
48
|
type: :runtime
|
49
49
|
version_requirements: *id002
|
50
|
-
|
51
|
-
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: escape_utils
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :runtime
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rspec
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
type: :development
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rake
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
segments:
|
85
|
+
- 0
|
86
|
+
version: "0"
|
87
|
+
type: :development
|
88
|
+
version_requirements: *id005
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: em-websocket
|
91
|
+
prerelease: false
|
92
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
version: "0"
|
100
|
+
type: :development
|
101
|
+
version_requirements: *id006
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: rack
|
104
|
+
prerelease: false
|
105
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
segments:
|
111
|
+
- 0
|
112
|
+
version: "0"
|
113
|
+
type: :development
|
114
|
+
version_requirements: *id007
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: mongrel
|
117
|
+
prerelease: false
|
118
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
120
|
+
requirements:
|
121
|
+
- - ~>
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
segments:
|
124
|
+
- 1
|
125
|
+
- 2
|
126
|
+
- 0
|
127
|
+
- pre2
|
128
|
+
version: 1.2.0.pre2
|
129
|
+
type: :development
|
130
|
+
version_requirements: *id008
|
131
|
+
description: EventMachine based, async HTTP Request client
|
132
|
+
email:
|
133
|
+
- ilya@igvita.com
|
52
134
|
executables: []
|
53
135
|
|
54
136
|
extensions:
|
55
137
|
- ext/buffer/extconf.rb
|
56
138
|
- ext/http11_client/extconf.rb
|
57
|
-
extra_rdoc_files:
|
58
|
-
|
59
|
-
- README.md
|
139
|
+
extra_rdoc_files: []
|
140
|
+
|
60
141
|
files:
|
61
142
|
- .gitignore
|
143
|
+
- .rspec
|
62
144
|
- Changelog.md
|
63
145
|
- Gemfile
|
64
|
-
- LICENSE
|
65
146
|
- README.md
|
66
147
|
- Rakefile
|
67
|
-
- VERSION
|
68
|
-
- autotest/discover.rb
|
69
148
|
- em-http-request.gemspec
|
70
149
|
- examples/fetch.rb
|
71
150
|
- examples/fibered-http.rb
|
@@ -86,10 +165,13 @@ files:
|
|
86
165
|
- lib/em-http/client.rb
|
87
166
|
- lib/em-http/core_ext/bytesize.rb
|
88
167
|
- lib/em-http/decoders.rb
|
168
|
+
- lib/em-http/http_encoding.rb
|
169
|
+
- lib/em-http/http_header.rb
|
89
170
|
- lib/em-http/http_options.rb
|
90
171
|
- lib/em-http/mock.rb
|
91
172
|
- lib/em-http/multi.rb
|
92
173
|
- lib/em-http/request.rb
|
174
|
+
- lib/em-http/version.rb
|
93
175
|
- spec/encoding_spec.rb
|
94
176
|
- spec/fixtures/google.ca
|
95
177
|
- spec/helper.rb
|
@@ -103,8 +185,8 @@ homepage: http://github.com/igrigorik/em-http-request
|
|
103
185
|
licenses: []
|
104
186
|
|
105
187
|
post_install_message:
|
106
|
-
rdoc_options:
|
107
|
-
|
188
|
+
rdoc_options: []
|
189
|
+
|
108
190
|
require_paths:
|
109
191
|
- lib
|
110
192
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -113,10 +195,8 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
195
|
- - ">="
|
114
196
|
- !ruby/object:Gem::Version
|
115
197
|
segments:
|
116
|
-
-
|
117
|
-
|
118
|
-
- 6
|
119
|
-
version: 1.8.6
|
198
|
+
- 0
|
199
|
+
version: "0"
|
120
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
201
|
none: false
|
122
202
|
requirements:
|
@@ -131,18 +211,13 @@ rubyforge_project: em-http-request
|
|
131
211
|
rubygems_version: 1.3.7
|
132
212
|
signing_key:
|
133
213
|
specification_version: 3
|
134
|
-
summary: EventMachine based, async HTTP Request
|
214
|
+
summary: EventMachine based, async HTTP Request client
|
135
215
|
test_files:
|
136
216
|
- spec/encoding_spec.rb
|
217
|
+
- spec/fixtures/google.ca
|
137
218
|
- spec/helper.rb
|
138
219
|
- spec/mock_spec.rb
|
139
220
|
- spec/multi_spec.rb
|
140
221
|
- spec/request_spec.rb
|
141
222
|
- spec/stallion.rb
|
142
223
|
- spec/stub_server.rb
|
143
|
-
- examples/fetch.rb
|
144
|
-
- examples/fibered-http.rb
|
145
|
-
- examples/oauth-tweet.rb
|
146
|
-
- examples/socks5.rb
|
147
|
-
- examples/websocket-handler.rb
|
148
|
-
- examples/websocket-server.rb
|
data/LICENSE
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>.
|
2
|
-
You can redistribute it and/or modify it under either the terms of the GPL
|
3
|
-
(see COPYING.txt file), or the conditions below:
|
4
|
-
|
5
|
-
1. You may make and give away verbatim copies of the source form of the
|
6
|
-
software without restriction, provided that you duplicate all of the
|
7
|
-
original copyright notices and associated disclaimers.
|
8
|
-
|
9
|
-
2. You may modify your copy of the software in any way, provided that
|
10
|
-
you do at least ONE of the following:
|
11
|
-
|
12
|
-
a) place your modifications in the Public Domain or otherwise
|
13
|
-
make them Freely Available, such as by posting said
|
14
|
-
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
-
the author to include your modifications in the software.
|
16
|
-
|
17
|
-
b) use the modified software only within your corporation or
|
18
|
-
organization.
|
19
|
-
|
20
|
-
c) rename any non-standard executables so the names do not conflict
|
21
|
-
with standard executables, which must also be provided.
|
22
|
-
|
23
|
-
d) make other distribution arrangements with the author.
|
24
|
-
|
25
|
-
3. You may distribute the software in object code or executable
|
26
|
-
form, provided that you do at least ONE of the following:
|
27
|
-
|
28
|
-
a) distribute the executables and library files of the software,
|
29
|
-
together with instructions (in the manual page or equivalent)
|
30
|
-
on where to get the original distribution.
|
31
|
-
|
32
|
-
b) accompany the distribution with the machine-readable source of
|
33
|
-
the software.
|
34
|
-
|
35
|
-
c) give non-standard executables non-standard names, with
|
36
|
-
instructions on where to get the original software distribution.
|
37
|
-
|
38
|
-
d) make other distribution arrangements with the author.
|
39
|
-
|
40
|
-
4. You may modify and include the part of the software into any other
|
41
|
-
software (possibly commercial). But some files in the distribution
|
42
|
-
are not written by the author, so that they are not under this terms.
|
43
|
-
|
44
|
-
They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some
|
45
|
-
files under the ./missing directory. See each file for the copying
|
46
|
-
condition.
|
47
|
-
|
48
|
-
5. The scripts and library files supplied as input to or produced as
|
49
|
-
output from the software do not automatically fall under the
|
50
|
-
copyright of the software, but belong to whomever generated them,
|
51
|
-
and may be sold commercially, and may be aggregated with this
|
52
|
-
software.
|
53
|
-
|
54
|
-
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
55
|
-
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
56
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
57
|
-
PURPOSE.
|
58
|
-
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.2.15
|
data/autotest/discover.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Autotest.add_discovery { 'rspec2' }
|