vagrant-vmpooler 0.1.4 → 0.1.5

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: 4b04a37efa122bb02dbadb2ab25d3772daea4c41
4
- data.tar.gz: d3b3c14a93f7e2ee5925d06cb6453386fbe381b8
3
+ metadata.gz: bd0d88612ba343bb8bccc2c7c5b864801457a39b
4
+ data.tar.gz: 0de7d735dbf5d48e145eff3e687f7ce5eee0bb28
5
5
  SHA512:
6
- metadata.gz: e651a3ce8fc17ba8ea054bbc197fd480c7e97a8fdeb93b84bfdb2686a44d8cc3f1cea86d03c7d4358e38f8e0e6d7b72e3ac06530737dab0b7be134e8ea5dda0f
7
- data.tar.gz: 77d90671f953f9d151ecefda624ea77bc675ee49613a30606274869bc5d07879ac82657ede8ad49863e6bfacad941ecc6c880c3c59f344984137953ac2fff81a
6
+ metadata.gz: a7f8a5b26259e0f6c1821bc19e3a84b4c498a5c38456a895f5cc564682b741160eb2781b180ebb8de4e704019350583fdef6ecee7b63e4b7304cf3785916bab5
7
+ data.tar.gz: 02068a5799c0ffe62d050e43fd4fc4cd66bca0b922fadb393f9f3eb0fb2637700b6e3615c6258fa9f4389f6b70c0a588c168b44e7e9822da5221fffebb5546a6
@@ -13,11 +13,12 @@ module VagrantPlugins
13
13
  end
14
14
 
15
15
  def call(env)
16
- env[:machine_state_id] = read_state(env[:machine])
16
+ env[:machine_state_id] = read_state(env)
17
17
  @app.call(env)
18
18
  end
19
19
 
20
- def read_state(machine)
20
+ def read_state(env)
21
+ machine = env[:machine]
21
22
  id = machine.id
22
23
  return :not_created if id.nil?
23
24
 
@@ -27,7 +28,11 @@ module VagrantPlugins
27
28
 
28
29
  server = Pooler.query(verbose, url, id)
29
30
  if server['ok'] == false
30
- @logger.info(I18n.t("vagrant_vmpooler.not_created"))
31
+ env[:ui].warn(I18n.t("vagrant_vmpooler.not_created"))
32
+ machine.id = nil
33
+ return :not_created
34
+ elsif server[id]["state"] == "destroyed"
35
+ env[:ui].warn(I18n.t("vagrant_vmpooler.deleted"))
31
36
  machine.id = nil
32
37
  return :not_created
33
38
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Vmpooler
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -5,7 +5,7 @@ en:
5
5
  not_supported: |-
6
6
  This action not supported with vagrant-vmpooler
7
7
  deleted: |-
8
- The server was deleted.
8
+ The pooler vm was destroyed.
9
9
  not_deleted: |-
10
10
  The server was not deleted.
11
11
  already_created: |-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-vmpooler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Cain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-10 00:00:00.000000000 Z
11
+ date: 2016-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vmfloaty