avm-tools 0.146.0 → 0.148.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: 5d991bbca749dc14183de47e3f7880ea924c4cd3357428d02e5740ec1aa17ce0
4
- data.tar.gz: 94bee26f8abc3a62d2482b5091fd3a0a95708004c5f9585aa33ae183a054caaa
3
+ metadata.gz: 491e51d5d9ec94066e9b302e222e006edba6f6301be4077ffe811586153d7ece
4
+ data.tar.gz: 88dc6ea95daafa3406f85b8acb41b38eae0a840cdc9b5155463ddd15dfedbf66
5
5
  SHA512:
6
- metadata.gz: 26616f9be672e8a3da83b55a481c8064a4a9e0e0c1e4486825388d089d634763cd1bc6cf09a026aaecff2de1eb5890093d8685bf1bc12475005cc215b2fdf073
7
- data.tar.gz: 30e7a998895ba25b11255d9bf1e9b8e67e40f039ce75274d2a625f33011f6a4c43f8b230eedf3a9295e095f4496091b9a03c4fd1089547df8b9065e921746733
6
+ metadata.gz: f8e7a8be03122dec204471d1e2430dc9cd91e43092be390b3cf2c2cec61c5f4c37e19e9ea57ee0024ed1dd9fe9fa248da7ce3a8fdeb4d5871d1fd745d428fb96
7
+ data.tar.gz: 280af4ee0c913a8fa912b4e272af61545f68251470083851ee37703f0aac1c14d78bb98d1a42f20876ba52a3e1ca38f28ae7f9dfccbb6f2898e2b1fd36b1bf79
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/instances/runner'
4
+ require 'eac_cli/core_ext'
5
+
6
+ module Avm
7
+ module Tools
8
+ class Runner
9
+ class Instance < ::Avm::Instances::Runner
10
+ class Data
11
+ class Clear
12
+ runner_with :help, :instance_data_clear
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -17,7 +17,7 @@ module Avm
17
17
  runner_with :help do
18
18
  desc 'Dump utility for EacRailsBase instance.'
19
19
  bool_opt '-w', '--rewrite', 'Forces dump overwrite.'
20
- pos_arg :dump_path
20
+ pos_arg :dump_path, optional: true
21
21
  end
22
22
 
23
23
  # @return [String]
@@ -38,10 +38,6 @@ module Avm
38
38
 
39
39
  private
40
40
 
41
- def instance
42
- runner_context.call(:instance)
43
- end
44
-
45
41
  def package_dump_uncached
46
42
  instance
47
43
  .data_package.dump(dump_path, existing: package_dump_existing)
@@ -10,11 +10,7 @@ module Avm
10
10
  class Data
11
11
  class Unit
12
12
  class Clear
13
- runner_with :help
14
-
15
- def run
16
- runner_context.call(:data_unit).clear
17
- end
13
+ runner_with :help, :instance_data_clear
18
14
  end
19
15
  end
20
16
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/instances/runner'
4
+ require 'eac_cli/core_ext'
5
+
6
+ module Avm
7
+ module Tools
8
+ class Runner
9
+ class Instance < ::Avm::Instances::Runner
10
+ class Data
11
+ class Unit
12
+ class Load
13
+ runner_with :help do
14
+ pos_arg :dump_path
15
+ end
16
+
17
+ def run
18
+ runner_context.call(:data_unit).load(dump_path)
19
+ end
20
+
21
+ # @return [Pathname]
22
+ def dump_path
23
+ parsed.dump_path.to_pathname
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -25,6 +25,11 @@ module Avm
25
25
  runner_context.call(:instance).data_package
26
26
  end
27
27
 
28
+ # @return [Avm::Instances::Data::Unit]
29
+ def data_owner
30
+ data_unit
31
+ end
32
+
28
33
  # @return [Avm::Instances::Data::Unit]
29
34
  def data_unit
30
35
  data_package.unit(parsed.identifier)
@@ -13,6 +13,11 @@ module Avm
13
13
  desc 'Data utilities for EacRailsBase0 instances.'
14
14
  subcommands
15
15
  end
16
+
17
+ # @return [Avm::Instances::Data::Package]
18
+ def data_owner
19
+ instance.data_package
20
+ end
16
21
  end
17
22
  end
18
23
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/tools/core_ext'
4
- require 'avm/projects/stereotypes'
5
4
 
6
5
  module Avm
7
6
  module Tools
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/launcher/stereotype'
4
- require 'avm/projects/stereotypes'
5
4
  require 'avm/tools/core_ext'
6
5
 
7
6
  module Avm
@@ -0,0 +1,20 @@
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 InstanceDataClear
10
+ common_concern do
11
+ include ::EacCli::Runner
12
+ end
13
+
14
+ def run
15
+ data_owner.clear
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Tools
7
+ module RunnerWith
8
+ require_sub __FILE__, require_mode: :kernel
9
+ end
10
+ end
11
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.146.0'
5
+ VERSION = '0.148.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.146.0
4
+ version: 0.148.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-12 00:00:00.000000000 Z
11
+ date: 2023-05-18 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.17'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 0.17.1
19
+ version: '0.18'
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.17'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 0.17.1
26
+ version: '0.18'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: avm
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: '0.70'
33
+ version: '0.72'
40
34
  type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: '0.70'
40
+ version: '0.72'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: avm-eac_ruby_base1
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +47,7 @@ dependencies:
53
47
  version: '0.30'
54
48
  - - ">="
55
49
  - !ruby/object:Gem::Version
56
- version: 0.30.2
50
+ version: 0.30.3
57
51
  type: :runtime
58
52
  prerelease: false
59
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -63,7 +57,7 @@ dependencies:
63
57
  version: '0.30'
64
58
  - - ">="
65
59
  - !ruby/object:Gem::Version
66
- version: 0.30.2
60
+ version: 0.30.3
67
61
  - !ruby/object:Gem::Dependency
68
62
  name: avm-eac_ubuntu_base0
69
63
  requirement: !ruby/object:Gem::Requirement
@@ -264,8 +258,6 @@ files:
264
258
  - Gemfile
265
259
  - exe/avm
266
260
  - lib/avm.rb
267
- - lib/avm/projects.rb
268
- - lib/avm/projects/stereotypes.rb
269
261
  - lib/avm/tools.rb
270
262
  - lib/avm/tools/core_ext.rb
271
263
  - lib/avm/tools/runner.rb
@@ -288,11 +280,13 @@ files:
288
280
  - lib/avm/tools/runner/git/subrepo/fix.rb
289
281
  - lib/avm/tools/runner/instance.rb
290
282
  - lib/avm/tools/runner/instance/data.rb
283
+ - lib/avm/tools/runner/instance/data/clear.rb
291
284
  - lib/avm/tools/runner/instance/data/dump.rb
292
285
  - lib/avm/tools/runner/instance/data/load.rb
293
286
  - lib/avm/tools/runner/instance/data/unit.rb
294
287
  - lib/avm/tools/runner/instance/data/unit/clear.rb
295
288
  - lib/avm/tools/runner/instance/data/unit/dump.rb
289
+ - lib/avm/tools/runner/instance/data/unit/load.rb
296
290
  - lib/avm/tools/runner/instance/info.rb
297
291
  - lib/avm/tools/runner/launcher.rb
298
292
  - lib/avm/tools/runner/launcher/instances.rb
@@ -314,6 +308,8 @@ files:
314
308
  - lib/avm/tools/runner/source/update.rb
315
309
  - lib/avm/tools/runner/source/version_bump.rb
316
310
  - lib/avm/tools/runner/source_generate.rb
311
+ - lib/avm/tools/runner_with.rb
312
+ - lib/avm/tools/runner_with/instance_data_clear.rb
317
313
  - lib/avm/tools/self.rb
318
314
  - lib/avm/tools/version.rb
319
315
  - template/avm/self/docker_image/Dockerfile
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/git/launcher_stereotypes/git'
4
- require 'avm/git/launcher_stereotypes/git_subrepo'
5
- require 'avm/git/launcher_stereotypes/git_subtree'
6
- require 'avm/eac_ruby_base1/launcher_stereotypes/base'
7
- require 'eac_ruby_utils/core_ext'
8
-
9
- module Avm
10
- module Projects
11
- module Stereotypes
12
- require_sub __FILE__, base: nil
13
- end
14
- end
15
- end
data/lib/avm/projects.rb DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Projects
7
- require_sub __FILE__
8
- end
9
- end