avm-tools 0.148.0 → 0.149.0

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: 491e51d5d9ec94066e9b302e222e006edba6f6301be4077ffe811586153d7ece
4
- data.tar.gz: 88dc6ea95daafa3406f85b8acb41b38eae0a840cdc9b5155463ddd15dfedbf66
3
+ metadata.gz: 4b9d3ec974736d535de064589ef2af6f4fae2b149e043675200df92b851eea30
4
+ data.tar.gz: 8da5ec56f8c81c6cdaa403534c33d88586c64eda07e7a706674ffc650f27908f
5
5
  SHA512:
6
- metadata.gz: f8e7a8be03122dec204471d1e2430dc9cd91e43092be390b3cf2c2cec61c5f4c37e19e9ea57ee0024ed1dd9fe9fa248da7ce3a8fdeb4d5871d1fd745d428fb96
7
- data.tar.gz: 280af4ee0c913a8fa912b4e272af61545f68251470083851ee37703f0aac1c14d78bb98d1a42f20876ba52a3e1ca38f28ae7f9dfccbb6f2898e2b1fd36b1bf79
6
+ metadata.gz: 45591b92498af434eaae3eb096134b6d8952593fdaeffea04d143e76a534593ad689ce15f2c2f39164f2b625696749aabfb6992c648444631a345fdb3fd00f9f
7
+ data.tar.gz: 91962893c6add83e548ad9a02bd9c2ef69a759eb6e8d1f002483f44afeff041f35968957c9a2c44b33a7274e416f7c7c53c45e78bef215bc2234783ae6a9fff3
@@ -9,7 +9,7 @@ module Avm
9
9
  class Instance < ::Avm::Instances::Runner
10
10
  class Data
11
11
  class Clear
12
- runner_with :help, :instance_data_clear
12
+ runner_with :help, :include_exclude, :instance_data_clear
13
13
  end
14
14
  end
15
15
  end
@@ -15,7 +15,7 @@ module Avm
15
15
  end
16
16
 
17
17
  def run
18
- runner_context.call(:data_unit).dump(dump_path)
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
- runner_context.call(:data_unit).data_default_dump_path
33
+ data_owner.data_default_dump_path
34
34
  end
35
35
  end
36
36
  end
@@ -15,7 +15,7 @@ module Avm
15
15
  end
16
16
 
17
17
  def run
18
- runner_context.call(:data_unit).load(dump_path)
18
+ data_owner.load(dump_path)
19
19
  end
20
20
 
21
21
  # @return [Pathname]
@@ -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
 
@@ -14,6 +14,8 @@ module Avm
14
14
  subcommands
15
15
  end
16
16
 
17
+ for_context :data_owner
18
+
17
19
  # @return [Avm::Instances::Data::Package]
18
20
  def data_owner
19
21
  instance.data_package
@@ -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
- data_owner.clear
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.148.0'
5
+ VERSION = '0.149.0'
6
6
  end
7
7
  end
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.148.0
4
+ version: 0.149.0
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: 2023-05-18 00:00:00.000000000 Z
11
+ date: 2023-05-20 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.72'
33
+ version: '0.73'
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.72'
40
+ version: '0.73'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: avm-eac_ruby_base1
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '0.18'
187
+ version: '0.19'
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '0.18'
194
+ version: '0.19'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: eac_templates
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -309,6 +309,7 @@ files:
309
309
  - lib/avm/tools/runner/source/version_bump.rb
310
310
  - lib/avm/tools/runner/source_generate.rb
311
311
  - lib/avm/tools/runner_with.rb
312
+ - lib/avm/tools/runner_with/include_exclude.rb
312
313
  - lib/avm/tools/runner_with/instance_data_clear.rb
313
314
  - lib/avm/tools/self.rb
314
315
  - lib/avm/tools/version.rb