vagrant-group 0.2.0 → 0.2.1
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.
- checksums.yaml +4 -4
- data/lib/vagrant-group/command.rb +7 -3
- data/lib/vagrant-group/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 40fe040fb02b96693012398f6c7ad29f9da9e53f
|
|
4
|
+
data.tar.gz: c13cfca9beb58de17cdd25bb82b9a5cd7eee43c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6fe1074b869a6bf6b519bbbec9fd1024f14d87cfefc842d3240a2bb68f554bc68013b71754d0273175519b52616ba0da1412226079d2d4e575d0b000be8f35df
|
|
7
|
+
data.tar.gz: 778f25785132b31039db9deb480718e6ef835d36c0529d83a5724757e8cf679cd4ba9ab9d84b751f881f17791a1e8a1507b96bbc74a755fb6521be8f15cecec9
|
|
@@ -2,6 +2,8 @@ module VagrantPlugins
|
|
|
2
2
|
module Group
|
|
3
3
|
class Command < Vagrant.plugin(2, :command)
|
|
4
4
|
|
|
5
|
+
COMMANDS = %w(up halt destroy provision hosts)
|
|
6
|
+
|
|
5
7
|
def self.synopsis
|
|
6
8
|
"runs vagrant command on specific group of VMs"
|
|
7
9
|
end # self.synopsis
|
|
@@ -9,7 +11,7 @@ module VagrantPlugins
|
|
|
9
11
|
def execute
|
|
10
12
|
options = {}
|
|
11
13
|
opts = OptionParser.new do |o|
|
|
12
|
-
o.banner =
|
|
14
|
+
o.banner = sprintf("Usage: vagrant group <group-name> <%s>", COMMANDS.join("|"))
|
|
13
15
|
o.separator ''
|
|
14
16
|
|
|
15
17
|
o.on('-h', '--help', 'Print this help') do
|
|
@@ -21,7 +23,7 @@ module VagrantPlugins
|
|
|
21
23
|
|
|
22
24
|
group, action = argv[0], argv[1]
|
|
23
25
|
|
|
24
|
-
if !group || !action || !
|
|
26
|
+
if !group || !action || !COMMANDS.include?(action)
|
|
25
27
|
safe_puts(opts.help)
|
|
26
28
|
return nil
|
|
27
29
|
end
|
|
@@ -31,7 +33,9 @@ module VagrantPlugins
|
|
|
31
33
|
|
|
32
34
|
with_target_vms() do |machine|
|
|
33
35
|
if machine.config.group.groups.has_key?(group)
|
|
34
|
-
|
|
36
|
+
if machine.config.group.groups[group].to_a.include? machine.name.to_s
|
|
37
|
+
@env.ui.info(sprintf(' - %s', machine.name))
|
|
38
|
+
end
|
|
35
39
|
elsif
|
|
36
40
|
@env.ui.warn('No hosts associated.')
|
|
37
41
|
break
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant-group
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Krzysztof Magosa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-07-
|
|
11
|
+
date: 2015-07-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|