Sha256: e9e5bf0593f99854a6c734da56ce54c01a029f50bdad968e2da35e92fae3ea57

Contents?: true

Size: 773 Bytes

Versions: 20

Compression:

Stored size: 773 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)
  else
    signature = 'tajHIhKHAdFYsigmzybCpaq8N0Q%3D'
  end

  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

Version data entries

20 entries across 20 versions & 9 rubygems

Version Path
hpfog-0.0.20 tests/aws/models/storage/url_tests.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/tests/aws/models/storage/url_tests.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/tests/aws/models/storage/url_tests.rb
fog-nirvanix-1.8.2 tests/aws/models/storage/url_tests.rb
fog-nirvanix-1.8.1 tests/aws/models/storage/url_tests.rb
fog-1.10.1 tests/aws/models/storage/url_tests.rb
fog-parser-fix-1.6.1 tests/aws/models/storage/url_tests.rb
fog-test-again-1.6.0 tests/aws/models/storage/url_tests.rb
fog-test-me-1.10.0 tests/aws/models/storage/url_tests.rb
fog-parser-fix-1.6.0 tests/aws/models/storage/url_tests.rb
fog-1.10.0 tests/aws/models/storage/url_tests.rb
fog-1.9.0 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.8.0.20130114204828 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.8.0.20130111070250 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.8.0.20130109172219 tests/aws/models/storage/url_tests.rb
fog-sgonyea-1.8.1 tests/aws/models/storage/url_tests.rb
fog-1.8.0 tests/aws/models/storage/url_tests.rb
fog-maestrodev-1.7.0.20121114190951 tests/aws/models/storage/url_tests.rb
fog-1.7.0 tests/aws/models/storage/url_tests.rb
fog-1.6.0 tests/aws/models/storage/url_tests.rb