inprovise 0.2.14 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/inprovise/cli/group.rb +5 -0
- data/lib/inprovise/control.rb +1 -1
- data/lib/inprovise/execution_context.rb +4 -4
- data/lib/inprovise/group.rb +4 -0
- data/lib/inprovise/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTAyNWE0NWQzZjQ4NmYyNWY2YjgxMDJjMzQ2ODRmOWI1MWYyMjI5OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTZkODg1ZTFiYWJkOGZjMWZhM2VmYzQ1MTY0MGRmOGQ2MTY2YzYzMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGQ2NmEyMzVjNDYyMzYxYWJkOWRiYzU4OGMwMDAwNzcxZWRjYjFkZGY5NGU4
|
10
|
+
MWE3MDA5NWY5NmJmMTA0ODYzYTIxNmEzMjIxMzU1ZjUzYzc2MTM2NGE3NmI4
|
11
|
+
MjIyZTIzM2E4ZGYxMWM2NDc1OGViODRiMzZkZGY4MzNmMTM1YWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Yzc1YmVkODE4MGU2MzVhZjc1NTQ1NjYwYWJhZjM3M2ZjNWU1YjQ2M2U1ZmNk
|
14
|
+
ZDMyYmYxYzZiYzRjYzRlNDY2NzUyZTI1NzExMTIyMmZlMzU1NmMwYWJmNDRi
|
15
|
+
YzRhNTFhMWQyNTAxNzgyYjQxNWQ0ZGMzMWMxNzljNjlmNmE1ZGE=
|
data/lib/inprovise/cli/group.rb
CHANGED
@@ -70,6 +70,11 @@ class Inprovise::Cli
|
|
70
70
|
$stdout.puts "ERROR: #{a} is not a group".red
|
71
71
|
when Inprovise::Infrastructure::Group
|
72
72
|
Inprovise::Cli.show_target(tgt, options[:details])
|
73
|
+
if options[:details]
|
74
|
+
$stdout.puts " \t["
|
75
|
+
tgt.unresolved_targets.each { |member| $stdout.puts " \t #{member}" }
|
76
|
+
$stdout.puts " \t]"
|
77
|
+
end
|
73
78
|
else
|
74
79
|
$stdout.puts "ERROR: #{a} is unknown".red
|
75
80
|
end
|
data/lib/inprovise/control.rb
CHANGED
@@ -225,7 +225,7 @@ class Inprovise::Controller
|
|
225
225
|
|
226
226
|
def add_group(options, grpcfg, name)
|
227
227
|
options[:target].each {|t| raise ArgumentError, "Unknown target [#{t}]" unless Inprovise::Infrastructure.find(t) }
|
228
|
-
grp = Inprovise::Infrastructure::Group.new(name, grpcfg
|
228
|
+
grp = Inprovise::Infrastructure::Group.new(name, grpcfg)
|
229
229
|
|
230
230
|
Inprovise.log.local("Adding #{grp}")
|
231
231
|
|
@@ -20,16 +20,16 @@ class Inprovise::ExecutionContext
|
|
20
20
|
@context.script ? @context.script.name : ''
|
21
21
|
end
|
22
22
|
|
23
|
+
def node
|
24
|
+
@context.node
|
25
|
+
end
|
26
|
+
|
23
27
|
def config
|
24
28
|
@context.config
|
25
29
|
end
|
26
30
|
end
|
27
31
|
|
28
32
|
class DSL < ConfigDSL
|
29
|
-
def node
|
30
|
-
@context.node
|
31
|
-
end
|
32
|
-
|
33
33
|
def as(user, &blk)
|
34
34
|
@context.as(user, &blk)
|
35
35
|
end
|
data/lib/inprovise/group.rb
CHANGED
@@ -12,6 +12,10 @@ class Inprovise::Infrastructure::Group < Inprovise::Infrastructure::Target
|
|
12
12
|
super(name, config)
|
13
13
|
end
|
14
14
|
|
15
|
+
def unresolved_targets
|
16
|
+
@targets.collect {|t| Inprovise::Infrastructure.find(t) }
|
17
|
+
end
|
18
|
+
|
15
19
|
def add_target(tgt)
|
16
20
|
tgt = Inprovise::Infrastructure::Target === tgt ? tgt : Inprovise::Infrastructure.find(tgt.to_s)
|
17
21
|
raise ArgumentError, "Circular reference detected in [#{tgt.to_s}] to [#{self.to_s}]" if tgt.includes?(self)
|
data/lib/inprovise/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inprovise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Corino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|