rfuzz 0.8 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/doc/rdoc/classes/RFuzz.html +1 -1
- data/doc/rdoc/classes/RFuzz/Browser.html +15 -15
- data/doc/rdoc/classes/RFuzz/Browser.src/M000084.html +12 -10
- data/doc/rdoc/classes/RFuzz/Browser.src/M000085.html +10 -11
- data/doc/rdoc/classes/RFuzz/Browser.src/M000086.html +24 -0
- data/doc/rdoc/classes/RFuzz/HttpClient.html +72 -64
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000020.html +12 -21
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000021.html +21 -15
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000022.html +15 -17
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000023.html +17 -22
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000024.html +22 -9
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000025.html +9 -31
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000026.html +31 -25
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000027.html +25 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000028.html +13 -21
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000029.html +21 -5
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000030.html +5 -13
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000031.html +26 -0
- data/doc/rdoc/classes/RFuzz/HttpResponse.html +15 -15
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000032.html +9 -5
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000033.html +5 -5
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000034.html +18 -0
- data/doc/rdoc/classes/RFuzz/Notifier.html +36 -36
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000059.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000060.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000061.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000062.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000063.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/M000064.html +4 -4
- data/doc/rdoc/classes/RFuzz/Notifier.src/{M000058.html → M000065.html} +4 -4
- data/doc/rdoc/classes/RFuzz/PushBackIO.html +55 -40
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000010.html +2 -1
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000011.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000012.html +8 -6
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000013.html +7 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000014.html +6 -31
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000015.html +32 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000016.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000017.html +6 -5
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000018.html +5 -9
- data/doc/rdoc/classes/RFuzz/PushBackIO.src/M000019.html +22 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.html +62 -62
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000047.html +8 -10
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000048.html +23 -0
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000051.html +9 -7
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000052.html +7 -9
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000053.html +9 -7
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000054.html +7 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000055.html +5 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000056.html +5 -9
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000057.html +9 -5
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000058.html +18 -0
- data/doc/rdoc/classes/RFuzz/Sampler.html +60 -60
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000072.html +6 -10
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000073.html +10 -13
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000074.html +13 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000075.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000076.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000077.html +5 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000078.html +5 -6
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000079.html +6 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000080.html +5 -10
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000081.html +10 -5
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000082.html +5 -7
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000083.html +20 -0
- data/doc/rdoc/classes/RFuzz/Session.html +63 -63
- data/doc/rdoc/classes/RFuzz/Session.src/M000035.html +18 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000036.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000037.html +5 -21
- data/doc/rdoc/classes/RFuzz/Session.src/M000038.html +21 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000039.html +6 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000040.html +6 -13
- data/doc/rdoc/classes/RFuzz/Session.src/M000041.html +13 -16
- data/doc/rdoc/classes/RFuzz/Session.src/M000042.html +16 -6
- data/doc/rdoc/classes/RFuzz/Session.src/M000043.html +6 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000044.html +5 -5
- data/doc/rdoc/classes/RFuzz/Session.src/M000045.html +5 -10
- data/doc/rdoc/classes/RFuzz/Session.src/M000046.html +23 -0
- data/doc/rdoc/classes/RFuzz/StatsTracker.html +32 -32
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000066.html +6 -6
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000067.html +6 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000068.html +5 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000069.html +5 -15
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/M000070.html +15 -5
- data/doc/rdoc/classes/RFuzz/StatsTracker.src/{M000065.html → M000071.html} +5 -6
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/lib/rfuzz/client_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/pushbackio_rb.html +1 -1
- data/doc/rdoc/files/lib/rfuzz/session_rb.html +1 -1
- data/doc/rdoc/fr_method_index.html +76 -75
- data/examples/kill_routes.rb +5 -4
- data/examples/mongrel_test_suite/test/rails/put.rb +14 -7
- data/examples/random_sockets.rb +37 -0
- data/examples/randomizer.rb +19 -0
- data/ext/http11_client/http11_parser.c +33 -34
- data/lib/rfuzz/client.rb +1 -1
- data/lib/rfuzz/pushbackio.rb +16 -2
- data/lib/rfuzz/session.rb +1 -1
- metadata +14 -11
- data/doc/rdoc/classes/RFuzz/Browser.src/M000083.html +0 -25
- data/doc/rdoc/classes/RFuzz/HttpClient.src/M000019.html +0 -25
- data/doc/rdoc/classes/RFuzz/HttpResponse.src/M000031.html +0 -22
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000046.html +0 -21
- data/doc/rdoc/classes/RFuzz/RandomGenerator.src/M000050.html +0 -22
- data/doc/rdoc/classes/RFuzz/Sampler.src/M000071.html +0 -19
- data/doc/rdoc/classes/RFuzz/Session.src/M000034.html +0 -31
@@ -14,6 +14,7 @@
|
|
14
14
|
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">secondary</span>)
|
15
15
|
12: <span class="ruby-ivar">@secondary</span> = <span class="ruby-identifier">secondary</span>
|
16
16
|
13: <span class="ruby-ivar">@buffer</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
|
17
|
-
14:
|
17
|
+
14: <span class="ruby-ivar">@die_after</span> = <span class="ruby-identifier">rand</span>(<span class="ruby-identifier">$io_death_count</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$io_death_count</span>
|
18
|
+
15: <span class="ruby-keyword kw">end</span></pre>
|
18
19
|
</body>
|
19
20
|
</html>
|
@@ -5,15 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>random_death (RFuzz::PushBackIO)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 17</span>
|
14
|
+
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random_death</span>
|
15
|
+
18: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$io_death_count</span>
|
16
|
+
19: <span class="ruby-ivar">@die_after</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
|
17
|
+
20: <span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@die_after</span> <span class="ruby-operator"><=</span> <span class="ruby-value">0</span>
|
17
18
|
21: <span class="ruby-keyword kw">end</span>
|
18
19
|
22: <span class="ruby-keyword kw">end</span></pre>
|
19
20
|
</body>
|
@@ -5,15 +5,17 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>push (RFuzz::PushBackIO)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 26</span>
|
14
|
+
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">push</span>(<span class="ruby-identifier">content</span>)
|
15
|
+
27: <span class="ruby-identifier">random_death</span>
|
16
|
+
28: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">content</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
17
|
+
29: <span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">content</span>)
|
18
|
+
30: <span class="ruby-keyword kw">end</span>
|
19
|
+
31: <span class="ruby-keyword kw">end</span></pre>
|
18
20
|
</body>
|
19
21
|
</html>
|
@@ -5,14 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>pop (RFuzz::PushBackIO)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 33</span>
|
14
|
+
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pop</span>(<span class="ruby-identifier">n</span>)
|
15
|
+
34: <span class="ruby-identifier">random_death</span>
|
16
|
+
35: <span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">rewind</span>
|
17
|
+
36: <span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">n</span>) <span class="ruby-operator">||</span> <span class="ruby-value str">""</span>
|
18
|
+
37: <span class="ruby-keyword kw">end</span></pre>
|
17
19
|
</body>
|
18
20
|
</html>
|
@@ -5,40 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>reset (RFuzz::PushBackIO)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
44: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">needs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
19
|
-
45: <span class="ruby-identifier">sec</span> = <span class="ruby-value str">""</span>
|
20
|
-
46: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">partial</span>
|
21
|
-
47: <span class="ruby-keyword kw">begin</span>
|
22
|
-
48: <span class="ruby-identifier">protect</span> <span class="ruby-keyword kw">do</span>
|
23
|
-
49: <span class="ruby-identifier">sec</span> = <span class="ruby-ivar">@secondary</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">needs</span>)
|
24
|
-
50: <span class="ruby-keyword kw">end</span>
|
25
|
-
51: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
|
26
|
-
52: <span class="ruby-comment cmt"># TODO: notify closed? error?</span>
|
27
|
-
53: <span class="ruby-keyword kw">end</span>
|
28
|
-
54: <span class="ruby-keyword kw">else</span>
|
29
|
-
55: <span class="ruby-identifier">protect</span> { <span class="ruby-identifier">sec</span> = <span class="ruby-ivar">@secondary</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">needs</span>)}
|
30
|
-
56: <span class="ruby-keyword kw">end</span>
|
31
|
-
57:
|
32
|
-
58: <span class="ruby-identifier">r</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">sec</span> <span class="ruby-operator">||</span> <span class="ruby-value str">""</span>)
|
33
|
-
59:
|
34
|
-
60: <span class="ruby-comment cmt"># finally, if there's nothing at all returned then this is bad</span>
|
35
|
-
61: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
36
|
-
62: <span class="ruby-identifier">raise</span> <span class="ruby-constant">HttpClientError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Server returned empty response."</span>)
|
37
|
-
63: <span class="ruby-keyword kw">end</span>
|
38
|
-
64: <span class="ruby-keyword kw">end</span>
|
39
|
-
65:
|
40
|
-
66: <span class="ruby-identifier">reset</span>
|
41
|
-
67: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">r</span>
|
42
|
-
68: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 39</span>
|
14
|
+
39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>
|
15
|
+
40: <span class="ruby-identifier">random_death</span>
|
16
|
+
41: <span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">string</span> = <span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">read</span> <span class="ruby-comment cmt"># reset out internal buffer</span>
|
17
|
+
42: <span class="ruby-keyword kw">end</span></pre>
|
43
18
|
</body>
|
44
19
|
</html>
|
@@ -5,14 +5,41 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>read (RFuzz::PushBackIO)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 51</span>
|
14
|
+
51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>(<span class="ruby-identifier">n</span>, <span class="ruby-identifier">partial</span>=<span class="ruby-keyword kw">false</span>)
|
15
|
+
52: <span class="ruby-identifier">random_death</span>
|
16
|
+
53: <span class="ruby-identifier">r</span> = <span class="ruby-identifier">pop</span>(<span class="ruby-identifier">n</span>)
|
17
|
+
54: <span class="ruby-identifier">needs</span> = <span class="ruby-identifier">n</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">length</span>
|
18
|
+
55:
|
19
|
+
56: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">needs</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
20
|
+
57: <span class="ruby-identifier">sec</span> = <span class="ruby-value str">""</span>
|
21
|
+
58: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">partial</span>
|
22
|
+
59: <span class="ruby-keyword kw">begin</span>
|
23
|
+
60: <span class="ruby-identifier">protect</span> <span class="ruby-keyword kw">do</span>
|
24
|
+
61: <span class="ruby-identifier">sec</span> = <span class="ruby-ivar">@secondary</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">needs</span>)
|
25
|
+
62: <span class="ruby-keyword kw">end</span>
|
26
|
+
63: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
|
27
|
+
64: <span class="ruby-identifier">close</span>
|
28
|
+
65: <span class="ruby-keyword kw">end</span>
|
29
|
+
66: <span class="ruby-keyword kw">else</span>
|
30
|
+
67: <span class="ruby-identifier">protect</span> { <span class="ruby-identifier">sec</span> = <span class="ruby-ivar">@secondary</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">needs</span>)}
|
31
|
+
68: <span class="ruby-keyword kw">end</span>
|
32
|
+
69:
|
33
|
+
70: <span class="ruby-identifier">r</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">sec</span> <span class="ruby-operator">||</span> <span class="ruby-value str">""</span>)
|
34
|
+
71:
|
35
|
+
72: <span class="ruby-comment cmt"># finally, if there's nothing at all returned then this is bad</span>
|
36
|
+
73: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
37
|
+
74: <span class="ruby-identifier">raise</span> <span class="ruby-constant">HttpClientError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Server returned empty response."</span>)
|
38
|
+
75: <span class="ruby-keyword kw">end</span>
|
39
|
+
76: <span class="ruby-keyword kw">end</span>
|
40
|
+
77:
|
41
|
+
78: <span class="ruby-identifier">reset</span>
|
42
|
+
79: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">r</span>
|
43
|
+
80: <span class="ruby-keyword kw">end</span></pre>
|
17
44
|
</body>
|
18
45
|
</html>
|
@@ -5,14 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>flush (RFuzz::PushBackIO)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 82</span>
|
14
|
+
82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">flush</span>
|
15
|
+
83: <span class="ruby-identifier">random_death</span>
|
16
|
+
84: <span class="ruby-identifier">protect</span> { <span class="ruby-ivar">@secondary</span>.<span class="ruby-identifier">flush</span> }
|
17
|
+
85: <span class="ruby-keyword kw">end</span></pre>
|
17
18
|
</body>
|
18
19
|
</html>
|
@@ -5,14 +5,15 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>write (RFuzz::PushBackIO)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 87</span>
|
14
|
+
87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">content</span>)
|
15
|
+
88: <span class="ruby-identifier">random_death</span>
|
16
|
+
89: <span class="ruby-identifier">protect</span> { <span class="ruby-ivar">@secondary</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">content</span>) }
|
17
|
+
90: <span class="ruby-keyword kw">end</span></pre>
|
17
18
|
</body>
|
18
19
|
</html>
|
@@ -5,18 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>close (RFuzz::PushBackIO)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
85: <span class="ruby-keyword kw">else</span>
|
18
|
-
86: <span class="ruby-identifier">raise</span> <span class="ruby-constant">HttpClientError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Socket closed."</span>)
|
19
|
-
87: <span class="ruby-keyword kw">end</span>
|
20
|
-
88: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 92</span>
|
14
|
+
92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
|
15
|
+
93: <span class="ruby-ivar">@secondary</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
16
|
+
94: <span class="ruby-keyword kw">end</span></pre>
|
21
17
|
</body>
|
22
18
|
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>protect (RFuzz::PushBackIO)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/rfuzz/pushbackio.rb, line 96</span>
|
14
|
+
96: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">protect</span>
|
15
|
+
97: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@secondary</span>.<span class="ruby-identifier">closed?</span>
|
16
|
+
98: <span class="ruby-keyword kw">yield</span>
|
17
|
+
99: <span class="ruby-keyword kw">else</span>
|
18
|
+
100: <span class="ruby-identifier">raise</span> <span class="ruby-constant">HttpClientError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"Socket closed."</span>)
|
19
|
+
101: <span class="ruby-keyword kw">end</span>
|
20
|
+
102: <span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -86,18 +86,18 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
89
|
+
<a href="#M000053">base64</a>
|
90
|
+
<a href="#M000054">byte_array</a>
|
91
|
+
<a href="#M000055">bytes</a>
|
92
|
+
<a href="#M000058">floats</a>
|
93
|
+
<a href="#M000048">hash_of</a>
|
94
|
+
<a href="#M000050">headers</a>
|
95
|
+
<a href="#M000057">ints</a>
|
96
|
+
<a href="#M000047">new</a>
|
97
|
+
<a href="#M000056">num</a>
|
98
|
+
<a href="#M000049">queries</a>
|
99
|
+
<a href="#M000051">uris</a>
|
100
|
+
<a href="#M000052">words</a>
|
101
101
|
</div>
|
102
102
|
</div>
|
103
103
|
|
@@ -119,12 +119,12 @@
|
|
119
119
|
<div id="methods">
|
120
120
|
<h3 class="section-bar">Public Class methods</h3>
|
121
121
|
|
122
|
-
<div id="method-
|
123
|
-
<a name="
|
122
|
+
<div id="method-M000047" class="method-detail">
|
123
|
+
<a name="M000047"></a>
|
124
124
|
|
125
125
|
<div class="method-heading">
|
126
|
-
<a href="RandomGenerator.src/
|
127
|
-
onclick="popupCode('RandomGenerator.src/
|
126
|
+
<a href="RandomGenerator.src/M000047.html" target="Code" class="method-signature"
|
127
|
+
onclick="popupCode('RandomGenerator.src/M000047.html');return false;">
|
128
128
|
<span class="method-name">new</span><span class="method-args">(dict=nil, type=:words)</span>
|
129
129
|
</a>
|
130
130
|
</div>
|
@@ -136,7 +136,7 @@ with a word dictionary then you can generate the random words, and is the
|
|
136
136
|
expected behavior. You can use the "type" parameter to change the
|
137
137
|
default type of generated content from words to any of the other types
|
138
138
|
available [:base64,:uris,:<a
|
139
|
-
href="RandomGenerator.html#
|
139
|
+
href="RandomGenerator.html#M000054">byte_array</a>,:ints,:floats].
|
140
140
|
</p>
|
141
141
|
<p>
|
142
142
|
The dict should just be an array of words.
|
@@ -146,12 +146,12 @@ The dict should just be an array of words.
|
|
146
146
|
|
147
147
|
<h3 class="section-bar">Public Instance methods</h3>
|
148
148
|
|
149
|
-
<div id="method-
|
150
|
-
<a name="
|
149
|
+
<div id="method-M000053" class="method-detail">
|
150
|
+
<a name="M000053"></a>
|
151
151
|
|
152
152
|
<div class="method-heading">
|
153
|
-
<a href="RandomGenerator.src/
|
154
|
-
onclick="popupCode('RandomGenerator.src/
|
153
|
+
<a href="RandomGenerator.src/M000053.html" target="Code" class="method-signature"
|
154
|
+
onclick="popupCode('RandomGenerator.src/M000053.html');return false;">
|
155
155
|
<span class="method-name">base64</span><span class="method-args">(count,length=100)</span>
|
156
156
|
</a>
|
157
157
|
</div>
|
@@ -164,12 +164,12 @@ the default and is a max, but the lengths are random.
|
|
164
164
|
</div>
|
165
165
|
</div>
|
166
166
|
|
167
|
-
<div id="method-
|
168
|
-
<a name="
|
167
|
+
<div id="method-M000054" class="method-detail">
|
168
|
+
<a name="M000054"></a>
|
169
169
|
|
170
170
|
<div class="method-heading">
|
171
|
-
<a href="RandomGenerator.src/
|
172
|
-
onclick="popupCode('RandomGenerator.src/
|
171
|
+
<a href="RandomGenerator.src/M000054.html" target="Code" class="method-signature"
|
172
|
+
onclick="popupCode('RandomGenerator.src/M000054.html');return false;">
|
173
173
|
<span class="method-name">byte_array</span><span class="method-args">(count,length=100)</span>
|
174
174
|
</a>
|
175
175
|
</div>
|
@@ -182,12 +182,12 @@ very nasty. As usual, length=100 is a max for the random lengths.
|
|
182
182
|
</div>
|
183
183
|
</div>
|
184
184
|
|
185
|
-
<div id="method-
|
186
|
-
<a name="
|
185
|
+
<div id="method-M000055" class="method-detail">
|
186
|
+
<a name="M000055"></a>
|
187
187
|
|
188
188
|
<div class="method-heading">
|
189
|
-
<a href="RandomGenerator.src/
|
190
|
-
onclick="popupCode('RandomGenerator.src/
|
189
|
+
<a href="RandomGenerator.src/M000055.html" target="Code" class="method-signature"
|
190
|
+
onclick="popupCode('RandomGenerator.src/M000055.html');return false;">
|
191
191
|
<span class="method-name">bytes</span><span class="method-args">(count)</span>
|
192
192
|
</a>
|
193
193
|
</div>
|
@@ -199,12 +199,12 @@ Generate a single String with random binary garbage in it.
|
|
199
199
|
</div>
|
200
200
|
</div>
|
201
201
|
|
202
|
-
<div id="method-
|
203
|
-
<a name="
|
202
|
+
<div id="method-M000058" class="method-detail">
|
203
|
+
<a name="M000058"></a>
|
204
204
|
|
205
205
|
<div class="method-heading">
|
206
|
-
<a href="RandomGenerator.src/
|
207
|
-
onclick="popupCode('RandomGenerator.src/
|
206
|
+
<a href="RandomGenerator.src/M000058.html" target="Code" class="method-signature"
|
207
|
+
onclick="popupCode('RandomGenerator.src/M000058.html');return false;">
|
208
208
|
<span class="method-name">floats</span><span class="method-args">(count)</span>
|
209
209
|
</a>
|
210
210
|
</div>
|
@@ -216,12 +216,12 @@ An array for random floats.
|
|
216
216
|
</div>
|
217
217
|
</div>
|
218
218
|
|
219
|
-
<div id="method-
|
220
|
-
<a name="
|
219
|
+
<div id="method-M000048" class="method-detail">
|
220
|
+
<a name="M000048"></a>
|
221
221
|
|
222
222
|
<div class="method-heading">
|
223
|
-
<a href="RandomGenerator.src/
|
224
|
-
onclick="popupCode('RandomGenerator.src/
|
223
|
+
<a href="RandomGenerator.src/M000048.html" target="Code" class="method-signature"
|
224
|
+
onclick="popupCode('RandomGenerator.src/M000048.html');return false;">
|
225
225
|
<span class="method-name">hash_of</span><span class="method-args">(count,length=5,type=@type)</span>
|
226
226
|
</a>
|
227
227
|
</div>
|
@@ -230,12 +230,12 @@ An array for random floats.
|
|
230
230
|
<p>
|
231
231
|
Returns a random hash of type (default :words) where the key=>value is
|
232
232
|
randomly generated. This is aliased for <a
|
233
|
-
href="RandomGenerator.html#
|
234
|
-
href="RandomGenerator.html#
|
233
|
+
href="RandomGenerator.html#M000049">RandomGenerator.queries</a> and <a
|
234
|
+
href="RandomGenerator.html#M000050">RandomGenerator.headers</a> so that it
|
235
235
|
is more readable.
|
236
236
|
</p>
|
237
237
|
<dl>
|
238
|
-
<dt>:words,:base64,:uris,:<a href="RandomGenerator.html#
|
238
|
+
<dt>:words,:base64,:uris,:<a href="RandomGenerator.html#M000054">byte_array</a>,:ints,:floats</dt><dd>are the available
|
239
239
|
|
240
240
|
</dd>
|
241
241
|
</dl>
|
@@ -246,8 +246,8 @@ translate to function calls on self.send(type,length).
|
|
246
246
|
</div>
|
247
247
|
</div>
|
248
248
|
|
249
|
-
<div id="method-
|
250
|
-
<a name="
|
249
|
+
<div id="method-M000050" class="method-detail">
|
250
|
+
<a name="M000050"></a>
|
251
251
|
|
252
252
|
<div class="method-heading">
|
253
253
|
<span class="method-name">headers</span><span class="method-args">(count,length=5,type=@type)</span>
|
@@ -255,17 +255,17 @@ translate to function calls on self.send(type,length).
|
|
255
255
|
|
256
256
|
<div class="method-description">
|
257
257
|
<p>
|
258
|
-
Alias for <a href="RandomGenerator.html#
|
258
|
+
Alias for <a href="RandomGenerator.html#M000048">hash_of</a>
|
259
259
|
</p>
|
260
260
|
</div>
|
261
261
|
</div>
|
262
262
|
|
263
|
-
<div id="method-
|
264
|
-
<a name="
|
263
|
+
<div id="method-M000057" class="method-detail">
|
264
|
+
<a name="M000057"></a>
|
265
265
|
|
266
266
|
<div class="method-heading">
|
267
|
-
<a href="RandomGenerator.src/
|
268
|
-
onclick="popupCode('RandomGenerator.src/
|
267
|
+
<a href="RandomGenerator.src/M000057.html" target="Code" class="method-signature"
|
268
|
+
onclick="popupCode('RandomGenerator.src/M000057.html');return false;">
|
269
269
|
<span class="method-name">ints</span><span class="method-args">(count, max = nil)</span>
|
270
270
|
</a>
|
271
271
|
</div>
|
@@ -279,12 +279,12 @@ tests should run the same on all platforms).
|
|
279
279
|
</div>
|
280
280
|
</div>
|
281
281
|
|
282
|
-
<div id="method-
|
283
|
-
<a name="
|
282
|
+
<div id="method-M000056" class="method-detail">
|
283
|
+
<a name="M000056"></a>
|
284
284
|
|
285
285
|
<div class="method-heading">
|
286
|
-
<a href="RandomGenerator.src/
|
287
|
-
onclick="popupCode('RandomGenerator.src/
|
286
|
+
<a href="RandomGenerator.src/M000056.html" target="Code" class="method-signature"
|
287
|
+
onclick="popupCode('RandomGenerator.src/M000056.html');return false;">
|
288
288
|
<span class="method-name">num</span><span class="method-args">(max)</span>
|
289
289
|
</a>
|
290
290
|
</div>
|
@@ -296,8 +296,8 @@ A random number with a maximum of max.
|
|
296
296
|
</div>
|
297
297
|
</div>
|
298
298
|
|
299
|
-
<div id="method-
|
300
|
-
<a name="
|
299
|
+
<div id="method-M000049" class="method-detail">
|
300
|
+
<a name="M000049"></a>
|
301
301
|
|
302
302
|
<div class="method-heading">
|
303
303
|
<span class="method-name">queries</span><span class="method-args">(count,length=5,type=@type)</span>
|
@@ -305,17 +305,17 @@ A random number with a maximum of max.
|
|
305
305
|
|
306
306
|
<div class="method-description">
|
307
307
|
<p>
|
308
|
-
Alias for <a href="RandomGenerator.html#
|
308
|
+
Alias for <a href="RandomGenerator.html#M000048">hash_of</a>
|
309
309
|
</p>
|
310
310
|
</div>
|
311
311
|
</div>
|
312
312
|
|
313
|
-
<div id="method-
|
314
|
-
<a name="
|
313
|
+
<div id="method-M000051" class="method-detail">
|
314
|
+
<a name="M000051"></a>
|
315
315
|
|
316
316
|
<div class="method-heading">
|
317
|
-
<a href="RandomGenerator.src/
|
318
|
-
onclick="popupCode('RandomGenerator.src/
|
317
|
+
<a href="RandomGenerator.src/M000051.html" target="Code" class="method-signature"
|
318
|
+
onclick="popupCode('RandomGenerator.src/M000051.html');return false;">
|
319
319
|
<span class="method-name">uris</span><span class="method-args">(count,length=100)</span>
|
320
320
|
</a>
|
321
321
|
</div>
|
@@ -329,12 +329,12 @@ gigantor URI. The URI starts with /.
|
|
329
329
|
</div>
|
330
330
|
</div>
|
331
331
|
|
332
|
-
<div id="method-
|
333
|
-
<a name="
|
332
|
+
<div id="method-M000052" class="method-detail">
|
333
|
+
<a name="M000052"></a>
|
334
334
|
|
335
335
|
<div class="method-heading">
|
336
|
-
<a href="RandomGenerator.src/
|
337
|
-
onclick="popupCode('RandomGenerator.src/
|
336
|
+
<a href="RandomGenerator.src/M000052.html" target="Code" class="method-signature"
|
337
|
+
onclick="popupCode('RandomGenerator.src/M000052.html');return false;">
|
338
338
|
<span class="method-name">words</span><span class="method-args">(count=1)</span>
|
339
339
|
</a>
|
340
340
|
</div>
|