Sha256: 8e4836149c098407d0e8fb868a22472c131d5bc7ed8ddeef5593fa049cf9ce87

Contents?: true

Size: 817 Bytes

Versions: 37

Compression:

Stored size: 817 Bytes

Contents

# encoding: utf-8

Shindo.tests('InternetArchive | url', ["internetarchive"]) do

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

  @storage = Fog::Storage.new(
    :provider => 'InternetArchive',
    :ia_access_key_id => '123',
    :ia_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::InternetArchive.new.signature(nil)
  else
    signature = 'tajHIhKHAdFYsigmzybCpaq8N0Q%3D'
  end

  tests('#url w/ response-cache-control').returns(
    "http://fognonbucket.s3.us.archive.org/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

37 entries across 35 versions & 6 rubygems

Version Path
fog-internet-archive-0.0.2 tests/internet_archive/models/storage/url_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-internet-archive-0.0.1/tests/internet_archive/models/storage/url_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-internet-archive-0.0.1/tests/internet_archive/models/storage/url_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-internet-archive-0.0.1/tests/internet_archive/models/storage/url_tests.rb
fog-1.40.0 tests/internet_archive/models/storage/url_tests.rb
fog-1.39.0 tests/internet_archive/models/storage/url_tests.rb
fog-internet-archive-0.0.1 tests/internet_archive/models/storage/url_tests.rb
fog-1.38.0 tests/internet_archive/models/storage/url_tests.rb
fog-1.37.0 tests/internet_archive/models/storage/url_tests.rb
fog-1.36.0 tests/internet_archive/models/storage/url_tests.rb
fog-1.35.0 tests/internet_archive/models/storage/url_tests.rb
fog-2.0.0.pre.0 tests/internet_archive/models/storage/url_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/internet_archive/models/storage/url_tests.rb
fog-1.34.0 tests/internet_archive/models/storage/url_tests.rb
fog-1.33.0 tests/internet_archive/models/storage/url_tests.rb
fog-1.32.0 tests/internet_archive/models/storage/url_tests.rb
fog-1.31.0 tests/internet_archive/models/storage/url_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/internet_archive/models/storage/url_tests.rb
fog-1.30.0 tests/internet_archive/models/storage/url_tests.rb
fog-1.29.0 tests/internet_archive/models/storage/url_tests.rb