vagrant-global-status 0.1.2 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9b82bce8f896bb501164ce0b72d72f1b8639a1a
|
4
|
+
data.tar.gz: 6f4f74901453aaf4eabdc161da4e1c1a61f932d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6338106b306084a6024dd9a91d05f70a229015df55224a0e570615e2a967b302b7511cc237c8fcea3d01e6deedf23f030ad43ff656c8adc21b6be8fe7ec94c25
|
7
|
+
data.tar.gz: 375195848f9a539a98a026a3e5ed8c9c55a43b270bd8d7e18643a0d2d097fd5986052a6c55fee635e8531614953e13feaffbc4a6818a66376d0b8e72415ff392
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
## [0.1.
|
1
|
+
## [0.1.3](https://github.com/fgrehm/vagrant-global-status/compare/v0.1.2...v0.1.3) (December 17, 2013)
|
2
|
+
|
3
|
+
- Stop displaying non-running machines without -a option [GH-1]
|
4
|
+
- Remove non-existent entries from machine-environments.json automatically [GH-4]
|
5
|
+
|
6
|
+
## [0.1.2](https://github.com/fgrehm/vagrant-global-status/compare/v0.1.1...v0.1.2) (December 3, 2013)
|
2
7
|
|
3
8
|
- Nicely handle Multibyte path names [GH-5]
|
4
9
|
|
5
|
-
## [0.1.1](https://github.com/fgrehm/vagrant-
|
10
|
+
## [0.1.1](https://github.com/fgrehm/vagrant-global-status/compare/v0.1.0...v0.1.1) (March 27, 2013)
|
6
11
|
|
7
12
|
- Nicely handle removed directories [GH-2]
|
8
13
|
|
data/Gemfile.lock
CHANGED
@@ -19,8 +19,11 @@ module VagrantPlugins
|
|
19
19
|
|
20
20
|
registry = GlobalRegistry.new(@env.home_path.join('machine-environments.json'))
|
21
21
|
registry.environments.each do |env|
|
22
|
-
|
23
|
-
|
22
|
+
status = "#{env.status(options[:all])}"
|
23
|
+
if not status == ""
|
24
|
+
@env.ui.info "\n#{env.path}"
|
25
|
+
@env.ui.info status
|
26
|
+
end
|
24
27
|
end
|
25
28
|
|
26
29
|
0
|
@@ -16,7 +16,7 @@ module VagrantPlugins
|
|
16
16
|
|
17
17
|
matches = vagrant_status.scan(/(\w[\w-]+)\s+(\w[\w\s]+)\s+\((\w+)\)/)
|
18
18
|
matches.map do |vm, status, provider|
|
19
|
-
if all || @machine_names.include?(vm)
|
19
|
+
if all || (@machine_names.include?(vm) and status == "running")
|
20
20
|
" #{vm.ljust(15)} #{status} (#{provider})"
|
21
21
|
end
|
22
22
|
end.compact.join("\n")
|
@@ -21,10 +21,11 @@ module VagrantPlugins
|
|
21
21
|
|
22
22
|
def initialize(statefile)
|
23
23
|
@statefile = statefile
|
24
|
-
|
25
|
-
JSON.parse(@statefile.read(:encoding => Encoding::UTF_8))
|
24
|
+
if @statefile.file?
|
25
|
+
@current_state = JSON.parse(@statefile.read(:encoding => Encoding::UTF_8))
|
26
|
+
fix_current_status
|
26
27
|
else
|
27
|
-
{ 'environments' => {} }
|
28
|
+
@current_state = { 'environments' => {} }
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
@@ -57,6 +58,15 @@ module VagrantPlugins
|
|
57
58
|
write_statefile
|
58
59
|
end
|
59
60
|
|
61
|
+
def fix_current_status
|
62
|
+
@current_state['environments'].each_with_object({}) do |(env, data), hash|
|
63
|
+
if not File.exist? env or not File.exist? env + "/Vagrantfile"
|
64
|
+
@current_state['environments'].delete(env)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
write_statefile
|
68
|
+
end
|
69
|
+
|
60
70
|
private
|
61
71
|
|
62
72
|
def write_statefile
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-global-status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rehm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,8 +81,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.0.6
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: Find out the status of all of the Vagrant VMs you manage
|
88
88
|
test_files: []
|
89
|
+
has_rdoc:
|