Turn network, provider, and provisioner names into symbols if not
This commit is contained in:
parent
6e7427ca4d
commit
9a29cecfdf
|
@ -6,6 +6,8 @@ IMPROVEMENTS:
|
||||||
are avoided. [GH-1418]
|
are avoided. [GH-1418]
|
||||||
- An error will be shown if you forward a port to the same host port
|
- An error will be shown if you forward a port to the same host port
|
||||||
multiple times.
|
multiple times.
|
||||||
|
- Automatically convert network, provider, and provisioner names to
|
||||||
|
symbols internally in case people define them as strings.
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
|
|
|
@ -138,19 +138,20 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
# Merge in the latest settings and set the internal state
|
# Merge in the latest settings and set the internal state
|
||||||
@__networks[id] = [type, options]
|
@__networks[id] = [type.to_sym, options]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Configures a provider for this VM.
|
# Configures a provider for this VM.
|
||||||
#
|
#
|
||||||
# @param [Symbol] name The name of the provider.
|
# @param [Symbol] name The name of the provider.
|
||||||
def provider(name, &block)
|
def provider(name, &block)
|
||||||
|
name = name.to_sym
|
||||||
@__providers[name] ||= []
|
@__providers[name] ||= []
|
||||||
@__providers[name] << block if block_given?
|
@__providers[name] << block if block_given?
|
||||||
end
|
end
|
||||||
|
|
||||||
def provision(name, options=nil, &block)
|
def provision(name, options=nil, &block)
|
||||||
@provisioners << VagrantConfigProvisioner.new(name, options, &block)
|
@provisioners << VagrantConfigProvisioner.new(name.to_sym, options, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def defined_vms
|
def defined_vms
|
||||||
|
|
Loading…
Reference in New Issue