avm-tools 0.75.0 → 0.75.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '061861b37a86551104e76e78c988fabd4e421dbdcaf223fd567e36aa725abf49'
4
- data.tar.gz: e5b1a4bcd4cc716e9dfad2527143163a8e97528cabe7fa44ac01ed12a4fdbe6d
3
+ metadata.gz: 4600b008c9ecc3f3aaa220ec18cac2199559787186710d80e6cd1fda6f39cf97
4
+ data.tar.gz: a8f6c806934616363ef26f4acc6e486a0f3fd215867e013c588256c20e077086
5
5
  SHA512:
6
- metadata.gz: 83feb6ab0a6519f2319650eac3a15305fbc46d088a80d7521e14347fda3db9ea3503fe0c5a474d8899f9359f0807685ff7e4a33ccac0c610ac08406a33e137fa
7
- data.tar.gz: cb4f4ff1b6f0b7dad60530111f60a20acbef410a9edb2e6c865cfd0589808e5847bf21afc9e954f33092ab8faa1cefd084905fc1206d54c18d117c8bd5efbaec
6
+ metadata.gz: d10aa9242ee96189a7f43ab7ba1d1dc8cda2c7bb9961566ed7c2bf2a2a33d4c285eb1a42eb747342e2a6d2a1f5130e4681871dbc92cf9716978914216c922a12
7
+ data.tar.gz: 6eab4907c7e01156c4a7394e0ffa1503a1a8cdc3dce4e4f05aabd105b66c0576baecd6b30f0779e01565c78db3603614e8e75426b3cead19751d7bef2de582db
@@ -8,7 +8,7 @@ require 'shellwords'
8
8
  module Avm
9
9
  module EacRailsBase1
10
10
  class Runner < ::Avm::EacWebappBase0::Runner
11
- class Bundle < ::EacRubyUtils::Console::DocoptRunner
11
+ class Bundle
12
12
  runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle
13
13
  runner_definition do
14
14
  desc 'Runs "bundle ...".'
@@ -20,7 +20,7 @@ module Avm
20
20
  end
21
21
 
22
22
  def bundle_args
23
- options.fetch('<bundle-args>').reject { |arg| arg == '--' }
23
+ parsed.bundle_args.reject { |arg| arg == '--' }
24
24
  end
25
25
  end
26
26
  end
@@ -7,7 +7,7 @@ require 'eac_ruby_utils/console/docopt_runner'
7
7
  module Avm
8
8
  module EacRailsBase1
9
9
  class Runner < ::Avm::EacWebappBase0::Runner
10
- class CodeRunner < ::EacRubyUtils::Console::DocoptRunner
10
+ class CodeRunner
11
11
  runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle
12
12
  runner_definition do
13
13
  desc 'Runs a Ruby code with "rails runner".'
@@ -15,12 +15,12 @@ module Avm
15
15
  end
16
16
 
17
17
  def run
18
- infov 'Environment', context(:instance).host_env
18
+ infov 'Environment', runner_context.call(:instance).host_env
19
19
  bundle_run
20
20
  end
21
21
 
22
22
  def bundle_args
23
- %w[exec rails runner] + [options.fetch('<code>')]
23
+ %w[exec rails runner] + [parsed.code]
24
24
  end
25
25
  end
26
26
  end
@@ -17,7 +17,7 @@ module Avm
17
17
  ::Avm::Files::Appender
18
18
  .new
19
19
  .variables_source_set(variables_source)
20
- .append_directory(template.path)
20
+ .append_templatized_directory(template.path)
21
21
  .append_templatized_directories(appended_directories)
22
22
  .append_file_content(version_target_path, version)
23
23
  .write_appended_on(build_dir)
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/instances/runner'
3
4
  require 'avm/path_string'
4
5
  require 'eac_ruby_utils/console/docopt_runner'
5
6
  require 'eac_ruby_utils/console/speaker'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.75.0'
5
+ VERSION = '0.75.1'
6
6
  end
7
7
  end
@@ -1,16 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/common_constructor'
4
3
  require 'eac_ruby_utils/configs'
5
- require 'eac_ruby_utils/console/speaker'
6
- require 'eac_ruby_utils/options_consumer'
7
- require 'eac_ruby_utils/patches/object/asserts'
8
- require 'eac_ruby_utils/simple_cache'
4
+ require 'eac_ruby_utils/core_ext'
9
5
 
10
6
  module EacRubyUtils
11
7
  module Console
12
8
  class Configs
13
- include ::EacRubyUtils::Console::Speaker
9
+ require_sub __FILE__
10
+ enable_console_speaker
14
11
 
15
12
  class << self
16
13
  def entry_key_to_envvar_name(entry_key)
@@ -34,7 +31,7 @@ module EacRubyUtils
34
31
  end
35
32
 
36
33
  def read_password(entry_key, options = {})
37
- options = options.merge(noecho: true)
34
+ options = ReadEntryOptions.new(options.merge(noecho: true))
38
35
  if store_passwords?
39
36
  read_entry(entry_key, options)
40
37
  else
@@ -101,38 +98,6 @@ module EacRubyUtils
101
98
  warn('Entered value is blank') if entry_value.blank?
102
99
  entry_value
103
100
  end
104
-
105
- class ReadEntryOptions
106
- include ::EacRubyUtils::SimpleCache
107
- ::EacRubyUtils::CommonConstructor.new(:options).setup_class(self)
108
-
109
- DEFAULT_VALUES = {
110
- before_input: nil, bool: false, list: false, noecho: false, noenv: false, noinput: false,
111
- required: true, validator: nil
112
- }.freeze
113
-
114
- def [](key)
115
- values.fetch(key.to_sym)
116
- end
117
-
118
- def request_input_options
119
- values.slice(:bool, :list, :noecho)
120
- end
121
-
122
- private
123
-
124
- def values_uncached
125
- consumer = ::EacRubyUtils::OptionsConsumer.new(options)
126
- r = {}
127
- DEFAULT_VALUES.each do |key, default_value|
128
- value = consumer.consume(key)
129
- value = default_value if value.nil?
130
- r[key] = value
131
- end
132
- consumer.validate
133
- r
134
- end
135
- end
136
101
  end
137
102
  end
138
103
  end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacRubyUtils
6
+ module Console
7
+ class Configs
8
+ class ReadEntryOptions
9
+ enable_simple_cache
10
+ common_constructor :options
11
+
12
+ DEFAULT_VALUES = {
13
+ before_input: nil, bool: false, list: false, noecho: false, noenv: false, noinput: false,
14
+ required: true, validator: nil
15
+ }.freeze
16
+
17
+ def [](key)
18
+ values.fetch(key.to_sym)
19
+ end
20
+
21
+ def request_input_options
22
+ values.slice(:bool, :list, :noecho)
23
+ end
24
+
25
+ private
26
+
27
+ def values_uncached
28
+ consumer = options.to_options_consumer
29
+ r = {}
30
+ DEFAULT_VALUES.each do |key, default_value|
31
+ value = consumer.consume(key)
32
+ value = default_value if value.nil?
33
+ r[key] = value
34
+ end
35
+ consumer.validate
36
+ r
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.49.0'
4
+ VERSION = '0.49.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.75.0
4
+ version: 0.75.1
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-10-30 00:00:00.000000000 Z
11
+ date: 2020-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -484,7 +484,6 @@ files:
484
484
  - lib/avm/tools/runner.rb
485
485
  - lib/avm/tools/runner/eac_rails_base0.rb
486
486
  - lib/avm/tools/runner/eac_rails_base0/apache_path.rb
487
- - lib/avm/tools/runner/eac_rails_base0/bundle.rb
488
487
  - lib/avm/tools/runner/eac_rails_base0/rails_server.rb
489
488
  - lib/avm/tools/runner/eac_rails_base0/runner.rb
490
489
  - lib/avm/tools/runner/eac_redmine_base0.rb
@@ -895,6 +894,7 @@ files:
895
894
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/configs/file.rb
896
895
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/console.rb
897
896
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
897
+ - vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs/read_entry_options.rb
898
898
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner.rb
899
899
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb
900
900
  - vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_doc.rb
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/runner/bundle'
4
-
5
- module Avm
6
- module Tools
7
- class Runner < ::EacRubyUtils::Console::DocoptRunner
8
- class EacRailsBase0 < ::Avm::EacRailsBase1::Runner
9
- class Bundle < ::Avm::EacRailsBase1::Runner::Bundle
10
- end
11
- end
12
- end
13
- end
14
- end