Skip to content

Commit

Permalink
Release v1.2.2
Browse files Browse the repository at this point in the history
  action/handle_forwarded_port_collisions: Fixed methods 'call' and 'recover'
  • Loading branch information
legal90 committed Aug 25, 2014
2 parents a88de4e + c7598ac commit 1445ee3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down Expand Up @@ -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.

16 changes: 11 additions & 5 deletions lib/vagrant-parallels/action/handle_forwarded_port_collisions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-parallels/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module Parallels
VERSION = "1.2.1"
VERSION = "1.2.2"
end
end

0 comments on commit 1445ee3

Please sign in to comment.