Remove deprecation warnings, the things are gone!

This commit is contained in:
Mitchell Hashimoto 2012-02-25 12:35:58 -08:00
parent 9fe42dd3a2
commit 07a815f9d8
2 changed files with 0 additions and 68 deletions

View File

@ -13,26 +13,6 @@ module Vagrant
attr_accessor :forward_x11 attr_accessor :forward_x11
attr_accessor :shell attr_accessor :shell
def forwarded_port_key=(value)
raise Errors::DeprecationError, :message => <<-MESSAGE
`config.ssh.forwarded_port_key` is now gone. You must now use
`config.ssh.guest_port` which is expected to be the port on the
guest that SSH is listening on. Vagrant will automatically scan
the forwarded ports to look for a forwarded port from this port
and use it.
MESSAGE
end
def forwarded_port_destination=(value)
raise Errors::DeprecationError, :message => <<-MESSAGE
`config.ssh.forwarded_port_destination` is now gone. You must now use
`config.ssh.guest_port` which is expected to be the port on the
guest that SSH is listening on. Vagrant will automatically scan
the forwarded ports to look for a forwarded port from this port
and use it.
MESSAGE
end
def validate(env, errors) def validate(env, errors)
[:username, :host, :max_tries, :timeout].each do |field| [:username, :host, :max_tries, :timeout].each do |field|
errors.add(I18n.t("vagrant.config.common.error_empty", :field => field)) if !instance_variable_get("@#{field}".to_sym) errors.add(I18n.t("vagrant.config.common.error_empty", :field => field)) if !instance_variable_get("@#{field}".to_sym)

View File

@ -39,28 +39,7 @@ module Vagrant
result result
end end
def system=(value)
raise Errors::DeprecationError, :message => <<-MESSAGE
`config.vm.system` has changed to `config.vm.guest` in Vagrant 0.9,
since this is more clear about the use of the configuration key.
Please change all references of `config.vm.system` to `config.vm.guest`.
MESSAGE
end
def forward_port(guestport, hostport, options=nil) def forward_port(guestport, hostport, options=nil)
if !guestport.kind_of?(Integer)
raise Errors::DeprecationError, :message => <<-MESSAGE
`config.vm.forward_port` changed in 0.9.0 where the required name
argument is now removed. Vagrant will now automatically generate
a unique name for your forwarded port. For example, to forward
port 80 to port 8080 you now do the following:
config.vm.forward_port 80, 8080
Please change your configurations to match this new syntax.
MESSAGE
end
@forwarded_ports << { @forwarded_ports << {
:name => "#{guestport.to_s(32)}-#{hostport.to_s(32)}", :name => "#{guestport.to_s(32)}-#{hostport.to_s(32)}",
:guestport => guestport, :guestport => guestport,
@ -85,19 +64,6 @@ Please change your configurations to match this new syntax.
end end
def network(type, *args) def network(type, *args)
if !type.kind_of?(Symbol)
raise Errors::DeprecationError, :message => <<-MESSAGE
`config.vm.network` changed in 0.9.0 where the first argument is
now the type of network and the remaining arguments are options for
that type. For example, host only networks are now configured like
so:
config.vm.network :hostonly, "172.24.24.24"
Please change your configurations to match this new syntax.
MESSAGE
end
@networks << [type, args] @networks << [type, args]
end end
@ -109,20 +75,6 @@ Please change your configurations to match this new syntax.
# It is only defaulted to nil so that the deprecation error # It is only defaulted to nil so that the deprecation error
# can be properly shown. # can be properly shown.
def customize(command=nil) def customize(command=nil)
if block_given?
raise Errors::DeprecationError, :message => <<-MESSAGE
`config.vm.customize` now takes an array of arguments to send to
`VBoxManage` instead of having a block which gets a virtual machine
object. Example of the new usage:
config.vm.customize ["modifyvm", :id, "--memory", "1024"]
The above will run `VBoxManage modifyvm 1234 --memory 1024` where
"1234" is the ID of your current virtual machine. Anything you could
do before is certainly still possible with `VBoxManage` as well.
MESSAGE
end
@customizations << command if command @customizations << command if command
end end