Skip to content
Browse files

Fixed a small bug with URI Encoding

  • Loading branch information...
1 parent 2604037 commit 070a9773d43bdd8ec53961ff3009d08756c49d6f Conrad Weidenkeller committed Dec 5, 2011
Showing with 11 additions and 10 deletions.
  1. +6 −1 CHANGELOG
  2. +1 −2 cloudfiles.gemspec
  3. +2 −5 lib/cloudfiles.rb
  4. +1 −1 lib/cloudfiles/storage_object.rb
  5. +1 −1 lib/cloudfiles/version.rb
View
7 CHANGELOG
@@ -1,5 +1,10 @@
================================================================================
-1.5.0 (2011/10/31
+1.5.0.1 (2011/12/05
+================================================================================
+o Fixed small bug with encoding or URI's
+
+================================================================================
+1.5.0 (2011/10/31)
================================================================================
o The underlying http wrapper now uses client.rb a simple abstraction to manage
each ReST call in its own function
View
3 cloudfiles.gemspec
@@ -3,7 +3,6 @@ require File.expand_path('../lib/cloudfiles/version', __FILE__)
Gem::Specification.new do |s|
s.name = %q{cloudfiles}
s.version = CloudFiles::VERSION
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["H. Wade Minter", "Rackspace Hosting"]
s.description = %q{A Ruby version of the Rackspace Cloud Files API.}
@@ -41,7 +40,7 @@ Gem::Specification.new do |s|
s.homepage = %q{http://www.rackspacecloud.com/cloud_hosting_products/files}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.5.0}
+ s.rubygems_version = %q{1.5.0.1}
s.summary = %q{A Ruby API into Rackspace Cloud Files}
s.test_files = [
"test/cf-testunit.rb",
View
7 lib/cloudfiles.rb
@@ -49,11 +49,8 @@ def self.lines(str)
(str.respond_to?(:lines) ? str.lines : str).to_a.map { |x| x.chomp }
end
- # CGI.escape, but without special treatment on spaces
- def self.escape(str,extra_exclude_chars = '')
- str.gsub(/([^a-zA-Z0-9\_\.\-#{extra_exclude_chars}]+)/) do
- '%' + $1.unpack('H2' * $1.bytesize).join('%').upcase
- end
+ def self.escape(str)
+ URI.encode(str)
end
end
View
2 lib/cloudfiles/storage_object.rb
@@ -400,7 +400,7 @@ def to_s # :nodoc:
end
def escape_name(name)
- CloudFiles.escape name, "\/"
+ CloudFiles.escape name
end
private
View
2 lib/cloudfiles/version.rb
@@ -1,3 +1,3 @@
module CloudFiles
- VERSION = '1.5.0'
+ VERSION = '1.5.0.1'
end

0 comments on commit 070a977

Please sign in to comment.
Something went wrong with that request. Please try again.