Skip to content

Commit

Permalink
Fixed vlad.rake to allow TCP or socket
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellekin O. Wolf =8 authored and macournoyer committed Sep 28, 2008
1 parent bcc0891 commit 56c9b3e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions example/vlad.rake
Expand Up @@ -15,7 +15,7 @@ namespace :vlad do
set :thin_log_file, nil
set :thin_pid_file, nil
set :thin_port, nil
set :thin_socket, "/tmp/thin.sock"
set :thin_socket, nil
set :thin_prefix, nil
set :thin_servers, 2
set :thin_user, nil
Expand All @@ -24,10 +24,13 @@ namespace :vlad do
configuration is set via the thin_* variables.".cleanup

remote_task :setup_app, :roles => :app do

raise(ArgumentError, "Please provide either thin_socket or thin_port") if thin_port.nil? && thin_socket.nil?

cmd = [
"#{thin_command} config",
"-s #{thin_servers}",
"-S #{thin_socket}",
("-S #{thin_socket}" if thin_socket),
"-e #{thin_environment}",
"-a #{thin_address}",
"-c #{current_path}",
Expand Down Expand Up @@ -58,4 +61,4 @@ configuration is set via the thin_* variables.".cleanup
remote_task :stop_app, :roles => :app do
run thin("stop -s #{thin_servers}")
end
end
end

0 comments on commit 56c9b3e

Please sign in to comment.