diff options
author | luislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9> | 2008-03-31 08:19:11 +0000 |
---|---|---|
committer | luislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9> | 2008-03-31 08:19:11 +0000 |
commit | eda1ea00904dcf4b4e7ed533b327a842713ac11a (patch) | |
tree | bf6e839153592c22c2c2f9b4745b823c0b3db1f0 /test/test_helper.rb | |
parent | 18e93c034db0c08bcc5b5f7a72a8fb6e909c009c (diff) | |
download | unicorn-eda1ea00904dcf4b4e7ed533b327a842713ac11a.tar.gz |
CI tools. Use of #process_based_port as port number. Exclude DirHandler(nil) with absolute paths on Windows. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@999 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 42ead2c..7615fdd 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -64,3 +64,16 @@ def hit(uris) return results end + +# process_based_port provides a port number, usable for TCP and UDP +# connections based on $$ and with a 5000 as base. +# this is required if you perform several builds of mongrel in parallel +# (like continuous integration systems) +def process_based_port + 5000 + $$ % 1000 +end + +# Platform check helper ;-) +def windows? + result = RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/ +end
\ No newline at end of file |