avm 0.57.0 → 0.58.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: 563904ca1b51a6a150dea04c0b6ae22e465fdd51ab6528743e33d62a6565b92c
4
- data.tar.gz: 0b81dcf8b1b4f1442141d464ed4f4f94cbaa889f61cb386dada4cd31e81093c1
3
+ metadata.gz: a50b6491d183f2df1d7423338b915f2017ec2bf147e6857806c27cdde72ef10d
4
+ data.tar.gz: 225020d14af638e08b723a00482794790715165b7cbe092e0833e301ba182993
5
5
  SHA512:
6
- metadata.gz: a4cb6348291b7ae8c74957a6cfa9448a034077e6ea755ed49079e991be4abce66c33ad55983faa452ced6d28ce294e0f6d787caf2edc634f0d9edf6317e5c9c5
7
- data.tar.gz: 07525e34146d9e712aaa8157cbafb8e9c2fdd83aa2b381931399306aa0592d8d839c272b0851eb8fa0d5bc46538f350e2367da48d1821d00413873f2524772fb
6
+ metadata.gz: e006a7a7a9be79a45abed6317db5de8c6097bd1f5269ec444dc43ad49852713e892c10685e1043f3eb93cfb40a0207739f025c16a758c47a3c3546a48014cc2e
7
+ data.tar.gz: 28d138623589418cb34db4ba74d7f0e1b1ecf87695ab5e49e2c62c0420c5631e2b09525952815d1a0b6c837367b1b4ce9123f1d42833ab08f1822aec5a5e2ba2
@@ -5,6 +5,27 @@ require 'avm/registry/with_path'
5
5
  module Avm
6
6
  module Registry
7
7
  class Sources < ::Avm::Registry::WithPath
8
+ # @return [Avm::ApplicationStereotypes::Base]
9
+ def application_stereotype_by_name(name)
10
+ ::Avm::Registry.application_stereotypes.detect(name)
11
+ end
12
+
13
+ # @return [Avm::Sources::Base, nil]
14
+ def detect_optional(*detect_args)
15
+ detect_optional_by_configuration(*detect_args) || super
16
+ end
17
+
18
+ # @return [Avm::Sources::Base, nil]
19
+ def detect_optional_by_configuration(path, *detect_args)
20
+ source_configured_stereotype_name(path).if_present do |v|
21
+ application_stereotype_by_name(v).source_class.new(path, *detect_args)
22
+ end
23
+ end
24
+
25
+ # @return [String]
26
+ def source_configured_stereotype_name(path)
27
+ ::Avm::Sources::Base.new(path).stereotype_name_by_configuration
28
+ end
8
29
  end
9
30
  end
10
31
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Sources
7
+ class Base
8
+ module Stereotype
9
+ STEREOTYPE_NAME_KEY = 'stereotype'
10
+
11
+ # @return [String, nil]
12
+ def stereotype_name_by_configuration
13
+ configuration.entry(STEREOTYPE_NAME_KEY).value
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
data/lib/avm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.57.0'
4
+ VERSION = '0.58.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.57.0
4
+ version: 0.58.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-16 00:00:00.000000000 Z
11
+ date: 2022-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.15'
81
+ version: '0.16'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.15'
88
+ version: '0.16'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: eac_git
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -106,20 +106,20 @@ dependencies:
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '0.107'
109
+ version: '0.109'
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: 0.107.1
112
+ version: 0.109.1
113
113
  type: :runtime
114
114
  prerelease: false
115
115
  version_requirements: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - "~>"
118
118
  - !ruby/object:Gem::Version
119
- version: '0.107'
119
+ version: '0.109'
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 0.107.1
122
+ version: 0.109.1
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: eac_templates
125
125
  requirement: !ruby/object:Gem::Requirement
@@ -394,6 +394,7 @@ files:
394
394
  - lib/avm/sources/base/instance.rb
395
395
  - lib/avm/sources/base/locale.rb
396
396
  - lib/avm/sources/base/parent.rb
397
+ - lib/avm/sources/base/stereotype.rb
397
398
  - lib/avm/sources/base/subs.rb
398
399
  - lib/avm/sources/base/subs_paths.rb
399
400
  - lib/avm/sources/base/testing.rb