diff --git a/CHANGELOG.md b/CHANGELOG.md index 625c6a53b..6e5ffbb0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # 0.11.0 * *Breaking Change* - Fix handling of large numbers during code generation. Previously the uint64/int64 formats were passed through as strings. They are now coerced to/from Fixnum/Bignum types +* *Breaking Change* - No longer normalize unicode strings in URI templates. Mostly affects + Cloud Storage, but other APIs with unicode strings in paths may be affected. Old behavior + can be restored using the `normalize_unicode` request option. * Remove Hurley as dependency. May cause minor breaking changes if directly accessing the underlying client connection. * Drop compatibility with Rails 3.x since that is no longer supported by the Rails community. diff --git a/MIGRATING.md b/MIGRATING.md index bbbbe242c..709e7cfbf 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -1,4 +1,4 @@ -# Migrating from version `0.8.x` to `0.9` +# Migrating from version `0.8.x` to `0.9` and above Many changes and improvements have been made to the `google-api-ruby-client` library to bring it to `0.9`. If you are starting a new project or haven't used diff --git a/google-api-client.gemspec b/google-api-client.gemspec index e115caae5..44a6622a0 100644 --- a/google-api-client.gemspec +++ b/google-api-client.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'representable', '~> 3.0' spec.add_runtime_dependency 'retriable', '>= 2.0', '< 4.0' - spec.add_runtime_dependency 'addressable', '~> 2.3' + spec.add_runtime_dependency 'addressable', '>= 2.5.1' spec.add_runtime_dependency 'mime-types', '>= 3.0' spec.add_runtime_dependency 'googleauth', '~> 0.5' spec.add_runtime_dependency 'httpclient', '>= 2.8.1', '< 3.0' diff --git a/lib/google/apis/core/http_command.rb b/lib/google/apis/core/http_command.rb index 16df06a24..9eb123468 100644 --- a/lib/google/apis/core/http_command.rb +++ b/lib/google/apis/core/http_command.rb @@ -139,8 +139,12 @@ module Google # @private # @return [void] def prepare! - header.update(options.header) if options && options.header - self.url = url.expand(params) if url.is_a?(Addressable::Template) + normalize_unicode = true + if options + header.update(options.header) if options.header + normalize_unicode = options.normalize_unicode + end + self.url = url.expand(params, nil, normalize_unicode) if url.is_a?(Addressable::Template) url.query_values = query.merge(url.query_values || {}) if allow_form_encoding? diff --git a/lib/google/apis/options.rb b/lib/google/apis/options.rb index f790e0cd1..066558a62 100644 --- a/lib/google/apis/options.rb +++ b/lib/google/apis/options.rb @@ -26,7 +26,8 @@ module Google :retries, :header, :timeout_sec, - :open_timeout_sec) + :open_timeout_sec, + :normalize_unicode) # General client options class ClientOptions @@ -56,6 +57,8 @@ module Google # @return [Fixnum] How long, in seconds, before failed connections time out # @!attribute [rw] header # @return [Hash