avm 0.32.0 → 0.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/applications/base.rb +2 -2
- data/lib/avm/entries/auto_values/entry.rb +32 -0
- data/lib/avm/entries/auto_values.rb +11 -0
- data/lib/avm/{instances/entries.rb → entries/base.rb} +9 -5
- data/lib/avm/{instances → entries}/entry.rb +3 -12
- data/lib/avm/entries.rb +9 -0
- data/lib/avm/instances/base/auto_values/mailer.rb +3 -2
- data/lib/avm/instances/base.rb +2 -2
- data/lib/avm/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a138a71c9d6253cf06cb24540bdb765dff78cea3cd9a93689952bdb60795833e
|
4
|
+
data.tar.gz: fa16c54d070882c7c3babda535010f0cfd66727a6c126e65a0b7da58b7e328d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bf6e089f8eba0bfed6ad0783c28948d1ee2653f3940c879e8e1d6451ff49009f639dff737c606e5d5baafd45108cf645b8dcc772481f2fb116f73cbb90586b1
|
7
|
+
data.tar.gz: fd7986157d7b494b934ebe1d491040252d2b2a73cc000eba1b25e29bbf26bc935a9ab07b54ab8e5fca0a42fefbea4ee7e82820c635d990d5194b6e44976ec288
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/entries/base'
|
4
4
|
require 'avm/registry'
|
5
5
|
require 'eac_ruby_utils/core_ext'
|
6
6
|
|
@@ -9,7 +9,7 @@ module Avm
|
|
9
9
|
class Base
|
10
10
|
enable_simple_cache
|
11
11
|
require_sub __FILE__, include_modules: true
|
12
|
-
include ::Avm::
|
12
|
+
include ::Avm::Entries::Base
|
13
13
|
|
14
14
|
LOCAL_INSTANCE_SUFFIX = 'dev'
|
15
15
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_config/node'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module Entries
|
8
|
+
module AutoValues
|
9
|
+
class Entry
|
10
|
+
class << self
|
11
|
+
def auto_value_method_name(suffix)
|
12
|
+
"auto_#{suffix.to_s.gsub('.', '_')}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
common_constructor :entries_provider, :suffix
|
17
|
+
|
18
|
+
def auto_value_method
|
19
|
+
self.class.auto_value_method_name(suffix)
|
20
|
+
end
|
21
|
+
|
22
|
+
def found?
|
23
|
+
entries_provider.respond_to?(auto_value_method, true)
|
24
|
+
end
|
25
|
+
|
26
|
+
def value
|
27
|
+
entries_provider.if_respond(auto_value_method)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,17 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'avm/
|
4
|
+
require 'avm/entries/entry'
|
5
5
|
|
6
6
|
module Avm
|
7
|
-
module
|
8
|
-
module
|
7
|
+
module Entries
|
8
|
+
module Base
|
9
|
+
def entries_provider_id
|
10
|
+
id
|
11
|
+
end
|
12
|
+
|
9
13
|
def entry(suffix, options = {})
|
10
|
-
::Avm::
|
14
|
+
::Avm::Entries::Entry.new(self, suffix, options)
|
11
15
|
end
|
12
16
|
|
13
17
|
def path_prefix
|
14
|
-
@path_prefix ||= [
|
18
|
+
@path_prefix ||= [entries_provider_id].freeze
|
15
19
|
end
|
16
20
|
|
17
21
|
def read_entry(entry_suffix, options = {})
|
@@ -1,25 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/entries/auto_values/entry'
|
3
4
|
require 'eac_config/node'
|
4
5
|
require 'eac_ruby_utils/core_ext'
|
5
6
|
|
6
7
|
module Avm
|
7
|
-
module
|
8
|
+
module Entries
|
8
9
|
class Entry
|
9
|
-
class << self
|
10
|
-
def auto_value_method_name(suffix)
|
11
|
-
"auto_#{suffix.to_s.gsub('.', '_')}"
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
10
|
common_constructor :parent, :suffix, :options
|
16
11
|
|
17
12
|
def auto_value
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
def auto_value_method
|
22
|
-
self.class.auto_value_method_name(suffix)
|
13
|
+
::Avm::Entries::AutoValues::Entry.new(parent, suffix).value
|
23
14
|
end
|
24
15
|
|
25
16
|
def full_path
|
data/lib/avm/entries.rb
ADDED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/entries/auto_values/entry'
|
4
|
+
require 'avm/entries/entry'
|
4
5
|
require 'avm/instances/entry_keys'
|
5
6
|
|
6
7
|
module Avm
|
@@ -11,7 +12,7 @@ module Avm
|
|
11
12
|
::Avm::Instances::EntryKeys.all.select { |c| c.to_s.start_with?('mailer.') }
|
12
13
|
.reject { |c| c == ::Avm::Instances::EntryKeys::MAILER_ID }
|
13
14
|
.each do |mailer_key|
|
14
|
-
define_method ::Avm::
|
15
|
+
define_method ::Avm::Entries::AutoValues::Entry.auto_value_method_name(mailer_key) do
|
15
16
|
mailer_auto_common(mailer_key)
|
16
17
|
end
|
17
18
|
end
|
data/lib/avm/instances/base.rb
CHANGED
@@ -4,7 +4,7 @@ require 'avm/with/application_stereotype'
|
|
4
4
|
require 'avm/with/extra_subcommands'
|
5
5
|
require 'eac_ruby_utils/require_sub'
|
6
6
|
require 'eac_ruby_utils/simple_cache'
|
7
|
-
require 'avm/
|
7
|
+
require 'avm/entries/base'
|
8
8
|
|
9
9
|
module Avm
|
10
10
|
module Instances
|
@@ -13,7 +13,7 @@ module Avm
|
|
13
13
|
enable_listable
|
14
14
|
enable_simple_cache
|
15
15
|
require_sub __FILE__, include_modules: true
|
16
|
-
include ::Avm::
|
16
|
+
include ::Avm::Entries::Base
|
17
17
|
include ::Avm::With::ExtraSubcommands
|
18
18
|
include ::Avm::With::ApplicationStereotype
|
19
19
|
|
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.33.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-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_cli
|
@@ -213,6 +213,11 @@ files:
|
|
213
213
|
- lib/avm/docker/container.rb
|
214
214
|
- lib/avm/docker/image.rb
|
215
215
|
- lib/avm/docker/runner.rb
|
216
|
+
- lib/avm/entries.rb
|
217
|
+
- lib/avm/entries/auto_values.rb
|
218
|
+
- lib/avm/entries/auto_values/entry.rb
|
219
|
+
- lib/avm/entries/base.rb
|
220
|
+
- lib/avm/entries/entry.rb
|
216
221
|
- lib/avm/executables.rb
|
217
222
|
- lib/avm/instances.rb
|
218
223
|
- lib/avm/instances/base.rb
|
@@ -230,8 +235,6 @@ files:
|
|
230
235
|
- lib/avm/instances/base/dockerizable.rb
|
231
236
|
- lib/avm/instances/base/entry_keys.rb
|
232
237
|
- lib/avm/instances/docker_image.rb
|
233
|
-
- lib/avm/instances/entries.rb
|
234
|
-
- lib/avm/instances/entry.rb
|
235
238
|
- lib/avm/instances/entry_keys.rb
|
236
239
|
- lib/avm/instances/runner.rb
|
237
240
|
- lib/avm/jobs.rb
|