avm-tools 0.68.0 → 0.70.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/data/instance/files_unit.rb +1 -1
- data/lib/avm/eac_rails_base0/apache_host.rb +17 -0
- data/lib/avm/eac_rails_base0/apache_path.rb +50 -0
- data/lib/avm/eac_rails_base0/deploy.rb +51 -0
- data/lib/avm/eac_rails_base0/instance.rb +14 -0
- data/lib/avm/eac_redmine_base0/deploy.rb +4 -4
- data/lib/avm/eac_redmine_base0/instance.rb +6 -5
- data/lib/avm/eac_ubuntu_base0/apache.rb +26 -0
- data/lib/avm/eac_ubuntu_base0/apache/resource.rb +59 -0
- data/lib/avm/eac_ubuntu_base0/docker_image.rb +14 -0
- data/lib/avm/eac_webapp_base0/apache_host.rb +103 -0
- data/lib/avm/eac_webapp_base0/deploy.rb +102 -0
- data/lib/avm/eac_webapp_base0/deploy/appended_directories.rb +25 -0
- data/lib/avm/eac_webapp_base0/deploy/file_unit.rb +42 -0
- data/lib/avm/eac_webapp_base0/deploy/git_info.rb +49 -0
- data/lib/avm/eac_webapp_base0/deploy/version.rb +20 -0
- data/lib/avm/eac_webapp_base0/instance.rb +50 -0
- data/lib/avm/eac_webapp_base0/runner/apache_host.rb +39 -0
- data/lib/avm/eac_webapp_base0/runner/data.rb +25 -0
- data/lib/avm/eac_webapp_base0/runner/data/dump.rb +69 -0
- data/lib/avm/eac_webapp_base0/runner/data/load.rb +66 -0
- data/lib/avm/eac_webapp_base0/runner/deploy.rb +59 -0
- data/lib/avm/git/issue/complete/_git_subrepos.rb +1 -0
- data/lib/avm/instances/base/auto_values/filesystem.rb +3 -1
- data/lib/avm/instances/entries.rb +5 -8
- data/lib/avm/instances/entry.rb +47 -0
- data/lib/avm/instances/entry_keys.rb +2 -0
- data/lib/avm/self/instance.rb +1 -1
- data/lib/avm/stereotypes/eac_wordpress_base0/apache_host.rb +3 -3
- data/lib/avm/stereotypes/eac_wordpress_base0/deploy.rb +2 -2
- data/lib/avm/stereotypes/eac_wordpress_base0/instance.rb +2 -2
- data/lib/avm/tools/runner/eac_rails_base0.rb +9 -14
- data/lib/avm/tools/runner/eac_rails_base0/apache_host.rb +3 -26
- data/lib/avm/tools/runner/eac_rails_base0/apache_path.rb +38 -0
- data/lib/avm/tools/runner/eac_rails_base0/data.rb +2 -2
- data/lib/avm/tools/runner/eac_rails_base0/deploy.rb +3 -3
- data/lib/avm/tools/runner/eac_redmine_base0/data.rb +1 -1
- data/lib/avm/tools/runner/eac_redmine_base0/data/dump.rb +2 -2
- data/lib/avm/tools/runner/eac_redmine_base0/deploy.rb +2 -2
- data/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb +1 -0
- data/lib/avm/tools/runner/eac_wordpress_base0/apache_host.rb +3 -25
- data/lib/avm/tools/runner/eac_wordpress_base0/data.rb +2 -2
- data/lib/avm/tools/runner/eac_wordpress_base0/deploy.rb +2 -2
- data/lib/avm/tools/runner/git/deploy.rb +3 -1
- data/lib/avm/tools/version.rb +1 -1
- data/template/avm/eac_rails_base0/apache_path/default.conf +13 -0
- data/template/avm/{stereotypes/eac_rails_base0 → eac_rails_base0}/deploy/config/database.yml.template +0 -0
- data/template/avm/{stereotypes/eac_webapp_base0 → eac_webapp_base0}/apache_host/no_ssl.conf +0 -0
- data/template/avm/self/docker_image/Dockerfile +1 -1
- data/vendor/eac_cli/Gemfile +5 -0
- data/vendor/eac_cli/eac_cli.gemspec +18 -0
- data/vendor/eac_cli/lib/eac_cli.rb +7 -0
- data/vendor/eac_cli/lib/eac_cli/core_ext.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/default_runner.rb +14 -0
- data/vendor/eac_cli/lib/eac_cli/definition.rb +72 -0
- data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +13 -0
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +26 -0
- data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +13 -0
- data/vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb +27 -0
- data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +77 -0
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +45 -0
- data/vendor/eac_cli/lib/eac_cli/parser.rb +14 -0
- data/vendor/eac_cli/lib/eac_cli/parser/collector.rb +56 -0
- data/vendor/eac_cli/lib/eac_cli/parser/error.rb +15 -0
- data/vendor/eac_cli/lib/eac_cli/parser/options_collection.rb +105 -0
- data/vendor/eac_cli/lib/eac_cli/parser/parse_result.rb +21 -0
- data/vendor/eac_cli/lib/eac_cli/parser/positional_collection.rb +49 -0
- data/vendor/eac_cli/lib/eac_cli/patches.rb +4 -0
- data/vendor/eac_cli/lib/eac_cli/patches/object.rb +5 -0
- data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +24 -0
- data/vendor/eac_cli/lib/eac_cli/runner.rb +87 -0
- data/vendor/eac_cli/lib/eac_cli/runner/context.rb +18 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with.rb +9 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/help.rb +19 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb +26 -0
- data/vendor/eac_cli/lib/eac_cli/version.rb +5 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +70 -0
- data/vendor/eac_cli/spec/rubocop_spec.rb +7 -0
- data/vendor/eac_cli/spec/spec_helper.rb +100 -0
- data/vendor/eac_git/lib/eac_git/version.rb +1 -1
- data/vendor/eac_git/vendor/git-subrepo/lib/git-subrepo +9 -7
- data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +3 -3
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +5 -1
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem.rb +10 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/gem/version_file.rb +6 -5
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple.rb +5 -34
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/decorated_gem.rb +42 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/result.rb +25 -0
- data/vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb +1 -1
- data/vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec.rb +14 -0
- data/vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec_files/a_version_file.rb +7 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern.rb +4 -4
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner.rb +6 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +8 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +18 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/value.rb +3 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb +9 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb +6 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/struct.rb +53 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +15 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/struct_spec.rb +46 -0
- metadata +66 -22
- data/lib/avm/instances/entries/entry_reader.rb +0 -45
- data/lib/avm/stereotypes/eac_rails_base0/apache_host.rb +0 -19
- data/lib/avm/stereotypes/eac_rails_base0/deploy.rb +0 -52
- data/lib/avm/stereotypes/eac_rails_base0/instance.rb +0 -16
- data/lib/avm/stereotypes/eac_ubuntu_base0/apache.rb +0 -27
- data/lib/avm/stereotypes/eac_ubuntu_base0/apache/site.rb +0 -61
- data/lib/avm/stereotypes/eac_ubuntu_base0/docker_image.rb +0 -16
- data/lib/avm/stereotypes/eac_webapp_base0/apache_host.rb +0 -97
- data/lib/avm/stereotypes/eac_webapp_base0/deploy.rb +0 -104
- data/lib/avm/stereotypes/eac_webapp_base0/deploy/appended_directories.rb +0 -27
- data/lib/avm/stereotypes/eac_webapp_base0/deploy/file_unit.rb +0 -43
- data/lib/avm/stereotypes/eac_webapp_base0/deploy/git_info.rb +0 -51
- data/lib/avm/stereotypes/eac_webapp_base0/deploy/version.rb +0 -22
- data/lib/avm/stereotypes/eac_webapp_base0/instance.rb +0 -52
- data/lib/avm/stereotypes/eac_webapp_base0/runner/data.rb +0 -27
- data/lib/avm/stereotypes/eac_webapp_base0/runner/data/dump.rb +0 -71
- data/lib/avm/stereotypes/eac_webapp_base0/runner/data/load.rb +0 -68
- data/lib/avm/stereotypes/eac_webapp_base0/runner/deploy.rb +0 -61
@@ -25,6 +25,8 @@ module EacRubyUtils
|
|
25
25
|
end
|
26
26
|
|
27
27
|
module SubcommandsSupport
|
28
|
+
EXTRA_AVAILABLE_SUBCOMMANDS_METHOD_NAME = :extra_available_subcommands
|
29
|
+
|
28
30
|
def check_subcommands_arg
|
29
31
|
if subcommand_arg_as_list?
|
30
32
|
singleton_class.include(SubcommandsSupport::SubcommandArgAsList)
|
@@ -43,7 +45,7 @@ module EacRubyUtils
|
|
43
45
|
end
|
44
46
|
|
45
47
|
def subcommand
|
46
|
-
@subcommand ||= subcommand_class_name(subcommand_name).constantize.
|
48
|
+
@subcommand ||= subcommand_class_name(subcommand_name).constantize.create(
|
47
49
|
argv: subcommand_args,
|
48
50
|
program_name: subcommand_program,
|
49
51
|
parent: self
|
@@ -77,7 +79,11 @@ module EacRubyUtils
|
|
77
79
|
end
|
78
80
|
|
79
81
|
def available_subcommands
|
80
|
-
(setting_value(:subcommands, false) || auto_available_subcommands)
|
82
|
+
r = ::Set.new(setting_value(:subcommands, false) || auto_available_subcommands)
|
83
|
+
if respond_to?(EXTRA_AVAILABLE_SUBCOMMANDS_METHOD_NAME, true)
|
84
|
+
r += send(EXTRA_AVAILABLE_SUBCOMMANDS_METHOD_NAME)
|
85
|
+
end
|
86
|
+
r.sort
|
81
87
|
end
|
82
88
|
|
83
89
|
def auto_available_subcommands
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacRubyUtils
|
4
|
+
class Inflector
|
5
|
+
class << self
|
6
|
+
VARIABLE_NAME_PATTERN = /[_a-z][_a-z0-9]*/i.freeze
|
7
|
+
|
8
|
+
def variableize(string)
|
9
|
+
r = string.gsub(/[^_a-z0-9]/i, '_').gsub(/_+/, '_').gsub(/_\z/, '').gsub(/\A_/, '').downcase
|
10
|
+
m = VARIABLE_NAME_PATTERN.match(r)
|
11
|
+
return r if m
|
12
|
+
|
13
|
+
raise ::ArgumentError, "Invalid variable name \"#{r}\" was generated " \
|
14
|
+
"from string \"#{string}\""
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'eac_ruby_utils/inflector'
|
4
|
+
|
3
5
|
module EacRubyUtils
|
4
6
|
module Listable
|
5
7
|
class Value
|
@@ -16,8 +18,7 @@ module EacRubyUtils
|
|
16
18
|
end
|
17
19
|
|
18
20
|
def constant_name
|
19
|
-
"#{@list.item}_#{@key}"
|
20
|
-
.gsub(/(?:\A_|_\z)/, '').upcase
|
21
|
+
::EacRubyUtils::Inflector.variableize("#{@list.item}_#{@key}").upcase
|
21
22
|
end
|
22
23
|
|
23
24
|
def label
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'active_support/hash_with_indifferent_access'
|
4
|
+
require 'active_support/core_ext/object/blank'
|
5
|
+
|
6
|
+
module EacRubyUtils
|
7
|
+
class Struct
|
8
|
+
def initialize(initial_data = {})
|
9
|
+
self.data = ::ActiveSupport::HashWithIndifferentAccess.new(initial_data)
|
10
|
+
end
|
11
|
+
|
12
|
+
def [](key)
|
13
|
+
key, bool = parse_key(key)
|
14
|
+
bool ? self[key].present? : data[key]
|
15
|
+
end
|
16
|
+
|
17
|
+
def fetch(key)
|
18
|
+
key, bool = parse_key(key)
|
19
|
+
bool ? fetch(key).present? : data.fetch(key)
|
20
|
+
end
|
21
|
+
|
22
|
+
def method_missing(method_name, *arguments, &block)
|
23
|
+
property_method?(method_name) ? fetch(method_name) : super
|
24
|
+
end
|
25
|
+
|
26
|
+
def respond_to_missing?(method_name, include_private = false)
|
27
|
+
property_method?(method_name) || super
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_h
|
31
|
+
data.dup
|
32
|
+
end
|
33
|
+
|
34
|
+
delegate :to_s, to: :data
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
attr_accessor :data
|
39
|
+
|
40
|
+
def parse_key(key)
|
41
|
+
m = /\A(.+)\?\z/.match(key.to_s)
|
42
|
+
[(m ? m[1] : key.to_s).to_sym, m ? true : false]
|
43
|
+
end
|
44
|
+
|
45
|
+
def property_method?(key)
|
46
|
+
property_methods.include?(key.to_sym)
|
47
|
+
end
|
48
|
+
|
49
|
+
def property_methods
|
50
|
+
data.keys.flat_map { |k| [k.to_sym, "#{k}?".to_sym] }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/inflector'
|
4
|
+
|
5
|
+
RSpec.describe ::EacRubyUtils::Inflector do
|
6
|
+
describe '#variableize' do
|
7
|
+
{
|
8
|
+
'_A_variableName' => 'a_variablename'
|
9
|
+
}.each do |source, expected|
|
10
|
+
context "when source is \"#{source}\"" do
|
11
|
+
it { expect(described_class.variableize(source)).to eq(expected) }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/struct'
|
4
|
+
|
5
|
+
RSpec.describe ::EacRubyUtils::Struct do
|
6
|
+
let(:instance) { described_class.new(a: 1, b: '') }
|
7
|
+
|
8
|
+
describe '#[]' do
|
9
|
+
it { expect(instance[:a]).to eq(1) }
|
10
|
+
it { expect(instance['a']).to eq(1) }
|
11
|
+
it { expect(instance[:a?]).to eq(true) }
|
12
|
+
it { expect(instance['a?']).to eq(true) }
|
13
|
+
it { expect(instance[:b]).to eq('') }
|
14
|
+
it { expect(instance['b']).to eq('') }
|
15
|
+
it { expect(instance[:b?]).to eq(false) }
|
16
|
+
it { expect(instance['b?']).to eq(false) }
|
17
|
+
it { expect(instance[:c]).to eq(nil) }
|
18
|
+
it { expect(instance['c']).to eq(nil) }
|
19
|
+
it { expect(instance[:c?]).to eq(false) }
|
20
|
+
it { expect(instance['c?']).to eq(false) }
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#fetch' do
|
24
|
+
it { expect(instance.fetch(:a)).to eq(1) }
|
25
|
+
it { expect(instance.fetch('a')).to eq(1) }
|
26
|
+
it { expect(instance.fetch(:a?)).to eq(true) }
|
27
|
+
it { expect(instance.fetch('a?')).to eq(true) }
|
28
|
+
it { expect(instance.fetch(:b)).to eq('') }
|
29
|
+
it { expect(instance.fetch('b')).to eq('') }
|
30
|
+
it { expect(instance.fetch(:b?)).to eq(false) }
|
31
|
+
it { expect(instance.fetch('b?')).to eq(false) }
|
32
|
+
it { expect { instance.fetch(:c) }.to raise_error(::KeyError) }
|
33
|
+
it { expect { instance.fetch('c') }.to raise_error(::KeyError) }
|
34
|
+
it { expect { instance.fetch(:c?) }.to raise_error(::KeyError) }
|
35
|
+
it { expect { instance.fetch('c?') }.to raise_error(::KeyError) }
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '#property_method' do
|
39
|
+
it { expect(instance.a).to eq(1) }
|
40
|
+
it { expect(instance.a?).to eq(true) }
|
41
|
+
it { expect(instance.b).to eq('') }
|
42
|
+
it { expect(instance.b?).to eq(false) }
|
43
|
+
it { expect { instance.c }.to raise_error(::NoMethodError) }
|
44
|
+
it { expect { instance.c? }.to raise_error(::NoMethodError) }
|
45
|
+
end
|
46
|
+
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.
|
4
|
+
version: 0.70.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: 2020-
|
11
|
+
date: 2020-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -290,10 +290,29 @@ files:
|
|
290
290
|
- lib/avm/docker/image.rb
|
291
291
|
- lib/avm/docker/registry.rb
|
292
292
|
- lib/avm/docker/runner.rb
|
293
|
+
- lib/avm/eac_rails_base0/apache_host.rb
|
294
|
+
- lib/avm/eac_rails_base0/apache_path.rb
|
295
|
+
- lib/avm/eac_rails_base0/deploy.rb
|
296
|
+
- lib/avm/eac_rails_base0/instance.rb
|
293
297
|
- lib/avm/eac_redmine_base0/core_update.rb
|
294
298
|
- lib/avm/eac_redmine_base0/data_unit.rb
|
295
299
|
- lib/avm/eac_redmine_base0/deploy.rb
|
296
300
|
- lib/avm/eac_redmine_base0/instance.rb
|
301
|
+
- lib/avm/eac_ubuntu_base0/apache.rb
|
302
|
+
- lib/avm/eac_ubuntu_base0/apache/resource.rb
|
303
|
+
- lib/avm/eac_ubuntu_base0/docker_image.rb
|
304
|
+
- lib/avm/eac_webapp_base0/apache_host.rb
|
305
|
+
- lib/avm/eac_webapp_base0/deploy.rb
|
306
|
+
- lib/avm/eac_webapp_base0/deploy/appended_directories.rb
|
307
|
+
- lib/avm/eac_webapp_base0/deploy/file_unit.rb
|
308
|
+
- lib/avm/eac_webapp_base0/deploy/git_info.rb
|
309
|
+
- lib/avm/eac_webapp_base0/deploy/version.rb
|
310
|
+
- lib/avm/eac_webapp_base0/instance.rb
|
311
|
+
- lib/avm/eac_webapp_base0/runner/apache_host.rb
|
312
|
+
- lib/avm/eac_webapp_base0/runner/data.rb
|
313
|
+
- lib/avm/eac_webapp_base0/runner/data/dump.rb
|
314
|
+
- lib/avm/eac_webapp_base0/runner/data/load.rb
|
315
|
+
- lib/avm/eac_webapp_base0/runner/deploy.rb
|
297
316
|
- lib/avm/executables.rb
|
298
317
|
- lib/avm/files.rb
|
299
318
|
- lib/avm/files/formatter.rb
|
@@ -365,7 +384,7 @@ files:
|
|
365
384
|
- lib/avm/instances/configuration/_rubocop.rb
|
366
385
|
- lib/avm/instances/configuration/_tests.rb
|
367
386
|
- lib/avm/instances/entries.rb
|
368
|
-
- lib/avm/instances/
|
387
|
+
- lib/avm/instances/entry.rb
|
369
388
|
- lib/avm/instances/entry_keys.rb
|
370
389
|
- lib/avm/launcher/context/instance_manager.rb
|
371
390
|
- lib/avm/launcher/context/instance_manager/cached_instance.rb
|
@@ -423,26 +442,9 @@ files:
|
|
423
442
|
- lib/avm/self/instance/entry_keys.rb
|
424
443
|
- lib/avm/stereotypes.rb
|
425
444
|
- lib/avm/stereotypes/eac_rails_base0.rb
|
426
|
-
- lib/avm/stereotypes/eac_rails_base0/apache_host.rb
|
427
|
-
- lib/avm/stereotypes/eac_rails_base0/deploy.rb
|
428
|
-
- lib/avm/stereotypes/eac_rails_base0/instance.rb
|
429
445
|
- lib/avm/stereotypes/eac_redmine_base0.rb
|
430
446
|
- lib/avm/stereotypes/eac_ubuntu_base0.rb
|
431
|
-
- lib/avm/stereotypes/eac_ubuntu_base0/apache.rb
|
432
|
-
- lib/avm/stereotypes/eac_ubuntu_base0/apache/site.rb
|
433
|
-
- lib/avm/stereotypes/eac_ubuntu_base0/docker_image.rb
|
434
447
|
- lib/avm/stereotypes/eac_webapp_base0.rb
|
435
|
-
- lib/avm/stereotypes/eac_webapp_base0/apache_host.rb
|
436
|
-
- lib/avm/stereotypes/eac_webapp_base0/deploy.rb
|
437
|
-
- lib/avm/stereotypes/eac_webapp_base0/deploy/appended_directories.rb
|
438
|
-
- lib/avm/stereotypes/eac_webapp_base0/deploy/file_unit.rb
|
439
|
-
- lib/avm/stereotypes/eac_webapp_base0/deploy/git_info.rb
|
440
|
-
- lib/avm/stereotypes/eac_webapp_base0/deploy/version.rb
|
441
|
-
- lib/avm/stereotypes/eac_webapp_base0/instance.rb
|
442
|
-
- lib/avm/stereotypes/eac_webapp_base0/runner/data.rb
|
443
|
-
- lib/avm/stereotypes/eac_webapp_base0/runner/data/dump.rb
|
444
|
-
- lib/avm/stereotypes/eac_webapp_base0/runner/data/load.rb
|
445
|
-
- lib/avm/stereotypes/eac_webapp_base0/runner/deploy.rb
|
446
448
|
- lib/avm/stereotypes/eac_wordpress_base0/apache_host.rb
|
447
449
|
- lib/avm/stereotypes/eac_wordpress_base0/deploy.rb
|
448
450
|
- lib/avm/stereotypes/eac_wordpress_base0/instance.rb
|
@@ -457,6 +459,7 @@ files:
|
|
457
459
|
- lib/avm/tools/runner.rb
|
458
460
|
- lib/avm/tools/runner/eac_rails_base0.rb
|
459
461
|
- lib/avm/tools/runner/eac_rails_base0/apache_host.rb
|
462
|
+
- lib/avm/tools/runner/eac_rails_base0/apache_path.rb
|
460
463
|
- lib/avm/tools/runner/eac_rails_base0/bundle.rb
|
461
464
|
- lib/avm/tools/runner/eac_rails_base0/data.rb
|
462
465
|
- lib/avm/tools/runner/eac_rails_base0/deploy.rb
|
@@ -542,8 +545,11 @@ files:
|
|
542
545
|
- lib/eac_launcher/vendor.rb
|
543
546
|
- lib/eac_launcher/vendor/github.rb
|
544
547
|
- lib/eac_launcher/version.rb
|
548
|
+
- template/avm/eac_rails_base0/apache_path/default.conf
|
549
|
+
- template/avm/eac_rails_base0/deploy/config/database.yml.template
|
545
550
|
- template/avm/eac_redmine_base0/deploy/config/install.sh.template
|
546
551
|
- template/avm/eac_redmine_base0/deploy/config/secrets.yml
|
552
|
+
- template/avm/eac_webapp_base0/apache_host/no_ssl.conf
|
547
553
|
- template/avm/ruby/gems/generator/gemspec.template
|
548
554
|
- template/avm/ruby/gems/generator/root_lib.template
|
549
555
|
- template/avm/ruby/gems/generator/static/Gemfile
|
@@ -552,10 +558,38 @@ files:
|
|
552
558
|
- template/avm/ruby/gems/generator/version.template
|
553
559
|
- template/avm/self/docker_image/Dockerfile
|
554
560
|
- template/avm/self/docker_image/entrypoint.sh
|
555
|
-
- template/avm/stereotypes/eac_rails_base0/deploy/config/database.yml.template
|
556
561
|
- template/avm/stereotypes/eac_ubuntu_base0/docker_image/Dockerfile
|
557
|
-
- template/avm/stereotypes/eac_webapp_base0/apache_host/no_ssl.conf
|
558
562
|
- template/avm/stereotypes/eac_wordpress_base0/deploy/wp-config.php.template
|
563
|
+
- vendor/eac_cli/Gemfile
|
564
|
+
- vendor/eac_cli/eac_cli.gemspec
|
565
|
+
- vendor/eac_cli/lib/eac_cli.rb
|
566
|
+
- vendor/eac_cli/lib/eac_cli/core_ext.rb
|
567
|
+
- vendor/eac_cli/lib/eac_cli/default_runner.rb
|
568
|
+
- vendor/eac_cli/lib/eac_cli/definition.rb
|
569
|
+
- vendor/eac_cli/lib/eac_cli/definition/argument_option.rb
|
570
|
+
- vendor/eac_cli/lib/eac_cli/definition/base_option.rb
|
571
|
+
- vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb
|
572
|
+
- vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb
|
573
|
+
- vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb
|
574
|
+
- vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb
|
575
|
+
- vendor/eac_cli/lib/eac_cli/parser.rb
|
576
|
+
- vendor/eac_cli/lib/eac_cli/parser/collector.rb
|
577
|
+
- vendor/eac_cli/lib/eac_cli/parser/error.rb
|
578
|
+
- vendor/eac_cli/lib/eac_cli/parser/options_collection.rb
|
579
|
+
- vendor/eac_cli/lib/eac_cli/parser/parse_result.rb
|
580
|
+
- vendor/eac_cli/lib/eac_cli/parser/positional_collection.rb
|
581
|
+
- vendor/eac_cli/lib/eac_cli/patches.rb
|
582
|
+
- vendor/eac_cli/lib/eac_cli/patches/object.rb
|
583
|
+
- vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb
|
584
|
+
- vendor/eac_cli/lib/eac_cli/runner.rb
|
585
|
+
- vendor/eac_cli/lib/eac_cli/runner/context.rb
|
586
|
+
- vendor/eac_cli/lib/eac_cli/runner_with.rb
|
587
|
+
- vendor/eac_cli/lib/eac_cli/runner_with/help.rb
|
588
|
+
- vendor/eac_cli/lib/eac_cli/runner_with/output_file.rb
|
589
|
+
- vendor/eac_cli/lib/eac_cli/version.rb
|
590
|
+
- vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb
|
591
|
+
- vendor/eac_cli/spec/rubocop_spec.rb
|
592
|
+
- vendor/eac_cli/spec/spec_helper.rb
|
559
593
|
- vendor/eac_docker/Gemfile
|
560
594
|
- vendor/eac_docker/eac_docker.gemspec
|
561
595
|
- vendor/eac_docker/lib/eac_docker.rb
|
@@ -797,8 +831,12 @@ files:
|
|
797
831
|
- vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/base.rb
|
798
832
|
- vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/minitest.rb
|
799
833
|
- vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple.rb
|
834
|
+
- vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/decorated_gem.rb
|
835
|
+
- vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/multiple/result.rb
|
800
836
|
- vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/tests/rspec.rb
|
801
837
|
- vendor/eac_ruby_gems_utils/lib/eac_ruby_gems_utils/version.rb
|
838
|
+
- vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec.rb
|
839
|
+
- vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem/version_file_spec_files/a_version_file.rb
|
802
840
|
- vendor/eac_ruby_gems_utils/spec/lib/eac_ruby_gems_utils/gem_spec.rb
|
803
841
|
- vendor/eac_ruby_gems_utils/spec/rubocop_check_spec.rb
|
804
842
|
- vendor/eac_ruby_gems_utils/spec/spec_helper.rb
|
@@ -867,6 +905,7 @@ files:
|
|
867
905
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/immutable/common_accessor.rb
|
868
906
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/immutable/hash_accessor.rb
|
869
907
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/immutable/instance_methods.rb
|
908
|
+
- vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb
|
870
909
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/listable.rb
|
871
910
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/class_methods.rb
|
872
911
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/listable/instance_methods.rb
|
@@ -905,6 +944,8 @@ files:
|
|
905
944
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb
|
906
945
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp.rb
|
907
946
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/if_match.rb
|
947
|
+
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string.rb
|
948
|
+
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/string/inflector.rb
|
908
949
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time.rb
|
909
950
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/default_time_zone_set.rb
|
910
951
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/local_time_zone.rb
|
@@ -918,6 +959,7 @@ files:
|
|
918
959
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb
|
919
960
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/settings_provider.rb
|
920
961
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/simple_cache.rb
|
962
|
+
- vendor/eac_ruby_utils/lib/eac_ruby_utils/struct.rb
|
921
963
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/templates.rb
|
922
964
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/directory.rb
|
923
965
|
- vendor/eac_ruby_utils/lib/eac_ruby_utils/templates/file.rb
|
@@ -944,6 +986,7 @@ files:
|
|
944
986
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb
|
945
987
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/temp_spec.rb
|
946
988
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb
|
989
|
+
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb
|
947
990
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb
|
948
991
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/options_consumer_spec.rb
|
949
992
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/enumerable/boolean_combinations_spec.rb
|
@@ -963,6 +1006,7 @@ files:
|
|
963
1006
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby_spec.rb
|
964
1007
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/settings_provider_spec.rb
|
965
1008
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/simple_cache_spec.rb
|
1009
|
+
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/struct_spec.rb
|
966
1010
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec.rb
|
967
1011
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec_files/expected_content
|
968
1012
|
- vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/templates/file_spec_files/source.template
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Instances
|
7
|
-
module Entries
|
8
|
-
class EntryReader
|
9
|
-
common_constructor :parent, :suffix, :options
|
10
|
-
|
11
|
-
def auto_value
|
12
|
-
parent.respond_to?(auto_value_method, true) ? parent.send(auto_value_method) : nil
|
13
|
-
end
|
14
|
-
|
15
|
-
def auto_value_method
|
16
|
-
"auto_#{suffix.to_s.gsub('.', '_')}"
|
17
|
-
end
|
18
|
-
|
19
|
-
def full_path
|
20
|
-
(parent.path_prefix + suffix_as_array).join('.')
|
21
|
-
end
|
22
|
-
|
23
|
-
def optional_value
|
24
|
-
read(required: false, noinput: true) || auto_value
|
25
|
-
end
|
26
|
-
|
27
|
-
def read(extra_options = {})
|
28
|
-
::Avm.configs.read_entry(full_path, options.merge(extra_options))
|
29
|
-
end
|
30
|
-
|
31
|
-
def suffix_as_array
|
32
|
-
if suffix.is_a?(::Array)
|
33
|
-
suffix.dup
|
34
|
-
else
|
35
|
-
::EacRubyUtils::PathsHash.parse_entry_key(suffix.to_s)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def value
|
40
|
-
optional_value || read
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|