jenkins-bot has submitted this change and it was merged.

Change subject: Fix provisioner.type bug in `Middleware`
......................................................................


Fix provisioner.type bug in `Middleware`

Despite declaring the same plugin API (v2), the
`VagrantConfigProvisioner` in Vagrant 1.6 and earlier names the method
`#name`. In 1.7 and above it's called `#type`.

Bug: T109779
Change-Id: Ib70e0bc0edd9129330926d43f3684ac30a6af9cc
---
M lib/mediawiki-vagrant/middleware.rb
M lib/mediawiki-vagrant/version.rb
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  BryanDavis: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/mediawiki-vagrant/middleware.rb 
b/lib/mediawiki-vagrant/middleware.rb
index 74cd19a..cc3b4ab 100644
--- a/lib/mediawiki-vagrant/middleware.rb
+++ b/lib/mediawiki-vagrant/middleware.rb
@@ -13,7 +13,9 @@
 
         # Add the name of the current provider to our puppet facts
         env[:machine].config.vm.provisioners.each do |provisioner|
-          if provisioner.type == :puppet
+          # Note that `VagrantPlugins::Kernel_V2::VagrantConfigProvisioner`
+          # `#name` in Vagrant <= 1.6 is `#type` in Vagrant > 1.6 :/
+          if (provisioner.name || provisioner.type) == :puppet
             provisioner.config.facter['provider_name'] = 
env[:machine].provider_name
           end
         end
diff --git a/lib/mediawiki-vagrant/version.rb b/lib/mediawiki-vagrant/version.rb
index fbe133e..e2336ea 100644
--- a/lib/mediawiki-vagrant/version.rb
+++ b/lib/mediawiki-vagrant/version.rb
@@ -1,3 +1,3 @@
 module MediaWikiVagrant
-  VERSION = '0.9.0'
+  VERSION = '0.10.0'
 end

-- 
To view, visit https://gerrit.wikimedia.org/r/232851
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib70e0bc0edd9129330926d43f3684ac30a6af9cc
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Dduvall <dduv...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Dduvall <dduv...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to