ms_rest 0.7.2 → 0.7.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: 6e955b7950efa77e049373a0428100865d18b26d
4
- data.tar.gz: 4f76d46ad6a6fda8531608e7857c9174704c0f25
3
+ metadata.gz: 9300dab5569a52972502122df91d87bf32cf3e1d
4
+ data.tar.gz: fee2b777d41042cfef710cac3c8f90ad795cf764
5
5
  SHA512:
6
- metadata.gz: f725c74997de1043afd9427051a9f06100988425619405f0f5e2559873ba481bb9105822e3122be8c52fc7602b8b8cac809526a5beb70f3381ceb23a7a19ae85
7
- data.tar.gz: 9cb2186ad4370277882abe7a9d57de7f513892b219b3c0a48b4ee84a1ba794b664786aed41c2006835400408b5c7d134067c87ea1313ed096d4d63ea3fd348ab
6
+ metadata.gz: 31fc088c11a05dbd2a67d83314f64985d6828dbafe4f2000498f5ef9172f2b868a60e574d0a93ceaa73aaf6d9499ee900c743075deeccf5c03c99425c6648d99
7
+ data.tar.gz: 1781769a506fe083d56c8369ad4a9b975a79d76257cad96b5cffd9e8ff2b316636d89c2f86875777aba9ef0c2bffc54ee057c1158e001957bf600a4c1068ca19
@@ -1,3 +1,6 @@
1
+ ##2018.09.25 ms_rest version 0.7.3
2
+ * [Enhancement] Added code to check for service response and retry if the code is 429 and retry header is provided. Refer [PR #1694](https://github.com/Azure/azure-sdk-for-ruby/pull/1694) for more details.
3
+
1
4
  ##2017.11.10 ms_rest version 0.7.2
2
5
  * [Enhancement] Added code to check & validate the constraints on the model. Refer [PR #1119](https://github.com/Azure/azure-sdk-for-ruby/pull/1119/files) for more details.
3
6
 
data/README.md CHANGED
@@ -48,7 +48,7 @@ To start working on the gem the only additional dev dependency is required - rsp
48
48
  Reference it in the gemfile and also add this line to your client's gemspec file:
49
49
 
50
50
  ```ruby
51
- spec.add_runtime_dependency 'ms_rest', '~> 0.7.2'
51
+ spec.add_runtime_dependency 'ms_rest', '~> 0.7.3'
52
52
  ```
53
53
  Don't forget to correct the version.
54
54
 
@@ -77,14 +77,22 @@ module MsRest
77
77
  end
78
78
  end
79
79
 
80
- @connection.run_request(:"#{method}", build_path, body, {'User-Agent' => user_agent}.merge(headers)) do |req|
81
- req.params = req.params.merge(query_params.reject{|_, v| v.nil?}) unless query_params.nil?
82
- yield(req) if block_given?
80
+ loop do
81
+ @response = @connection.run_request(:"#{method}", build_path, body, {'User-Agent' => user_agent}.merge(headers)) do |req|
82
+ req.params = req.params.merge(query_params.reject{|_, v| v.nil?}) unless query_params.nil?
83
+ yield(req) if block_given?
84
+ end
85
+
86
+ break if ((@response.status != 429) || (@response.status == 429 && @response.headers['retry-after'].nil?))
87
+
88
+ if(@response.status == 429 && !@response.headers['retry-after'].nil?)
89
+ sleep(@response.headers['retry-after'].to_i)
90
+ end
83
91
  end
92
+ @response
84
93
  end
85
94
  end
86
95
 
87
-
88
96
  # Creates a path from the path template and the path_params and skip_encoding_path_params
89
97
  # @return [URI] body the HTTP response body.
90
98
  def build_path
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module MsRest
6
- VERSION = '0.7.2'
6
+ VERSION = '0.7.3'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ms_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-10 00:00:00.000000000 Z
11
+ date: 2018-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -124,7 +124,12 @@ files:
124
124
  homepage: https://aka.ms/ms_rest
125
125
  licenses:
126
126
  - MIT
127
- metadata: {}
127
+ metadata:
128
+ bug_tracker_uri: https://github.com/Azure/azure-sdk-for-ruby/issues
129
+ changelog_uri: https://github.com/Azure/azure-sdk-for-ruby/blob/master/runtime/ms_rest/CHANGELOG.md
130
+ documentation_uri: https://azure.microsoft.com/en-us/develop/ruby/
131
+ homepage_uri: https://aka.ms/azure-sdk-for-ruby
132
+ source_code_uri: https://github.com/Azure/azure-sdk-for-ruby/tree/ms_rest-v0.7.3
128
133
  post_install_message:
129
134
  rdoc_options: []
130
135
  require_paths: