lib/fog/identity/openstack/v3.rb in fog-openstack-0.3.4 vs lib/fog/identity/openstack/v3.rb in fog-openstack-0.3.5

- old
+ new

@@ -140,24 +140,24 @@ version end class Real < Fog::Identity::OpenStack::Real - def initialize(args) - @path_prefix = if args[:no_path_prefix] - '' - else - 'v3' - end + def api_path_prefix + @path_prefix = version_in_path?(@openstack_management_uri.path) ? '' : 'v3' super end def default_path_prefix @path_prefix end def default_service_type %w[identity_v3 identityv3 identity] + end + + def version_in_path?(url) + true if url =~ /\/v3(\/)*.*$/ end end end end end