From c373e232e7e8fbe6697cd2d8daf32e7c8254a028 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Tue, 8 Oct 2024 17:14:11 -0700 Subject: [PATCH] Use RDF::Util::File.open_file instead of Kernel.open in suite_helper. --- spec/suite_helper.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/spec/suite_helper.rb b/spec/suite_helper.rb index d448473..fd553d6 100644 --- a/spec/suite_helper.rb +++ b/spec/suite_helper.rb @@ -25,13 +25,6 @@ class << self # @yield [IO] File stream def self.open_file(filename_or_url, **options, &block) case - when filename_or_url.to_s =~ /^file:/ - path = RDF::URI(filename_or_url).path - if path.match?(/^\/[A-Za-z]:/) && Gem.win_platform? - # Turns "/D:foo" into "D:foo" - path = path[1..-1] - end - Kernel.open(path.to_s, &block) when filename_or_url.to_s =~ %r{http://www.w3.org/ns/csvw/?} ::File.open(::File.expand_path("../../etc/csvw.jsonld", __FILE__), &block) when filename_or_url.to_s == "http://www.w3.org/.well-known/csvm"