From f364396de566ee5dc834b91d93b32e1476677e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Mon, 28 Mar 2022 23:29:03 +0000 Subject: [PATCH] Ruby 3.0 removed URI.escape, CGI.escape should be used instead --- table/lib/azure/storage/table/table_service.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/table/lib/azure/storage/table/table_service.rb b/table/lib/azure/storage/table/table_service.rb index 6357b645..7a8a11f2 100644 --- a/table/lib/azure/storage/table/table_service.rb +++ b/table/lib/azure/storage/table/table_service.rb @@ -23,6 +23,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. #-------------------------------------------------------------------------- +require "cgi" require "azure/storage/table/auth/shared_key" module Azure::Storage @@ -234,7 +235,7 @@ def delete_table(table_name, options = {}) # * +:timeout+ - Integer. A timeout in seconds. # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded # in the analytics logs when storage analytics logging is enabled. - # * +:location_mode+ - LocationMode. Specifies the location mode used to decide + # * +:location_mode+ - LocationMode. Specifies the location mode used to decide # which location the request should be sent to. # # Returns the last updated time for the table @@ -263,7 +264,7 @@ def get_table(table_name, options = {}) # * +:timeout+ - Integer. A timeout in seconds. # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded # in the analytics logs when storage analytics logging is enabled. - # * +:location_mode+ - LocationMode. Specifies the location mode used to decide + # * +:location_mode+ - LocationMode. Specifies the location mode used to decide # which location the request should be sent to. # * +:accept+ - String. Specifies the accepted content-type of the response payload. Possible values are: # :no_meta @@ -306,7 +307,7 @@ def query_tables(options = {}) # * +:timeout+ - Integer. A timeout in seconds. # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded # in the analytics logs when storage analytics logging is enabled. - # * +:location_mode+ - LocationMode. Specifies the location mode used to decide + # * +:location_mode+ - LocationMode. Specifies the location mode used to decide # which location the request should be sent to. # # See http://msdn.microsoft.com/en-us/library/azure/jj159100 @@ -412,7 +413,7 @@ def insert_entity(table_name, entity_values, options = {}) # * +:timeout+ - Integer. A timeout in seconds. # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded # in the analytics logs when storage analytics logging is enabled. - # * +:location_mode+ - LocationMode. Specifies the location mode used to decide + # * +:location_mode+ - LocationMode. Specifies the location mode used to decide # which location the request should be sent to. # * +:accept+ - String. Specifies the accepted content-type of the response payload. Possible values are: # :no_meta @@ -621,7 +622,7 @@ def delete_entity(table_name, partition_key, row_key, options = {}) # * +:timeout+ - Integer. A timeout in seconds. # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded # in the analytics logs when storage analytics logging is enabled. - # * +:location_mode+ - LocationMode. Specifies the location mode used to decide + # * +:location_mode+ - LocationMode. Specifies the location mode used to decide # which location the request should be sent to. # # See http://msdn.microsoft.com/en-us/library/azure/dd894038 @@ -657,7 +658,7 @@ def execute_batch(batch, options = {}) # * +:timeout+ - Integer. A timeout in seconds. # * +:request_id+ - String. Provides a client-generated, opaque value with a 1 KB character limit that is recorded # in the analytics logs when storage analytics logging is enabled. - # * +:location_mode+ - LocationMode. Specifies the location mode used to decide + # * +:location_mode+ - LocationMode. Specifies the location mode used to decide # which location the request should be sent to. # # Returns an Azure::Storage::Table::Entity instance on success @@ -746,7 +747,7 @@ def encodeODataUriValue(value) value = value.gsub("'", "''") # Encode the special URL characters - value = URI.escape(value) + value = CGI.escape(value) value end