From 5459a742957d09f42c5d6a534cc8815f4d8ef9af Mon Sep 17 00:00:00 2001 From: wonda-tea-coffee <rikita.ishikawa@crowdworks.co.jp> Date: Sun, 21 Mar 2021 13:38:43 +0900 Subject: [PATCH] remove unused variables --- common/lib/azure/storage/common/client.rb | 8 ++++---- common/lib/azure/storage/common/client_options.rb | 12 ++++++------ test/integration/test_helper.rb | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/lib/azure/storage/common/client.rb b/common/lib/azure/storage/common/client.rb index 459c088..09a7746 100644 --- a/common/lib/azure/storage/common/client.rb +++ b/common/lib/azure/storage/common/client.rb @@ -125,7 +125,7 @@ module Azure::Storage::Common # # @return [Azure::Storage::Common::Client] def create(options = {}, &block) - client = Client.new(options, &block) + Client.new(options, &block) end # Public: Creates an instance of [Azure::Storage::Common::Client] with Storage Emulator @@ -137,14 +137,14 @@ module Azure::Storage::Common # @return [Azure::Storage::Common::Client] def create_development(proxy_uri = nil, &block) proxy_uri ||= StorageServiceClientConstants::DEV_STORE_URI - client = create(use_development_storage: true, development_storage_proxy_uri: proxy_uri, &block) + create(use_development_storage: true, development_storage_proxy_uri: proxy_uri, &block) end # Public: Creates an instance of [Azure::Storage::Common::Client] from Environment Variables # # @return [Azure::Storage::Client] def create_from_env(&block) - client = create(&block) + create(&block) end # Public: Creates an instance of [Azure::Storage::Common::Client] from Environment Variables @@ -155,7 +155,7 @@ module Azure::Storage::Common # # @return [Azure::Storage::Common::Client] def create_from_connection_string(connection_string, &block) - client = Client.new(connection_string, &block) + Client.new(connection_string, &block) end end end diff --git a/common/lib/azure/storage/common/client_options.rb b/common/lib/azure/storage/common/client_options.rb index d5d889a..ff2bf01 100644 --- a/common/lib/azure/storage/common/client_options.rb +++ b/common/lib/azure/storage/common/client_options.rb @@ -191,7 +191,7 @@ module Azure::Storage::Common storage_file_host: "#{proxy_uri}:#{StorageServiceClientConstants::DEVSTORE_FILE_HOST_PORT}", use_path_style_uri: true) return results - rescue InvalidOptionsError => e + rescue InvalidOptionsError end # P2 - explicit hosts with account connection string @@ -202,7 +202,7 @@ module Azure::Storage::Common results[:use_path_style_uri] = results.key?(:use_path_style_uri) normalize_hosts(results) return results - rescue InvalidOptionsError => e + rescue InvalidOptionsError end # P3 - account name and key or sas with default hosts or an end suffix @@ -220,7 +220,7 @@ module Azure::Storage::Common storage_file_host: "#{protocol}://#{account}.#{ServiceType::FILE}.#{suffix}", use_path_style_uri: false) return results - rescue InvalidOptionsError => e + rescue InvalidOptionsError end # P4 - explicit hosts with account name and key @@ -232,7 +232,7 @@ module Azure::Storage::Common results[:use_path_style_uri] = results.key?(:use_path_style_uri) normalize_hosts(results) return results - rescue InvalidOptionsError => e + rescue InvalidOptionsError end # P5 - anonymous or sas only for one or more particular services, options with account name/key + hosts should be already validated in P4 @@ -245,7 +245,7 @@ module Azure::Storage::Common # Adds anonymous signer if no sas token results[:signer] = Azure::Storage::Common::Core::Auth::AnonymousSigner.new unless results.key?(:storage_sas_token) return results - rescue InvalidOptionsError => e + rescue InvalidOptionsError end # P6 - account name and key or sas with explicit hosts @@ -257,7 +257,7 @@ module Azure::Storage::Common results[:use_path_style_uri] = results.key?(:use_path_style_uri) normalize_hosts(results) return results - rescue InvalidOptionsError => e + rescue InvalidOptionsError end raise InvalidOptionsError, "options provided are not valid set: #{opts}" # wrong opts if move to this line diff --git a/test/integration/test_helper.rb b/test/integration/test_helper.rb index f4a94e7..b6fab02 100644 --- a/test/integration/test_helper.rb +++ b/test/integration/test_helper.rb @@ -45,7 +45,7 @@ module Azure::Storage def call(req, _next) begin r = _next.call - rescue Azure::Core::Http::HTTPError => e + rescue Azure::Core::Http::HTTPError end @callable.call(req, r) if @callable r = _next.call -- GitLab