Sha256: 2b52daa18aed98edd0374f12347fd80c25a5b7b3ce032c3b075fb8538f432308
Contents?: true
Size: 749 Bytes
Versions: 61
Compression:
Stored size: 749 Bytes
Contents
module Fog module Identity def self.[](provider) self.new(:provider => provider) end def self.new(attributes) attributes = attributes.dup # Prevent delete from having side effects case provider = attributes.delete(:provider).to_s.downcase.to_sym when :rackspace require 'fog/rackspace/identity' Fog::Rackspace::Identity.new(attributes) else if self.providers.include?(provider) require "fog/#{provider}/identity" return Fog::Identity.const_get(Fog.providers[provider]).new(attributes) end raise ArgumentError.new("#{provider} has no identity service") end end def self.providers Fog.services[:identity] end end end
Version data entries
61 entries across 61 versions & 7 rubygems