cloudfiles 1.4.5 → 1.4.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.5
1
+ 1.4.6
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cloudfiles}
8
- s.version = "1.4.5"
8
+ s.version = "1.4.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["H. Wade Minter", "Rackspace Hosting"]
12
- s.date = %q{2010-02-02}
12
+ s.date = %q{2010-02-12}
13
13
  s.description = %q{A Ruby version of the Rackspace Cloud Files API.}
14
14
  s.email = %q{wade.minter@rackspace.com}
15
15
  s.extra_rdoc_files = [
@@ -63,7 +63,7 @@ module CloudFiles
63
63
  def populate
64
64
  # Get the size and object count
65
65
  response = self.connection.cfreq("HEAD",@storagehost,@storagepath+"/",@storageport,@storagescheme)
66
- raise NoSuchContainerException, "Container #{@name} does not exist" unless (response.code == "204")
66
+ raise NoSuchContainerException, "Container #{@name} does not exist" unless (response.code =~ /^20/)
67
67
  @bytes = response["x-container-bytes-used"].to_i
68
68
  @count = response["x-container-object-count"].to_i
69
69
 
@@ -213,7 +213,7 @@ module CloudFiles
213
213
  # => false
214
214
  def object_exists?(objectname)
215
215
  response = self.connection.cfreq("HEAD",@storagehost,"#{@storagepath}/#{URI.encode(objectname).gsub(/&/,'%26')}",@storageport,@storagescheme)
216
- return (response.code == "204")? true : false
216
+ return (response.code =~ /^20/)? true : false
217
217
  end
218
218
 
219
219
  # Creates a new CloudFiles::StorageObject in the current container.
@@ -239,7 +239,7 @@ module CloudFiles
239
239
  def delete_object(objectname)
240
240
  response = self.connection.cfreq("DELETE",@storagehost,"#{@storagepath}/#{URI.encode(objectname).gsub(/&/,'%26')}",@storageport,@storagescheme)
241
241
  raise NoSuchObjectException, "Object #{objectname} does not exist" if (response.code == "404")
242
- raise InvalidResponseException, "Invalid response code #{response.code}" unless (response.code == "204")
242
+ raise InvalidResponseException, "Invalid response code #{response.code}" unless (response.code =~ /^20/)
243
243
  true
244
244
  end
245
245
 
@@ -47,7 +47,7 @@ module CloudFiles
47
47
  # class is initialized, but it can be called again if the data needs to be updated.
48
48
  def populate
49
49
  response = self.container.connection.cfreq("HEAD",@storagehost,@storagepath,@storageport,@storagescheme)
50
- raise NoSuchObjectException, "Object #{@name} does not exist" if (response.code != "204")
50
+ raise NoSuchObjectException, "Object #{@name} does not exist" unless (response.code =~ /^20/)
51
51
  @bytes = response["content-length"]
52
52
  @last_modified = Time.parse(response["last-modified"])
53
53
  @etag = response["etag"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudfiles
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - H. Wade Minter
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-02-02 00:00:00 -06:00
13
+ date: 2010-02-12 00:00:00 -06:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency