lib/beaker/network_manager.rb in beaker-4.38.1 vs lib/beaker/network_manager.rb in beaker-4.39.0

- old
+ new

@@ -15,11 +15,11 @@ # - always if it is a vagrant box (vagrant boxes are always provisioned as # they always need ssh key hacking.) def provision? options, host command_line_says = options[:provision] host_says = host['hypervisor'] && (host.has_key?('provision') ? host['provision'] : true) - (command_line_says && host_says) or (host['hypervisor'] =~/(vagrant)/) + (command_line_says && host_says) or host['hypervisor'].include?('vagrant') end attr_accessor :hosts, :hypervisors def initialize(options, logger) @@ -51,10 +51,10 @@ if @hypervisors cleanup end @hypervisors = {} #sort hosts by their hypervisor, use hypervisor 'none' if no hypervisor is specified - hostless_options = Beaker::Options::OptionsHash.new.merge(@options.select{ |k,v| k.to_s !~ /HOSTS/}) + hostless_options = Beaker::Options::OptionsHash.new.merge(@options.select{ |k,_v| !k.to_s.include?('HOSTS')}) @options['HOSTS'].each_key do |name| host_hash = @options['HOSTS'][name] hypervisor = host_hash['hypervisor'] if @options[:provision] hypervisor = provision?(@options, host_hash) ? host_hash['hypervisor'] : 'none'