avm 0.84.0 → 0.84.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/applications/base/publishing.rb +1 -1
- data/lib/avm/data/rotate.rb +1 -1
- data/lib/avm/docker/image.rb +3 -3
- data/lib/avm/docker/runner.rb +1 -1
- data/lib/avm/entries/base/uri_components_entries_values/path_component.rb +1 -1
- data/lib/avm/entries/keys_constants_set.rb +1 -1
- data/lib/avm/entries/uri_builder.rb +2 -2
- data/lib/avm/executables.rb +1 -1
- data/lib/avm/instances/base/install.rb +1 -1
- data/lib/avm/instances/base.rb +1 -1
- data/lib/avm/instances/ids.rb +1 -1
- data/lib/avm/launcher/context/instance_manager/cached_instances.rb +1 -1
- data/lib/avm/launcher/context/instance_manager.rb +1 -1
- data/lib/avm/launcher/instances/base.rb +2 -2
- data/lib/avm/launcher/paths/logical.rb +3 -3
- data/lib/avm/launcher/publish/check_result.rb +2 -4
- data/lib/avm/path_string.rb +1 -1
- data/lib/avm/result.rb +6 -10
- data/lib/avm/rspec/shared_examples/avm_file_format_file_resource_name.rb +1 -1
- data/lib/avm/rspec/shared_examples/avm_file_formats_with_fixtures.rb +5 -5
- data/lib/avm/rspec/shared_examples/avm_source_generated.rb +3 -3
- data/lib/avm/rspec/shared_examples/entries_values.rb +2 -2
- data/lib/avm/rspec/shared_examples/in_avm_registry.rb +2 -2
- data/lib/avm/rspec/shared_examples/not_in_avm_registry.rb +2 -2
- data/lib/avm/scms/auto_commit/file_resource_name.rb +1 -1
- data/lib/avm/scms/auto_commit/rules.rb +3 -3
- data/lib/avm/scms/commit_info.rb +9 -3
- data/lib/avm/source_generators/runner.rb +1 -1
- data/lib/avm/sources/base/subs.rb +1 -1
- data/lib/avm/sources/base/testing.rb +2 -2
- data/lib/avm/sources/tests/single.rb +1 -1
- data/lib/avm/version.rb +1 -1
- metadata +8 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04fc28e6c812fafc3f5058dcecd83bc88747313b69f8eecd9572d2dd488a3bd9
|
4
|
+
data.tar.gz: 75caf23c90d9f359e36a8a08158b6be25ddf2f7f898f27358b860fbf836a6cc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9cc4823f23801e9ace4a30321aef793420f9e3b4f3a57704421f3df9f8575c5173b9e04b3377828778a58bf93adb8a1331d528227cc52be691b101c17e0d00b
|
7
|
+
data.tar.gz: 94f592cb4ed045330c5eb29aafd3d21be3f074c1923b5c4feb9f8194d0792d9c39ab0cb1a668098342e1ae82bcec6ceee435afc9699553756067e204b83c51b9
|
@@ -26,7 +26,7 @@ module Avm
|
|
26
26
|
parse_publishable_value(entry(PUBLISHABLE_KEY).optional_value, false)
|
27
27
|
end
|
28
28
|
|
29
|
-
def parse_publishable_value(value, hash_to_true)
|
29
|
+
def parse_publishable_value(value, hash_to_true)
|
30
30
|
return value.with_indifferent_access if parse_publishable_value_hash?(value, hash_to_true)
|
31
31
|
return true if value.nil? || value == true
|
32
32
|
return false if value == false || value.is_a?(::EacRubyUtils::BlankNotBlank)
|
data/lib/avm/data/rotate.rb
CHANGED
@@ -93,7 +93,7 @@ module Avm
|
|
93
93
|
return '_UNKNOWN_MTIME' unless ::File.exist?(source_path)
|
94
94
|
|
95
95
|
t = ::File.mtime(source_path)
|
96
|
-
t.strftime('_%Y-%m-%d_%H-%M-%S_') + t.strftime('%z').gsub(/\A\+/, 'P').gsub(/\A
|
96
|
+
t.strftime('_%Y-%m-%d_%H-%M-%S_') + t.strftime('%z').gsub(/\A\+/, 'P').gsub(/\A-/, 'N')
|
97
97
|
end
|
98
98
|
|
99
99
|
def file_extension(basename)
|
data/lib/avm/docker/image.rb
CHANGED
@@ -21,10 +21,10 @@ module Avm
|
|
21
21
|
end
|
22
22
|
|
23
23
|
attr_reader :registry
|
24
|
-
attr_accessor :snapshot
|
25
|
-
attr_accessor :version
|
24
|
+
attr_accessor :snapshot, :version
|
26
25
|
|
27
26
|
def initialize(registry = nil)
|
27
|
+
super()
|
28
28
|
@registry = registry || self.class.default_registry
|
29
29
|
self.snapshot = true
|
30
30
|
self.version = true
|
@@ -61,7 +61,7 @@ module Avm
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def tag_version
|
64
|
-
[tag_version_version, stereotype_tag].
|
64
|
+
[tag_version_version, stereotype_tag].compact_blank.join('_')
|
65
65
|
end
|
66
66
|
|
67
67
|
def tag_version_version
|
data/lib/avm/docker/runner.rb
CHANGED
@@ -10,7 +10,7 @@ module Avm
|
|
10
10
|
class PathComponent < ::Avm::Entries::Base::UriComponentsEntriesValues::GenericComponent
|
11
11
|
def setup
|
12
12
|
super
|
13
|
-
define_inherited_value_proc_method { |value| value
|
13
|
+
define_inherited_value_proc_method { |value| "#{value}/#{id}" }
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -49,7 +49,7 @@ module Avm
|
|
49
49
|
# @return [String, nil]
|
50
50
|
def field_get(name)
|
51
51
|
v = data[name.to_sym]
|
52
|
-
v
|
52
|
+
v&.to_s
|
53
53
|
end
|
54
54
|
|
55
55
|
def field_set(field, value)
|
@@ -78,7 +78,7 @@ module Avm
|
|
78
78
|
|
79
79
|
# @return [Addressable::URI]
|
80
80
|
def to_required_uri
|
81
|
-
::Addressable::URI.new(FIELDS.
|
81
|
+
::Addressable::URI.new(FIELDS.to_h { |f| [f.to_sym, field_get(f)] })
|
82
82
|
end
|
83
83
|
|
84
84
|
private
|
data/lib/avm/executables.rb
CHANGED
data/lib/avm/instances/base.rb
CHANGED
data/lib/avm/instances/ids.rb
CHANGED
@@ -6,7 +6,7 @@ module Avm
|
|
6
6
|
module Instances
|
7
7
|
module Ids
|
8
8
|
ID_PARTS_SEPARATOR = '_'
|
9
|
-
ID_PATTERN = /\A([a-z0-9]+(
|
9
|
+
ID_PATTERN = /\A([a-z0-9]+(?:-[a-z0-9]+)*)_(.+)\z/.freeze
|
10
10
|
ID_PARSER = ID_PATTERN.to_parser do |m|
|
11
11
|
::Struct.new(:application_id, :instance_suffix).new(m[1], m[2])
|
12
12
|
end
|
@@ -60,11 +60,11 @@ module Avm
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def included?
|
63
|
-
|
63
|
+
::Avm::Launcher::Context.current.settings.excluded_projects.exclude?(project_name)
|
64
64
|
end
|
65
65
|
|
66
66
|
def to_h
|
67
|
-
super.to_h.merge(parent: parent
|
67
|
+
super.to_h.merge(parent: parent&.logical)
|
68
68
|
end
|
69
69
|
|
70
70
|
private
|
@@ -28,7 +28,7 @@ module Avm
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def to_h
|
31
|
-
{ logical: logical, real: real.to_s, parent_path: parent_path
|
31
|
+
{ logical: logical, real: real.to_s, parent_path: parent_path&.to_h }
|
32
32
|
end
|
33
33
|
|
34
34
|
def project?
|
@@ -48,13 +48,13 @@ module Avm
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def included?
|
51
|
-
|
51
|
+
context.settings.excluded_paths.exclude?(logical)
|
52
52
|
end
|
53
53
|
|
54
54
|
private
|
55
55
|
|
56
56
|
def stereotypes_uncached
|
57
|
-
::Avm::Launcher::Stereotype.stereotypes.select { |s| s.match?(self) }
|
57
|
+
::Avm::Launcher::Stereotype.stereotypes.select { |s| s.match?(self) } # rubocop:disable Style/SelectByRegexp
|
58
58
|
end
|
59
59
|
|
60
60
|
def build_child(name)
|
@@ -13,11 +13,9 @@ module Avm
|
|
13
13
|
lists.add_string :status, :updated, :pending, :blocked, :outdated
|
14
14
|
|
15
15
|
lists.status.values.each do |status| # rubocop:disable Style/HashEachMethods
|
16
|
-
|
17
|
-
|
18
|
-
new('#{status}', message)
|
16
|
+
singleton_class.define_method status do |message|
|
17
|
+
new(status, message)
|
19
18
|
end
|
20
|
-
RUBY_EVAL
|
21
19
|
end
|
22
20
|
|
23
21
|
class << self
|
data/lib/avm/path_string.rb
CHANGED
data/lib/avm/result.rb
CHANGED
@@ -11,11 +11,9 @@ module Avm
|
|
11
11
|
lists.add_string :type, :success, :error, :neutral, :pending, :outdated
|
12
12
|
|
13
13
|
lists.type.values.each do |type| # rubocop:disable Style/HashEachMethods
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
18
|
-
RUBY_EVAL
|
14
|
+
singleton_class.define_method type do |value|
|
15
|
+
new(value, type)
|
16
|
+
end
|
19
17
|
end
|
20
18
|
|
21
19
|
TYPE_SUCCESS_COLOR = 'green'
|
@@ -62,11 +60,9 @@ module Avm
|
|
62
60
|
end
|
63
61
|
|
64
62
|
lists.type.values.each do |type| # rubocop:disable Style/HashEachMethods
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
end
|
69
|
-
RUBY_EVAL
|
63
|
+
define_method "#{type}?" do
|
64
|
+
@type == type
|
65
|
+
end
|
70
66
|
end
|
71
67
|
|
72
68
|
private
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
4
|
|
5
|
-
|
5
|
+
RSpec.shared_examples 'avm_file_format_file_resource_name' do |input_expected|
|
6
6
|
describe '#file_resource_name' do
|
7
7
|
input_expected.each do |path, expected_resource_name|
|
8
8
|
context "when path is \"#{path}\"" do
|
@@ -3,11 +3,11 @@
|
|
3
3
|
require 'avm/file_formats/search_formatter'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
|
-
|
6
|
+
RSpec.shared_examples 'avm_file_formats_with_fixtures' do |the_spec_file|
|
7
7
|
include_examples 'source_target_fixtures', the_spec_file
|
8
8
|
|
9
9
|
def format_files_in_directory(target_dir)
|
10
|
-
|
10
|
+
Avm::FileFormats::SearchFormatter
|
11
11
|
.new([target_dir], recursive: true, apply: true, verbose: false)
|
12
12
|
.run
|
13
13
|
end
|
@@ -16,16 +16,16 @@ require 'eac_ruby_utils/core_ext'
|
|
16
16
|
dir = temp_dir
|
17
17
|
source_basename = source_file_basename_without_source_extname(source_file)
|
18
18
|
source_path = dir.join(source_basename)
|
19
|
-
|
19
|
+
FileUtils.cp(source_file, source_path)
|
20
20
|
format_files_in_directory(dir)
|
21
21
|
source_path.read
|
22
22
|
end
|
23
23
|
|
24
24
|
def source_file_basename_without_source_extname(source_file)
|
25
|
-
source_file.to_pathname.basename_sub { |b| b.to_path.gsub(
|
25
|
+
source_file.to_pathname.basename_sub { |b| b.to_path.gsub('.source', '') }.basename
|
26
26
|
end
|
27
27
|
|
28
28
|
def target_data(target_file)
|
29
|
-
|
29
|
+
File.read(target_file)
|
30
30
|
end
|
31
31
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
require 'eac_fs/comparator'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
|
-
|
7
|
-
fixtures_dir =
|
6
|
+
RSpec.shared_examples 'avm_source_generated' do |spec_file, stereotype, options = {}|
|
7
|
+
fixtures_dir = Pathname.new('base_spec_files').expand_path(File.dirname(spec_file))
|
8
8
|
|
9
9
|
fixtures_dir.children.select(&:directory?).each do |target_dir|
|
10
10
|
context "when target is \"#{target_dir.basename}\"" do
|
@@ -18,6 +18,6 @@ require 'eac_ruby_utils/core_ext'
|
|
18
18
|
|
19
19
|
# @return [EacFs::Comparato]
|
20
20
|
def fs_comparator
|
21
|
-
|
21
|
+
EacFs::Comparator.new.rename_file('.gitignore', '_gitignore')
|
22
22
|
end
|
23
23
|
end
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
4
|
|
5
|
-
|
5
|
+
RSpec.shared_examples 'entries_values' do |spec_file, expected_values|
|
6
6
|
describe '#read_entry' do
|
7
7
|
config_path = spec_file.to_pathname
|
8
8
|
config_path = config_path.dirname.join("#{config_path.basename_noext}_files", 'config.yml')
|
9
|
-
|
9
|
+
EacRubyUtils::Rspec.default_setup.stub_eac_config_node(self, config_path)
|
10
10
|
|
11
11
|
expected_values.each do |instance_id, values|
|
12
12
|
values.each do |input, expected|
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'avm/registry'
|
4
4
|
|
5
|
-
|
6
|
-
let(:avm_registry) {
|
5
|
+
RSpec.shared_examples 'in_avm_registry' do |registry_method|
|
6
|
+
let(:avm_registry) { Avm::Registry.send(registry_method) }
|
7
7
|
|
8
8
|
it 'is in the avm registry' do
|
9
9
|
expect(avm_registry.registered_modules).to include(described_class)
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'avm/registry'
|
4
4
|
|
5
|
-
|
6
|
-
registry_method.if_present(
|
5
|
+
RSpec.shared_examples 'not_in_avm_registry' do |registry_method = nil|
|
6
|
+
registry_method.if_present(Avm::Registry.registries) { |v| [Avm::Registry.send(v)] }
|
7
7
|
.each do |registry|
|
8
8
|
context "when registry is #{registry}" do
|
9
9
|
it 'is not in the avm registry' do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
4
|
|
5
|
-
|
5
|
+
EacRubyUtils.require_sub __FILE__
|
6
6
|
|
7
7
|
module Avm
|
8
8
|
module Scms
|
@@ -26,8 +26,8 @@ module Avm
|
|
26
26
|
|
27
27
|
def rule_class_by_key(key)
|
28
28
|
RULES_CLASSES.find { |klass| klass.keys.include?(key) } ||
|
29
|
-
raise("Rule not find with key \"#{key}\" (Available: "
|
30
|
-
|
29
|
+
raise("Rule not find with key \"#{key}\" (Available: " \
|
30
|
+
"#{RULES_CLASSES.flat_map(&:keys).join(', ')})")
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
data/lib/avm/scms/commit_info.rb
CHANGED
@@ -24,9 +24,15 @@ module Avm
|
|
24
24
|
immutable_accessor :path, type: :array
|
25
25
|
|
26
26
|
def to_s
|
27
|
-
self.class.name.demodulize
|
28
|
-
|
29
|
-
|
27
|
+
"#{self.class.name.demodulize}[#{attributes_to_s}]"
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
# @return [String]
|
33
|
+
def attributes_to_s
|
34
|
+
%w[fixup message].map { |m| [m, send(m)] }.reject { |m| m[1].blank? }
|
35
|
+
.map { |m| m.join(': ') }.join(',')
|
30
36
|
end
|
31
37
|
end
|
32
38
|
end
|
@@ -57,12 +57,12 @@ module Avm
|
|
57
57
|
|
58
58
|
def configured_enumerable_value_as_test_commands(value)
|
59
59
|
configured_hash_value_as_test_commands(
|
60
|
-
value.each_with_index.
|
60
|
+
value.each_with_index.to_h { |v, i| ["test_#{i}", v] }
|
61
61
|
)
|
62
62
|
end
|
63
63
|
|
64
64
|
def configured_hash_value_as_test_commands(value)
|
65
|
-
value.
|
65
|
+
value.to_h { |k, v| [k.to_s.strip, configuration_value_to_env_command(v)] }
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
data/lib/avm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.84.
|
4
|
+
version: 0.84.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -16,34 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.22'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.22'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: eac_cli
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 0.38.1
|
33
|
+
version: '0.39'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 0.38.1
|
40
|
+
version: '0.39'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: eac_config
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,20 +112,14 @@ dependencies:
|
|
118
112
|
requirements:
|
119
113
|
- - "~>"
|
120
114
|
- !ruby/object:Gem::Version
|
121
|
-
version: '0.
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.119.2
|
115
|
+
version: '0.120'
|
125
116
|
type: :runtime
|
126
117
|
prerelease: false
|
127
118
|
version_requirements: !ruby/object:Gem::Requirement
|
128
119
|
requirements:
|
129
120
|
- - "~>"
|
130
121
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0.
|
132
|
-
- - ">="
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: 0.119.2
|
122
|
+
version: '0.120'
|
135
123
|
- !ruby/object:Gem::Dependency
|
136
124
|
name: eac_templates
|
137
125
|
requirement: !ruby/object:Gem::Requirement
|