Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with vagrant-aws v0.4.0 #28

Merged
merged 2 commits into from
Sep 27, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 0.5.3 / _Unreleased_

- Compatibility with vagrant-aws v0.4.0 ([GH-28][])
* Next vagrant-aws release [will remove](https://github.com/mitchellh/vagrant-aws/commit/dd17f23) its custom TimedProvision action class

# 0.5.2 / 2013-09-27

Expand Down Expand Up @@ -72,3 +74,4 @@
[GH-25]: https://github.com/tmatilai/vagrant-proxyconf/issues/25 "Issue 25"
[GH-26]: https://github.com/tmatilai/vagrant-proxyconf/issues/26 "Issue 26"
[GH-27]: https://github.com/tmatilai/vagrant-proxyconf/issues/27 "Issue 27"
[GH-28]: https://github.com/tmatilai/vagrant-proxyconf/issues/28 "Issue 28"
16 changes: 5 additions & 11 deletions lib/vagrant-proxyconf/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ def self.register_hooks(hook, provision_action)
hook.after provision_action, Action::ConfigureEnvProxy
end

def self.aws_plugin_installed?
VagrantPlugins.const_defined?('AWS')
end

def self.omnibus_plugin_installed?
VagrantPlugins.const_defined?('Omnibus')
end

setup_i18n
check_vagrant_version!

Expand Down Expand Up @@ -76,14 +68,16 @@ def self.omnibus_plugin_installed?
end

action_hook 'proxyconf_configure' do |hook|
if omnibus_plugin_installed?
if defined? VagrantPlugins::Omnibus::Action::InstallChef
# configure the proxies before vagrant-omnibus
register_hooks(hook, VagrantPlugins::Omnibus::Action::InstallChef)
else
register_hooks(hook, Vagrant::Action::Builtin::Provision)

# vagrant-aws uses a non-standard provision action
register_hooks(hook, VagrantPlugins::AWS::Action::TimedProvision) if aws_plugin_installed?
# vagrant-aws < 0.4.0 uses a non-standard provision action
if defined? VagrantPlugins::AWS::Action::TimedProvision
register_hooks(hook, VagrantPlugins::AWS::Action::TimedProvision)
end
end
end
end
Expand Down