From 54b3f8574a6a12c8be5164b379fe6edbde61eb2c Mon Sep 17 00:00:00 2001 From: "Michael R. Fleet" Date: Mon, 10 Aug 2020 18:47:53 -0400 Subject: [PATCH] fix: update thor dependency (#124) Co-authored-by: Lindsey Hattamer Co-authored-by: Lindsey Hattamer --- lib/pact/mock_service/cli.rb | 3 +++ lib/pact/mock_service/cli/custom_thor.rb | 3 +++ lib/pact/mock_service/cli/pidfile.rb | 4 +++- pact-mock_service.gemspec | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/pact/mock_service/cli.rb b/lib/pact/mock_service/cli.rb index 29dfd05..a507d3c 100755 --- a/lib/pact/mock_service/cli.rb +++ b/lib/pact/mock_service/cli.rb @@ -9,6 +9,9 @@ module Pact module MockService class CLI < Thor + def self.exit_on_failure? # Thor 1.0 deprecation guard + false + end PACT_FILE_WRITE_MODE_DESC = "`overwrite` or `merge`. Use `merge` when running multiple mock service instances in parallel for the same consumer/provider pair." + " Ensure the pact file is deleted before running tests when using this option so that interactions deleted from the code are not maintained in the file." diff --git a/lib/pact/mock_service/cli/custom_thor.rb b/lib/pact/mock_service/cli/custom_thor.rb index 7869c02..b18e939 100644 --- a/lib/pact/mock_service/cli/custom_thor.rb +++ b/lib/pact/mock_service/cli/custom_thor.rb @@ -11,6 +11,9 @@ class CLI < Thor # `script --help` to display the help for the default task instead of the command list # class CustomThor < ::Thor + def self.exit_on_failure? # Thor 1.0 deprecation guard + false + end no_commands do def self.start given_args = ARGV, config = {} diff --git a/lib/pact/mock_service/cli/pidfile.rb b/lib/pact/mock_service/cli/pidfile.rb index 07f1a71..fc7b8cc 100644 --- a/lib/pact/mock_service/cli/pidfile.rb +++ b/lib/pact/mock_service/cli/pidfile.rb @@ -3,9 +3,11 @@ module Pact module MockService class CLI < Thor + def self.exit_on_failure? # Thor 1.0 deprecation guard + false + end class Pidfile - attr_accessor :pid_dir, :name, :pid def initialize options diff --git a/pact-mock_service.gemspec b/pact-mock_service.gemspec index c6bb502..b852806 100644 --- a/pact-mock_service.gemspec +++ b/pact-mock_service.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'rack', '~> 2.0' gem.add_runtime_dependency 'rspec', '>=2.14' gem.add_runtime_dependency 'find_a_port', '~> 1.0.1' - gem.add_runtime_dependency 'thor', '~> 0.19' + gem.add_runtime_dependency 'thor', '>= 0.19', '< 2.0' gem.add_runtime_dependency 'json' gem.add_runtime_dependency 'webrick', '~> 1.3' gem.add_runtime_dependency 'term-ansicolor', '~> 1.0'