From 39b3cb32d314da4b8e6b77260056cdba6c2d6d85 Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Mon, 25 Aug 2014 13:32:36 +0400 Subject: [PATCH 1/2] action/handle_forwarded_port_collisions: Fixed methods 'call' and 'recover' --- .../action/handle_forwarded_port_collisions.rb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/vagrant-parallels/action/handle_forwarded_port_collisions.rb b/lib/vagrant-parallels/action/handle_forwarded_port_collisions.rb index 31dee671..e79629be 100644 --- a/lib/vagrant-parallels/action/handle_forwarded_port_collisions.rb +++ b/lib/vagrant-parallels/action/handle_forwarded_port_collisions.rb @@ -10,13 +10,19 @@ def initialize(app, env) # This middleware just wraps the builtin action and allows to skip it if # port forwarding is not supported for current Parallels Desktop version. def call(env) - # Port Forwarding feature is available only with PD >= 10 - if !env[:machine].provider.pd_version_satisfies?('>= 10') - return @app.call(env) + if env[:machine].provider.pd_version_satisfies?('>= 10') + super + else + # Just continue if port forwarding is not supporting + @app.call(env) end + end - # Call the builtin action - super + def recover(env) + if env[:machine].provider.pd_version_satisfies?('>= 10') + super + end + # Do nothing if port forwarding is not supporting end end end From c7598ac7b8416c4036361e22ff001020cea82dcb Mon Sep 17 00:00:00 2001 From: Mikhail Zholobov Date: Mon, 25 Aug 2014 17:55:57 +0400 Subject: [PATCH 2/2] README.md updated --- README.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 5a335750..dc6af64c 100644 --- a/README.md +++ b/README.md @@ -8,18 +8,16 @@ allowing to power [Parallels Desktop for Mac](http://www.parallels.com/downloads based virtual machines. ### Requirements -- Parallels Desktop for Mac 8 or 9 +- Parallels Desktop for Mac 8 or higher - Vagrant v1.5 or higher If you're just getting started with Vagrant, it is highly recommended that you read the official [Vagrant documentation](http://docs.vagrantup.com/v2/) first. ## Features -The Parallels provider supports all basic Vagrant features, except the next: -**"Forwarded ports" configuration is not available yet**. +The Parallels provider supports all basic Vagrant features, but "Forwarded ports" + configuration is available only if you are using Parallels Desktop **10** for Mac. -It might be implemented in the future, after the next release of Parallels -Desktop for Mac. ## Installation First, make sure that you have [Parallels Desktop for Mac](http://www.parallels.com/products/desktop/) @@ -53,13 +51,6 @@ please report it on the [IssueTracker](https://github.com/Parallels/vagrant-para Great thanks to *Youssef Shahin* `@yshahin` for having initiated the development of this provider. You've done a great job, Youssef! -Also, thanks to the people who are helping this project stand on its feet, thank you - -* Mikhail Zholobov `@legal90` -* Kevin Kaland `@wizonesolutions` -* Konstantin Nazarov `@racktear` -* Dmytro Vasylenko `@odi-um` -* Thomas Koschate `@koschate` - -and to all the people who are using and testing this provider. +Also, thanks to the people [who are contributing](https://github.com/Parallels/vagrant-parallels/graphs/contributors) + to our provider.