righttp 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rig/http_header.rb +2 -2
- data/righttp.gemspec +2 -2
- data/test/test_http.rb +11 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/lib/rig/http_header.rb
CHANGED
data/righttp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{righttp}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["hukl"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-16}
|
13
13
|
s.description = %q{A HTTP client library written from scratch that is easy to use and offers full flexibility}
|
14
14
|
s.email = %q{contact@smyck.org}
|
15
15
|
s.extra_rdoc_files = [
|
data/test/test_http.rb
CHANGED
@@ -223,6 +223,17 @@ class TestHttp < Test::Unit::TestCase
|
|
223
223
|
assert_equal false, request.body.multipart?
|
224
224
|
end
|
225
225
|
|
226
|
+
test "simple request in full manual mode" do
|
227
|
+
request = Rig::HTTP.new( "http://github.com:80/hukl" )
|
228
|
+
expected = "GET /hukl HTTP/1.1\r\n" \
|
229
|
+
"Host: github.com\r\n" \
|
230
|
+
"Origin: localhost\r\n" \
|
231
|
+
"Content-Length: 0\r\n" \
|
232
|
+
"Content-Type: text/plain\r\n" \
|
233
|
+
"Connection: close\r\n\r\n"
|
234
|
+
assert_equal expected, request.header.to_s
|
235
|
+
end
|
236
|
+
|
226
237
|
#test "multipart body gets properly created" do
|
227
238
|
# post = HTTP.new(
|
228
239
|
# :host => "localhost",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 5
|
9
|
+
version: 0.1.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- hukl
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-08-
|
17
|
+
date: 2010-08-16 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|