Permalink
Browse files

Default host is now ‘auto’ for ssh connections

  • Loading branch information...
1 parent fe63312 commit 310b38cbccc0a59351bb245e055c8ca6e63aaecc @jstjohn jstjohn committed with sorbits Sep 4, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 rmate
View
4 rmate
@@ -15,7 +15,7 @@ class Settings
attr_accessor :host, :port, :wait, :force, :verbose
def initialize
- @host, @port = 'localhost', 52698
+ @host, @port = 'auto', 52698
@host = ENV['RMATE_HOST'].to_s if ENV.has_key? 'RMATE_HOST'
@port = ENV['RMATE_PORT'].to_i if ENV.has_key? 'RMATE_PORT'
@@ -29,6 +29,8 @@ class Settings
if @host == 'auto' and (conn = ENV['SSH_CONNECTION'])
@host = conn.split(' ').first
+ else
+ @host = 'localhost'
end
end

0 comments on commit 310b38c

Please sign in to comment.