From abdc4c36eefe6b9c70aa176078e8c50f1a828c3c Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Sun, 30 Oct 2022 21:05:42 +0200 Subject: [PATCH] Fix compatibility with rubytest 0.5+ Since rubytest 0.5, `Test::Runner.cli` gets removed, which breaks the lemons command line utility: ``` lib/lemon/cli.rb:28:in `cli': undefined method `cli' for Test::Runner:Class (NoMethodError) ``` As the CLI functionality was split off as `rubytest-cli`, let's depend on it instead and adapt to the new method name. Since the original test folder is no longer present now with lemon 0.9+, I can at least verify that lemons runs successfully with rubytest 0.7.0 + rubytest-cli 0.1.0 after this change. --- .index | 2 +- Indexfile | 2 +- lib/lemon/cli.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.index b/.index index 6f37098..aff24f2 100644 --- a/.index +++ b/.index @@ -10,7 +10,7 @@ copyrights: year: '2009' license: BSD-2-Clause requirements: -- name: rubytest +- name: rubytest-cli - name: ae - name: ansi version: 1.3+ diff --git a/Indexfile b/Indexfile index a89d690..dba5fb5 100644 --- a/Indexfile +++ b/Indexfile @@ -15,7 +15,7 @@ resources: bugs: http://github.com/rubyworks/lemon/issues requirements: - - rubytest + - rubytest-cli - ae - ansi 1.3+ - detroit (build) diff --git a/lib/lemon/cli.rb b/lib/lemon/cli.rb index 708f26e..f1695bb 100644 --- a/lib/lemon/cli.rb +++ b/lib/lemon/cli.rb @@ -24,8 +24,8 @@ def self.cli(*argv) case cmd when 't', 'test', 'run' require 'lemon' - require 'rubytest' - Test::Runner.cli(*ARGV) + require 'rubytest-cli' + Test::CLI.new(ARGV) #Lemon::CLI::Test.new.run(argv) when 'g', 'gen', 'generate', 'generator' Lemon::CLI::Generate.run(argv)