diff --git a/common/lib/azure/storage/common/client.rb b/common/lib/azure/storage/common/client.rb index 459c088f980f6baefcbe127d5cedec24948ee3b5..09a77460b46c4e55c8c0927b348a75141ab71b47 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 d5d889a916a53f3a8fc17df2abd682623a1bd0a5..ff2bf01bff0ea167fcd256d1e0df3f214e40bc1f 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 f4a94e7f9ab693c94ee34fb71945b3b5a19679b4..b6fab025f63dee21bfce73f8060430025a498651 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