vagrant-parallels 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vagrant Parallels Provider
2
- [![Build Status](https://travis-ci.org/yshahin/vagrant-parallels.png?branch=master)](https://travis-ci.org/yshahin/vagrant-parallels)
3
- [![Code Climate](https://codeclimate.com/github/yshahin/vagrant-parallels.png)](https://codeclimate.com/github/yshahin/vagrant-parallels)
2
+ [![Build Status](https://travis-ci.org/Parallels/vagrant-parallels.png?branch=master)](https://travis-ci.org/Parallels/vagrant-parallels)
3
+ [![Code Climate](https://codeclimate.com/github/Parallels/vagrant-parallels.png)](https://codeclimate.com/github/Parallels/vagrant-parallels)
4
4
 
5
5
  This is a [Vagrant](http://www.vagrantup.com) 1.3+ plugin that adds a [Parallels Desktop](http://www.parallels.com/products/desktop/)
6
6
  provider to Vagrant, allowing Vagrant to control and provision machines using Parallels Desktop instead of the default Virtualbox.
@@ -59,9 +59,10 @@ That directory also contains instructions on how to build a box.
59
59
  Download the box file, then use vagrant to add the downloaded box using this command. Remember to use `bundle exec` before `vagrant` command if you are in development mode
60
60
 
61
61
  ```
62
- $ wget https://s3-eu-west-1.amazonaws.com/vagrant-parallels/devbox.box
62
+ $ wget https://s3-eu-west-1.amazonaws.com/vagrant-parallels/devbox-201312.box
63
63
  $ vagrant box add devbox devbox.box --provider=parallels
64
64
  ```
65
+ ***updated box file to fix mac address regeneration issue #42, devbox is Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-57-generic x86_64***
65
66
 
66
67
  The box format is basically just the required `metadata.json` file
67
68
  along with a `Vagrantfile` that does default settings for the
@@ -129,7 +130,7 @@ Provider allows to define directives for `prlctl set` through `Vagrantfile` in s
129
130
  To work on the `vagrant-parallels` plugin, clone this repository out
130
131
 
131
132
  ```
132
- $ git clone https://github.com/yshahin/vagrant-parallels
133
+ $ git clone https://github.com/Parallels/vagrant-parallels
133
134
  $ cd vagrant-parallels
134
135
  ```
135
136
 
@@ -166,7 +167,7 @@ After testing you can also build a gem-package by yourself and then install it a
166
167
  (if you have 'vagrant-parallels' plugin already installed, delete it first)
167
168
 
168
169
  ```
169
- $ git clone https://github.com/yshahin/vagrant-parallels
170
+ $ git clone https://github.com/Parallels/vagrant-parallels
170
171
  $ cd vagrant-parallels
171
172
  $ rake build
172
173
  ...
data/Rakefile CHANGED
@@ -4,6 +4,9 @@ require 'rubygems'
4
4
  require 'bundler/setup'
5
5
  require 'rspec/core/rake_task'
6
6
 
7
+ #Load i18-tasks
8
+ load 'tasks/i18n-tasks.rake'
9
+
7
10
  # Immediately sync all stdout so that tools like buildbot can
8
11
  # immediately load in the output.
9
12
  $stdout.sync = true
@@ -0,0 +1,13 @@
1
+ search:
2
+ paths:
3
+ - "lib/"
4
+ data:
5
+ adapter: yaml
6
+ read:
7
+ - "locales/%{locale}.yml"
8
+ - "<%= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml"
9
+ write:
10
+ - "locales/%{locale}.yml"
11
+ ignore_unused:
12
+ - "vagrant_parallels.errors.*"
13
+ - "vagrant.*"
@@ -11,7 +11,7 @@ module VagrantPlugins
11
11
 
12
12
  #TODO: Clean up registered VM on interupt
13
13
  def call(env)
14
- env[:ui].info I18n.t("vagrant_parallels.actions.vm.import.importing",
14
+ env[:ui].info I18n.t("vagrant.actions.vm.import.importing",
15
15
  :name => env[:machine].box.name)
16
16
 
17
17
  vm_name = generate_name(env[:root_path])
@@ -1,7 +1,7 @@
1
1
  module VagrantPlugins
2
2
  module Parallels
3
3
  module Action
4
- class IsSaved
4
+ class IsSuspended
5
5
  def initialize(app, env)
6
6
  @app = app
7
7
  end
@@ -7,7 +7,7 @@ module VagrantPlugins
7
7
  end
8
8
 
9
9
  def call(env)
10
- env[:ui].info I18n.t("vagrant.commands.common.vm_already_running")
10
+ env[:ui].info I18n.t("vagrant_parallels.commands.common.vm_already_running")
11
11
  @app.call(env)
12
12
  end
13
13
  end
@@ -10,11 +10,8 @@ module VagrantPlugins
10
10
  current_state = env[:machine].provider.state.id
11
11
 
12
12
  if current_state == :suspended
13
- env[:ui].info I18n.t("vagrant.actions.vm.resume.unpausing")
14
- env[:machine].provider.driver.resume
15
- elsif current_state == :stopped
16
13
  env[:ui].info I18n.t("vagrant.actions.vm.resume.resuming")
17
- env[:action_runner].run(Boot, env)
14
+ env[:machine].provider.driver.resume
18
15
  end
19
16
 
20
17
  @app.call(env)
@@ -73,7 +73,7 @@ module VagrantPlugins
73
73
  if env[:result]
74
74
  b2.use CheckAccessible
75
75
 
76
- b2.use Call, IsPaused do |env2, b3|
76
+ b2.use Call, IsSuspended do |env2, b3|
77
77
  next if !env2[:result]
78
78
  b3.use Resume
79
79
  end
@@ -208,23 +208,16 @@ module VagrantPlugins
208
208
  next
209
209
  end
210
210
 
211
- b2.use Call, IsSaved do |env2, b3|
211
+ b2.use Call, IsSuspended do |env2, b3|
212
212
  if env2[:result]
213
- # The VM is saved, so just resume it
213
+ # The VM is suspended, so just resume it
214
214
  b3.use action_resume
215
215
  next
216
216
  end
217
217
 
218
- b3.use Call, IsPaused do |env3, b4|
219
- if env3[:result]
220
- b4.use Resume
221
- next
222
- end
223
-
224
- # The VM is not saved, so we must have to boot it up
225
- # like normal. Boot!
226
- b4.use action_boot
227
- end
218
+ # The VM is not saved, so we must have to boot it up
219
+ # like normal. Boot!
220
+ b3.use action_boot
228
221
  end
229
222
  end
230
223
  end
@@ -283,9 +276,8 @@ module VagrantPlugins
283
276
  autoload :Export, File.expand_path("../action/export", __FILE__)
284
277
  autoload :ForcedHalt, File.expand_path("../action/forced_halt", __FILE__)
285
278
  autoload :Import, File.expand_path("../action/import", __FILE__)
286
- autoload :IsPaused, File.expand_path("../action/is_paused", __FILE__)
279
+ autoload :IsSuspended, File.expand_path("../action/is_suspended", __FILE__)
287
280
  autoload :IsRunning, File.expand_path("../action/is_running", __FILE__)
288
- autoload :IsSaved, File.expand_path("../action/is_saved", __FILE__)
289
281
  autoload :MatchMACAddress, File.expand_path("../action/match_mac_address", __FILE__)
290
282
  autoload :MessageAlreadyRunning, File.expand_path("../action/message_already_running", __FILE__)
291
283
  autoload :MessageNotCreated, File.expand_path("../action/message_not_created", __FILE__)
@@ -38,10 +38,9 @@ module VagrantPlugins
38
38
  valid_events = ["pre-import", "pre-boot", "post-boot"]
39
39
  @customizations.each do |event, _|
40
40
  if !valid_events.include?(event)
41
- errors << I18n.t(
42
- "vagrant_parallels.config.invalid_event",
43
- event: event.to_s,
44
- valid_events: valid_events.join(", "))
41
+ errors << I18n.t("vagrant_parallels.config.invalid_event",
42
+ event: event.to_s,
43
+ valid_events: valid_events.join(", "))
45
44
  end
46
45
  end
47
46
  @customizations.each do |event, command|
@@ -14,7 +14,7 @@ module VagrantPlugins
14
14
  module Parallels
15
15
 
16
16
  class Plugin < Vagrant.plugin("2")
17
- name "Parallels"
17
+ name "vagrant-parallels"
18
18
  description <<-EOF
19
19
  The Parallels provider allows Vagrant to manage and control
20
20
  Parallels-based virtual machines.
@@ -48,7 +48,7 @@ module VagrantPlugins
48
48
 
49
49
  # Translate into short/long descriptions
50
50
  short = state_id.to_s.gsub("_", " ")
51
- long = I18n.t("vagrant.commands.status.#{state_id}")
51
+ long = I18n.t("vagrant_parallels.commands.status.#{state_id}")
52
52
 
53
53
  # Return the state
54
54
  Vagrant::MachineState.new(state_id, short, long)
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Parallels
3
- VERSION = "0.1.3"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end