From 63a73887fd558bf552316e5bed22c87aea88ce0c Mon Sep 17 00:00:00 2001 From: Calvin Wong Loi Sing Date: Wed, 17 May 2017 10:30:22 +0200 Subject: [PATCH 1/2] Make the default host and port settable via an environment variable --- lib/pry-remote.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pry-remote.rb b/lib/pry-remote.rb index 4a1ec35..cf8b418 100644 --- a/lib/pry-remote.rb +++ b/lib/pry-remote.rb @@ -5,8 +5,8 @@ require 'open3' module PryRemote - DefaultHost = "127.0.0.1" - DefaultPort = 9876 + DefaultHost = ENV['PRY_REMOTE_HOST'] || "127.0.0.1" + DefaultPort = ENV['PRY_REMOTE_PORT'] || 9876 # A class to represent an input object created from DRb. This is used because # Pry checks for arity to know if a prompt should be passed to the object. From 5cfe7aa93ee076c4e51d412f0e12ff09a94d6239 Mon Sep 17 00:00:00 2001 From: Calvin Wong Loi Sing Date: Fri, 19 May 2017 11:19:28 +0200 Subject: [PATCH 2/2] Change the name of the environment variable to be more descriptive --- lib/pry-remote.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pry-remote.rb b/lib/pry-remote.rb index cf8b418..3bcf288 100644 --- a/lib/pry-remote.rb +++ b/lib/pry-remote.rb @@ -5,8 +5,8 @@ require 'open3' module PryRemote - DefaultHost = ENV['PRY_REMOTE_HOST'] || "127.0.0.1" - DefaultPort = ENV['PRY_REMOTE_PORT'] || 9876 + DefaultHost = ENV['PRY_REMOTE_DEFAULT_HOST'] || "127.0.0.1" + DefaultPort = ENV['PRY_REMOTE_DEFAULT_PORT'] || 9876 # A class to represent an input object created from DRb. This is used because # Pry checks for arity to know if a prompt should be passed to the object.