Skip to content

Commit

Permalink
Update all gems + fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoster committed Mar 29, 2021
1 parent 759ad8f commit 984d0a7
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export RELEASE_DIR=$PWD
export SRC_DIR=$PWD/src/bosh_azure_cpi
export PROJECT_RUBY_VERSION=2.4.4
export PROJECT_RUBY_VERSION=2.7.2
8 changes: 4 additions & 4 deletions src/bosh_azure_cpi/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

source 'https://rubygems.org'

gem 'azure-storage', '0.12.3.preview'
gem 'azure-storage', '~> 0.15.0.preview'
gem 'bosh_common', '1.3262.24.0'
gem 'bosh_cpi', '2.5.0'
gem 'concurrent-ruby', '1.0.5'
gem 'jwt', '1.5.6'
gem 'deep_merge', '~> 1.0', '>= 1.0.1'
gem 'concurrent-ruby', '~> 1.1', '>= 1.1.8'
gem 'jwt', '~> 2.2', '>= 2.2.2'
gem 'deep_merge', '~> 1.2', '>= 1.2.1'

group :development, :test do
gem 'rake', '~>12.0'
Expand Down
87 changes: 45 additions & 42 deletions src/bosh_azure_cpi/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,55 +1,58 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
ast (2.4.0)
azure-core (0.1.14)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ast (2.4.2)
azure-core (0.1.15)
faraday (~> 0.9)
faraday_middleware (~> 0.10)
nokogiri (~> 1.6)
azure-storage (0.12.3.preview)
azure-storage (0.15.0.preview)
azure-core (~> 0.1)
faraday (~> 0.9)
faraday_middleware (~> 0.10)
nokogiri (~> 1.6, >= 1.6.8)
bosh_common (1.3262.24.0)
logging (~> 1.8.2)
semi_semantic (~> 1.2.0)
bosh_cpi (2.5.0)
httpclient (~> 2.8.3)
membrane (~> 1.1.0)
concurrent-ruby (1.0.5)
crack (0.4.3)
safe_yaml (~> 1.0.0)
concurrent-ruby (1.1.8)
crack (0.4.5)
rexml
deep_merge (1.2.1)
diff-lcs (1.3)
docile (1.1.5)
faraday (0.14.0)
diff-lcs (1.4.4)
docile (1.3.5)
faraday (0.17.4)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.12.2)
faraday_middleware (0.14.0)
faraday (>= 0.7.4, < 1.0)
hashdiff (0.3.6)
hashdiff (1.0.1)
httpclient (2.8.3)
jaro_winkler (1.5.1)
json (2.1.0)
jwt (1.5.6)
jaro_winkler (1.5.4)
jwt (2.2.2)
little-plugger (1.1.4)
logging (1.8.2)
little-plugger (>= 1.1.3)
multi_json (>= 1.8.4)
membrane (1.1.0)
mini_portile2 (2.3.0)
multi_json (1.12.1)
multipart-post (2.0.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.1.2)
ast (~> 2.4.0)
powerpack (0.1.2)
public_suffix (3.0.0)
mini_portile2 (2.5.0)
multi_json (1.15.0)
multipart-post (2.1.1)
nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
powerpack (0.1.3)
public_suffix (4.0.6)
racc (1.5.2)
rainbow (3.0.0)
rake (12.0.0)
rake (12.3.3)
rexml (3.2.4)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
Expand All @@ -71,35 +74,35 @@ GEM
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
ruby-progressbar (1.10.0)
safe_yaml (1.0.4)
ruby-progressbar (1.11.0)
semi_semantic (1.2.0)
simplecov (0.15.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
unicode-display_width (1.4.0)
webmock (3.0.1)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.2)
unicode-display_width (1.4.1)
webmock (3.12.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
ruby

DEPENDENCIES
azure-storage (= 0.12.3.preview)
azure-storage (~> 0.15.0.preview)
bosh_common (= 1.3262.24.0)
bosh_cpi (= 2.5.0)
concurrent-ruby (= 1.0.5)
deep_merge (~> 1.0, >= 1.0.1)
jwt (= 1.5.6)
concurrent-ruby (~> 1.1, >= 1.1.8)
deep_merge (~> 1.2, >= 1.2.1)
jwt (~> 2.2, >= 2.2.2)
rake (~> 12.0)
rspec (~> 3.5.0)
rubocop (~> 0.60.0)
simplecov
webmock

BUNDLED WITH
1.17.1
2.1.4
4 changes: 2 additions & 2 deletions src/bosh_azure_cpi/lib/cloud/azure/restapi/azure_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def get_resource_by_id(url, params = {})
begin
uri = http_url(url, params)
response = http_get(uri)
result = JSON.parse(response.body) unless response.body.nil?
result = JSON.parse(response.body) unless response.body.nil? || response.body == ''
rescue AzureNotFoundError => e
@logger.debug("Resource not found for url #{url} with parms #{params}")
result = nil
Expand Down Expand Up @@ -2427,7 +2427,7 @@ def check_completion(response, options)
status_code = response.code.to_i
raise AzureAsynchronousError.new, "check_completion - http code: #{response.code}. Error message: #{response.body}" if status_code != HTTP_CODE_OK && status_code != HTTP_CODE_ACCEPTED

raise AzureAsynchronousError.new, 'The body of the asynchronous response is empty' if response.body.nil?
raise AzureAsynchronousError.new, 'The body of the asynchronous response is empty' if response.body.nil? || response.body == ''

result = JSON(response.body)
raise AzureAsynchronousError.new, "The body of the asynchronous response does not contain 'status'. Response: #{response.body}" if result['status'].nil?
Expand Down

0 comments on commit 984d0a7

Please sign in to comment.