From 7c64584750e64ba9a0030eba82264203247a1032 Mon Sep 17 00:00:00 2001 From: Casey Provost Date: Sat, 21 Mar 2020 16:52:28 -0400 Subject: [PATCH 1/5] fix pry --- lib/guard/jobs/pry_wrapper.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/guard/jobs/pry_wrapper.rb b/lib/guard/jobs/pry_wrapper.rb index ea48ebd61..17d7aa542 100644 --- a/lib/guard/jobs/pry_wrapper.rb +++ b/lib/guard/jobs/pry_wrapper.rb @@ -134,7 +134,12 @@ def _setup(options) Pry.config.should_load_rc = false Pry.config.should_load_local_rc = false history_file_path = options[:history_file] || HISTORY_FILE - Pry.config.history.file = File.expand_path(history_file_path) + + if Pry.respond_to?(:file) + Pry.config.history.file = File.expand_path(history_file_path) + else + Pry.config.history_file = File.expand_path(history_file_path) + end _add_hooks(options) From 880c43a742a58f8f82c9f7792c825d790d920a83 Mon Sep 17 00:00:00 2001 From: Casey Provost Date: Sat, 21 Mar 2020 16:53:50 -0400 Subject: [PATCH 2/5] Update pry_wrapper.rb --- lib/guard/jobs/pry_wrapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guard/jobs/pry_wrapper.rb b/lib/guard/jobs/pry_wrapper.rb index 17d7aa542..47356ee60 100644 --- a/lib/guard/jobs/pry_wrapper.rb +++ b/lib/guard/jobs/pry_wrapper.rb @@ -135,7 +135,7 @@ def _setup(options) Pry.config.should_load_local_rc = false history_file_path = options[:history_file] || HISTORY_FILE - if Pry.respond_to?(:file) + if Pry.config.&history.respond_to?(:file) Pry.config.history.file = File.expand_path(history_file_path) else Pry.config.history_file = File.expand_path(history_file_path) From 977db16ab646f6b74b398cf22f0dba742a16f631 Mon Sep 17 00:00:00 2001 From: Casey Provost Date: Sat, 21 Mar 2020 16:57:30 -0400 Subject: [PATCH 3/5] Update pry_wrapper.rb --- lib/guard/jobs/pry_wrapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guard/jobs/pry_wrapper.rb b/lib/guard/jobs/pry_wrapper.rb index 47356ee60..75f1ebf36 100644 --- a/lib/guard/jobs/pry_wrapper.rb +++ b/lib/guard/jobs/pry_wrapper.rb @@ -135,7 +135,7 @@ def _setup(options) Pry.config.should_load_local_rc = false history_file_path = options[:history_file] || HISTORY_FILE - if Pry.config.&history.respond_to?(:file) + if Pry.config.try(:history).respond_to?(:file) Pry.config.history.file = File.expand_path(history_file_path) else Pry.config.history_file = File.expand_path(history_file_path) From a6e4049d0a2201e4a64e15a6950429d0aacbfcb3 Mon Sep 17 00:00:00 2001 From: Casey Provost Date: Sat, 21 Mar 2020 16:58:58 -0400 Subject: [PATCH 4/5] Update pry_wrapper.rb --- lib/guard/jobs/pry_wrapper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/guard/jobs/pry_wrapper.rb b/lib/guard/jobs/pry_wrapper.rb index 75f1ebf36..298e14d4f 100644 --- a/lib/guard/jobs/pry_wrapper.rb +++ b/lib/guard/jobs/pry_wrapper.rb @@ -135,10 +135,10 @@ def _setup(options) Pry.config.should_load_local_rc = false history_file_path = options[:history_file] || HISTORY_FILE - if Pry.config.try(:history).respond_to?(:file) - Pry.config.history.file = File.expand_path(history_file_path) - else + if Pry.config.respond_to?(:history_file) Pry.config.history_file = File.expand_path(history_file_path) + else + Pry.config.history.file = File.expand_path(history_file_path) end _add_hooks(options) From 7d81307d2d2cb9f4809015a8431d0aa126742f85 Mon Sep 17 00:00:00 2001 From: Casey Provost Date: Mon, 23 Mar 2020 11:32:35 -0400 Subject: [PATCH 5/5] fix whitespace --- lib/guard/jobs/pry_wrapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/guard/jobs/pry_wrapper.rb b/lib/guard/jobs/pry_wrapper.rb index 298e14d4f..a6eb9397c 100644 --- a/lib/guard/jobs/pry_wrapper.rb +++ b/lib/guard/jobs/pry_wrapper.rb @@ -134,7 +134,7 @@ def _setup(options) Pry.config.should_load_rc = false Pry.config.should_load_local_rc = false history_file_path = options[:history_file] || HISTORY_FILE - + if Pry.config.respond_to?(:history_file) Pry.config.history_file = File.expand_path(history_file_path) else