Module: EventStore::HTTP::Controls::Hostname::Resolution

Defined in:
lib/event_store/http/controls/hostname/resolution.rb

Defined Under Namespace

Modules: HostsFile

Class Method Summary collapse

Class Method Details

.activateObject



6
7
8
9
10
11
12
13
14
# File 'lib/event_store/http/controls/hostname/resolution.rb', line 6

def self.activate
  require 'resolv-replace'

  hosts_path = HostsFile.get

  hosts_resolver = Resolv::Hosts.new hosts_path

  Resolv::DefaultResolver.replace_resolvers [hosts_resolver]
end