Sha256: 30e742cf350463aa964e9cefce331616fda3bd1ec2f6b28f0f12662214968e96

Contents?: true

Size: 527 Bytes

Versions: 82

Compression:

Stored size: 527 Bytes

Contents

module Fog
  module Storage
    class AWS
      class Real

        # Sync clock against S3 to avoid skew errors
        #
        def sync_clock
          response = begin
            get_service
          rescue Excon::Errors::HTTPStatusError => error
            error.response
          end
          Fog::Time.now = Time.parse(response.headers['Date'])
        end

      end # Real

      class Mock # :nodoc:all

        def sync_clock
          true
        end

      end # Mock
    end # Storage
  end # AWS
end # Fog

Version data entries

82 entries across 82 versions & 14 rubygems

Version Path
fog-maestrodev-1.20.0.20140305101839 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/aws/requests/storage/sync_clock.rb
fog-1.20.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/aws/requests/storage/sync_clock.rb
fog-1.19.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/aws/requests/storage/sync_clock.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/aws/requests/storage/sync_clock.rb