avm-tools 0.124.0 → 0.127.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: '08cbe8be7452f80405bfbc8fe71f64bc84b797af3399ee4d35c1d218065f7a98'
4
- data.tar.gz: ae959f3f8c6c7e70da1c3dd4d425d8cda2fe73b27a8bd806b4bf24e7db424b53
3
+ metadata.gz: 6e8d20e2a16533f12e2368cf501da49148ee2b03cbfb34c25fb6802a04c7b940
4
+ data.tar.gz: 1eced5352d28ec766276eaea52b26e5942599aa0de6ebc77502482d2d3159635
5
5
  SHA512:
6
- metadata.gz: ef1e039ba2a5ff3be49286b37fb1d17b15561960d53458d55c011ecaec3e80bed22fd88caa5be6a8b5ba2ff09a1f60cddce412710f6aa44f64909c07ec4ce5d4
7
- data.tar.gz: b560513dcf791a0bec5287054e3f4c18e5c71c3099b1b4f2d1617f8dd742cccfe6802a0c6547b46799bf8570b0aa498dab40dbaf299f26f6fa6b26cb74094cde
6
+ metadata.gz: ae4de37a44d8bccc1227f6fdb9f40dda66d32b4fa83735925e0f993829201ca60a248c7b340c2538ec2c087d42de181e3b445d8ae0e97bbc8f6adb806bdb32db
7
+ data.tar.gz: d3e77aed040039d6858f56b14c05a4b3673b4335ee39e3d8dce449a440263a4194bf0d9b11c8a37396383b4c1f9bd98296183369df67f276b403c0d715ce4269
@@ -22,6 +22,7 @@ module Avm
22
22
  def base_banner
23
23
  infov 'ID', instance.id
24
24
  infov 'Application ID', instance.application.id
25
+ infov 'Application stereotype', instance.application.stereotype
25
26
  infov 'Suffix', instance.suffix
26
27
  end
27
28
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/instances/base'
4
+ require 'avm/registry'
4
5
  require 'eac_cli/core_ext'
5
6
 
6
7
  module Avm
@@ -14,10 +15,14 @@ module Avm
14
15
  subcommands
15
16
  end
16
17
 
18
+ def extra_available_subcommands
19
+ instance.if_present({}, &:extra_available_subcommands)
20
+ end
21
+
17
22
  private
18
23
 
19
24
  def instance_uncached
20
- ::Avm::Instances::Base.by_id(parsed.instance_id)
25
+ ::Avm::Registry.instances.detect(parsed.instance_id)
21
26
  end
22
27
  end
23
28
  end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/runners/base'
4
+ require 'eac_cli/core_ext'
5
+
6
+ module Avm
7
+ module Tools
8
+ class Runner
9
+ class SourceGenerate
10
+ runner_with :help do
11
+ pos_arg :stereotype_name
12
+ pos_arg :target_path
13
+ end
14
+
15
+ def run
16
+ start_banner
17
+ generate
18
+ end
19
+
20
+ def generate
21
+ infom 'Generating...'
22
+ generator.perform
23
+ success "Source generated in \"#{generator.target_path}\""
24
+ end
25
+
26
+ def start_banner
27
+ infov 'Stereotype', stereotype_name
28
+ infov 'Target path', target_path
29
+ infov 'Generator', generator.class
30
+ end
31
+
32
+ def generator_uncached
33
+ ::Avm::Registry.source_generators.detect_optional(stereotype_name, target_path) ||
34
+ fatal_error("No generator found for stereotype \"#{stereotype_name}\"")
35
+ end
36
+
37
+ delegate :stereotype_name, to: :parsed
38
+
39
+ def target_path
40
+ parsed.target_path.to_pathname
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.124.0'
5
+ VERSION = '0.127.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.124.0
4
+ version: 0.127.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: 2022-07-25 00:00:00.000000000 Z
11
+ date: 2022-07-27 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.27'
33
+ version: '0.30'
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.27'
40
+ version: '0.30'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: avm-eac_asciidoctor_base0
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,40 +58,6 @@ dependencies:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: 0.3.4
61
- - !ruby/object:Gem::Dependency
62
- name: avm-eac_rails_base0
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '0.3'
68
- type: :runtime
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '0.3'
75
- - !ruby/object:Gem::Dependency
76
- name: avm-eac_redmine_base0
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '0.5'
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: 0.5.2
85
- type: :runtime
86
- prerelease: false
87
- version_requirements: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - "~>"
90
- - !ruby/object:Gem::Version
91
- version: '0.5'
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: 0.5.2
95
61
  - !ruby/object:Gem::Dependency
96
62
  name: avm-eac_ruby_base1
97
63
  requirement: !ruby/object:Gem::Requirement
@@ -376,9 +342,6 @@ files:
376
342
  - lib/avm/tools/runner/config.rb
377
343
  - lib/avm/tools/runner/config/load_path.rb
378
344
  - lib/avm/tools/runner/eac_asciidoctor_base0.rb
379
- - lib/avm/tools/runner/eac_redmine_base0.rb
380
- - lib/avm/tools/runner/eac_redmine_base0/docker.rb
381
- - lib/avm/tools/runner/eac_redmine_base0/project_rename.rb
382
345
  - lib/avm/tools/runner/eac_webapp_base0.rb
383
346
  - lib/avm/tools/runner/eac_wordpress_base0.rb
384
347
  - lib/avm/tools/runner/eac_writings_base0.rb
@@ -409,6 +372,7 @@ files:
409
372
  - lib/avm/tools/runner/self.rb
410
373
  - lib/avm/tools/runner/self/docker.rb
411
374
  - lib/avm/tools/runner/self/registry.rb
375
+ - lib/avm/tools/runner/source_generate.rb
412
376
  - lib/avm/tools/self.rb
413
377
  - lib/avm/tools/version.rb
414
378
  - locale/en.yml
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/docker/runner'
4
-
5
- module Avm
6
- module Tools
7
- class Runner
8
- class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
9
- class Docker < ::Avm::Docker::Runner
10
- def use_default_registry?
11
- false
12
- end
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,56 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_cli/core_ext'
4
- require 'avm/eac_rails_base1/runner/code_runner'
5
-
6
- module Avm
7
- module Tools
8
- class Runner
9
- class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
10
- class ProjectRename
11
- runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle do
12
- pos_arg :from
13
- pos_arg :to
14
- end
15
-
16
- def run
17
- bundle_run
18
- end
19
-
20
- def start_banner
21
- infov 'From', from
22
- infov 'To', to
23
- end
24
-
25
- delegate :from, :to, to: :parsed
26
-
27
- def bundle_args
28
- %w[exec rails runner] + [code]
29
- end
30
-
31
- def code
32
- <<~CODE
33
- from_arg = '#{from}'
34
- to_arg = '#{to}'
35
- project = ::Project.where(identifier: from_arg).first
36
- if project.present?
37
- puts "Project found: \#{project}"
38
- puts "Renaming..."
39
- project.update_column(:identifier, to_arg)
40
- puts "Renamed. Testing..."
41
- project = ::Project.where(identifier: to_arg).first
42
- if project
43
- puts "Project found: \#{project}"
44
- else
45
- fail "After rename: project not found with identifier \\"\#{to_arg}\\""
46
- end
47
- else
48
- fail "Before rename: project not found with identifier \\"\#{from_arg}\\""
49
- end
50
- CODE
51
- end
52
- end
53
- end
54
- end
55
- end
56
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/runner'
4
- require 'avm/eac_redmine_base0'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module Tools
9
- class Runner
10
- class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
11
- require_sub __FILE__
12
- end
13
- end
14
- end
15
- end