Sha256: 7e8ed550ba363a3c8fdb35c3846af3970e4603e01ba35293c1ec77ea7ede37af

Contents?: true

Size: 863 Bytes

Versions: 13

Compression:

Stored size: 863 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

13 entries across 13 versions & 3 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/aws/models/storage/url_tests.rb
fog-1.24.0 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.11 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.10 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.9 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.8 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.7 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.6 tests/aws/models/storage/url_tests.rb
fog-1.23.0 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.4 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.3 tests/aws/models/storage/url_tests.rb
ns-fog-1.22.2 tests/aws/models/storage/url_tests.rb
fog-1.22.1 tests/aws/models/storage/url_tests.rb