eac_tools 0.25.1 → 0.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -8
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/default_value.rb +27 -0
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb +38 -0
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value/url_entry_value.rb +31 -0
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value.rb +3 -30
- data/sub/avm/lib/avm/instances/base/auto_values/filesystem.rb +0 -21
- data/sub/avm/lib/avm/instances/base/auto_values/install.rb +9 -17
- data/sub/avm/lib/avm/instances/entry_keys.rb +0 -1
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-tools/avm-tools.gemspec +2 -2
- data/sub/avm-tools/lib/avm/tools/runner/git/deploy.rb +1 -1
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- metadata +8 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6de32a35373e92c90852a1d3d432b16112da4a908cd94bda757d64ca31647e93
|
4
|
+
data.tar.gz: 2b9c7aa3b2d163f2d5427c3f1d6de0da7e938d58ee79c4bc22418efce16ce1a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e26f055dd1a4d7f617ebd982f820e25b3a81d10ef81d2e0d93648fcfed43a483e9dee6ce6b3a56c7546688aeb19a65edd4d8ae87e5a4dd6850555326cad9535
|
7
|
+
data.tar.gz: e5da4638216094a63e821b2aef2cb9a346c90cb952a41e8e408295e78628a9c0ff26c55922f4ad7dd7f3f5a5908a16d1dc681dfda3e4482fd9b9229d691a6181
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
5
|
-
avm (~> 0.
|
4
|
+
eac_tools (0.26.0)
|
5
|
+
avm (~> 0.40)
|
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)
|
@@ -13,7 +13,7 @@ PATH
|
|
13
13
|
avm-eac_ruby_base1 (~> 0.20)
|
14
14
|
avm-eac_webapp_base0 (~> 0.5)
|
15
15
|
avm-eac_wordpress_base0 (~> 0.1, >= 0.1.2)
|
16
|
-
avm-tools (~> 0.
|
16
|
+
avm-tools (~> 0.134)
|
17
17
|
eac_ruby_utils (~> 0.102)
|
18
18
|
|
19
19
|
PATH
|
@@ -106,10 +106,10 @@ PATH
|
|
106
106
|
PATH
|
107
107
|
remote: sub/avm-tools
|
108
108
|
specs:
|
109
|
-
avm-tools (0.
|
109
|
+
avm-tools (0.134.0)
|
110
110
|
aranha-parsers (~> 0.14, >= 0.14.1)
|
111
|
-
avm (~> 0.
|
112
|
-
avm-eac_ruby_base1 (~> 0.
|
111
|
+
avm (~> 0.40)
|
112
|
+
avm-eac_ruby_base1 (~> 0.20)
|
113
113
|
avm-eac_ubuntu_base0 (~> 0.3)
|
114
114
|
avm-files (~> 0.3, >= 0.3.2)
|
115
115
|
avm-git (~> 0.4)
|
@@ -124,7 +124,7 @@ PATH
|
|
124
124
|
PATH
|
125
125
|
remote: sub/avm
|
126
126
|
specs:
|
127
|
-
avm (0.
|
127
|
+
avm (0.40.0)
|
128
128
|
eac_cli (~> 0.27, >= 0.27.8)
|
129
129
|
eac_config (~> 0.11, >= 0.11.1)
|
130
130
|
eac_docker (~> 0.4, >= 0.4.2)
|
@@ -272,7 +272,8 @@ GEM
|
|
272
272
|
faraday_middleware (1.2.0)
|
273
273
|
faraday (~> 1.0)
|
274
274
|
filesize (0.2.0)
|
275
|
-
git (1.
|
275
|
+
git (1.12.0)
|
276
|
+
addressable (~> 2.8)
|
276
277
|
rchardet (~> 1.8)
|
277
278
|
hpricot (0.8.6)
|
278
279
|
htmlbeautifier (1.4.2)
|
data/lib/eac_tools/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
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
|
+
class DefaultValue
|
12
|
+
enable_method_class
|
13
|
+
common_constructor :uri_component_entry_value
|
14
|
+
delegate :component, :entries_provider, to: :uri_component_entry_value
|
15
|
+
|
16
|
+
def default_value_method_name
|
17
|
+
"#{component}_default_value"
|
18
|
+
end
|
19
|
+
|
20
|
+
def result
|
21
|
+
entries_provider.if_respond(default_value_method_name)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,38 @@
|
|
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
|
+
class InheritedValue
|
12
|
+
enable_method_class
|
13
|
+
common_constructor :uri_component_entry_value
|
14
|
+
delegate :component, :entries_provider, :id_entry_path, :component_entry_path,
|
15
|
+
to: :uri_component_entry_value
|
16
|
+
|
17
|
+
def result
|
18
|
+
entries_provider.inherited_entry_value(
|
19
|
+
id_entry_path.to_string,
|
20
|
+
component_entry_path.to_string,
|
21
|
+
&inherited_value_block
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def inherited_value_block
|
26
|
+
return nil unless entries_provider.respond_to?(inherited_value_block_method_name)
|
27
|
+
|
28
|
+
->(value) { entries_provider.send(inherited_value_block_method_name, value) }
|
29
|
+
end
|
30
|
+
|
31
|
+
def inherited_value_block_method_name
|
32
|
+
"#{component}_inherited_value_proc".to_sym
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,31 @@
|
|
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
|
+
class UrlEntryValue
|
12
|
+
enable_method_class
|
13
|
+
common_constructor :uri_component_entry_value
|
14
|
+
delegate :component, :entries_provider, :root_entry_path, to: :uri_component_entry_value
|
15
|
+
|
16
|
+
def result
|
17
|
+
return unless url_entry.context_found?
|
18
|
+
|
19
|
+
::Avm::Entries::UriBuilder.from_source(url_entry.value.to_uri)
|
20
|
+
.avm_field_get(component)
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [Avm::Entries::Entry]
|
24
|
+
def url_entry
|
25
|
+
entries_provider.entry((root_entry_path + %w[url]).to_string)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -9,31 +9,16 @@ module Avm
|
|
9
9
|
module Base
|
10
10
|
class UriComponentEntryValue
|
11
11
|
enable_method_class
|
12
|
+
require_sub __FILE__, require_dependency: true
|
12
13
|
|
13
14
|
enable_listable
|
14
|
-
lists.add_symbol :option
|
15
|
+
lists.add_symbol :option
|
15
16
|
|
16
17
|
common_constructor :entries_provider, :component_entry_path, :options, default: [{}] do
|
17
18
|
self.component_entry_path = ::EacConfig::EntryPath.assert(component_entry_path)
|
18
19
|
self.options = self.class.lists.option.hash_keys_validate!(options)
|
19
20
|
end
|
20
21
|
|
21
|
-
def default_value
|
22
|
-
options[OPTION_DEFAULT_VALUE].call_if_proc
|
23
|
-
end
|
24
|
-
|
25
|
-
def inherited_result
|
26
|
-
entries_provider.inherited_entry_value(
|
27
|
-
id_entry_path.to_string,
|
28
|
-
component_entry_path.to_string,
|
29
|
-
&inherited_value_block
|
30
|
-
)
|
31
|
-
end
|
32
|
-
|
33
|
-
def inherited_value_block
|
34
|
-
options[OPTION_INHERITED_VALUE_BLOCK]
|
35
|
-
end
|
36
|
-
|
37
22
|
# @return [EacConfig::EntryPath]
|
38
23
|
def id_entry_path
|
39
24
|
root_entry_path + %w[id]
|
@@ -41,7 +26,7 @@ module Avm
|
|
41
26
|
|
42
27
|
# @return [String, nil]
|
43
28
|
def result
|
44
|
-
url_entry_value ||
|
29
|
+
url_entry_value || inherited_value || default_value
|
45
30
|
end
|
46
31
|
|
47
32
|
# @return [EacConfig::EntryPath]
|
@@ -49,18 +34,6 @@ module Avm
|
|
49
34
|
component_entry_path[0..-2]
|
50
35
|
end
|
51
36
|
|
52
|
-
# @return [Avm::Entries::Entry]
|
53
|
-
def url_entry
|
54
|
-
entries_provider.entry((root_entry_path + %w[url]).to_string)
|
55
|
-
end
|
56
|
-
|
57
|
-
def url_entry_value
|
58
|
-
return unless url_entry.context_found?
|
59
|
-
|
60
|
-
::Avm::Entries::UriBuilder.from_source(url_entry.value.to_uri)
|
61
|
-
.avm_field_get(component)
|
62
|
-
end
|
63
|
-
|
64
37
|
# @return [String]
|
65
38
|
def component
|
66
39
|
component_entry_path.last
|
@@ -11,27 +11,6 @@ module Avm
|
|
11
11
|
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
12
12
|
::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id }
|
13
13
|
end
|
14
|
-
|
15
|
-
def auto_fs_url
|
16
|
-
auto_fs_url_with_install || auto_fs_url_without_install
|
17
|
-
end
|
18
|
-
|
19
|
-
def auto_fs_url_with_install
|
20
|
-
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL)
|
21
|
-
.if_present do |install_url|
|
22
|
-
read_entry_optional('fs_path').if_present do |fs_path|
|
23
|
-
"#{install_url}#{fs_path}"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def auto_fs_url_without_install
|
29
|
-
return nil if read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_URL).present?
|
30
|
-
|
31
|
-
read_entry_optional('fs_path').if_present do |fs_path|
|
32
|
-
"file://#{fs_path}"
|
33
|
-
end
|
34
|
-
end
|
35
14
|
end
|
36
15
|
end
|
37
16
|
end
|
@@ -8,23 +8,7 @@ module Avm
|
|
8
8
|
class Base
|
9
9
|
module AutoValues
|
10
10
|
module Install
|
11
|
-
|
12
|
-
uri_component_entry_value(
|
13
|
-
::Avm::Instances::EntryKeys::INSTALL_DATA_PATH,
|
14
|
-
inherited_value_block: ->(v) { v + '/' + id }
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
def auto_install_groupname
|
19
|
-
uri_component_entry_value(
|
20
|
-
::Avm::Instances::EntryKeys::INSTALL_GROUPNAME,
|
21
|
-
default_value: lambda do
|
22
|
-
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
23
|
-
end
|
24
|
-
)
|
25
|
-
end
|
26
|
-
|
27
|
-
::Avm::Entries::UriBuilder::ENTRIES_FIELDS.each do |component|
|
11
|
+
(::Avm::Entries::UriBuilder::ENTRIES_FIELDS + %w[data_path groupname]).each do |component|
|
28
12
|
method_suffix = "install_#{component}"
|
29
13
|
define_method "auto_#{method_suffix}" do
|
30
14
|
uri_component_entry_value(
|
@@ -43,6 +27,14 @@ module Avm
|
|
43
27
|
require 'avm/entries/auto_values/uri_entry'
|
44
28
|
::Avm::Entries::AutoValues::UriEntry.new(self, 'install').value
|
45
29
|
end
|
30
|
+
|
31
|
+
def data_path_inherited_value_proc(value)
|
32
|
+
value + '/' + id
|
33
|
+
end
|
34
|
+
|
35
|
+
def groupname_default_value
|
36
|
+
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
37
|
+
end
|
46
38
|
end
|
47
39
|
end
|
48
40
|
end
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -15,8 +15,8 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
16
16
|
|
17
17
|
s.add_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
|
18
|
-
s.add_dependency 'avm', '~> 0.
|
19
|
-
s.add_dependency 'avm-eac_ruby_base1', '~> 0.
|
18
|
+
s.add_dependency 'avm', '~> 0.40'
|
19
|
+
s.add_dependency 'avm-eac_ruby_base1', '~> 0.20'
|
20
20
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
|
21
21
|
s.add_dependency 'avm-files', '~> 0.3', '>= 0.3.2'
|
22
22
|
s.add_dependency 'avm-git', '~> 0.4'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.39.1
|
19
|
+
version: '0.40'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.39.1
|
26
|
+
version: '0.40'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: avm-eac_asciidoctor_base0
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,14 +182,14 @@ dependencies:
|
|
188
182
|
requirements:
|
189
183
|
- - "~>"
|
190
184
|
- !ruby/object:Gem::Version
|
191
|
-
version: '0.
|
185
|
+
version: '0.134'
|
192
186
|
type: :runtime
|
193
187
|
prerelease: false
|
194
188
|
version_requirements: !ruby/object:Gem::Requirement
|
195
189
|
requirements:
|
196
190
|
- - "~>"
|
197
191
|
- !ruby/object:Gem::Version
|
198
|
-
version: '0.
|
192
|
+
version: '0.134'
|
199
193
|
- !ruby/object:Gem::Dependency
|
200
194
|
name: eac_ruby_utils
|
201
195
|
requirement: !ruby/object:Gem::Requirement
|
@@ -774,6 +768,9 @@ files:
|
|
774
768
|
- sub/avm/lib/avm/entries/base.rb
|
775
769
|
- sub/avm/lib/avm/entries/base/inherited_entry_value.rb
|
776
770
|
- sub/avm/lib/avm/entries/base/uri_component_entry_value.rb
|
771
|
+
- sub/avm/lib/avm/entries/base/uri_component_entry_value/default_value.rb
|
772
|
+
- sub/avm/lib/avm/entries/base/uri_component_entry_value/inherited_value.rb
|
773
|
+
- sub/avm/lib/avm/entries/base/uri_component_entry_value/url_entry_value.rb
|
777
774
|
- sub/avm/lib/avm/entries/entry.rb
|
778
775
|
- sub/avm/lib/avm/entries/uri_builder.rb
|
779
776
|
- sub/avm/lib/avm/executables.rb
|