eac_launcher 0.1.5 → 0.1.6

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: d9fb76da2d6b0eac4f82442cce2b34da22a3da89
4
- data.tar.gz: 97646bf8c08b58bd6370bdd3b8df96c088bf15bc
3
+ metadata.gz: 0ab5bf921659df3c88a83fe103ebd637cdf31867
4
+ data.tar.gz: cecdcb2756bc6a5588631da4c3add9c69af43169
5
5
  SHA512:
6
- metadata.gz: a84f54221b8c79f7a64d358f8d86ce667d022f8de5fcfae06b505fb243963891c1d711cff5b0b66d8d1cb36ea27bec736e48fbc76117234efb1acd74a7d72875
7
- data.tar.gz: 8c022f63cc330882484d8638921d82c42a61d920068cbd4865319d2b63e346a0fcae8da244aaf390692f2c995ded283a85c8bbbc4bb36b97583a46f9e4ba4daa
6
+ metadata.gz: 7ce5c60b145385320aafc6e051246e4dd3b11b8d8406d22743a99c3b3561f2f67ec2f15a9b5ce70cb8dcb87e8f8770fbd1df3549d48999112653ece979343491
7
+ data.tar.gz: 0eaea78113863318f8a0579cd377b47fb4487962a38bf76bd9a54f271880de0e3a29ce22204458548b45d7a7ec67432d77764798636ac4dbd3cc96166e7cb68a
@@ -22,7 +22,14 @@ DOCOPT
22
22
  private
23
23
 
24
24
  def run
25
- instances.each { |i| puts instance_label(i) }
25
+ instances.each { |i| show_instance(i) }
26
+ end
27
+
28
+ def show_instance(i)
29
+ puts instance_label(i)
30
+ infov(' * Parent', (i.parent ? instance_label(i.parent) : '-'))
31
+ infov(' * Git current revision', i.options.git_current_revision)
32
+ infov(' * Git publish remote', i.options.git_publish_remote)
26
33
  end
27
34
 
28
35
  def instance_path
@@ -29,8 +29,8 @@ module EacLauncher
29
29
  @publish_options = { new: false, confirm: false, stereotype: nil }
30
30
  end
31
31
 
32
- def instance(to_root_path)
33
- instances.find { |i| i.to_root_path == to_root_path }
32
+ def instance(name)
33
+ instances.find { |i| i.name == name }
34
34
  end
35
35
 
36
36
  private
@@ -8,7 +8,7 @@ module EacLauncher
8
8
  end
9
9
 
10
10
  def instance_settings(instance)
11
- ::EacLauncher::Instances::Settings.new(value(['Instances', instance.to_root_path]))
11
+ ::EacLauncher::Instances::Settings.new(value(['Instances', instance.name]))
12
12
  end
13
13
 
14
14
  private
@@ -14,6 +14,10 @@ module EacLauncher
14
14
  @parent = parent
15
15
  end
16
16
 
17
+ def name
18
+ to_root_path
19
+ end
20
+
17
21
  def stereotypes_uncached
18
22
  EacLauncher::Stereotype.stereotypes.select { |s| s.match?(self) }
19
23
  end
@@ -42,7 +46,7 @@ module EacLauncher
42
46
  def publish_run
43
47
  stereotypes.each do |s|
44
48
  next unless publish?(s)
45
- infov(to_root_path, "publishing #{s.stereotype_name_in_color}")
49
+ infov(name, "publishing #{s.stereotype_name_in_color}")
46
50
  s.publish_class.new(self).run
47
51
  end
48
52
  end
@@ -50,7 +54,7 @@ module EacLauncher
50
54
  def publish_check
51
55
  stereotypes.each do |s|
52
56
  next unless publish?(s)
53
- puts "#{to_root_path.to_s.cyan}|#{s.stereotype_name_in_color}|" \
57
+ puts "#{name.to_s.cyan}|#{s.stereotype_name_in_color}|" \
54
58
  "#{s.publish_class.new(self).check}"
55
59
  end
56
60
  end
@@ -30,7 +30,7 @@ module EacLauncher
30
30
  end
31
31
 
32
32
  def cache_root
33
- File.join(::EacLauncher::Context.current.cache_root, to_root_path.parameterize)
33
+ File.join(::EacLauncher::Context.current.cache_root, name.parameterize)
34
34
  end
35
35
  end
36
36
  end
@@ -7,8 +7,8 @@ module EacLauncher
7
7
  @context ||= ::EacLauncher::Context.current
8
8
  end
9
9
 
10
- def find_instance(instance_path)
11
- context.instances.find { |i| i.to_root_path == instance_path }
10
+ def find_instance(instance_name)
11
+ context.instances.find { |i| i.name == instance_name }
12
12
  end
13
13
 
14
14
  def find_instance!(instance_path)
@@ -30,7 +30,7 @@ module EacLauncher
30
30
  end
31
31
 
32
32
  def instance_label(instance)
33
- "#{instance.to_root_path} [#{instance_stereotypes(instance)}]"
33
+ "#{instance.name} [#{instance_stereotypes(instance)}]"
34
34
  end
35
35
  end
36
36
  end
@@ -2,15 +2,15 @@ module EacLauncher
2
2
  module Instances
3
3
  class Settings
4
4
  def initialize(data)
5
- @data = (data.is_a?(Hash) ? data : {})
5
+ @data = ActiveSupport::HashWithIndifferentAccess.new(data.is_a?(Hash) ? data : {})
6
6
  end
7
7
 
8
8
  def git_current_revision
9
- @data['git_current_revision'] || 'origin/master'
9
+ @data[__method__] || 'origin/master'
10
10
  end
11
11
 
12
12
  def git_publish_remote
13
- @data[__METHOD__] || 'publish'
13
+ @data[__method__] || 'publish'
14
14
  end
15
15
  end
16
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacLauncher
4
- VERSION = '0.1.5'.freeze
4
+ VERSION = '0.1.6'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-23 00:00:00.000000000 Z
11
+ date: 2018-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport