eac_tools 0.24.0 → 0.24.1

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: 6548064142eb8ef0905dfc0c1705229f1554f3adb631fa0ec171888c32e8f0fa
4
- data.tar.gz: 0c76aefc07d8a02763ffbcdd551a07b0f0a019f5b1fa626ce727ca4ce5eec0da
3
+ metadata.gz: 01ef491263c804f929167ab7067054cfd5341598cf5c7855915f187d8206727c
4
+ data.tar.gz: 6dfc25b5ee4e38978a80a50980cdbb15a992f6a7fd8a695d7298e481f176f839
5
5
  SHA512:
6
- metadata.gz: 18a95cc1eb6a32ec6f0273fb07be9c9217cba540033166b95007ebcfa73f53e29619fd4d5bfde46d57c7085c8af8834be5f7a2ad945fb06350d4621b9f7e8227
7
- data.tar.gz: cb554e78ef18fe33ff56de3cf1f9e75f0da77b07a7a37e5dabfb569cfc20123ba140913da82f271ae6245499982c3f1a62291fdde931cf5b9ece6e737c6da98e
6
+ metadata.gz: ddd276d51b2eccb1b53ef335d58000de09c32d2d8d86283a8a0723e1a9ea2edb854f6603f37ffdb0a4ec8df9ed23a073ec5a9fcdfc5c95d3f7966fcdd93f9eb8
7
+ data.tar.gz: c4b5df3fe0a896e24cbeabbb27aa573e6a814460cbadc1fb3941c6490a5e2f129c9c747135085dc064f7cfd6d201cd6e2cbc4fcf246cd304bc64d282b59708cd
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.24.0)
5
- avm (~> 0.37)
4
+ eac_tools (0.24.1)
5
+ avm (~> 0.38)
6
6
  avm-eac_asciidoctor_base0 (~> 0.5)
7
7
  avm-eac_generic_base0 (~> 0.5)
8
8
  avm-eac_latex_base0 (~> 0.1, >= 0.1.2)
@@ -14,7 +14,7 @@ PATH
14
14
  avm-eac_webapp_base0 (~> 0.4)
15
15
  avm-eac_wordpress_base0 (~> 0.1, >= 0.1.2)
16
16
  avm-tools (~> 0.133)
17
- eac_ruby_utils (~> 0.98)
17
+ eac_ruby_utils (~> 0.100)
18
18
 
19
19
  PATH
20
20
  remote: sub/avm-eac_asciidoctor_base0
@@ -124,12 +124,12 @@ PATH
124
124
  PATH
125
125
  remote: sub/avm
126
126
  specs:
127
- avm (0.37.0)
127
+ avm (0.38.0)
128
128
  eac_cli (~> 0.27, >= 0.27.8)
129
- eac_config (~> 0.10)
129
+ eac_config (~> 0.11)
130
130
  eac_docker (~> 0.4, >= 0.4.2)
131
- eac_git (~> 0.12, >= 0.12.1)
132
- eac_ruby_utils (~> 0.98)
131
+ eac_git (~> 0.12, >= 0.12.2)
132
+ eac_ruby_utils (~> 0.100)
133
133
  eac_templates (~> 0.3, >= 0.3.1)
134
134
  filesize (~> 0.2)
135
135
  htmlbeautifier (~> 1.4, >= 1.4.2)
@@ -146,9 +146,9 @@ PATH
146
146
  PATH
147
147
  remote: sub/eac_config
148
148
  specs:
149
- eac_config (0.10.0)
150
- addressable
151
- eac_ruby_utils (~> 0.97)
149
+ eac_config (0.11.0)
150
+ addressable (~> 2.8)
151
+ eac_ruby_utils (~> 0.100)
152
152
 
153
153
  PATH
154
154
  remote: sub/eac_docker
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.24.0'
4
+ VERSION = '0.24.1'
5
5
  end
data/sub/avm/avm.gemspec CHANGED
@@ -13,10 +13,10 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
15
  s.add_dependency 'eac_cli', '~> 0.27', '>= 0.27.8'
16
- s.add_dependency 'eac_config', '~> 0.10'
16
+ s.add_dependency 'eac_config', '~> 0.11'
17
17
  s.add_dependency 'eac_docker', '~> 0.4', '>= 0.4.2'
18
- s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.1'
19
- s.add_dependency 'eac_ruby_utils', '~> 0.98'
18
+ s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.2'
19
+ s.add_dependency 'eac_ruby_utils', '~> 0.100'
20
20
  s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.1'
21
21
  s.add_dependency 'filesize', '~> 0.2'
22
22
  s.add_dependency 'htmlbeautifier', '~> 1.4', '>= 1.4.2'
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/entries/uri_builder'
4
+ require 'eac_config/entry_path'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module Entries
9
+ module Base
10
+ class UriComponentEntryValue
11
+ enable_method_class
12
+ common_constructor :entries_provider, :component_entry_path do
13
+ self.component_entry_path = ::EacConfig::EntryPath.assert(component_entry_path)
14
+ end
15
+
16
+ def inherited_result
17
+ entries_provider.inherited_entry_value(
18
+ id_entry_path.to_string,
19
+ component_entry_path.to_string
20
+ )
21
+ end
22
+
23
+ # @return [EacConfig::EntryPath]
24
+ def id_entry_path
25
+ root_entry_path + %w[id]
26
+ end
27
+
28
+ # @return [String, nil]
29
+ def result
30
+ if url_entry.context_found?
31
+ return ::Avm::Entries::UriBuilder.from_source(url_entry.value.to_uri)
32
+ .avm_field_get(component)
33
+ end
34
+
35
+ inherited_result
36
+ end
37
+
38
+ # @return [EacConfig::EntryPath]
39
+ def root_entry_path
40
+ component_entry_path[0..-2]
41
+ end
42
+
43
+ # @return [Avm::Entries::Entry]
44
+ def url_entry
45
+ entries_provider.entry((root_entry_path + %w[url]).to_string)
46
+ end
47
+
48
+ # @return [String]
49
+ def component
50
+ component_entry_path.last
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -6,6 +6,8 @@ require 'avm/entries/entry'
6
6
  module Avm
7
7
  module Entries
8
8
  module Base
9
+ require_sub __FILE__, require_dependency: true
10
+
9
11
  def entries_provider_id
10
12
  id
11
13
  end
@@ -10,7 +10,16 @@ module Avm
10
10
  common_constructor :parent, :suffix, :options
11
11
 
12
12
  def auto_value
13
- ::Avm::Entries::AutoValues::Entry.new(parent, suffix).value
13
+ auto_value_entry.value
14
+ end
15
+
16
+ def auto_value_entry
17
+ @auto_value_entry ||= ::Avm::Entries::AutoValues::Entry.new(parent, suffix)
18
+ end
19
+
20
+ # @return [Boolean]
21
+ def context_found?
22
+ context_entry.found?
14
23
  end
15
24
 
16
25
  def full_path
@@ -42,6 +42,10 @@ module Avm
42
42
 
43
43
  common_constructor :data, default: [{}]
44
44
 
45
+ def avm_field_get(avm_field)
46
+ field_get(translate_field(avm_field))
47
+ end
48
+
45
49
  def field_get(name)
46
50
  data[name.to_sym].if_present(&:to_s)
47
51
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/entries/uri_builder'
3
4
  require 'avm/instances/entry_keys'
4
5
 
5
6
  module Avm
@@ -13,19 +14,10 @@ module Avm
13
14
  read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
14
15
  end
15
16
 
16
- def auto_install_hostname
17
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
18
- ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME)
19
- end
20
-
21
- def auto_install_port
22
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
23
- ::Avm::Instances::EntryKeys::INSTALL_PORT) || 22
24
- end
25
-
26
- def auto_install_username
27
- inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
28
- ::Avm::Instances::EntryKeys::INSTALL_USERNAME)
17
+ ::Avm::Entries::UriBuilder::ENTRIES_FIELDS.each do |component|
18
+ define_method "auto_install_#{component}" do
19
+ uri_component_entry_value("install.#{component}")
20
+ end
29
21
  end
30
22
 
31
23
  def auto_install_url
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/entries/uri_builder'
3
4
  require 'eac_ruby_utils/core_ext'
4
5
 
5
6
  module Avm
6
7
  module Instances
7
8
  module EntryKeys
8
- URI_FIELDS = %i[fragment hostname password path port query scheme url username].freeze
9
+ URI_FIELDS = ::Avm::Entries::UriBuilder::ENTRIES_FIELDS + %w[url]
9
10
 
10
11
  class << self
11
12
  def all
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.37.0'
4
+ VERSION = '0.38.0'
5
5
  end
@@ -57,6 +57,22 @@ RSpec.describe ::Avm::Instances::Base do
57
57
  ::Avm::Instances::EntryKeys::INSTALL_GROUPNAME => 'group4',
58
58
  ::Avm::Instances::EntryKeys::INSTALL_URL => 'ssh://user4@host4.net'
59
59
  },
60
+ 'app_5' => {
61
+ ::Avm::Instances::EntryKeys::INSTALL_SCHEME => 'ssh',
62
+ ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'host5.net',
63
+ ::Avm::Instances::EntryKeys::INSTALL_PORT => '2222',
64
+ ::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'user5',
65
+ ::Avm::Instances::EntryKeys::INSTALL_PASSWORD => 'passwd5',
66
+ ::Avm::Instances::EntryKeys::INSTALL_PATH => '/path/to/app5'
67
+ },
68
+ 'app_6' => {
69
+ ::Avm::Instances::EntryKeys::INSTALL_SCHEME => 'ssh',
70
+ ::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'host5.net',
71
+ ::Avm::Instances::EntryKeys::INSTALL_PORT => '2222',
72
+ ::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'user5',
73
+ ::Avm::Instances::EntryKeys::INSTALL_PASSWORD => 'passwd5',
74
+ ::Avm::Instances::EntryKeys::INSTALL_PATH => '/path/to/app5'
75
+ },
60
76
  'mailer_0' => {
61
77
  ::Avm::Instances::EntryKeys::MAILER_FROM => 'noreply@example.net',
62
78
  ::Avm::Instances::EntryKeys::MAILER_REPLY_TO => '',
@@ -28,6 +28,12 @@ app_4:
28
28
  username: user4
29
29
  hostname: host4.net
30
30
  groupname: group4
31
+ app_5:
32
+ install:
33
+ url: ssh://user5:passwd5@host5.net:2222/path/to/app5
34
+ app_6:
35
+ install:
36
+ id: app_5
31
37
  mailer_0:
32
38
  mailer:
33
39
  from: 'noreply@example.net'
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'addressable'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.97'
15
+ s.add_dependency 'addressable', '~> 2.8'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.100'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
19
19
  end
@@ -51,7 +51,12 @@ module EacConfig
51
51
  end
52
52
 
53
53
  def to_s
54
- "#{self.class}[#{parts.join(PART_SEPARATOR)}]"
54
+ "#{self.class}[#{to_string}]"
55
+ end
56
+
57
+ # @return [String]
58
+ def to_string
59
+ parts.join(PART_SEPARATOR)
55
60
  end
56
61
  end
57
62
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacConfig
4
- VERSION = '0.10.0'
4
+ VERSION = '0.11.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.24.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-14 00:00:00.000000000 Z
11
+ date: 2022-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.37'
19
+ version: '0.38'
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.37'
26
+ version: '0.38'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: avm-eac_asciidoctor_base0
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -202,14 +202,14 @@ dependencies:
202
202
  requirements:
203
203
  - - "~>"
204
204
  - !ruby/object:Gem::Version
205
- version: '0.98'
205
+ version: '0.100'
206
206
  type: :runtime
207
207
  prerelease: false
208
208
  version_requirements: !ruby/object:Gem::Requirement
209
209
  requirements:
210
210
  - - "~>"
211
211
  - !ruby/object:Gem::Version
212
- version: '0.98'
212
+ version: '0.100'
213
213
  - !ruby/object:Gem::Dependency
214
214
  name: eac_ruby_gem_support
215
215
  requirement: !ruby/object:Gem::Requirement
@@ -772,6 +772,7 @@ files:
772
772
  - sub/avm/lib/avm/entries/auto_values/entry.rb
773
773
  - sub/avm/lib/avm/entries/auto_values/uri_entry.rb
774
774
  - sub/avm/lib/avm/entries/base.rb
775
+ - sub/avm/lib/avm/entries/base/uri_component_entry_value.rb
775
776
  - sub/avm/lib/avm/entries/entry.rb
776
777
  - sub/avm/lib/avm/entries/uri_builder.rb
777
778
  - sub/avm/lib/avm/executables.rb