vagrant-skytap 0.2.1 → 0.2.2

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: ee9cca3ef03d038cdb2470d8311a73a4d8b2abd6
4
- data.tar.gz: 8d8a3248ef15261b24731511665da4ae73ea90b4
3
+ metadata.gz: 42367c7e3c19aaeea00c74ed4756d8c54d92612f
4
+ data.tar.gz: c5b4962d7052fad5e4a7e4c90bad7799c64b92ed
5
5
  SHA512:
6
- metadata.gz: e8cfb11207527c5d94ce6b50b1c5735b24f2080b6565d6977173bdfa9317072b6173b2b42f672fbfe080f2fd2d331b68e59de0b523c82085253fb2b752a967fb
7
- data.tar.gz: 88af9755df93f2e2a1514bc86b1c3600561aa25e0dff8adf2695563b7ecf23c82463d03a976783aca0a09e7c3565c5d7209913194d28710ea7ec3ada34307ce9
6
+ metadata.gz: 3ac68aee81962e0729980aa6b5785413ca24780a2a149447f34ca3aec45a4cd4629c415035ff11c3acb838c69a85e5c115c47df2ea7ac24ded5655d0de8ed70c
7
+ data.tar.gz: a0fa8b2edc3ac422141d5af6d07990e18824c76443c649b2272ff0dab506124679b7fa401531e6ee215e38b5d14250a347b19d28c2c538e98ed3150190763799
data/.byebug_history CHANGED
@@ -1,4 +1,12 @@
1
1
  c
2
+ q
3
+ action_result[:api_client].url
4
+ action_result[:api_client].base_url
5
+ action_result[:api_client]
6
+ action_result.keys
7
+ action_result.class
8
+ action_result
9
+ c
2
10
  $!
3
11
  c
4
12
  @env[:initial_states]
@@ -246,11 +254,3 @@ b 96
246
254
  b
247
255
  names
248
256
  finish
249
- $!
250
- n
251
- c
252
- n
253
- folders.count
254
- c
255
- folders.first
256
- folders.count
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.2.2 (January 26, 2016)
2
+
3
+ * Bug fix: `vagrant add` would create but not start a new VM if
4
+ the first existing VM was already running.
5
+
1
6
  # 0.2.1 (January 26, 2016)
2
7
 
3
8
  * Handle error when the user tries to use --install-provider flag.
@@ -3,12 +3,9 @@ require "log4r"
3
3
  module VagrantPlugins
4
4
  module Skytap
5
5
  module Action
6
- # Runs multiple VMs in parallel. This middleware will be invoked for
7
- # each machine, so we set the :first_machine flag to prevent redundant
8
- # REST calls.
6
+ # Runs multiple VMs in parallel. Ensures that the REST call happens
7
+ # only once.
9
8
  class RunEnvironment
10
- include Vagrant::Util::Retryable
11
-
12
9
  attr_reader :env
13
10
 
14
11
  def initialize(app, env)
@@ -18,18 +15,20 @@ module VagrantPlugins
18
15
  end
19
16
 
20
17
  def call(env)
21
- if env[:first_machine]
18
+ environment = env[:environment]
19
+ vm_ids = vm_ids_to_run
20
+
21
+ if environment.current_vm.id == vm_ids.first
22
22
  env[:ui].info(I18n.t("vagrant_skytap.running_environment"))
23
- vm_ids = env[:machines].try(:collect, &:id)
24
23
  @logger.info("Running VMs: #{vm_ids}")
25
- env[:environment].run!(vm_ids)
24
+ environment.run!(vm_ids)
26
25
  end
27
26
 
28
27
  @app.call(env)
29
28
  end
30
29
 
31
- def environment
32
- env[:environment]
30
+ def vm_ids_to_run
31
+ @env[:initial_states].reject{|id, state| state == :running}.keys
33
32
  end
34
33
  end
35
34
  end
@@ -94,9 +94,8 @@ module VagrantPlugins
94
94
 
95
95
  initial_states = machines.inject({}) {|acc, m| acc[m.id] = m.state.id ; acc }
96
96
 
97
- machines.each_with_index do |machine, i|
97
+ machines.each do |machine|
98
98
  machine.action(:run_vm, options.merge(
99
- first_machine: i == 0,
100
99
  machines: machines,
101
100
  initial_states: initial_states
102
101
  ))
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Skytap
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-skytap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Astete