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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTIyYmM4ZjcwNDg2MTZkNjRhODc1MmMyMmU2MmY2NjRkOGUxNGNmMw==
4
+ MTAyNWE0NWQzZjQ4NmYyNWY2YjgxMDJjMzQ2ODRmOWI1MWYyMjI5OQ==
5
5
  data.tar.gz: !binary |-
6
- YzI0ODNkZDkyZDVmNjgyZDllMzdkYjI5OGZhYjc3NzgzYzBiYjQyZA==
6
+ ZTZkODg1ZTFiYWJkOGZjMWZhM2VmYzQ1MTY0MGRmOGQ2MTY2YzYzMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDQzMWNkMDAxZmU1MzVlMTg4NjRlMWMzMDY3N2FlNjhmZWQ5MmMyMDJiNTAw
10
- ZjI1NDhjMDFhM2ZjNGQ3OTA2MmE5ZmQ2ZDY2NjUzYWZiN2JkYzg0MjMzYWY3
11
- Y2FkNjE1N2ZiZTNiM2NhZGQ5YzRhMGNiNTFkNTZjN2NjZTdmNTM=
9
+ ZGQ2NmEyMzVjNDYyMzYxYWJkOWRiYzU4OGMwMDAwNzcxZWRjYjFkZGY5NGU4
10
+ MWE3MDA5NWY5NmJmMTA0ODYzYTIxNmEzMjIxMzU1ZjUzYzc2MTM2NGE3NmI4
11
+ MjIyZTIzM2E4ZGYxMWM2NDc1OGViODRiMzZkZGY4MzNmMTM1YWY=
12
12
  data.tar.gz: !binary |-
13
- MGFhNjczMDQ3MDE3YTUzMzJiMGE4OGZhYjlmYjNlZjIwYTgzMDM0MTQ4YTcw
14
- NTFkNjkxZmNhMjUwZmJlNTk4OWI5YjQ1YzM4MDM1YzFhOTVhYTE2ZDBkM2U2
15
- MzU3NjVkMTZmMTIxZjMzNDcwYWVjNzhhODllOGI5NDhhOTNmYWY=
13
+ Yzc1YmVkODE4MGU2MzVhZjc1NTQ1NjYwYWJhZjM3M2ZjNWU1YjQ2M2U1ZmNk
14
+ ZDMyYmYxYzZiYzRjYzRlNDY2NzUyZTI1NzExMTIyMmZlMzU1NmMwYWJmNDRi
15
+ YzRhNTFhMWQyNTAxNzgyYjQxNWQ0ZGMzMWMxNzljNjlmNmE1ZGE=
@@ -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
@@ -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, options[:target])
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
@@ -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)
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Inprovise
7
7
 
8
- VERSION = '0.2.14'
8
+ VERSION = '0.2.15'
9
9
 
10
10
  end
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.14
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-17 00:00:00.000000000 Z
11
+ date: 2016-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored