From bcf7028d37b56d0fd93c165074e0242f9f2ad15d Mon Sep 17 00:00:00 2001 From: jhongturney Date: Tue, 21 May 2024 09:55:05 -0700 Subject: [PATCH 1/2] Update command.rb --- lib/octocatalog-diff/catalog-util/command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/octocatalog-diff/catalog-util/command.rb b/lib/octocatalog-diff/catalog-util/command.rb index 18c936e7..8c87cdf6 100644 --- a/lib/octocatalog-diff/catalog-util/command.rb +++ b/lib/octocatalog-diff/catalog-util/command.rb @@ -91,7 +91,7 @@ def setup facts_terminus = @options.fetch(:facts_terminus, 'yaml') if facts_terminus == 'yaml' cmdline << "--factpath=#{Shellwords.escape(File.join(@compilation_dir, 'var', 'yaml', 'facts'))}" - if @options[:fact_file].is_a?(String) && @options[:fact_file] =~ /.*\.(\w+)$/ + if @options[:fact_file].is_a?(String) && @options[:fact_file] =~ /.*{1,1000}\.(\w+)$/ fact_file = File.join(@compilation_dir, 'var', 'yaml', 'facts', "#{@node}.#{Regexp.last_match(1)}") FileUtils.cp @options[:fact_file], fact_file unless File.file?(fact_file) || @options[:fact_file] == fact_file end From dd2af6383fbf73bacf3b7ec4f8757575991fa872 Mon Sep 17 00:00:00 2001 From: jhongturney Date: Tue, 21 May 2024 09:55:13 -0700 Subject: [PATCH 2/2] Update parallel_spec.rb --- spec/octocatalog-diff/tests/util/parallel_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/octocatalog-diff/tests/util/parallel_spec.rb b/spec/octocatalog-diff/tests/util/parallel_spec.rb index 3cb2a8b7..cf983f6c 100644 --- a/spec/octocatalog-diff/tests/util/parallel_spec.rb +++ b/spec/octocatalog-diff/tests/util/parallel_spec.rb @@ -343,8 +343,8 @@ def two(arg, _logger = nil) expect(two_result.exception).to eq(nil) expect(two_result.output).to match(/^two def \d+$/) - one_time = Regexp.last_match(1).to_i if one_result.output =~ /(\d+)$/ - two_time = Regexp.last_match(1).to_i if two_result.output =~ /(\d+)$/ + one_time = Regexp.last_match(1).to_i if one_result.output =~ /(\d+{1,1000})$/ + two_time = Regexp.last_match(1).to_i if two_result.output =~ /(\d+{1,1000})$/ expect(one_time).to be < two_time end