avm 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/avm/sources/base/application.rb +34 -0
- data/lib/avm/sources/base/configuration.rb +2 -0
- data/lib/avm/sources/base/testing.rb +1 -1
- data/lib/avm/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0821a30efc137201d1e73d98cf31b741458bacc8a297495e1d88a6a150d988d3'
|
4
|
+
data.tar.gz: da4de9f1f24f9638ee5158411a05494c5007ffad292f26c3f19a4c5665389b1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afad52fb0a1801a83d5d295b9e220d7040a8ed09205d9fafd783393abc08bafe750a882e4ce4a28c6bbb5d23d3039a97e843818ef6e75437f4f7b5b5d87f1458
|
7
|
+
data.tar.gz: b450f642ef1c8692264dd21d60195f669a1d58291cff3256f3c379b5f529bdd589b8b66537f10e19acafa796ec1eb0e4600bb788e31ca6e3712392534dd32b00
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/applications/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Sources
|
8
|
+
class Base
|
9
|
+
module Application
|
10
|
+
APPLICATION_NAME_KEY = 'application'
|
11
|
+
|
12
|
+
# @return [Avm::Applications::Base]
|
13
|
+
def application
|
14
|
+
@application ||= ::Avm::Applications::Base.new(application_id)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [String]
|
18
|
+
def application_id
|
19
|
+
application_id_by_configuration || application_id_by_directory
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [String, nil]
|
23
|
+
def application_id_by_configuration
|
24
|
+
configuration.entry(APPLICATION_NAME_KEY).value
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [String]
|
28
|
+
def application_id_by_directory
|
29
|
+
path.basename.to_path
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -24,6 +24,8 @@ module Avm
|
|
24
24
|
|
25
25
|
# @return [EacRubyUtils::Envs::Command, nil]
|
26
26
|
def configuration_value_to_env_command(value)
|
27
|
+
return value if value.is_a?(::EacRubyUtils::Envs::Command)
|
28
|
+
|
27
29
|
configuration_value_to_shell_words(value).if_present { |v| env.command(v).chdir(path) }
|
28
30
|
end
|
29
31
|
|
data/lib/avm/version.rb
CHANGED
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.
|
4
|
+
version: 0.37.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-08-
|
11
|
+
date: 2022-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_cli
|
@@ -290,6 +290,7 @@ files:
|
|
290
290
|
- lib/avm/source_generators/runner.rb
|
291
291
|
- lib/avm/sources.rb
|
292
292
|
- lib/avm/sources/base.rb
|
293
|
+
- lib/avm/sources/base/application.rb
|
293
294
|
- lib/avm/sources/base/configuration.rb
|
294
295
|
- lib/avm/sources/base/instance.rb
|
295
296
|
- lib/avm/sources/base/locale.rb
|