From 436da57cc47c2fed6111b9f62dfe330a031cafff Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 14 Jul 2012 17:04:06 -0700 Subject: [PATCH] Add the #action API to the provider plugin --- lib/vagrant/plugin/v1/provider.rb | 8 ++++++++ test/unit/vagrant/plugin/v1/provider_test.rb | 9 +++++++++ 2 files changed, 17 insertions(+) create mode 100644 test/unit/vagrant/plugin/v1/provider_test.rb diff --git a/lib/vagrant/plugin/v1/provider.rb b/lib/vagrant/plugin/v1/provider.rb index f4650af9b..df974cfd8 100644 --- a/lib/vagrant/plugin/v1/provider.rb +++ b/lib/vagrant/plugin/v1/provider.rb @@ -5,6 +5,14 @@ module Vagrant # is responsible for creating compute resources to match the needs # of a Vagrant-configured system. class Provider + # This should return an action callable for the given name. + # + # @param [Symbol] name Name of the action. + # @return [Object] A callable action sequence object, whether it + # is a proc, object, etc. + def action(name) + nil + end end end end diff --git a/test/unit/vagrant/plugin/v1/provider_test.rb b/test/unit/vagrant/plugin/v1/provider_test.rb new file mode 100644 index 000000000..578715e49 --- /dev/null +++ b/test/unit/vagrant/plugin/v1/provider_test.rb @@ -0,0 +1,9 @@ +require File.expand_path("../../../../base", __FILE__) + +describe Vagrant::Plugin::V1::Provider do + let(:instance) { described_class.new } + + it "should return nil by default for actions" do + instance.action(:whatever).should be_nil + end +end