Sha256: 7f7bd8fb5fbfc6db3f7e96decd073f8852e4ac00f201d5f873c5e9e29f534610

Contents?: true

Size: 612 Bytes

Versions: 12

Compression:

Stored size: 612 Bytes

Contents

module GoGrid
  class << self
    if Fog.credentials[:go_grid_api_key] && Fog.credentials[:go_grid_shared_secret]

      def initialized?
        true
      end

      def [](service)
        @@connections ||= Hash.new do |hash, key|
          credentials = Fog.credentials.reject do |k,v|
            ![:go_grid_api_key, :go_grid_shared_secret].include?(k)
          end
          hash[key] = case key
          when :go_grid
            Fog::GoGrid.new(credentials)
          end
        end
        @@connections[service]
      end

    else

      def initialized?
        false
      end

    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/go_grid/bin.rb
fog-0.2.28 lib/fog/go_grid/bin.rb
fog-0.2.27 lib/fog/go_grid/bin.rb
fog-0.2.26 lib/fog/go_grid/bin.rb
fog-0.2.25 lib/fog/go_grid/bin.rb
fog-0.2.24 lib/fog/go_grid/bin.rb
tecnh-fog-0.2.23.vpc lib/fog/go_grid/bin.rb
fog-0.2.23 lib/fog/go_grid/bin.rb
fog-0.2.22 lib/fog/go_grid/bin.rb
fog-0.2.21 lib/fog/go_grid/bin.rb
fog-0.2.20 lib/fog/go_grid/bin.rb
fog-0.2.19 lib/fog/go_grid/bin.rb