public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Change wording.
Hongli Lai (Phusion) (author)
Tue May 06 02:31:32 -0700 2008
commit  67b8f20bccc43504a8344c68fb78f9d94e0f4878
tree    507ca5e80c799d4f942d44e7b1157bfe8d2a08ee
parent  c214a11e030f92eaaebec60a8323b3b7ffd89476
...
17
18
19
20
 
21
22
23
24
25
 
26
27
28
29
30
 
31
32
33
34
35
 
36
37
38
...
43
44
45
46
 
47
48
49
50
51
 
52
53
54
55
56
 
57
58
59
60
61
 
62
63
64
65
66
 
67
68
69
...
75
76
77
78
 
79
80
81
...
84
85
86
87
 
88
89
90
...
99
100
101
102
 
103
104
105
...
112
113
114
115
 
116
117
118
...
125
126
127
128
 
129
130
131
...
17
18
19
 
20
21
22
23
24
 
25
26
27
28
29
 
30
31
32
33
34
 
35
36
37
38
...
43
44
45
 
46
47
48
49
50
 
51
52
53
54
55
 
56
57
58
59
60
 
61
62
63
64
65
 
66
67
68
69
...
75
76
77
 
78
79
80
81
...
84
85
86
 
87
88
89
90
...
99
100
101
 
102
103
104
105
...
112
113
114
 
115
116
117
118
...
125
126
127
 
128
129
130
131
0
@@ -17,22 +17,22 @@ describe MessageChannel do
0
       @writer_pipe.close unless @writer_pipe.closed?
0
     end
0
     
0
- it "should be able to read a single written array message" do
0
+ it "can read a single written array message" do
0
       @writer.write("hello")
0
       @reader.read.should == ["hello"]
0
     end
0
     
0
- it "should be able to handle array messages that contain spaces" do
0
+ it "can handle array messages that contain spaces" do
0
       @writer.write("hello world", "! ")
0
       @reader.read.should == ["hello world", "! "]
0
     end
0
     
0
- it "should be able to handle array messages that have only a single empty string" do
0
+ it "can handle array messages that have only a single empty string" do
0
       @writer.write("")
0
       @reader.read.should == [""]
0
     end
0
     
0
- it "should be able to handle array messages with empty arguments" do
0
+ it "can handle array messages with empty arguments" do
0
       @writer.write("hello", "", "world")
0
       @reader.read.should == ["hello", "", "world"]
0
       
0
@@ -43,27 +43,27 @@ describe MessageChannel do
0
       @reader.read.should == ["", "foo"]
0
     end
0
     
0
- it "should properly detect end-of-file when reading an array message" do
0
+ it "properly detects end-of-file when reading an array message" do
0
       @writer.close
0
       @reader.read.should be_nil
0
     end
0
     
0
- it "should be able to read a single written scalar message" do
0
+ it "can read a single written scalar message" do
0
       @writer.write_scalar("hello world")
0
       @reader.read_scalar.should == "hello world"
0
     end
0
     
0
- it "should be able to handle empty scalar messages" do
0
+ it "can handle empty scalar messages" do
0
       @writer.write_scalar("")
0
       @reader.read_scalar.should == ""
0
     end
0
     
0
- it "should properly detect end-of-file when reading a scalar message" do
0
+ it "properly detects end-of-file when reading a scalar message" do
0
       @writer.close
0
       @reader.read_scalar.should be_nil
0
     end
0
     
0
- it "should raise SecurityError when a received scalar message's size is larger than a specified maximum" do
0
+ it "raises SecurityError when a received scalar message's size is larger than a specified maximum" do
0
       @writer.write_scalar(" " * 100)
0
       lambda { @reader.read_scalar(99) }.should raise_error(SecurityError)
0
     end
0
@@ -75,7 +75,7 @@ describe MessageChannel do
0
       Process.waitpid(@pid) rescue nil
0
     end
0
     
0
- it "both processes should be able to read and write a single array message" do
0
+ it "both processes can read and write a single array message" do
0
       spawn_process do
0
         x = @channel.read
0
         @channel.write("#{x}!")
0
@@ -84,7 +84,7 @@ describe MessageChannel do
0
       @channel.read.should == ["hello!"]
0
     end
0
     
0
- it "should be able to handle scalar messages with arbitrary binary data" do
0
+ it "can handle scalar messages with arbitrary binary data" do
0
       garbage_files = ["garbage1.dat", "garbage2.dat", "garbage3.dat"]
0
       spawn_process do
0
         garbage_files.each do |name|
0
@@ -99,7 +99,7 @@ describe MessageChannel do
0
       end
0
     end
0
     
0
- it "should support IO object (file descriptor) passing" do
0
+ it "supports IO object (file descriptor) passing" do
0
       spawn_process do
0
         writer = @channel.recv_io
0
         writer.write("it works")
0
@@ -112,7 +112,7 @@ describe MessageChannel do
0
       reader.close
0
     end
0
     
0
- it "should support large amounts of data" do
0
+ it "supports large amounts of data" do
0
       iterations = 1000
0
       blob = "123" * 1024
0
       spawn_process do
0
@@ -125,7 +125,7 @@ describe MessageChannel do
0
       end
0
     end
0
     
0
- it "should have stream properties" do
0
+ it "has stream properties" do
0
       garbage = File.read("stub/garbage1.dat")
0
       spawn_process do
0
         @channel.write("hello", "world")
...
1
2
 
3
4
5
6
7
8
9
 
10
11
12
...
1
 
2
3
4
5
6
7
8
 
9
10
11
12
0
@@ -1,12 +1,12 @@
0
 shared_examples_for "a minimal spawner" do
0
- it "should be able to spawn our stub application" do
0
+ it "can spawn our stub application" do
0
     app = spawn_arbitrary_application
0
     app.pid.should_not == 0
0
     app.app_root.should_not be_nil
0
     app.close
0
   end
0
   
0
- it "should be able to spawn an arbitary number of applications" do
0
+ it "can spawn an arbitary number of applications" do
0
     last_pid = 0
0
     4.times do
0
       app = spawn_arbitrary_application
...
4
5
6
7
 
8
9
10
11
12
13
 
14
15
16
...
4
5
6
 
7
8
9
10
11
12
 
13
14
15
16
0
@@ -4,13 +4,13 @@ require 'abstract_server_spec'
0
 shared_examples_for "a spawn server" do
0
   it_should_behave_like "AbstractServer"
0
   
0
- it "should raise an AbstractServer::ServerError if the server was killed" do
0
+ it "raises an AbstractServer::ServerError if the server was killed" do
0
     Process.kill('SIGABRT', @spawner.server_pid)
0
     spawning = lambda { spawn_arbitrary_application }
0
     spawning.should raise_error(AbstractServer::ServerError)
0
   end
0
   
0
- it "should work correctly after a restart, if something went wrong" do
0
+ it "works correctly after a restart, if something went wrong" do
0
     Process.kill('SIGABRT', @spawner.server_pid)
0
     spawning = lambda { spawn_arbitrary_application }
0
     spawning.should raise_error(AbstractServer::ServerError)

Comments

    No one has commented yet.