| 1 |
module Extensions |
| 2 |
class Mongrel < Base |
| 3 |
|
| 4 |
|
| 5 |
def self.sensitivity |
| 6 |
1 |
| 7 |
end |
| 8 |
|
| 9 |
def start(handle) |
| 10 |
@port = find_free_port |
| 11 |
|
| 12 |
|
| 13 |
@root_path = "/Users/andreas/ruby/tools/dynablaster/extra/test_app" |
| 14 |
@pid_path = @root_path + "/tmp/pids/mongrel.#{@port}.pid" |
| 15 |
`/usr/bin/env mongrel_rails start -p #{@port} -e development -d -c #{@root_path} -P #{@pid_path}` |
| 16 |
end |
| 17 |
|
| 18 |
def restart |
| 19 |
`/usr/bin/env mongrel_rails restart -P #{@pid_path}` |
| 20 |
end |
| 21 |
|
| 22 |
def stop |
| 23 |
`/usr/bin/env mongrel_rails stop -P #{@pid_path}` |
| 24 |
end |
| 25 |
|
| 26 |
def port |
| 27 |
@port |
| 28 |
end |
| 29 |
|
| 30 |
end |
| 31 |
end |