iudex-http-test 1.4.0-java → 1.7.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/History.rdoc +5 -0
- data/README.rdoc +1 -1
- data/bin/iudex-http-test-fg +1 -1
- data/lib/iudex-http-test.rb +1 -1
- data/lib/iudex-http-test/base.rb +2 -2
- data/lib/iudex-http-test/broken_server.rb +9 -1
- data/lib/iudex-http-test/helper.rb +1 -1
- data/lib/iudex-http-test/server.rb +1 -1
- data/lib/iudex-http-test/test_app.rb +5 -1
- data/test/setup.rb +1 -1
- data/test/test_broken_server.rb +9 -12
- data/test/test_server.rb +1 -1
- data/test/test_test_app.rb +1 -1
- metadata +40 -64
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5ddbded29ec426264c6a57d9cc6e61be3f5978f2
|
4
|
+
data.tar.gz: 03421ef9dedd6fd848599e481f2a76cbd6221e3b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9eb1370bb37810e755128149fd89e9eba4d6b9b51f2b750881d5c5ac0a84be4687f761de602540887d82b1d910fb45b733d15e879f1227f9d3de94864bdc0516
|
7
|
+
data.tar.gz: d0a95718e2d2007ad777f9ce7372c1a9555398383e318c1ac257705709bc2d2a5c358ca1886258d5de982078106b5868170b315f3ca7c2e2fdc552427d0e4c1b
|
data/History.rdoc
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== 1.7.0 (2015-5-3)
|
2
|
+
* Add BrokenServer.accept_thread with name for logging
|
3
|
+
* Add /post_to test path
|
4
|
+
* Broaden/upgrade to fishwife ~> 1.7 (supports jetty 9.2.x)
|
5
|
+
|
1
6
|
=== 1.4.0 (2013-10-29)
|
2
7
|
* Add /slow streaming output test path
|
3
8
|
* Add rescue, log of EPIPE from BrokenServer.accept
|
data/README.rdoc
CHANGED
@@ -11,7 +11,7 @@ testing HTTP client implementations.
|
|
11
11
|
|
12
12
|
== License
|
13
13
|
|
14
|
-
Copyright (c)
|
14
|
+
Copyright (c) 2011-2015 David Kellum
|
15
15
|
|
16
16
|
Licensed under the Apache License, Version 2.0 (the "License"); you
|
17
17
|
may not use this file except in compliance with the License. You
|
data/bin/iudex-http-test-fg
CHANGED
data/lib/iudex-http-test.rb
CHANGED
data/lib/iudex-http-test/base.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c)
|
2
|
+
# Copyright (c) 2011-2015 David Kellum
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
5
5
|
# may not use this file except in compliance with the License. You
|
@@ -17,7 +17,7 @@
|
|
17
17
|
module Iudex
|
18
18
|
module HTTP
|
19
19
|
module Test
|
20
|
-
VERSION = '1.
|
20
|
+
VERSION = '1.7.0'
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c)
|
2
|
+
# Copyright (c) 2011-2015 David Kellum
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
5
5
|
# may not use this file except in compliance with the License. You
|
@@ -16,6 +16,7 @@
|
|
16
16
|
|
17
17
|
require 'iudex-http-test/base'
|
18
18
|
|
19
|
+
require 'thread'
|
19
20
|
require 'socket'
|
20
21
|
|
21
22
|
module Iudex::HTTP::Test
|
@@ -33,6 +34,13 @@ module Iudex::HTTP::Test
|
|
33
34
|
@server = TCPServer.new( @port )
|
34
35
|
end
|
35
36
|
|
37
|
+
def accept_thread( &block )
|
38
|
+
Thread.new do
|
39
|
+
java.lang.Thread::currentThread.name = 'accept' # for logging
|
40
|
+
accept( &block )
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
36
44
|
def accept
|
37
45
|
sock = @server.accept
|
38
46
|
yield sock if block_given?
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c)
|
2
|
+
# Copyright (c) 2011-2015 David Kellum
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
5
5
|
# may not use this file except in compliance with the License. You
|
@@ -144,6 +144,10 @@ module Iudex::HTTP::Test
|
|
144
144
|
:type => 'application/atom+xml' )
|
145
145
|
end
|
146
146
|
|
147
|
+
post '/post_to' do
|
148
|
+
params.inspect
|
149
|
+
end
|
150
|
+
|
147
151
|
get '/env' do
|
148
152
|
request.inspect
|
149
153
|
end
|
data/test/setup.rb
CHANGED
data/test/test_broken_server.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#.hashdot.profile += jruby-shortlived
|
3
3
|
|
4
4
|
#--
|
5
|
-
# Copyright (c)
|
5
|
+
# Copyright (c) 2011-2015 David Kellum
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
8
8
|
# may not use this file except in compliance with the License. You
|
@@ -21,7 +21,6 @@ require File.join( File.dirname( __FILE__ ), "setup" )
|
|
21
21
|
|
22
22
|
require 'iudex-http-test/broken_server'
|
23
23
|
require 'net/http'
|
24
|
-
require 'thread'
|
25
24
|
|
26
25
|
class TestBrokenServer < MiniTest::Unit::TestCase
|
27
26
|
include Iudex::HTTP::Test
|
@@ -36,16 +35,14 @@ class TestBrokenServer < MiniTest::Unit::TestCase
|
|
36
35
|
def test_fake_http
|
37
36
|
bs = BrokenServer.new
|
38
37
|
bs.start
|
39
|
-
sthread =
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
sock.write content
|
48
|
-
end
|
38
|
+
sthread = bs.accept_thread do |sock|
|
39
|
+
content = "body"
|
40
|
+
|
41
|
+
sock.write "HTTP/1.0 200 OK\r\n"
|
42
|
+
sock.write "Content-Length: #{ content.length }\r\n"
|
43
|
+
sock.write "Connection: close\r\n"
|
44
|
+
sock.write "\r\n"
|
45
|
+
sock.write content
|
49
46
|
end
|
50
47
|
|
51
48
|
res = Net::HTTP.start( 'localhost', bs.port ) do |http|
|
data/test/test_server.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#.hashdot.profile += jruby-shortlived
|
3
3
|
|
4
4
|
#--
|
5
|
-
# Copyright (c)
|
5
|
+
# Copyright (c) 2011-2015 David Kellum
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
8
8
|
# may not use this file except in compliance with the License. You
|
data/test/test_test_app.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#.hashdot.profile += jruby-shortlived
|
3
3
|
|
4
4
|
#--
|
5
|
-
# Copyright (c)
|
5
|
+
# Copyright (c) 2011-2015 David Kellum
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
8
8
|
# may not use this file except in compliance with the License. You
|
metadata
CHANGED
@@ -1,144 +1,127 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iudex-http-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 1.4.0
|
4
|
+
version: 1.7.0
|
6
5
|
platform: java
|
7
6
|
authors:
|
8
7
|
- David Kellum
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-05-04 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name: fishwife
|
16
|
-
version_requirements: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ~>
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: 1.5.0
|
21
|
-
none: false
|
22
14
|
requirement: !ruby/object:Gem::Requirement
|
23
15
|
requirements:
|
24
16
|
- - ~>
|
25
17
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
27
|
-
|
18
|
+
version: '1.7'
|
19
|
+
name: fishwife
|
28
20
|
prerelease: false
|
29
21
|
type: :runtime
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: sinatra
|
32
22
|
version_requirements: !ruby/object:Gem::Requirement
|
33
23
|
requirements:
|
34
24
|
- - ~>
|
35
25
|
- !ruby/object:Gem::Version
|
36
|
-
version: 1.
|
37
|
-
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
38
28
|
requirement: !ruby/object:Gem::Requirement
|
39
29
|
requirements:
|
40
30
|
- - ~>
|
41
31
|
- !ruby/object:Gem::Version
|
42
32
|
version: 1.4.2
|
43
|
-
|
33
|
+
name: sinatra
|
44
34
|
prerelease: false
|
45
35
|
type: :runtime
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: builder
|
48
36
|
version_requirements: !ruby/object:Gem::Requirement
|
49
37
|
requirements:
|
50
38
|
- - ~>
|
51
39
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
53
|
-
|
40
|
+
version: 1.4.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
54
42
|
requirement: !ruby/object:Gem::Requirement
|
55
43
|
requirements:
|
56
44
|
- - ~>
|
57
45
|
- !ruby/object:Gem::Version
|
58
46
|
version: 3.2.0
|
59
|
-
|
47
|
+
name: builder
|
60
48
|
prerelease: false
|
61
49
|
type: :runtime
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: markaby
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - ~>
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
|
54
|
+
version: 3.2.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
70
56
|
requirement: !ruby/object:Gem::Requirement
|
71
57
|
requirements:
|
72
58
|
- - ~>
|
73
59
|
- !ruby/object:Gem::Version
|
74
60
|
version: 0.7.2
|
75
|
-
|
61
|
+
name: markaby
|
76
62
|
prerelease: false
|
77
63
|
type: :runtime
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: minitest
|
80
64
|
version_requirements: !ruby/object:Gem::Requirement
|
81
65
|
requirements:
|
82
66
|
- - ~>
|
83
67
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
85
|
-
|
68
|
+
version: 0.7.2
|
69
|
+
- !ruby/object:Gem::Dependency
|
86
70
|
requirement: !ruby/object:Gem::Requirement
|
87
71
|
requirements:
|
88
72
|
- - ~>
|
89
73
|
- !ruby/object:Gem::Version
|
90
74
|
version: 4.7.4
|
91
|
-
|
75
|
+
name: minitest
|
92
76
|
prerelease: false
|
93
77
|
type: :runtime
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: rack-test
|
96
78
|
version_requirements: !ruby/object:Gem::Requirement
|
97
79
|
requirements:
|
98
80
|
- - ~>
|
99
81
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
101
|
-
|
82
|
+
version: 4.7.4
|
83
|
+
- !ruby/object:Gem::Dependency
|
102
84
|
requirement: !ruby/object:Gem::Requirement
|
103
85
|
requirements:
|
104
86
|
- - ~>
|
105
87
|
- !ruby/object:Gem::Version
|
106
88
|
version: 0.6.2
|
107
|
-
|
89
|
+
name: rack-test
|
108
90
|
prerelease: false
|
109
91
|
type: :development
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
name: rjack-logback
|
112
92
|
version_requirements: !ruby/object:Gem::Requirement
|
113
93
|
requirements:
|
114
94
|
- - ~>
|
115
95
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
117
|
-
|
96
|
+
version: 0.6.2
|
97
|
+
- !ruby/object:Gem::Dependency
|
118
98
|
requirement: !ruby/object:Gem::Requirement
|
119
99
|
requirements:
|
120
100
|
- - ~>
|
121
101
|
- !ruby/object:Gem::Version
|
122
102
|
version: '1.5'
|
123
|
-
|
103
|
+
name: rjack-logback
|
124
104
|
prerelease: false
|
125
105
|
type: :development
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: rjack-tarpit
|
128
106
|
version_requirements: !ruby/object:Gem::Requirement
|
129
107
|
requirements:
|
130
108
|
- - ~>
|
131
109
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
133
|
-
|
110
|
+
version: '1.5'
|
111
|
+
- !ruby/object:Gem::Dependency
|
134
112
|
requirement: !ruby/object:Gem::Requirement
|
135
113
|
requirements:
|
136
114
|
- - ~>
|
137
115
|
- !ruby/object:Gem::Version
|
138
|
-
version: '2.
|
139
|
-
|
116
|
+
version: '2.1'
|
117
|
+
name: rjack-tarpit
|
140
118
|
prerelease: false
|
141
119
|
type: :development
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.1'
|
142
125
|
description: Iudex is a general purpose web crawler and feed processor in ruby/java. The iudex-http-test gem contains a HTTP test server for testing HTTP client implementations.
|
143
126
|
email:
|
144
127
|
- dek-oss@gravitext.com
|
@@ -154,8 +137,8 @@ files:
|
|
154
137
|
- README.rdoc
|
155
138
|
- Rakefile
|
156
139
|
- bin/iudex-http-test-fg
|
157
|
-
- lib/iudex-http-test/base.rb
|
158
140
|
- lib/iudex-http-test.rb
|
141
|
+
- lib/iudex-http-test/base.rb
|
159
142
|
- lib/iudex-http-test/broken_server.rb
|
160
143
|
- lib/iudex-http-test/helper.rb
|
161
144
|
- lib/iudex-http-test/server.rb
|
@@ -166,7 +149,9 @@ files:
|
|
166
149
|
- test/test_server.rb
|
167
150
|
- test/test_test_app.rb
|
168
151
|
homepage: http://iudex.gravitext.com
|
169
|
-
licenses:
|
152
|
+
licenses:
|
153
|
+
- Apache-2.0
|
154
|
+
metadata: {}
|
170
155
|
post_install_message:
|
171
156
|
rdoc_options:
|
172
157
|
- --main
|
@@ -175,27 +160,18 @@ require_paths:
|
|
175
160
|
- lib
|
176
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
177
162
|
requirements:
|
178
|
-
- -
|
163
|
+
- - '>='
|
179
164
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
181
|
-
segments:
|
182
|
-
- 0
|
183
|
-
hash: 2
|
184
|
-
none: false
|
165
|
+
version: 1.8.7
|
185
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
167
|
requirements:
|
187
|
-
- -
|
168
|
+
- - '>='
|
188
169
|
- !ruby/object:Gem::Version
|
189
170
|
version: '0'
|
190
|
-
segments:
|
191
|
-
- 0
|
192
|
-
hash: 2
|
193
|
-
none: false
|
194
171
|
requirements: []
|
195
172
|
rubyforge_project:
|
196
|
-
rubygems_version:
|
173
|
+
rubygems_version: 2.4.5
|
197
174
|
signing_key:
|
198
|
-
specification_version:
|
175
|
+
specification_version: 4
|
199
176
|
summary: Iudex is a general purpose web crawler and feed processor in ruby/java.
|
200
177
|
test_files: []
|
201
|
-
...
|