Skip to content

Commit

Permalink
Reverse fix of empty map in template, should not compact empty hash w…
Browse files Browse the repository at this point in the history
…hen sign (#28)

* Reverse fix of empty map in template, should not compact empty hash when sign.

* Modify changelog
  • Loading branch information
Prnyself authored May 11, 2020
1 parent cd59877 commit a5dd31f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ All notable changes to QingStor SDK for Ruby will be documented here.
- Modify content-type check for application/json. (#21)
- Fix sub-resources not be recognized when generate signature. (#25)
- Fix meta data not work as intended. (#26)
- Reverse fix of empty map in template, should not compact empty hash when sign. (#28)
### [v2.2.3] - 2017-03-28
Expand Down
8 changes: 4 additions & 4 deletions lib/qingstor/sdk/service/object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def initiate_multipart_upload(object_key, content_type: '',
x_qs_encryption_customer_algorithm: '',
x_qs_encryption_customer_key: '',
x_qs_encryption_customer_key_md5: '',
x_qs_meta_data: {},
x_qs_meta_data: [],
x_qs_storage_class: '')
request = initiate_multipart_upload_request object_key, content_type: content_type,
x_qs_encryption_customer_algorithm: x_qs_encryption_customer_algorithm,
Expand All @@ -497,7 +497,7 @@ def initiate_multipart_upload_request(object_key, content_type: '',
x_qs_encryption_customer_algorithm: '',
x_qs_encryption_customer_key: '',
x_qs_encryption_customer_key_md5: '',
x_qs_meta_data: {},
x_qs_meta_data: [],
x_qs_storage_class: '')
properties[:'object-key'] = object_key
input = {
Expand Down Expand Up @@ -681,7 +681,7 @@ def put_object(object_key, cache_control: '',
x_qs_encryption_customer_key_md5: '',
x_qs_fetch_if_unmodified_since: '',
x_qs_fetch_source: '',
x_qs_meta_data: {},
x_qs_meta_data: [],
x_qs_move_source: '',
x_qs_storage_class: '',
body: nil)
Expand Down Expand Up @@ -730,7 +730,7 @@ def put_object_request(object_key, cache_control: '',
x_qs_encryption_customer_key_md5: '',
x_qs_fetch_if_unmodified_since: '',
x_qs_fetch_source: '',
x_qs_meta_data: {},
x_qs_meta_data: [],
x_qs_move_source: '',
x_qs_storage_class: '',
body: nil)
Expand Down
2 changes: 1 addition & 1 deletion template/shared.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{- else if eq $property.Type "object" -}}
{{$property.ID | snakeCase}}: []
{{- else if eq $property.Type "map" -}}
{{$property.ID | snakeCase}}: {}
{{$property.ID | snakeCase}}: []
{{- else if eq $property.Type "any" -}}
{{$property.ID | snakeCase}}: []
{{- else -}}
Expand Down

0 comments on commit a5dd31f

Please sign in to comment.