cloudfiles 1.5.0.2 → 1.5.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
48
48
  s.homepage = %q{http://www.rackspacecloud.com/cloud_hosting_products/files}
49
49
  s.rdoc_options = ["--charset=UTF-8"]
50
50
  s.require_paths = ["lib"]
51
- s.rubygems_version = %q{1.5.0.2}
51
+ s.rubygems_version = %q{1.5.0.3}
52
52
  s.summary = %q{A Ruby API into Rackspace Cloud Files}
53
53
  s.test_files = [
54
54
  "test/cf-testunit.rb",
@@ -37,7 +37,7 @@ class ChunkedConnectionWrapper
37
37
  @file = data
38
38
  end
39
39
 
40
- def read(foo)
40
+ def read(foo=nil)
41
41
  @file.read(@size)
42
42
  end
43
43
 
@@ -1,3 +1,3 @@
1
1
  module CloudFiles
2
- VERSION = '1.5.0.2'
2
+ VERSION = '1.5.0.3'
3
3
  end
@@ -17,7 +17,7 @@ class SwiftClientTest < Test::Unit::TestCase
17
17
  assert_equal "foobar 404", foo.to_s
18
18
  end
19
19
 
20
- def test_chunked_connection_wrapper
20
+ def test_chunked_connection_wrapper_with_read_argument
21
21
  file = mock("File")
22
22
  file.stubs(:read).returns("this ", "is so", "me da", "ta!", "")
23
23
  file.stubs(:eof?).returns(true)
@@ -31,6 +31,20 @@ class SwiftClientTest < Test::Unit::TestCase
31
31
  assert_equal true, chunk.eof!
32
32
  end
33
33
 
34
+ def test_chunked_connection_wrapper_without_read_argument
35
+ file = mock("File")
36
+ file.stubs(:read).returns("this ", "is so", "me da", "ta!", "")
37
+ file.stubs(:eof?).returns(true)
38
+ file.stubs(:eof!).returns(true)
39
+ chunk = ChunkedConnectionWrapper.new(file, 5)
40
+ assert_equal "this ", chunk.read
41
+ assert_equal "is so", chunk.read
42
+ assert_equal "me da", chunk.read
43
+ assert_equal "ta!", chunk.read
44
+ assert_equal true, chunk.eof?
45
+ assert_equal true, chunk.eof!
46
+ end
47
+
34
48
  def test_query
35
49
  query = Query.new("foo=bar&baz=quu")
36
50
  query.add("chunky", "bacon")
@@ -439,15 +439,20 @@ class CloudfilesContainerTest < Test::Unit::TestCase
439
439
  @container.purge_from_cdn
440
440
  end
441
441
  end
442
-
443
- def test_cdn_metadata_fails
442
+
443
+ def test_cdn_metadata_no_container
444
444
  connection = stub(:storagehost => 'test.storage.example', :storagepath => '/dummy/path', :storageport => 443, :storagescheme => 'https', :cdnmgmthost => 'cdm.test.example', :cdnmgmtpath => '/dummy/path', :cdnmgmtport => 443, :cdnmgmtscheme => 'https', :cdn_available? => true, :cdnurl => 'http://foo.test.example/container', :storageurl => 'http://foo.test.example/container', :authtoken => "dummy token")
445
445
  SwiftClient.stubs(:head_container).returns({'x-container-bytes-used' => '0','x-container-object-count' => '0'})
446
- @container = CloudFiles::Container.new(connection, "test_container")
447
- SwiftClient.stubs(:head_container).raises(ClientException.new("test_cdn_metadata_fails", :http_status => 404))
448
- assert_raise(CloudFiles::Exception::NoSuchContainer) do
449
- @container.cdn_metadata
450
- end
446
+ @container = CloudFiles::Container.new(connection, "test_container")
447
+ SwiftClient.stubs(:head_container).raises(ClientException.new("test_cdn_metadata_fails", :http_status => 404))
448
+ assert_equal @container.cdn_metadata, {
449
+ :cdn_enabled => false,
450
+ :cdn_ttl => nil,
451
+ :cdn_url => nil,
452
+ :cdn_ssl_url => nil,
453
+ :cdn_streaming_url => nil,
454
+ :cdn_log => false
455
+ }
451
456
  end
452
457
 
453
458
  def test_cdn_metadata_no_cdn
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudfiles
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.2
4
+ version: 1.5.0.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - H. Wade Minter
@@ -9,11 +10,12 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-05-20 00:00:00.000000000 Z
13
+ date: 2013-11-12 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: json
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
20
  - - ! '>='
19
21
  - !ruby/object:Gem::Version
@@ -21,6 +23,7 @@ dependencies:
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
28
  - - ! '>='
26
29
  - !ruby/object:Gem::Version
@@ -28,6 +31,7 @@ dependencies:
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: mocha
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
36
  - - ~>
33
37
  - !ruby/object:Gem::Version
@@ -35,6 +39,7 @@ dependencies:
35
39
  type: :development
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
44
  - - ~>
40
45
  - !ruby/object:Gem::Version
@@ -73,7 +78,6 @@ files:
73
78
  - test/test_helper.rb
74
79
  homepage: http://www.rackspacecloud.com/cloud_hosting_products/files
75
80
  licenses: []
76
- metadata: {}
77
81
  post_install_message: ! "\n**** PLEASE NOTE **********************************************************************************************\n\n
78
82
  \ cloudfiles has been deprecated. Please consider using fog (http://github.com/fog/fog)
79
83
  for all new projects. \n \n***************************************************************************************************************\n\n"
@@ -82,18 +86,20 @@ rdoc_options:
82
86
  require_paths:
83
87
  - lib
84
88
  required_ruby_version: !ruby/object:Gem::Requirement
89
+ none: false
85
90
  requirements:
86
91
  - - ! '>='
87
92
  - !ruby/object:Gem::Version
88
93
  version: '0'
89
94
  required_rubygems_version: !ruby/object:Gem::Requirement
95
+ none: false
90
96
  requirements:
91
97
  - - ! '>='
92
98
  - !ruby/object:Gem::Version
93
99
  version: '0'
94
100
  requirements: []
95
101
  rubyforge_project:
96
- rubygems_version: 2.0.3
102
+ rubygems_version: 1.8.23
97
103
  signing_key:
98
104
  specification_version: 3
99
105
  summary: A Ruby API into Rackspace Cloud Files
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTM2NDk2NjY5ZWIwMDQzNzFiOWY4N2JlNDNlZGFmYTlkMzJiZDRlOQ==
5
- data.tar.gz: !binary |-
6
- MTZkODJjMzA4NmNkMDRlNzc4NGExYjA4MDdjNzNlNDI4MDgwNTk4Nw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- ZDk4MjY4OWI4ZDFlNThiN2NiMWM4MmM0OGM1N2RmZDYyMzI5MDJmZTdjYWRi
10
- YjkwMmYxNzc1MmZiM2YyOWMwY2QzOTFhMjM2NzkzOWZhMzhlNjJkMjdkOWZm
11
- NjhlNDNiMTAyODAyNjk0ZDQwNDdhNWE4YzEwNTFmZTNkZWJmNjA=
12
- data.tar.gz: !binary |-
13
- NWU4NzVmMzQ3M2M2YjA2OGQ5ODcwMjBjMDU4ODNmNzdhNjUxZGJkODRlMWZi
14
- MTNmZWE3NzQ5OGQxODVmNDVmZmI4MmNlOWE2MGVjNjU2OGMyNWVhNDBmMmEy
15
- Y2Y2N2JkMzlhZmFkM2E1ZDcwMGUwMmM3NjI4MmE4NjljNTg0MDU=