Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support RMATE_{HOST,PORT}.

This allows setting the default host/port as environment variables and additionally, if the server accepts environment variables from the connecting client, solves the problem where multiple clients connects to the same account (e.g. same user on different machines).
  • Loading branch information...
commit a7929a2f9e56a5c6e63a8761663f33ce9383f01a 1 parent 49c305b
Allan Odgaard sorbits authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 rmate
5 rmate
View
@@ -3,7 +3,7 @@ require 'optparse'
require 'socket'
require 'fileutils'
-VERSION_STRING = 'rmate version 1.2 (2011-01-23)'
+VERSION_STRING = 'rmate version 1.3 (2011-10-18)'
class Settings
attr_accessor :host, :port, :wait, :force, :verbose
@@ -15,6 +15,9 @@ class Settings
@host = conn.split(' ').first
end
+ @host = ENV['RMATE_HOST'].to_s if ENV.has_key? 'RMATE_HOST'
+ @port = ENV['RMATE_PORT'].to_i if ENV.has_key? 'RMATE_PORT'
+
@wait = false
@force = false
@verbose = false
Please sign in to comment.
Something went wrong with that request. Please try again.