eac_tools 0.66.0 → 0.67.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 +28 -28
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +2 -2
- data/sub/avm/lib/avm/data/clearer.rb +8 -6
- data/sub/avm/lib/avm/data/package/base_performer.rb +38 -0
- data/sub/avm/lib/avm/data/package/clear.rb +3 -4
- data/sub/avm/lib/avm/data/performer.rb +49 -0
- data/sub/avm/lib/avm/instances/runner.rb +1 -1
- data/sub/avm/lib/avm/sources/runner.rb +2 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec +3 -3
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base.rb +2 -0
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/version.rb +1 -1
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +3 -3
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/file_formats/provider.rb +2 -2
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/avm-tools/avm-tools.gemspec +2 -2
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/clear.rb +1 -1
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit/dump.rb +2 -2
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit/load.rb +1 -1
- data/sub/avm-tools/lib/avm/tools/runner/instance/data/unit.rb +2 -5
- data/sub/avm-tools/lib/avm/tools/runner/instance/data.rb +2 -0
- data/sub/avm-tools/lib/avm/tools/runner_with/include_exclude.rb +23 -0
- data/sub/avm-tools/lib/avm/tools/runner_with/instance_data_clear.rb +11 -1
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/eac_cli/eac_cli.gemspec +1 -1
- data/sub/eac_cli/lib/eac_cli/definition/alternative.rb +11 -7
- data/sub/eac_cli/lib/eac_cli/definition/base_option/initialize_args_parser.rb +2 -1
- data/sub/eac_cli/lib/eac_cli/definition/base_option.rb +1 -1
- data/sub/eac_cli/lib/eac_cli/definition/boolean_option.rb +2 -1
- data/sub/eac_cli/lib/eac_cli/definition/error.rb +8 -0
- data/sub/eac_cli/lib/eac_cli/runner/after_class_methods.rb +6 -1
- data/sub/eac_cli/lib/eac_cli/runner/context.rb +22 -3
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/base.rb +24 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/parent.rb +27 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/runner.rb +20 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/runner_missing_method.rb +32 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders/set.rb +44 -0
- data/sub/eac_cli/lib/eac_cli/runner/context_responders.rb +11 -0
- data/sub/eac_cli/lib/eac_cli/runner/for_context.rb +40 -0
- data/sub/eac_cli/lib/eac_cli/runner/instance_methods.rb +5 -3
- data/sub/eac_cli/lib/eac_cli/runner.rb +1 -0
- data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
- data/sub/eac_cli/spec/lib/eac_cli/runner/for_context_spec.rb +79 -0
- data/sub/eac_cli/spec/lib/eac_cli/runner_with/subcommands_spec.rb +1 -0
- data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +3 -3
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner/contexts.rb +52 -0
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner/prepend.rb +17 -4
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +1 -39
- data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_abstract.rb +17 -6
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/array_accessor.rb +25 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/base_accessor.rb +57 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/{immutable → acts_as_immutable}/boolean_accessor.rb +3 -3
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/{immutable → acts_as_immutable}/class_methods.rb +2 -2
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/{immutable → acts_as_immutable}/common_accessor.rb +5 -5
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/{immutable/array_accessor.rb → acts_as_immutable/enumerable_accessor.rb} +11 -8
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/{immutable → acts_as_immutable}/hash_accessor.rb +5 -5
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/{immutable → acts_as_immutable}/instance_methods.rb +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/set_accessor.rb +25 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/{immutable.rb → acts_as_immutable.rb} +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/enumerables_methods.rb +42 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/base.rb +34 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/hash.rb +20 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable/set.rb +19 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/module_ancestors_variable.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/acts_as_immutable.rb +10 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/module/immutable.rb +3 -2
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/debug.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/unimplemented_method_error.rb +6 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_abstract_spec.rb +73 -7
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/{immutable → acts_as_immutable}/array_accessor_spec.rb +11 -3
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/common_accessor_spec.rb +57 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/{immutable → acts_as_immutable}/hash_accessor_spec.rb +3 -3
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/acts_as_immutable/set_accessor_spec.rb +43 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/enumerables_methods_spec.rb +50 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/module_ancestors_variable/hash_spec.rb +57 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/module_ancestors_variable/set_spec.rb +57 -0
- metadata +47 -20
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/base_accessor.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eaf414401edd6cd32a363aa20ae12bfd3641bfc0c11d8007911f0dfce9738e0
|
4
|
+
data.tar.gz: 56e6df8b4ac42ed7f10cf7b3121d17cc825ce3c4a8e46018101f2ce71316f654
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c24f42e05720c894b99c1757654fe045ce0f306f2e2f4c5ef4fdc9477f048aa227e5d4e58c6a1d97ff90ebeede013c331152fbfa354def48591cb6b213a47ab0
|
7
|
+
data.tar.gz: fd0260cb92aee69652efbab55ef85f73ab6b442966d8aeaf0a09b522db6a6dd59dd5a39c6490255878f24c801c1f9557888017c75b6ec66bc2f4ee9f045f41c2
|
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.67.0)
|
5
|
+
avm (~> 0.73)
|
6
6
|
avm-eac_asciidoctor_base0 (~> 0.19)
|
7
7
|
avm-eac_generic_base0 (~> 0.12)
|
8
8
|
avm-eac_latex_base0 (~> 0.3, >= 0.3.1)
|
@@ -14,11 +14,11 @@ PATH
|
|
14
14
|
avm-eac_redmine_base0 (~> 0.20, >= 0.20.1)
|
15
15
|
avm-eac_redmine_plugin_base0 (~> 0.4)
|
16
16
|
avm-eac_ruby_base1 (~> 0.30, >= 0.30.3)
|
17
|
-
avm-eac_webapp_base0 (~> 0.17, >= 0.17.
|
17
|
+
avm-eac_webapp_base0 (~> 0.17, >= 0.17.2)
|
18
18
|
avm-eac_wordpress_base0 (~> 0.3, >= 0.3.1)
|
19
19
|
avm-git (~> 0.13, >= 0.13.2)
|
20
|
-
avm-tools (~> 0.
|
21
|
-
eac_ruby_utils (~> 0.
|
20
|
+
avm-tools (~> 0.149)
|
21
|
+
eac_ruby_utils (~> 0.117)
|
22
22
|
|
23
23
|
PATH
|
24
24
|
remote: sub/aranha-parsers
|
@@ -127,21 +127,21 @@ PATH
|
|
127
127
|
PATH
|
128
128
|
remote: sub/avm-eac_ubuntu_base0
|
129
129
|
specs:
|
130
|
-
avm-eac_ubuntu_base0 (0.4.
|
131
|
-
avm (~> 0.
|
132
|
-
eac_ruby_utils (~> 0.
|
133
|
-
eac_templates (~> 0.
|
130
|
+
avm-eac_ubuntu_base0 (0.4.3)
|
131
|
+
avm (~> 0.73)
|
132
|
+
eac_ruby_utils (~> 0.117)
|
133
|
+
eac_templates (~> 0.5)
|
134
134
|
|
135
135
|
PATH
|
136
136
|
remote: sub/avm-eac_webapp_base0
|
137
137
|
specs:
|
138
|
-
avm-eac_webapp_base0 (0.17.
|
139
|
-
avm (~> 0.
|
138
|
+
avm-eac_webapp_base0 (0.17.2)
|
139
|
+
avm (~> 0.73)
|
140
140
|
avm-eac_generic_base0 (~> 0.12)
|
141
141
|
avm-eac_postgresql_base0 (~> 0.5, >= 0.5.1)
|
142
|
-
avm-eac_ubuntu_base0 (~> 0.4, >= 0.4.
|
142
|
+
avm-eac_ubuntu_base0 (~> 0.4, >= 0.4.3)
|
143
143
|
avm-files (~> 0.6, >= 0.6.2)
|
144
|
-
eac_ruby_utils (~> 0.
|
144
|
+
eac_ruby_utils (~> 0.117)
|
145
145
|
|
146
146
|
PATH
|
147
147
|
remote: sub/avm-eac_wordpress_base0
|
@@ -174,9 +174,9 @@ PATH
|
|
174
174
|
PATH
|
175
175
|
remote: sub/avm-tools
|
176
176
|
specs:
|
177
|
-
avm-tools (0.
|
177
|
+
avm-tools (0.149.0)
|
178
178
|
aranha-parsers (~> 0.18)
|
179
|
-
avm (~> 0.
|
179
|
+
avm (~> 0.73)
|
180
180
|
avm-eac_ruby_base1 (~> 0.30, >= 0.30.3)
|
181
181
|
avm-eac_ubuntu_base0 (~> 0.4, >= 0.4.2)
|
182
182
|
avm-files (~> 0.6, >= 0.6.2)
|
@@ -184,7 +184,7 @@ PATH
|
|
184
184
|
clipboard (~> 1.3, >= 1.3.6)
|
185
185
|
curb (~> 0.9, >= 0.9.11)
|
186
186
|
eac_git (~> 0.14, >= 0.14.1)
|
187
|
-
eac_ruby_base0 (~> 0.
|
187
|
+
eac_ruby_base0 (~> 0.19)
|
188
188
|
eac_templates (~> 0.5)
|
189
189
|
git (~> 1.18)
|
190
190
|
ruby-progressbar (~> 1.13)
|
@@ -192,14 +192,14 @@ PATH
|
|
192
192
|
PATH
|
193
193
|
remote: sub/avm
|
194
194
|
specs:
|
195
|
-
avm (0.
|
195
|
+
avm (0.73.0)
|
196
196
|
aranha-parsers (~> 0.18)
|
197
|
-
eac_cli (~> 0.
|
197
|
+
eac_cli (~> 0.35)
|
198
198
|
eac_config (~> 0.12)
|
199
199
|
eac_docker (~> 0.7)
|
200
200
|
eac_fs (~> 0.16)
|
201
201
|
eac_git (~> 0.14, >= 0.14.1)
|
202
|
-
eac_ruby_utils (~> 0.
|
202
|
+
eac_ruby_utils (~> 0.117)
|
203
203
|
eac_templates (~> 0.5)
|
204
204
|
filesize (~> 0.2)
|
205
205
|
htmlbeautifier (~> 1.4, >= 1.4.2)
|
@@ -208,10 +208,10 @@ PATH
|
|
208
208
|
PATH
|
209
209
|
remote: sub/eac_cli
|
210
210
|
specs:
|
211
|
-
eac_cli (0.
|
211
|
+
eac_cli (0.35.0)
|
212
212
|
colorize (~> 0.8, >= 0.8.1)
|
213
213
|
eac_config (~> 0.12)
|
214
|
-
eac_ruby_utils (~> 0.
|
214
|
+
eac_ruby_utils (~> 0.117)
|
215
215
|
|
216
216
|
PATH
|
217
217
|
remote: sub/eac_config
|
@@ -265,16 +265,16 @@ PATH
|
|
265
265
|
PATH
|
266
266
|
remote: sub/eac_ruby_base0
|
267
267
|
specs:
|
268
|
-
eac_ruby_base0 (0.
|
269
|
-
avm-eac_ruby_base1 (~> 0.30, >= 0.30.
|
270
|
-
eac_cli (~> 0.
|
268
|
+
eac_ruby_base0 (0.19.0)
|
269
|
+
avm-eac_ruby_base1 (~> 0.30, >= 0.30.3)
|
270
|
+
eac_cli (~> 0.35)
|
271
271
|
eac_fs (~> 0.16)
|
272
|
-
eac_ruby_utils (~> 0.
|
272
|
+
eac_ruby_utils (~> 0.117)
|
273
273
|
|
274
274
|
PATH
|
275
275
|
remote: sub/eac_ruby_utils
|
276
276
|
specs:
|
277
|
-
eac_ruby_utils (0.
|
277
|
+
eac_ruby_utils (0.117.0)
|
278
278
|
activesupport (>= 4, < 7)
|
279
279
|
addressable (~> 2.8, >= 2.8.4)
|
280
280
|
bundler
|
@@ -299,7 +299,7 @@ GEM
|
|
299
299
|
zeitwerk (~> 2.3)
|
300
300
|
addressable (2.8.4)
|
301
301
|
public_suffix (>= 2.0.2, < 6.0)
|
302
|
-
asciidoctor (2.0.
|
302
|
+
asciidoctor (2.0.20)
|
303
303
|
ast (2.4.2)
|
304
304
|
clipboard (1.3.6)
|
305
305
|
colorize (0.8.1)
|
@@ -340,7 +340,7 @@ GEM
|
|
340
340
|
minitest (5.18.0)
|
341
341
|
multipart-post (2.3.0)
|
342
342
|
net-ssh (4.2.0)
|
343
|
-
nokogiri (1.15.
|
343
|
+
nokogiri (1.15.1-x86_64-linux)
|
344
344
|
racc (~> 1.4)
|
345
345
|
ofx-parser (1.1.0)
|
346
346
|
hpricot (>= 0.6)
|
data/lib/eac_tools/version.rb
CHANGED
data/sub/avm/avm.gemspec
CHANGED
@@ -13,12 +13,12 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'aranha-parsers', '~> 0.18'
|
16
|
-
s.add_dependency 'eac_cli', '~> 0.
|
16
|
+
s.add_dependency 'eac_cli', '~> 0.35'
|
17
17
|
s.add_dependency 'eac_config', '~> 0.12'
|
18
18
|
s.add_dependency 'eac_docker', '~> 0.7'
|
19
19
|
s.add_dependency 'eac_fs', '~> 0.16'
|
20
20
|
s.add_dependency 'eac_git', '~> 0.14', '>= 0.14.1'
|
21
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
21
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.117'
|
22
22
|
s.add_dependency 'eac_templates', '~> 0.5'
|
23
23
|
s.add_dependency 'filesize', '~> 0.2'
|
24
24
|
s.add_dependency 'htmlbeautifier', '~> 1.4', '>= 1.4.2'
|
@@ -1,17 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/data/performer'
|
3
4
|
require 'eac_ruby_utils/core_ext'
|
4
5
|
|
5
6
|
module Avm
|
6
7
|
module Data
|
7
|
-
class Clearer
|
8
|
-
|
8
|
+
class Clearer < ::Avm::Data::Performer
|
9
|
+
def cannot_perform_reason
|
10
|
+
nil
|
11
|
+
end
|
9
12
|
|
10
|
-
|
13
|
+
protected
|
11
14
|
|
12
|
-
|
13
|
-
|
14
|
-
storage.clear
|
15
|
+
def internal_perform
|
16
|
+
data_owner.clear(*include_excludes_arguments)
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module Data
|
7
|
+
class Package
|
8
|
+
class BasePerformer
|
9
|
+
acts_as_abstract :result
|
10
|
+
enable_speaker
|
11
|
+
enable_listable
|
12
|
+
lists.add_symbol :option, :excludes, :includes
|
13
|
+
common_constructor :package, :options, default: [{}] do
|
14
|
+
self.options = ::Avm::Data::Package::BasePerformer.lists.option
|
15
|
+
.hash_keys_validate!(options)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [Set<Symbol>]
|
19
|
+
def excludes
|
20
|
+
::Set.new((options[OPTION_EXCLUDES] || []).map(&:to_sym))
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [Set<Symbol>]
|
24
|
+
def includes
|
25
|
+
::Set.new((options[OPTION_INCLUDES] || []).map(&:to_sym))
|
26
|
+
end
|
27
|
+
|
28
|
+
# @return [Hash<Symbol, Avm::Data::Unit]
|
29
|
+
def selected_units
|
30
|
+
r = package.units
|
31
|
+
r = r.slice(*includes.to_a) if includes.any?
|
32
|
+
r = r.except(*excludes.to_a) if excludes.any?
|
33
|
+
r
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -1,18 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/data/package/base_performer'
|
3
4
|
require 'eac_ruby_utils/core_ext'
|
4
5
|
|
5
6
|
module Avm
|
6
7
|
module Data
|
7
8
|
class Package
|
8
|
-
class Clear
|
9
|
+
class Clear < ::Avm::Data::Package::BasePerformer
|
9
10
|
enable_method_class
|
10
|
-
enable_speaker
|
11
|
-
common_constructor :package
|
12
11
|
|
13
12
|
# @return [void]
|
14
13
|
def result
|
15
|
-
|
14
|
+
selected_units.each do |identifier, unit|
|
16
15
|
infov 'Clearing unit', identifier
|
17
16
|
unit.clear
|
18
17
|
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/data/rotate'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
require 'eac_ruby_utils/fs/temp'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Data
|
9
|
+
class Performer
|
10
|
+
acts_as_abstract(:cannot_perform_reason, :internal_perform)
|
11
|
+
acts_as_immutable
|
12
|
+
common_constructor :data_owner
|
13
|
+
immutable_accessor :exclude, :include, type: :set
|
14
|
+
|
15
|
+
# @return [Enumerable]
|
16
|
+
def immutable_constructor_args
|
17
|
+
[data_owner]
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [self]
|
21
|
+
def perform
|
22
|
+
raise "Cannot run: #{cannot_run_reason}" unless performable?
|
23
|
+
|
24
|
+
internal_perform
|
25
|
+
|
26
|
+
self
|
27
|
+
end
|
28
|
+
|
29
|
+
# @return [Boolean]
|
30
|
+
def performable?
|
31
|
+
cannot_perform_reason.blank?
|
32
|
+
end
|
33
|
+
|
34
|
+
protected
|
35
|
+
|
36
|
+
def include_excludes_arguments
|
37
|
+
options = include_excludes_options
|
38
|
+
options.any? ? [options] : []
|
39
|
+
end
|
40
|
+
|
41
|
+
def include_excludes_options
|
42
|
+
r = {}
|
43
|
+
r[:includes] = includes if includes.any?
|
44
|
+
r[:excludes] = excludes if excludes.any?
|
45
|
+
r
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
17
|
-
s.add_dependency 'eac_templates', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.73'
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.117'
|
17
|
+
s.add_dependency 'eac_templates', '~> 0.5'
|
18
18
|
|
19
19
|
s.add_development_dependency 'avm-eac_ubuntu_base0'
|
20
20
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
|
@@ -12,12 +12,12 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.73'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.12'
|
17
17
|
s.add_dependency 'avm-eac_postgresql_base0', '~> 0.5', '>= 0.5.1'
|
18
|
-
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.
|
18
|
+
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.3'
|
19
19
|
s.add_dependency 'avm-files', '~> 0.6', '>= 0.6.2'
|
20
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
20
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.117'
|
21
21
|
|
22
22
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
|
23
23
|
end
|
@@ -15,7 +15,7 @@ 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.18'
|
18
|
-
s.add_dependency 'avm', '~> 0.
|
18
|
+
s.add_dependency 'avm', '~> 0.73'
|
19
19
|
s.add_dependency 'avm-eac_ruby_base1', '~> 0.30', '>= 0.30.3'
|
20
20
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.2'
|
21
21
|
s.add_dependency 'avm-files', '~> 0.6', '>= 0.6.2'
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_dependency 'clipboard', '~> 1.3', '>= 1.3.6'
|
24
24
|
s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
|
25
25
|
s.add_dependency 'eac_git', '~> 0.14', '>= 0.14.1'
|
26
|
-
s.add_dependency 'eac_ruby_base0', '~> 0.
|
26
|
+
s.add_dependency 'eac_ruby_base0', '~> 0.19'
|
27
27
|
s.add_dependency 'eac_templates', '~> 0.5'
|
28
28
|
s.add_dependency 'git', '~> 1.18'
|
29
29
|
s.add_dependency 'ruby-progressbar', '~> 1.13'
|
@@ -15,7 +15,7 @@ module Avm
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def run
|
18
|
-
|
18
|
+
data_owner.dump(dump_path)
|
19
19
|
end
|
20
20
|
|
21
21
|
# @return [String]
|
@@ -30,7 +30,7 @@ module Avm
|
|
30
30
|
|
31
31
|
# @return [String]
|
32
32
|
def default_dump_path
|
33
|
-
|
33
|
+
data_owner.data_default_dump_path
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -15,6 +15,8 @@ module Avm
|
|
15
15
|
subcommands
|
16
16
|
end
|
17
17
|
|
18
|
+
for_context :data_owner
|
19
|
+
|
18
20
|
# @return [Enumerable<String>]
|
19
21
|
def available_units_ids
|
20
22
|
data_package.units_ids
|
@@ -27,11 +29,6 @@ module Avm
|
|
27
29
|
|
28
30
|
# @return [Avm::Instances::Data::Unit]
|
29
31
|
def data_owner
|
30
|
-
data_unit
|
31
|
-
end
|
32
|
-
|
33
|
-
# @return [Avm::Instances::Data::Unit]
|
34
|
-
def data_unit
|
35
32
|
data_package.unit(parsed.identifier)
|
36
33
|
end
|
37
34
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'eac_cli/runner'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Tools
|
8
|
+
module RunnerWith
|
9
|
+
module IncludeExclude
|
10
|
+
common_concern do
|
11
|
+
include ::EacCli::Runner
|
12
|
+
|
13
|
+
runner_definition do
|
14
|
+
arg_opt '-I', '--include', repeat: true
|
15
|
+
arg_opt '-E', '--exclude', repeat: true
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
delegate :include, :exclude, to: :parsed
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/data/clearer'
|
3
4
|
require 'eac_cli/core_ext'
|
4
5
|
require 'eac_cli/runner'
|
5
6
|
|
@@ -8,11 +9,20 @@ module Avm
|
|
8
9
|
module RunnerWith
|
9
10
|
module InstanceDataClear
|
10
11
|
common_concern do
|
12
|
+
enable_simple_cache
|
11
13
|
include ::EacCli::Runner
|
12
14
|
end
|
13
15
|
|
14
16
|
def run
|
15
|
-
|
17
|
+
performer.perform
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def performer_uncached
|
23
|
+
%i[include exclude].inject(::Avm::Data::Clearer.new(data_owner)) do |a1, e1|
|
24
|
+
if_respond(e1, []).inject(a1) { |a2, e2| a2.send(e1, e2) }
|
25
|
+
end
|
16
26
|
end
|
17
27
|
end
|
18
28
|
end
|
data/sub/eac_cli/eac_cli.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.add_dependency 'colorize', '~> 0.8', '>= 0.8.1'
|
16
16
|
s.add_dependency 'eac_config', '~> 0.12'
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.117'
|
18
18
|
|
19
19
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
20
20
|
end
|
@@ -42,14 +42,15 @@ module EacCli
|
|
42
42
|
pos_set.to_a
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
45
|
+
def positional_arguments_blocked_reason(new_pos_arg)
|
46
46
|
last = pos_set.last
|
47
|
-
return
|
48
|
-
return
|
49
|
-
return
|
50
|
-
return
|
47
|
+
return nil unless last
|
48
|
+
return 'there are subcommands' if subcommands?
|
49
|
+
return 'last argument repeats' if last.repeat?
|
50
|
+
return 'new argument is required and last is optional' if
|
51
|
+
last.optional? && new_pos_arg.if_present(&:required?)
|
51
52
|
|
52
|
-
|
53
|
+
nil
|
53
54
|
end
|
54
55
|
|
55
56
|
def subcommands
|
@@ -65,7 +66,10 @@ module EacCli
|
|
65
66
|
private
|
66
67
|
|
67
68
|
def check_positional_blocked(new_pos_arg)
|
68
|
-
|
69
|
+
positional_arguments_blocked_reason(new_pos_arg).if_present do |v|
|
70
|
+
raise ::EacCli::Definition::Error, "Positional arguments are blocked: #{v}" \
|
71
|
+
" (New argument: #{new_pos_arg})"
|
72
|
+
end
|
69
73
|
end
|
70
74
|
|
71
75
|
def pos_set
|
@@ -26,7 +26,8 @@ module EacCli
|
|
26
26
|
common_constructor :value
|
27
27
|
|
28
28
|
def type
|
29
|
-
TYPES.find { |type| send("#{type}?") } ||
|
29
|
+
TYPES.find { |type| send("#{type}?") } ||
|
30
|
+
raise(::EacCli::Definition::Error, "Unknown type for \"#{value}\"")
|
30
31
|
end
|
31
32
|
|
32
33
|
def short?
|
@@ -16,7 +16,8 @@ module EacCli
|
|
16
16
|
def default_value
|
17
17
|
return super unless default_value?
|
18
18
|
|
19
|
-
raise
|
19
|
+
raise(::EacCli::Definition::Error,
|
20
|
+
"Unallowed default value for boolean options (Option: #{self})")
|
20
21
|
end
|
21
22
|
|
22
23
|
def default_default_value
|