qingstor-sdk 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4391cc24e2f51a70db0f75c7e99d735535b473b
4
- data.tar.gz: 463094d6e75f6494f3016947b11c93b6a4fa2797
3
+ metadata.gz: 4b19c35ad3fac339d332026ed3c2d3e9f8926bcd
4
+ data.tar.gz: c6081506ae29d0264bc699367632eea97988f11e
5
5
  SHA512:
6
- metadata.gz: 7d0e092d7899da72e282d8a72943b771d28d4ad5d36b811835b5d335deaf39c61a6f3b9d287f4d343514687bc11eb5d751ea878997064e4412841e9405a58258
7
- data.tar.gz: 1b7338a27c55f6545afc53b148e0d42c85f6555d87014649e4c76cb3f6d43041c274df1ec91bbe02355f6de1c487be5b85746d5389319e7997e21de61b48f44c
6
+ metadata.gz: 1a00a47cdd43f96e8a8f059a2089b3577d1a8c293eb93adeebdaabbfaf8f0ef47981dfb48d0dcd94f307c541687572d34ad72b7d187f767f20036f26a7bebc35
7
+ data.tar.gz: f57aac7cb7d95711a52f1c8a1688efd03feb66fd687e1462fc79bc39d9d8511a25fc16b9424572badb805efde900284cef3484b73128e86391a17723a5de4962
data/README.md CHANGED
@@ -1,11 +1,9 @@
1
1
  # QingStor::SDK
2
2
 
3
- <span style="display: inline-block">
4
3
  [![Build Status](https://travis-ci.org/yunify/qingstor-sdk-ruby.svg?branch=master)](https://travis-ci.org/yunify/qingstor-sdk-ruby)
5
4
  [![Gem Version](https://badge.fury.io/rb/qingstor-sdk.svg)](http://badge.fury.io/rb/qingstor-sdk)
6
5
  [![API Reference](http://img.shields.io/badge/api-reference-green.svg)](https://docs.qingcloud.com/qingstor/)
7
6
  [![License](http://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/yunify/qingstor-sdk-ruby/blob/master/LICENSE)
8
- </span>
9
7
 
10
8
  The official QingStor SDK for Ruby programming language.
11
9
 
@@ -169,17 +167,23 @@ log_level: 'warn'
169
167
  ## Change Log
170
168
  All notable changes to QingStor SDK for Ruby will be documented here.
171
169
 
170
+ ### [v2.2.3] - 2017-03-28
171
+
172
+ ### Fixed
173
+
174
+ - Fix status code of DELETE CORS API.
175
+
172
176
  ### [v2.2.2] - 2017-03-10
173
177
 
174
178
  ### Fixed
175
179
 
176
- - Resource is not mandatory in bucket policy statement
180
+ - Resource is not mandatory in bucket policy statement.
177
181
 
178
182
  ### [v2.2.1] - 2017-03-10
179
183
 
180
184
  #### Added
181
185
 
182
- - Allow user to append additional info to User-Agent
186
+ - Allow user to append additional info to User-Agent.
183
187
 
184
188
  ### [v2.2.0] - 2017-02-28
185
189
 
@@ -240,6 +244,7 @@ All notable changes to QingStor SDK for Ruby will be documented here.
240
244
  The Apache License (Version 2.0, January 2004).
241
245
 
242
246
  [compatible]: https://github.com/yunify/qingstor-sdk-ruby/tree/compatible
247
+ [v2.2.3]: https://github.com/yunify/qingstor-sdk-ruby/compare/v2.2.2...v2.2.3
243
248
  [v2.2.2]: https://github.com/yunify/qingstor-sdk-ruby/compare/v2.2.1...v2.2.2
244
249
  [v2.2.1]: https://github.com/yunify/qingstor-sdk-ruby/compare/v2.2.0...v2.2.1
245
250
  [v2.2.0]: https://github.com/yunify/qingstor-sdk-ruby/compare/v2.1.1...v2.2.0
@@ -47,7 +47,7 @@ module QingStor
47
47
  end
48
48
 
49
49
  def check
50
- [:access_key_id, :secret_access_key, :host, :port, :protocol].each do |x|
50
+ %i(access_key_id secret_access_key host port protocol).each do |x|
51
51
  if !self[x] || self[x].to_s.empty?
52
52
  raise ConfigurationError, "#{x.to_sym} not specified"
53
53
  end
@@ -62,7 +62,10 @@ module QingStor
62
62
 
63
63
  def build
64
64
  params = input[:request_params].map { |k, v| "#{k}=#{v}" }
65
- query_string = !params.empty? ? "?#{params.join '&'}" : ''
65
+ query_string = params.join '&'
66
+ if query_string && !query_string.empty?
67
+ query_string = "#{input[:request_uri].include?('?') ? '&' : '?'}#{query_string}"
68
+ end
66
69
  self.request_url = "#{input[:request_endpoint]}#{input[:request_uri]}#{query_string}"
67
70
 
68
71
  request = new_http_request input[:request_method], request_url
@@ -83,7 +83,7 @@ module QingStor
83
83
  def self.canonicalized_headers(input)
84
84
  h = {}
85
85
  input[:request_headers].each { |k, v| h[k.to_s.strip.downcase] = v.to_s.strip }
86
- h.keys.sort.reject { |k| !k.start_with? 'x-qs-' }.map { |k| "#{k}:#{h[k]}\n" }.join ''
86
+ h.keys.sort.select { |k| k.start_with? 'x-qs-' }.map { |k| "#{k}:#{h[k]}\n" }.join ''
87
87
  end
88
88
 
89
89
  def self.canonicalized_resource(input)
@@ -86,7 +86,7 @@ module QingStor
86
86
  },
87
87
  request_body: nil,
88
88
  status_code: [
89
- 200, # OK
89
+ 204, # OK
90
90
  ],
91
91
  }
92
92
 
@@ -16,6 +16,6 @@
16
16
 
17
17
  module QingStor
18
18
  module SDK
19
- VERSION = '2.2.2'.freeze
19
+ VERSION = '2.2.3'.freeze
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qingstor-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yunify SDK Group
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-10 00:00:00.000000000 Z
11
+ date: 2017-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.45.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: cucumber
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 2.4.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 2.4.0
125
139
  description: The official QingStor SDK for Ruby programming language.
126
140
  email:
127
141
  - sdk_group@yunify.com