avm-tools 0.113.3 → 0.113.4
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 +4 -4
- data/lib/avm/tools/runner/self.rb +2 -2
- data/lib/avm/tools/self.rb +0 -13
- data/lib/avm/tools/version.rb +1 -1
- data/sub/avm/lib/avm/instances/base/auto_values/data.rb +2 -2
- data/sub/avm/lib/avm/instances/entry.rb +10 -4
- data/sub/avm/lib/avm/self/instance.rb +8 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +0 -1
- data/sub/avm-eac_rails_base0/spec/spec_helper.rb +1 -5
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/sub/eac_cli/eac_cli.gemspec +1 -1
- data/sub/eac_cli/lib/eac_cli/config/entry/options.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/config/entry/undefined.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/config/entry.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/rspec/setup.rb +44 -0
- data/sub/eac_cli/lib/eac_cli/rspec.rb +9 -0
- data/sub/eac_cli/lib/eac_cli/speaker/constants.rb +13 -0
- data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
- data/sub/eac_config/lib/eac_config/rspec/setup.rb +11 -3
- data/sub/eac_config/lib/eac_config/version.rb +1 -1
- data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +1 -1
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/rspec/setup.rb +14 -0
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/rspec.rb +9 -0
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- metadata +11 -14
- data/sub/eac_cli/lib/eac_cli/old_configs_bridge.rb +0 -39
- data/sub/eac_cli/lib/eac_cli/speaker/_constants.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5488a15876aa81048d9c653caff915780167551415a60d351c3137fd2418f78a
|
4
|
+
data.tar.gz: 73cf7cf7ef72418ded4b5cffac2dd4f7e2e399ce3a2b3149d962a5f1805d1e85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed7d05f9c93b6710189ec11e8b3e9f604b5066a2612c4053e978ac23d04da049257a42e6eab379c27b594d3255b09e682b44ae47d596e7529e53dcbe72c5da11
|
7
|
+
data.tar.gz: 18511d97a59192acf9e1ed6c14bf8e8a892c2a4a5af6caacfc5d9e7e9453a75057b2a265ea73b6890edc0a04e6f12070e63f973a8329e0582a2f96d6dd5d2793
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/tools/core_ext'
|
4
|
-
require 'avm/
|
4
|
+
require 'avm/self/instance'
|
5
5
|
|
6
6
|
module Avm
|
7
7
|
module Tools
|
@@ -14,7 +14,7 @@ module Avm
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def instance
|
17
|
-
::Avm::
|
17
|
+
::Avm::Self::Instance.default
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/lib/avm/tools/self.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_cli/old_configs_bridge'
|
4
3
|
require 'eac_ruby_base0/application'
|
5
4
|
require 'eac_ruby_utils/require_sub'
|
6
5
|
require 'avm/instances/base'
|
@@ -15,18 +14,6 @@ module Avm
|
|
15
14
|
@application ||= ::EacRubyBase0::Application.new(root.to_path)
|
16
15
|
end
|
17
16
|
|
18
|
-
# @return [EacCli::OldConfigsBridge]
|
19
|
-
def build_config(path = nil)
|
20
|
-
::EacCli::OldConfigsBridge.new(
|
21
|
-
application.name,
|
22
|
-
path.if_present({}) { |v| { storage_path: v } }
|
23
|
-
)
|
24
|
-
end
|
25
|
-
|
26
|
-
def instance
|
27
|
-
@instance ||= ::Avm::Tools::Self::Instance.by_id('avm-tools_self')
|
28
|
-
end
|
29
|
-
|
30
17
|
def root
|
31
18
|
::Pathname.new('../../..').expand_path(__dir__)
|
32
19
|
end
|
data/lib/avm/tools/version.rb
CHANGED
@@ -9,8 +9,8 @@ module Avm
|
|
9
9
|
module AutoValues
|
10
10
|
module Data
|
11
11
|
def auto_data_default_dump_path
|
12
|
-
::Avm::Self
|
13
|
-
.
|
12
|
+
::Avm::Self::Instance
|
13
|
+
.default
|
14
14
|
.read_entry_optional(::Avm::Self::Instance::EntryKeys::DATA_DEFAULT_PATH)
|
15
15
|
.if_present do |v|
|
16
16
|
::File.join(
|
@@ -27,11 +27,11 @@ module Avm
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def optional_value
|
30
|
-
|
30
|
+
context_entry.found? ? context_entry.value : auto_value
|
31
31
|
end
|
32
32
|
|
33
|
-
def read
|
34
|
-
|
33
|
+
def read
|
34
|
+
context_entry.value
|
35
35
|
end
|
36
36
|
|
37
37
|
def suffix_as_array
|
@@ -47,7 +47,13 @@ module Avm
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def write(value)
|
50
|
-
|
50
|
+
context_entry.value = value
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def context_entry
|
56
|
+
::EacConfig::Node.context.current.entry(full_path)
|
51
57
|
end
|
52
58
|
end
|
53
59
|
end
|
@@ -8,6 +8,14 @@ require 'avm/eac_ubuntu_base0/docker_image'
|
|
8
8
|
module Avm
|
9
9
|
module Self
|
10
10
|
class Instance < ::Avm::Instances::Base
|
11
|
+
DEFAULT_INSTANCE_ID = 'avm_self'
|
12
|
+
|
13
|
+
class << self
|
14
|
+
def default
|
15
|
+
@default ||= by_id(DEFAULT_INSTANCE_ID)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
11
19
|
def docker_image_class
|
12
20
|
::Avm::Self::DockerImage
|
13
21
|
end
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -15,6 +15,5 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.add_dependency 'avm-eac_rails_base1', '~> 0.1', '>= 0.1.3'
|
16
16
|
s.add_dependency 'eac_ruby_utils', '~> 0.80', '>= 0.80.2'
|
17
17
|
|
18
|
-
s.add_development_dependency 'eac_cli', '~> 0.24', '~> 0.24.1'
|
19
18
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
|
20
19
|
end
|
@@ -2,8 +2,4 @@
|
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/rspec/default_setup'
|
4
4
|
::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
|
5
|
-
|
6
|
-
require 'eac_cli/old_configs_bridge'
|
7
|
-
::EacRubyUtils::Rspec.default_setup.stub_eac_config_node do |file|
|
8
|
-
::EacCli::OldConfigsBridge.new(file)
|
9
|
-
end
|
5
|
+
::EacRubyUtils::Rspec.default_setup.stub_eac_config_node
|
data/sub/eac_cli/eac_cli.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*', 'Gemfile']
|
14
14
|
|
15
15
|
s.add_dependency 'colorize', '~> 0.8.1'
|
16
|
-
s.add_dependency 'eac_config', '~> 0.
|
16
|
+
s.add_dependency 'eac_config', '~> 0.7'
|
17
17
|
s.add_dependency 'eac_ruby_utils', '~> 0.80'
|
18
18
|
|
19
19
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3'
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/config/entry'
|
4
|
+
require 'eac_cli/speaker'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
require 'eac_ruby_utils/speaker'
|
7
|
+
|
8
|
+
module EacCli
|
9
|
+
module Rspec
|
10
|
+
module Setup
|
11
|
+
def disable_input_request
|
12
|
+
disable_config_input_request
|
13
|
+
disable_speaker_input_request
|
14
|
+
end
|
15
|
+
|
16
|
+
def disable_config_input_request
|
17
|
+
rspec_config.before do
|
18
|
+
allow_any_instance_of(::EacCli::Config::Entry).to receive(:input_value) do |obj|
|
19
|
+
raise "Console input requested for entry (Path: #{obj.path})"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def disable_speaker_input_request
|
25
|
+
::RSpec.configure do |config|
|
26
|
+
config.around do |example|
|
27
|
+
::EacRubyUtils::Speaker.context.on(
|
28
|
+
::EacCli::Speaker.new(err_out: ::StringIO.new, out_out: ::StringIO.new,
|
29
|
+
in_in: FailIfRequestInput.new)
|
30
|
+
) { example.run }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
class FailIfRequestInput
|
36
|
+
%w[gets noecho].each do |method|
|
37
|
+
define_method(method) do
|
38
|
+
raise "Input method requested: #{method}. Should not request input on RSpec."
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/by_reference'
|
4
|
+
|
5
|
+
module EacCli
|
6
|
+
class Speaker
|
7
|
+
module Constants
|
8
|
+
STDERR = ::EacRubyUtils::ByReference.new { $stderr }
|
9
|
+
STDIN = ::EacRubyUtils::ByReference.new { $stdin }
|
10
|
+
STDOUT = ::EacRubyUtils::ByReference.new { $stdout }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -29,10 +29,10 @@ module EacConfig
|
|
29
29
|
::EacConfig::EnvvarsNode.new.load_path.entry
|
30
30
|
end
|
31
31
|
|
32
|
-
def stub_eac_config_node(&node_builder)
|
32
|
+
def stub_eac_config_node(target_example = nil, target_file = nil, &node_builder)
|
33
33
|
parent_self = self
|
34
|
-
rspec_config.around do |example|
|
35
|
-
|
34
|
+
(target_example || rspec_config).around do |example|
|
35
|
+
parent_self.stub_eac_config_node_on_file(target_file) do |file|
|
36
36
|
::EacConfig::Node
|
37
37
|
.context.on(parent_self.stub_eac_config_node_build(file, &node_builder)) do
|
38
38
|
example.run
|
@@ -44,6 +44,14 @@ module EacConfig
|
|
44
44
|
def stub_eac_config_node_build(file, &node_builder)
|
45
45
|
node_builder.present? ? node_builder.call(file) : ::EacConfig::YamlFileNode.new(file)
|
46
46
|
end
|
47
|
+
|
48
|
+
def stub_eac_config_node_on_file(target_file)
|
49
|
+
if target_file
|
50
|
+
yield(target_file.to_pathname)
|
51
|
+
else
|
52
|
+
::EacRubyUtils::Fs::Temp.on_file { |file| yield(file) }
|
53
|
+
end
|
54
|
+
end
|
47
55
|
end
|
48
56
|
end
|
49
57
|
end
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'eac_cli', '~> 0.
|
15
|
+
s.add_dependency 'eac_cli', '~> 0.25'
|
16
16
|
s.add_dependency 'eac_fs', '~> 0.3'
|
17
17
|
s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '~> 0.9.6'
|
18
18
|
s.add_dependency 'eac_ruby_utils', '~> 0.70'
|
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.113.
|
4
|
+
version: 0.113.4
|
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: 2021-12-
|
11
|
+
date: 2021-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.13'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.13'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: avm-eac_asciidoctor_base0
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,20 +176,14 @@ dependencies:
|
|
176
176
|
requirements:
|
177
177
|
- - "~>"
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version: '0.
|
180
|
-
- - ">="
|
181
|
-
- !ruby/object:Gem::Version
|
182
|
-
version: 0.13.2
|
179
|
+
version: '0.14'
|
183
180
|
type: :runtime
|
184
181
|
prerelease: false
|
185
182
|
version_requirements: !ruby/object:Gem::Requirement
|
186
183
|
requirements:
|
187
184
|
- - "~>"
|
188
185
|
- !ruby/object:Gem::Version
|
189
|
-
version: '0.
|
190
|
-
- - ">="
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: 0.13.2
|
186
|
+
version: '0.14'
|
193
187
|
- !ruby/object:Gem::Dependency
|
194
188
|
name: eac_ruby_gems_utils
|
195
189
|
requirement: !ruby/object:Gem::Requirement
|
@@ -780,7 +774,6 @@ files:
|
|
780
774
|
- sub/eac_cli/lib/eac_cli/old_configs/password_entry_reader.rb
|
781
775
|
- sub/eac_cli/lib/eac_cli/old_configs/read_entry_options.rb
|
782
776
|
- sub/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb
|
783
|
-
- sub/eac_cli/lib/eac_cli/old_configs_bridge.rb
|
784
777
|
- sub/eac_cli/lib/eac_cli/parser.rb
|
785
778
|
- sub/eac_cli/lib/eac_cli/parser/alternative.rb
|
786
779
|
- sub/eac_cli/lib/eac_cli/parser/alternative/argv.rb
|
@@ -795,6 +788,8 @@ files:
|
|
795
788
|
- sub/eac_cli/lib/eac_cli/patches.rb
|
796
789
|
- sub/eac_cli/lib/eac_cli/patches/object.rb
|
797
790
|
- sub/eac_cli/lib/eac_cli/patches/object/runner_with.rb
|
791
|
+
- sub/eac_cli/lib/eac_cli/rspec.rb
|
792
|
+
- sub/eac_cli/lib/eac_cli/rspec/setup.rb
|
798
793
|
- sub/eac_cli/lib/eac_cli/runner.rb
|
799
794
|
- sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb
|
800
795
|
- sub/eac_cli/lib/eac_cli/runner/context.rb
|
@@ -808,7 +803,7 @@ files:
|
|
808
803
|
- sub/eac_cli/lib/eac_cli/runner_with/subcommands/definition_concern.rb
|
809
804
|
- sub/eac_cli/lib/eac_cli/runner_with_set.rb
|
810
805
|
- sub/eac_cli/lib/eac_cli/speaker.rb
|
811
|
-
- sub/eac_cli/lib/eac_cli/speaker/
|
806
|
+
- sub/eac_cli/lib/eac_cli/speaker/constants.rb
|
812
807
|
- sub/eac_cli/lib/eac_cli/speaker/list.rb
|
813
808
|
- sub/eac_cli/lib/eac_cli/speaker/options.rb
|
814
809
|
- sub/eac_cli/lib/eac_cli/version.rb
|
@@ -1132,6 +1127,8 @@ files:
|
|
1132
1127
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb
|
1133
1128
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb
|
1134
1129
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb
|
1130
|
+
- sub/eac_ruby_base0/lib/eac_ruby_base0/rspec.rb
|
1131
|
+
- sub/eac_ruby_base0/lib/eac_ruby_base0/rspec/setup.rb
|
1135
1132
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
|
1136
1133
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb
|
1137
1134
|
- sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_cli/config'
|
4
|
-
require 'eac_config/envvars_node'
|
5
|
-
require 'eac_config/yaml_file_node'
|
6
|
-
require 'eac_ruby_utils/core_ext'
|
7
|
-
|
8
|
-
module EacCli
|
9
|
-
class OldConfigsBridge < ::EacCli::Config
|
10
|
-
ENTRY_KEY = 'core.store_passwords'
|
11
|
-
|
12
|
-
class << self
|
13
|
-
def new_configs_path(configs_key, options)
|
14
|
-
options[:storage_path] || ::File.join(ENV['HOME'], '.config', configs_key, 'settings.yml')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def initialize(configs_key, options = {})
|
19
|
-
options.assert_argument(::Hash, 'options')
|
20
|
-
envvar_node = ::EacConfig::EnvvarsNode.new
|
21
|
-
file_node = ::EacConfig::YamlFileNode.new(self.class.new_configs_path(configs_key, options))
|
22
|
-
envvar_node.load_path.push(file_node.url)
|
23
|
-
envvar_node.write_node = file_node
|
24
|
-
super(envvar_node)
|
25
|
-
end
|
26
|
-
|
27
|
-
def read_entry(entry_key, options = {})
|
28
|
-
entry(entry_key, options).value
|
29
|
-
end
|
30
|
-
|
31
|
-
def read_password(entry_key, options = {})
|
32
|
-
entry(entry_key, options.merge(noecho: true, store: store_passwords?)).value
|
33
|
-
end
|
34
|
-
|
35
|
-
def store_passwords?
|
36
|
-
read_entry(ENTRY_KEY, bool: true)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/by_reference'
|
4
|
-
|
5
|
-
module EacCli
|
6
|
-
# https://github.com/fazibear/colorize
|
7
|
-
class Speaker
|
8
|
-
STDERR = ::EacRubyUtils::ByReference.new { $stderr }
|
9
|
-
STDIN = ::EacRubyUtils::ByReference.new { $stdin }
|
10
|
-
STDOUT = ::EacRubyUtils::ByReference.new { $stdout }
|
11
|
-
end
|
12
|
-
end
|