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

Version Path
fog-core-1.21.1 lib/fog/identity.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/identity.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/identity.rb
fog-core-1.21.0 lib/fog/identity.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/identity.rb
fog-1.20.0 lib/fog/identity.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/identity.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/identity.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/identity.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/identity.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/identity.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/identity.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/identity.rb
fog-1.19.0 lib/fog/identity.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/identity.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/identity.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/identity.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/identity.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/identity.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/identity.rb