vagrant-parallels 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de33693db1716fa532ac466100960e204d0a2aab
4
- data.tar.gz: 4cef81cca0b698a57786354d774776aae8b20eeb
3
+ metadata.gz: 1a13c25bcdb28367ff315b90af6afc37eb8788e3
4
+ data.tar.gz: f0b172f3e8ba722ec295fa2216db182cfcdc769a
5
5
  SHA512:
6
- metadata.gz: 66039bc48af7c1104d279e0b52e57fbe250ebc3feb5eeb0b2d01326aa34b178b16c4cdd0681128ad4ecf4cc0f50779b1657a2236335113850bef8a3a08d4aee3
7
- data.tar.gz: 3311b730676476f1e4fbc216e0d7926b8ae3920b99834c488bd12162233fe0db004701a7e3fae7f10b726839a7f6f8dc4a76ea6c846429e654aeae6996bdb977
6
+ metadata.gz: 813e9edbabbffb8d4b913d549f8808298d3e2c8e1aa0e63f88a92eb9ff331bfc19251abe4ec5d63ef7842b77f85cb6ff90af7517957d175b5cb811b14b35908c
7
+ data.tar.gz: 75a2ee142077fa988267656c4613d97f270ae2310381481c499993707ffa9f0ebbc02ec6978c438be77682e01bd80862375cf620fc30b1c43596cd44c3e8a265
@@ -29,6 +29,7 @@ module VagrantPlugins
29
29
  b.use Boot
30
30
  b.use Customize, "post-boot"
31
31
  b.use WaitForCommunicator, [:starting, :running]
32
+ b.use Customize, "post-comm"
32
33
  b.use HandleGuestTools
33
34
  end
34
35
  end
@@ -285,8 +286,27 @@ module VagrantPlugins
285
286
  end
286
287
  end
287
288
 
289
+ # This action simply reboots the VM. It is executed right after
290
+ # Parallels Tools installation or upgrade.
291
+ def self.action_simple_reboot
292
+ Vagrant::Action::Builder.new.tap do |b|
293
+ b.use Call, GracefulHalt, :stopped, :running do |env2, b2|
294
+ if !env2[:result]
295
+ b2.use ForcedHalt
296
+ end
297
+ end
298
+
299
+ b.use Customize, "pre-boot"
300
+ b.use Boot
301
+ b.use Customize, "post-boot"
302
+ b.use WaitForCommunicator, [:starting, :running]
303
+ b.use Customize, "post-comm"
304
+ end
305
+ end
306
+
288
307
  autoload :Boot, File.expand_path("../action/boot", __FILE__)
289
308
  autoload :HandleGuestTools, File.expand_path("../action/handle_guest_tools", __FILE__)
309
+ autoload :HandleForwardedPortCollisions, File.expand_path("../action/handle_forwarded_port_collisions.rb", __FILE__)
290
310
  autoload :ClearNetworkInterfaces, File.expand_path("../action/clear_network_interfaces", __FILE__)
291
311
  autoload :ClearForwardedPorts, File.expand_path("../action/clear_forwarded_ports", __FILE__)
292
312
  autoload :Customize, File.expand_path("../action/customize", __FILE__)
@@ -0,0 +1,24 @@
1
+ module VagrantPlugins
2
+ module Parallels
3
+ module Action
4
+ class HandleForwardedPortCollisions < Vagrant::Action::Builtin::HandleForwardedPortCollisions
5
+ def initialize(app, env)
6
+ @app = app
7
+ @logger = Log4r::Logger.new('vagrant_parallels::action::handle_port_collisions')
8
+ end
9
+
10
+ # This middleware just wraps the builtin action and allows to skip it if
11
+ # port forwarding is not supported for current Parallels Desktop version.
12
+ def call(env)
13
+ # Port Forwarding feature is available only with PD >= 10
14
+ if !env[:machine].provider.pd_version_satisfies?('>= 10')
15
+ return @app.call(env)
16
+ end
17
+
18
+ # Call the builtin action
19
+ super
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -37,6 +37,11 @@ module VagrantPlugins
37
37
  if @machine.guest.capability?(:install_parallels_tools)
38
38
  env[:ui].output(I18n.t("vagrant_parallels.actions.vm.handle_guest_tools.installing"))
39
39
  @machine.guest.capability(:install_parallels_tools)
40
+
41
+ # The VM should be rebooted to enable kernel modules
42
+ # bundled with Parallels Tools.
43
+ env[:ui].output(I18n.t("vagrant_parallels.actions.vm.handle_guest_tools.rebooting"))
44
+ @machine.action(:simple_reboot)
40
45
  else
41
46
  env[:ui].warn(I18n.t("vagrant_parallels.actions.vm.handle_guest_tools.cant_install"))
42
47
  end
@@ -83,7 +83,7 @@ module VagrantPlugins
83
83
 
84
84
  def validate(machine)
85
85
  errors = _detected_errors
86
- valid_events = ["pre-import", "pre-boot", "post-boot"]
86
+ valid_events = ["pre-import", "pre-boot", "post-boot", "post-comm"]
87
87
  @customizations.each do |event, _|
88
88
  if !valid_events.include?(event)
89
89
  errors << I18n.t("vagrant_parallels.config.invalid_event",
@@ -11,6 +11,10 @@ module VagrantPlugins
11
11
  error_key(:dhcp_leases_file_not_accessible)
12
12
  end
13
13
 
14
+ class LinuxMountFailed < VagrantParallelsError
15
+ error_key(:linux_mount_failed)
16
+ end
17
+
14
18
  class MacOSXRequired < VagrantParallelsError
15
19
  error_key(:mac_os_x_required)
16
20
  end
@@ -60,7 +60,7 @@ module VagrantPlugins
60
60
 
61
61
  attempts += 1
62
62
  if attempts > 10
63
- raise Vagrant::Errors::LinuxMountFailed,
63
+ raise VagrantPlugins::Parallels::Errors::LinuxMountFailed,
64
64
  command: mount_commands.join("\n")
65
65
  end
66
66
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Parallels
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -22,6 +22,16 @@ en:
22
22
  Command: %{command}
23
23
 
24
24
  Stderr: %{stderr}
25
+
26
+ linux_mount_failed: |-
27
+ Failed to mount folders in Linux guest. This is usually because
28
+ the "prl_fs" file system is not available. Please verify that
29
+ Parallels Tools are properly installed in the guest and
30
+ can work properly. If so, the VM reboot can solve a problem.
31
+ The command attempted was:
32
+
33
+ %{command}
34
+
25
35
  mac_os_x_required: |-
26
36
  Parallels provider works only on OS X (Mac OS X) systems.
27
37
  parallels_install_incomplete: |-
@@ -118,6 +128,8 @@ en:
118
128
  If SSH fails or shared folders are not working on this machine,
119
129
  please install Parallels Tools within the virtual machine and
120
130
  reload your VM.
131
+ rebooting: |-
132
+ Parallels Tools have been installed. Rebooting the VM...
121
133
  outdated: |-
122
134
  Parallels Tools installed on this VM are outdated! In most cases
123
135
  this is fine but in rare cases it can cause things such as shared
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-parallels
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikhail Zholobov
@@ -9,82 +9,82 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-13 00:00:00.000000000 Z
12
+ date: 2014-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 1.5.2
21
- - - <
21
+ - - "<"
22
22
  - !ruby/object:Gem::Version
23
23
  version: 1.7.0
24
24
  type: :development
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - '>='
28
+ - - ">="
29
29
  - !ruby/object:Gem::Version
30
30
  version: 1.5.2
31
- - - <
31
+ - - "<"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.7.0
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rake
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  type: :development
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: minitest
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rspec
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.14.0
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.14.0
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: i18n-tasks
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.3.9
83
83
  type: :development
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.3.9
90
90
  description: Enables Vagrant to manage Parallels virtual machines.
@@ -95,9 +95,16 @@ executables: []
95
95
  extensions: []
96
96
  extra_rdoc_files: []
97
97
  files:
98
- - config/i18n-tasks.yml.erb
98
+ - ".gitignore"
99
+ - ".travis.yml"
99
100
  - CONTRIBUTING.md
100
101
  - Gemfile
102
+ - LICENSE.txt
103
+ - README.md
104
+ - Rakefile
105
+ - config/i18n-tasks.yml.erb
106
+ - lib/vagrant-parallels.rb
107
+ - lib/vagrant-parallels/action.rb
101
108
  - lib/vagrant-parallels/action/boot.rb
102
109
  - lib/vagrant-parallels/action/clear_forwarded_ports.rb
103
110
  - lib/vagrant-parallels/action/clear_network_interfaces.rb
@@ -108,6 +115,7 @@ files:
108
115
  - lib/vagrant-parallels/action/export.rb
109
116
  - lib/vagrant-parallels/action/forced_halt.rb
110
117
  - lib/vagrant-parallels/action/forward_ports.rb
118
+ - lib/vagrant-parallels/action/handle_forwarded_port_collisions.rb
111
119
  - lib/vagrant-parallels/action/handle_guest_tools.rb
112
120
  - lib/vagrant-parallels/action/import.rb
113
121
  - lib/vagrant-parallels/action/network.rb
@@ -121,7 +129,6 @@ files:
121
129
  - lib/vagrant-parallels/action/set_name.rb
122
130
  - lib/vagrant-parallels/action/setup_package_files.rb
123
131
  - lib/vagrant-parallels/action/suspend.rb
124
- - lib/vagrant-parallels/action.rb
125
132
  - lib/vagrant-parallels/cap/forwarded_ports.rb
126
133
  - lib/vagrant-parallels/cap/host_address.rb
127
134
  - lib/vagrant-parallels/cap/nic_mac_addresses.rb
@@ -142,11 +149,7 @@ files:
142
149
  - lib/vagrant-parallels/synced_folder.rb
143
150
  - lib/vagrant-parallels/util/compile_forwarded_ports.rb
144
151
  - lib/vagrant-parallels/version.rb
145
- - lib/vagrant-parallels.rb
146
- - LICENSE.txt
147
152
  - locales/en.yml
148
- - Rakefile
149
- - README.md
150
153
  - tasks/bundler.rake
151
154
  - tasks/test.rake
152
155
  - test/unit/base.rb
@@ -159,8 +162,6 @@ files:
159
162
  - test/unit/support/shared/pd_driver_examples.rb
160
163
  - test/unit/synced_folder_test.rb
161
164
  - vagrant-parallels.gemspec
162
- - .gitignore
163
- - .travis.yml
164
165
  homepage: http://github.com/Parallels/vagrant-parallels
165
166
  licenses:
166
167
  - MIT
@@ -171,17 +172,17 @@ require_paths:
171
172
  - lib
172
173
  required_ruby_version: !ruby/object:Gem::Requirement
173
174
  requirements:
174
- - - '>='
175
+ - - ">="
175
176
  - !ruby/object:Gem::Version
176
177
  version: '0'
177
178
  required_rubygems_version: !ruby/object:Gem::Requirement
178
179
  requirements:
179
- - - '>='
180
+ - - ">="
180
181
  - !ruby/object:Gem::Version
181
182
  version: 1.3.6
182
183
  requirements: []
183
184
  rubyforge_project: vagrant-parallels
184
- rubygems_version: 2.0.14
185
+ rubygems_version: 2.2.0
185
186
  signing_key:
186
187
  specification_version: 4
187
188
  summary: Parallels provider for Vagrant.