Sha256: d7b5d032aefd449cba29424d14d2727d060a663169d97026b8b808e3ad7b6b51

Contents?: true

Size: 865 Bytes

Versions: 55

Compression:

Stored size: 865 Bytes

Contents

# encoding: utf-8

Shindo.tests('AWS | url', ["aws"]) do

  @expires = Time.utc(2013,1,1).utc.to_i

  @storage = Fog::Storage.new(
    :provider => 'AWS',
    :aws_access_key_id => '123',
    :aws_secret_access_key => 'abc',
    :region => 'us-east-1'
  )
  
  @file = @storage.directories.new(:key => 'fognonbucket').files.new(:key => 'test.txt')

  if Fog.mock?
    signature = Fog::Storage::AWS.new.signature(nil, nil)
  else
    signature = 'tajHIhKHAdFYsigmzybCpaq8N0Q%3D'
  end

  if RUBY_VERSION > '1.8.7' # ruby 1.8.x doesn't provide hash ordering
    tests('#url w/ response-cache-control').returns(
      "https://fognonbucket.s3.amazonaws.com/test.txt?response-cache-control=No-cache&AWSAccessKeyId=123&Signature=#{signature}&Expires=1356998400"
    ) do
      @file.url(@expires, :query => { 'response-cache-control' => 'No-cache' })
    end
  end

end

Version data entries

55 entries across 55 versions & 3 rubygems

Version Path
fog-1.22.0 tests/aws/models/storage/url_tests.rb
fog-1.21.0 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/aws/models/storage/url_tests.rb
fog-1.20.0 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/aws/models/storage/url_tests.rb
fog-1.19.0 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/aws/models/storage/url_tests.rb