From 752d4cea9e3afe30c404da321580f9af80cb82f5 Mon Sep 17 00:00:00 2001 From: samawia-moin-confiz Date: Fri, 9 Sep 2016 11:01:37 +0500 Subject: [PATCH] Resolve hound violations --- .rubocop.yml | 2 ++ .../network/list_local_network_gateways.rb | 34 +++++++++---------- .../requests/network/local_network_gateway.rb | 5 ++- test/test_helper.rb | 4 +-- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 98b1fbf14..6b49debdc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -34,3 +34,5 @@ StringLiterals: EnforcedStyle: single_quotes SignalException: EnforcedStyle: only_raise +Style/FrozenStringLiteralComment: + Enabled: false \ No newline at end of file diff --git a/lib/fog/azurerm/requests/network/list_local_network_gateways.rb b/lib/fog/azurerm/requests/network/list_local_network_gateways.rb index edeb9346b..60f975410 100644 --- a/lib/fog/azurerm/requests/network/list_local_network_gateways.rb +++ b/lib/fog/azurerm/requests/network/list_local_network_gateways.rb @@ -18,25 +18,25 @@ def list_local_network_gateways(resource_group_name) # Mock class for Local Network Gateway Request class Mock def list_virtual_network_gateways(*) - local_network_gateway = { + local_network_gateway = { 'value' => [ - { - 'id' => '/subscriptions//resourceGroups/learn_fog/providers/Microsoft.Network/localNetworkGateways/testLocalNetworkGateway', - 'name' => 'testLocalNetworkGateway', - 'type' => 'Microsoft.Network/localNetworkGateways', - 'location' => 'eastus', - 'properties' => - { - 'local_network_address_space' => { - 'address_prefixes' => [] - }, - 'gateway_ip_address' => '192.168.1.1', - 'bgp_settings' => { - 'asn' => 100, - 'bgp_peering_address' => '192.168.1.2', - 'peer_weight' => 3 + { + 'id' => '/subscriptions//resourceGroups/learn_fog/providers/Microsoft.Network/localNetworkGateways/testLocalNetworkGateway', + 'name' => 'testLocalNetworkGateway', + 'type' => 'Microsoft.Network/localNetworkGateways', + 'location' => 'eastus', + 'properties' => + { + 'local_network_address_space' => { + 'address_prefixes' => [] + }, + 'gateway_ip_address' => '192.168.1.1', + 'bgp_settings' => { + 'asn' => 100, + 'bgp_peering_address' => '192.168.1.2', + 'peer_weight' => 3 + } } - } } ] } diff --git a/test/api_stub/requests/network/local_network_gateway.rb b/test/api_stub/requests/network/local_network_gateway.rb index ee7b3a354..4ebb0c67f 100644 --- a/test/api_stub/requests/network/local_network_gateway.rb +++ b/test/api_stub/requests/network/local_network_gateway.rb @@ -19,8 +19,7 @@ def self.create_local_network_gateway_response(network_client) 'asn' => 100, 'bgp_peering_address' => '192.168.1.2', 'peer_weight' => 3 - }, - 'gateway_ip_address' => '192.168.1.1' + } } } local_network_gateway_mapper = Azure::ARM::Network::Models::LocalNetworkGateway.mapper @@ -32,7 +31,7 @@ def self.delete_local_network_gateway_response end def self.list_local_network_gateway_response(network_client) - local_network_gateway = { + local_network_gateway = { 'value' => [ { 'id' => '/subscriptions//resourceGroups/learn_fog/providers/Microsoft.Network/localNetworkGateways/testLocalNetworkGateway', diff --git a/test/test_helper.rb b/test/test_helper.rb index d3e9c8e09..f16b92094 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -499,8 +499,8 @@ def local_network_gateway(service) name: 'testLocalNetworkGateway', location: 'eastus', tags: { - key1: 'value1', - key2: 'value2' + key1: 'value1', + key2: 'value2' }, resource_group: 'learn_fog', gateway_ip_address: '192.168.1.1',