From 21f9fd2fd6089ec3cb229e4d8b1fc9d42c7ee845 Mon Sep 17 00:00:00 2001 From: Daniel Badde <19553316+badde-media@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:54:05 +0300 Subject: [PATCH] Update token.rb Trying to fix this error (https://github.com/fog/fog-openstack/issues/535) by changing the input to_s before trying to match it with the regex --- lib/fog/openstack/auth/token.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/openstack/auth/token.rb b/lib/fog/openstack/auth/token.rb index d8e2cec76..0c33798da 100644 --- a/lib/fog/openstack/auth/token.rb +++ b/lib/fog/openstack/auth/token.rb @@ -14,7 +14,7 @@ class StandardError < RuntimeError; end class URLError < RuntimeError; end def self.build(auth, options) - if auth[:openstack_identity_api_version] =~ /(v)*2(\.0)*/i || + if auth[:openstack_identity_api_version].to_s =~ /(v)*2(\.0)*/i || auth[:openstack_tenant_id] || auth[:openstack_tenant] Fog::OpenStack::Auth::Token::V2.new(auth, options) else