Sha256: 50388b79ea5c60e0d6aa25d4ed76077503f731ddcff671f070490eb72e74a13b

Contents?: true

Size: 689 Bytes

Versions: 12

Compression:

Stored size: 689 Bytes

Contents

require 'hashdiff'

module Vcloud
  module EdgeGateway
    class ConfigurationDiffer

        def initialize local, remote
          @local = local
          @remote = remote
        end

        def diff
          ( stripped_local_config == stripped_remote_config ) ? [] : HashDiff.diff(stripped_local_config, stripped_remote_config)
        end

        def stripped_local_config
          strip_fields_for_differ_to_ignore(@local) unless @local.nil?
        end

        def stripped_remote_config
          strip_fields_for_differ_to_ignore(@remote) unless @remote.nil?
        end

        def strip_fields_for_differ_to_ignore(config)
          config
        end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vcloud-edge_gateway-2.1.1 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-2.1.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.5.2 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.5.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.4.1 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.4.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.3.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.2.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.1.0 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.0.2 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.0.1 lib/vcloud/edge_gateway/configuration_differ.rb
vcloud-edge_gateway-1.0.0 lib/vcloud/edge_gateway/configuration_differ.rb