From ef2cc0278dac1779448668f9c83cdd308bf09e68 Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Tue, 30 Apr 2024 16:05:05 -0400 Subject: [PATCH] Fix local spec failures on ruby 3 --- lib/linux_admin/registration_system.rb | 3 ++- spec/spec_helper.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/linux_admin/registration_system.rb b/lib/linux_admin/registration_system.rb index 55d7612f..975c60de 100644 --- a/lib/linux_admin/registration_system.rb +++ b/lib/linux_admin/registration_system.rb @@ -47,7 +47,8 @@ def self.white_list_methods private_class_method :white_list_methods def install_server_certificate(server, cert_path) - host = server.start_with?("http") ? URI.parse(server).host : server + require 'uri' + host = server.start_with?("http") ? ::URI.parse(server).host : server LinuxAdmin::Rpm.upgrade("http://#{host}/#{cert_path}") end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index eaecf646..1243e562 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -85,6 +85,7 @@ end end +require 'rspec/support/differ' require 'linux_admin' def etc_issue_contains(contents)