eac_launcher 0.6.8 → 0.7.0

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
  SHA256:
3
- metadata.gz: 8ad0aa8774e1df1d7021fd0378efb380e010d62ef1e512133a804d482661f9dc
4
- data.tar.gz: e59ccce20cf0e91123a8c50c83273b8190dd7bf1f86ca9d5679a37521c8cb58a
3
+ metadata.gz: dc5c8e9304567b7ce13caa84773de5b00125780481c95ec3c2b2b1764fc99293
4
+ data.tar.gz: 7f2a01ba747baf92f8441497829d0d4f7277ae6cbffb27f5b7ff44b65c5d86e8
5
5
  SHA512:
6
- metadata.gz: 78962bf298d9f2ee7f0dbff6685996a7041d339237b2c39355bf5ebd90e98437a70b171f8b81e5b639b1e5b698606c5a771d0af6cf2480636af2734d3e61e740
7
- data.tar.gz: 371cd735e19e5aa369a5666dbf064e20cf0837b9cfab14e542612f60aececd280654406904b2cdb0151251654c88c6984643a94b3892cd0fba16ba0dd9eb0c7b
6
+ metadata.gz: d43f28992f7f580041927fec666f2648cf1a9bf4cd9ffa5775fc556cbaea9801f665d0b658ab3229e807f3e95c08db4b6a81987b3c3fcdf2610dea27d19ba0a5
7
+ data.tar.gz: 65c00f0e89738c5948629e7e2983cd3c37578ed9e9fb3bf252a7dd0cfa5099507dae12c8667c3e692c1f27de8e123dd2b47703dfdc47fbe152727e3320fa4648
@@ -11,7 +11,7 @@ module EacLauncher
11
11
 
12
12
  lists.add_string :status, :updated, :pending, :blocked, :outdated
13
13
 
14
- lists.status.values.each do |status|
14
+ lists.status.values.each do |status| # rubocop:disable Style/HashEachMethods
15
15
  class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
16
16
  def self.#{status}(message)
17
17
  new('#{status}', message)
@@ -108,7 +108,7 @@ module EacLauncher
108
108
 
109
109
  def on_clear_envvars(*start_with_vars)
110
110
  old_values = envvars_starting_with(start_with_vars)
111
- old_values.keys.each { |k| ENV.delete(k) }
111
+ old_values.each_key { |k| ENV.delete(k) }
112
112
  yield
113
113
  ensure
114
114
  old_values&.each { |k, v| ENV[k] = v }
@@ -7,7 +7,7 @@ module EacLauncher
7
7
  Publica projetos ou instâncias.
8
8
 
9
9
  Usage:
10
- __PROGRAM__ (check|dry-run|run) [options] [<instance_path>...]
10
+ __PROGRAM__ [options] [<instance_path>...]
11
11
  __PROGRAM__ -h | --help
12
12
 
13
13
  Options:
@@ -15,15 +15,13 @@ Options:
15
15
  --new Publish projects not published before.
16
16
  -s --stereotype=<st> Publish only for stereotype <stereotype>.
17
17
  --all Publish all instances.
18
+ -d --dry-run "Dry run" publishing.
18
19
  --pending Publish only pending.
19
20
  --recache Rewrite instances cache.
21
+ --run Confirm publishing.
20
22
 
21
23
  DOCOPT
22
24
 
23
- OPTIONS = {
24
- new: '--new', confirm: 'run', stereotype: '--stereotype'
25
- }.freeze
26
-
27
25
  def run
28
26
  ::EacLauncher::Context.current.recache = options['--recache']
29
27
  build_publish_options
@@ -36,8 +34,12 @@ DOCOPT
36
34
 
37
35
  private
38
36
 
37
+ def dry_run?
38
+ options.fetch('--dry-run')
39
+ end
40
+
39
41
  def instance_method
40
- options['run'] || options['dry-run'] ? 'publish_run' : 'publish_check'
42
+ run? || dry_run? ? 'publish_run' : 'publish_check'
41
43
  end
42
44
 
43
45
  def build_publish_options
@@ -45,7 +47,12 @@ DOCOPT
45
47
  end
46
48
 
47
49
  def publish_options
48
- Hash[OPTIONS.map { |k, v| [k, options[v]] }]
50
+ { new: options.fetch('--new'), stereotype: options.fetch('--stereotype'),
51
+ confirm: run? }
52
+ end
53
+
54
+ def run?
55
+ options.fetch('--run') && !dry_run?
49
56
  end
50
57
  end
51
58
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacLauncher
4
- VERSION = '0.6.8'
4
+ VERSION = '0.7.0'
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.6.8
4
+ version: 0.7.0
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: 2020-03-06 00:00:00.000000000 Z
11
+ date: 2020-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -101,33 +101,19 @@ dependencies:
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  - !ruby/object:Gem::Dependency
104
- name: rspec
104
+ name: eac_ruby_gem_support
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '3.7'
109
+ version: '0.1'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '3.7'
117
- - !ruby/object:Gem::Dependency
118
- name: rubocop
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '0.74'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '0.74'
116
+ version: '0.1'
131
117
  description:
132
118
  email:
133
119
  executables: