avm-tools 0.121.0 → 0.122.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/lib/avm/tools/runner/app_src/info.rb +19 -0
- data/lib/avm/tools/version.rb +1 -1
- data/locale/en.yml +7 -0
- data/locale/pt-BR.yml +7 -0
- metadata +4 -71
- data/sub/avm-eac_generic_base0/Gemfile +0 -5
- data/sub/avm-eac_generic_base0/avm-eac_generic_base0.gemspec +0 -19
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base/version_bump.rb +0 -35
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base.rb +0 -25
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/tester.rb +0 -56
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources.rb +0 -11
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb +0 -7
- data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0.rb +0 -9
- data/sub/avm-eac_generic_base0/locale/en.yaml +0 -6
- data/sub/avm-eac_generic_base0/locale/pt-BR.yaml +0 -6
- data/sub/avm-eac_generic_base0/spec/lib/avm/eac_generic_base0/sources/base_spec.rb +0 -7
- data/sub/avm-eac_generic_base0/spec/rubocop_spec.rb +0 -3
- data/sub/avm-eac_generic_base0/spec/spec_helper.rb +0 -4
- data/sub/avm-eac_rails_base0/Gemfile +0 -5
- data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +0 -19
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_host.rb +0 -10
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb +0 -19
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb +0 -53
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instance.rb +0 -11
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb +0 -26
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb +0 -11
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb +0 -27
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +0 -7
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0.rb +0 -9
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec.rb +0 -22
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec_files/apache_host_spec_no_ssl_content.conf +0 -11
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec.rb +0 -23
- data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec_files/stub-app_0_apache_path.conf +0 -14
- data/sub/avm-eac_rails_base0/spec/rubocop_spec.rb +0 -3
- data/sub/avm-eac_rails_base0/spec/spec_helper.rb +0 -5
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/apache_path/extra_content.conf +0 -5
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/database.yml.template +0 -21
- data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template +0 -11
- data/sub/eac_config/Gemfile +0 -5
- data/sub/eac_config/eac_config.gemspec +0 -19
- data/sub/eac_config/lib/eac_config/entry.rb +0 -53
- data/sub/eac_config/lib/eac_config/entry_path.rb +0 -41
- data/sub/eac_config/lib/eac_config/envvars_node/entry.rb +0 -54
- data/sub/eac_config/lib/eac_config/envvars_node.rb +0 -25
- data/sub/eac_config/lib/eac_config/load_nodes_search.rb +0 -39
- data/sub/eac_config/lib/eac_config/load_path.rb +0 -28
- data/sub/eac_config/lib/eac_config/node.rb +0 -67
- data/sub/eac_config/lib/eac_config/node_entry.rb +0 -22
- data/sub/eac_config/lib/eac_config/node_uri.rb +0 -38
- data/sub/eac_config/lib/eac_config/old_configs/base.rb +0 -43
- data/sub/eac_config/lib/eac_config/old_configs/file.rb +0 -47
- data/sub/eac_config/lib/eac_config/old_configs.rb +0 -75
- data/sub/eac_config/lib/eac_config/paths_hash/entry_key_error.rb +0 -8
- data/sub/eac_config/lib/eac_config/paths_hash/node.rb +0 -67
- data/sub/eac_config/lib/eac_config/paths_hash/path_search.rb +0 -39
- data/sub/eac_config/lib/eac_config/paths_hash.rb +0 -63
- data/sub/eac_config/lib/eac_config/rspec/setup.rb +0 -65
- data/sub/eac_config/lib/eac_config/rspec.rb +0 -9
- data/sub/eac_config/lib/eac_config/version.rb +0 -5
- data/sub/eac_config/lib/eac_config/yaml_file_node/entry.rb +0 -36
- data/sub/eac_config/lib/eac_config/yaml_file_node.rb +0 -47
- data/sub/eac_config/lib/eac_config.rb +0 -7
- data/sub/eac_config/spec/lib/eac_config/entry_path_spec.rb +0 -30
- data/sub/eac_config/spec/lib/eac_config/envvars_node/entry_spec.rb +0 -14
- data/sub/eac_config/spec/lib/eac_config/envvars_node_spec.rb +0 -40
- data/sub/eac_config/spec/lib/eac_config/old_configs_spec.rb +0 -46
- data/sub/eac_config/spec/lib/eac_config/paths_hash_spec.rb +0 -88
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec.rb +0 -52
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1.yaml +0 -6
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_1.yaml +0 -2
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2/storage1_2_1.yaml +0 -2
- data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2.yaml +0 -4
- data/sub/eac_config/spec/rubocop_spec.rb +0 -3
- data/sub/eac_config/spec/spec_helper.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '099777e93c832a08aed482da764730031fa31a681e54885edbe17a1298545065'
|
4
|
+
data.tar.gz: 4f41a900634129f6c09454e6d7caccce9956caf6ad2c885b826eaf28f68f44d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d7ea750379d191aec03687d126b327123015458ccbcbb35a733334bd0e660c009627c7054b92583f4b65af0012a1f62204a1d047dc13778ee0d72e7de642e5e
|
7
|
+
data.tar.gz: a81da679f43cff4f1d0eb89f7e636197dfe95e39205dab53484083ac8a204540ae5a96abb691b46dd1dd1634a62222247759c7483d0b190f6adcf90463097b26
|
data/Gemfile
CHANGED
@@ -9,11 +9,15 @@ module Avm
|
|
9
9
|
class Info
|
10
10
|
runner_with :help do
|
11
11
|
desc 'Show information about local project instance.'
|
12
|
+
bool_opt '-p', '--parent', 'Show the parent source.'
|
13
|
+
bool_opt '-t', '--tests', 'Show test commands.'
|
12
14
|
end
|
13
15
|
|
14
16
|
def run
|
15
17
|
show_instance
|
16
18
|
show_source
|
19
|
+
show_parent
|
20
|
+
show_test_commands
|
17
21
|
end
|
18
22
|
|
19
23
|
private
|
@@ -23,11 +27,26 @@ module Avm
|
|
23
27
|
infov 'Launcher stereotypes', instance.stereotypes.map(&:label).join(', ')
|
24
28
|
end
|
25
29
|
|
30
|
+
def show_parent
|
31
|
+
return unless parsed.parent?
|
32
|
+
|
33
|
+
infov 'Parent', runner_context.call(:subject).parent
|
34
|
+
end
|
35
|
+
|
26
36
|
def show_source
|
27
37
|
infov 'Stereotype', runner_context.call(:subject).class
|
28
38
|
infov 'SCM', runner_context.call(:subject).scm
|
29
39
|
end
|
30
40
|
|
41
|
+
def show_test_commands
|
42
|
+
return unless parsed.tests?
|
43
|
+
|
44
|
+
infov 'Test commands', runner_context.call(:subject).test_commands.count
|
45
|
+
runner_context.call(:subject).test_commands.each do |name, command|
|
46
|
+
infov " * #{name}", command
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
31
50
|
def instance
|
32
51
|
runner_context.call(:instance)
|
33
52
|
end
|
data/lib/avm/tools/version.rb
CHANGED
data/locale/en.yml
ADDED
data/locale/pt-BR.yml
ADDED
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.122.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-
|
11
|
+
date: 2022-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -410,6 +410,8 @@ files:
|
|
410
410
|
- lib/avm/tools/runner/self/registry.rb
|
411
411
|
- lib/avm/tools/self.rb
|
412
412
|
- lib/avm/tools/version.rb
|
413
|
+
- locale/en.yml
|
414
|
+
- locale/pt-BR.yml
|
413
415
|
- sub/avm-eac_asciidoctor_base0/Gemfile
|
414
416
|
- sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec
|
415
417
|
- sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0.rb
|
@@ -427,19 +429,6 @@ files:
|
|
427
429
|
- sub/avm-eac_asciidoctor_base0/spec/lib/avm/eac_asciidoctor_base0/sources/base_spec.rb
|
428
430
|
- sub/avm-eac_asciidoctor_base0/spec/rubocop_spec.rb
|
429
431
|
- sub/avm-eac_asciidoctor_base0/spec/spec_helper.rb
|
430
|
-
- sub/avm-eac_generic_base0/Gemfile
|
431
|
-
- sub/avm-eac_generic_base0/avm-eac_generic_base0.gemspec
|
432
|
-
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0.rb
|
433
|
-
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources.rb
|
434
|
-
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base.rb
|
435
|
-
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/base/version_bump.rb
|
436
|
-
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/sources/tester.rb
|
437
|
-
- sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb
|
438
|
-
- sub/avm-eac_generic_base0/locale/en.yaml
|
439
|
-
- sub/avm-eac_generic_base0/locale/pt-BR.yaml
|
440
|
-
- sub/avm-eac_generic_base0/spec/lib/avm/eac_generic_base0/sources/base_spec.rb
|
441
|
-
- sub/avm-eac_generic_base0/spec/rubocop_spec.rb
|
442
|
-
- sub/avm-eac_generic_base0/spec/spec_helper.rb
|
443
432
|
- sub/avm-eac_postgresql_base0/Gemfile
|
444
433
|
- sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec
|
445
434
|
- sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0.rb
|
@@ -450,26 +439,6 @@ files:
|
|
450
439
|
- sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb
|
451
440
|
- sub/avm-eac_postgresql_base0/spec/rubocop_spec.rb
|
452
441
|
- sub/avm-eac_postgresql_base0/spec/spec_helper.rb
|
453
|
-
- sub/avm-eac_rails_base0/Gemfile
|
454
|
-
- sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec
|
455
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0.rb
|
456
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_host.rb
|
457
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb
|
458
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb
|
459
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instance.rb
|
460
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb
|
461
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb
|
462
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb
|
463
|
-
- sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb
|
464
|
-
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec.rb
|
465
|
-
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec_files/apache_host_spec_no_ssl_content.conf
|
466
|
-
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec.rb
|
467
|
-
- sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec_files/stub-app_0_apache_path.conf
|
468
|
-
- sub/avm-eac_rails_base0/spec/rubocop_spec.rb
|
469
|
-
- sub/avm-eac_rails_base0/spec/spec_helper.rb
|
470
|
-
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/apache_path/extra_content.conf
|
471
|
-
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/database.yml.template
|
472
|
-
- sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template
|
473
442
|
- sub/avm-eac_ubuntu_base0/Gemfile
|
474
443
|
- sub/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec
|
475
444
|
- sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0.rb
|
@@ -581,42 +550,6 @@ files:
|
|
581
550
|
- sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb
|
582
551
|
- sub/avm-git/spec/rubocop_spec.rb
|
583
552
|
- sub/avm-git/spec/spec_helper.rb
|
584
|
-
- sub/eac_config/Gemfile
|
585
|
-
- sub/eac_config/eac_config.gemspec
|
586
|
-
- sub/eac_config/lib/eac_config.rb
|
587
|
-
- sub/eac_config/lib/eac_config/entry.rb
|
588
|
-
- sub/eac_config/lib/eac_config/entry_path.rb
|
589
|
-
- sub/eac_config/lib/eac_config/envvars_node.rb
|
590
|
-
- sub/eac_config/lib/eac_config/envvars_node/entry.rb
|
591
|
-
- sub/eac_config/lib/eac_config/load_nodes_search.rb
|
592
|
-
- sub/eac_config/lib/eac_config/load_path.rb
|
593
|
-
- sub/eac_config/lib/eac_config/node.rb
|
594
|
-
- sub/eac_config/lib/eac_config/node_entry.rb
|
595
|
-
- sub/eac_config/lib/eac_config/node_uri.rb
|
596
|
-
- sub/eac_config/lib/eac_config/old_configs.rb
|
597
|
-
- sub/eac_config/lib/eac_config/old_configs/base.rb
|
598
|
-
- sub/eac_config/lib/eac_config/old_configs/file.rb
|
599
|
-
- sub/eac_config/lib/eac_config/paths_hash.rb
|
600
|
-
- sub/eac_config/lib/eac_config/paths_hash/entry_key_error.rb
|
601
|
-
- sub/eac_config/lib/eac_config/paths_hash/node.rb
|
602
|
-
- sub/eac_config/lib/eac_config/paths_hash/path_search.rb
|
603
|
-
- sub/eac_config/lib/eac_config/rspec.rb
|
604
|
-
- sub/eac_config/lib/eac_config/rspec/setup.rb
|
605
|
-
- sub/eac_config/lib/eac_config/version.rb
|
606
|
-
- sub/eac_config/lib/eac_config/yaml_file_node.rb
|
607
|
-
- sub/eac_config/lib/eac_config/yaml_file_node/entry.rb
|
608
|
-
- sub/eac_config/spec/lib/eac_config/entry_path_spec.rb
|
609
|
-
- sub/eac_config/spec/lib/eac_config/envvars_node/entry_spec.rb
|
610
|
-
- sub/eac_config/spec/lib/eac_config/envvars_node_spec.rb
|
611
|
-
- sub/eac_config/spec/lib/eac_config/old_configs_spec.rb
|
612
|
-
- sub/eac_config/spec/lib/eac_config/paths_hash_spec.rb
|
613
|
-
- sub/eac_config/spec/lib/eac_config/yaml_file_node_spec.rb
|
614
|
-
- sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1.yaml
|
615
|
-
- sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_1.yaml
|
616
|
-
- sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2.yaml
|
617
|
-
- sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2/storage1_2_1.yaml
|
618
|
-
- sub/eac_config/spec/rubocop_spec.rb
|
619
|
-
- sub/eac_config/spec/spec_helper.rb
|
620
553
|
- sub/eac_docker/Gemfile
|
621
554
|
- sub/eac_docker/eac_docker.gemspec
|
622
555
|
- sub/eac_docker/lib/eac_docker.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
-
|
5
|
-
require 'avm/eac_generic_base0/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = 'avm-eac_generic_base0'
|
9
|
-
s.version = Avm::EacGenericBase0::VERSION
|
10
|
-
s.authors = ['Put here the authors']
|
11
|
-
s.summary = 'Put here de description.'
|
12
|
-
|
13
|
-
s.files = Dir['{lib}/**/*']
|
14
|
-
|
15
|
-
s.add_dependency 'avm', '~> 0.19'
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.80'
|
17
|
-
|
18
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
|
19
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/sources/base'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module EacGenericBase0
|
8
|
-
module Sources
|
9
|
-
class Base < ::Avm::Sources::Base
|
10
|
-
module VersionBump
|
11
|
-
def after_sub_version_bump_do_changes
|
12
|
-
# Do nothing
|
13
|
-
end
|
14
|
-
|
15
|
-
# @return [Avm::Scms::Commit, nil]
|
16
|
-
def version_bump(target_version)
|
17
|
-
scm.commit_if_change(version_bump_commit_message(target_version)) do
|
18
|
-
version_bump_do_changes(target_version)
|
19
|
-
parent.if_present(&:after_sub_version_bump_do_changes)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
# @return [String]
|
24
|
-
def version_bump_commit_message(target_version)
|
25
|
-
i18n_translate(__method__, version: target_version, __locale: locale)
|
26
|
-
end
|
27
|
-
|
28
|
-
def version_bump_do_changes(_target_version)
|
29
|
-
raise_abstract_method(__METHOD__)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_generic_base0/sources/tester'
|
4
|
-
require 'avm/sources/base'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module EacGenericBase0
|
9
|
-
module Sources
|
10
|
-
class Base < ::Avm::Sources::Base
|
11
|
-
require_sub __FILE__, include_modules: true
|
12
|
-
enable_abstract_methods
|
13
|
-
|
14
|
-
# @return [Avm::EacGenericBase0::Sources::Tester]
|
15
|
-
def tester_class
|
16
|
-
Avm::EacGenericBase0::Sources::Tester
|
17
|
-
end
|
18
|
-
|
19
|
-
def valid?
|
20
|
-
::Avm::Registry.scms.detect_optional(path).present?
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/sources/tester'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module EacGenericBase0
|
8
|
-
module Sources
|
9
|
-
class Tester < ::Avm::Sources::Tester
|
10
|
-
TEST_COMMAND_CONFIGURATION_KEY = :test_command
|
11
|
-
|
12
|
-
enable_simple_cache
|
13
|
-
|
14
|
-
# @return [EacRubyUtils::Envs::Command, nil]
|
15
|
-
def test_command
|
16
|
-
source.read_configuration_as_shell_words(TEST_COMMAND_CONFIGURATION_KEY)
|
17
|
-
.if_present do |args|
|
18
|
-
::EacRubyUtils::Envs.local.command(args).chdir(source.path)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# @return [EacFs::Logs]
|
23
|
-
def logs
|
24
|
-
@logs ||= ::EacFs::Logs.new.add(:stdout).add(:stderr)
|
25
|
-
end
|
26
|
-
|
27
|
-
# @return [Avm::Sources::Tests::Result]
|
28
|
-
def result
|
29
|
-
@result ||= begin
|
30
|
-
if test_command.blank?
|
31
|
-
::Avm::Sources::Tests::Result::NONEXISTENT
|
32
|
-
elsif run_test_command
|
33
|
-
::Avm::Sources::Tests::Result::SUCESSFUL
|
34
|
-
else
|
35
|
-
::Avm::Sources::Tests::Result::FAILED
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
protected
|
41
|
-
|
42
|
-
def run_test_command
|
43
|
-
execute_command_and_log(test_command)
|
44
|
-
end
|
45
|
-
|
46
|
-
# @return [true, false]
|
47
|
-
def execute_command_and_log(command)
|
48
|
-
r = command.execute
|
49
|
-
logs[:stdout].write(r[:stdout])
|
50
|
-
logs[:stderr].write(r[:stderr])
|
51
|
-
r[:exit_code].zero?
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
-
|
5
|
-
require 'avm/eac_rails_base0/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = 'avm-eac_rails_base0'
|
9
|
-
s.version = Avm::EacRailsBase0::VERSION
|
10
|
-
s.authors = ['Put here the authors']
|
11
|
-
s.summary = 'Put here de description.'
|
12
|
-
|
13
|
-
s.files = Dir['{lib,template}/**/*']
|
14
|
-
|
15
|
-
s.add_dependency 'avm-eac_rails_base1', '~> 0.3'
|
16
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.80', '>= 0.80.2'
|
17
|
-
|
18
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
|
19
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_templates/core_ext'
|
4
|
-
require 'avm/eac_webapp_base0/apache_path'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module EacRailsBase0
|
9
|
-
class ApachePath < ::Avm::EacWebappBase0::ApachePath
|
10
|
-
def document_root
|
11
|
-
::File.join(super, 'public')
|
12
|
-
end
|
13
|
-
|
14
|
-
def extra_content
|
15
|
-
template.child('extra_content.conf').apply(instance)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_templates/core_ext'
|
4
|
-
require 'avm/eac_webapp_base0/deploy'
|
5
|
-
require 'avm/instances/entry_keys'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module EacRailsBase0
|
9
|
-
class Deploy < ::Avm::EacWebappBase0::Deploy
|
10
|
-
set_callback :assert_instance_branch, :after do
|
11
|
-
bundle_install
|
12
|
-
assert_database
|
13
|
-
database_migrate
|
14
|
-
compile_assets
|
15
|
-
restart_tasks_scheduler
|
16
|
-
touch_restart_file
|
17
|
-
end
|
18
|
-
|
19
|
-
def assert_database
|
20
|
-
infom 'Asserting database...'
|
21
|
-
instance.pg.assert
|
22
|
-
end
|
23
|
-
|
24
|
-
def bundle_install
|
25
|
-
infom 'Running "bundle install"...'
|
26
|
-
instance.bundle('install').system!
|
27
|
-
end
|
28
|
-
|
29
|
-
def compile_assets
|
30
|
-
infom 'Compiling assets...'
|
31
|
-
instance.rake('assets:clean', 'assets:precompile').system!
|
32
|
-
end
|
33
|
-
|
34
|
-
def database_migrate
|
35
|
-
infom 'Running database migrations...'
|
36
|
-
instance.rake('db:migrate').system!
|
37
|
-
end
|
38
|
-
|
39
|
-
def restart_tasks_scheduler
|
40
|
-
infom 'Restarting Tasks Scheduler\'s daemon...'
|
41
|
-
instance.bundle('exec', 'tasks_scheduler', 'restart').system!
|
42
|
-
end
|
43
|
-
|
44
|
-
def touch_restart_file
|
45
|
-
infom 'Touching restart file...'
|
46
|
-
instance.host_env.command(
|
47
|
-
'touch', ::File.join(instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH),
|
48
|
-
'tmp', 'restart.txt')
|
49
|
-
).system!
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_rails_base0/instance'
|
4
|
-
require 'avm/eac_rails_base0/deploy'
|
5
|
-
require 'avm/eac_rails_base0/apache_host'
|
6
|
-
require 'avm/eac_rails_base0/apache_path'
|
7
|
-
require 'avm/eac_rails_base1/runner'
|
8
|
-
require 'eac_ruby_utils/core_ext'
|
9
|
-
|
10
|
-
module Avm
|
11
|
-
module EacRailsBase0
|
12
|
-
module Runners
|
13
|
-
class Base < ::Avm::EacRailsBase1::Runner
|
14
|
-
require_sub __FILE__
|
15
|
-
|
16
|
-
STEREOTYPE_NAME = 'EacRailsBase0'
|
17
|
-
|
18
|
-
class << self
|
19
|
-
def stereotype_name
|
20
|
-
STEREOTYPE_NAME
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_rails_base1/sources/base'
|
4
|
-
require 'eac_ruby_utils/core_ext'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module EacRailsBase0
|
8
|
-
module Sources
|
9
|
-
class Base < ::Avm::EacRailsBase1::Sources::Base
|
10
|
-
CONFIG_RU_SUBPATH = 'config.ru'
|
11
|
-
SUBS_INCLUDE_PATHS_DEFAULT = ['sub/*/*'].freeze
|
12
|
-
|
13
|
-
def config_ru_path
|
14
|
-
path.join(CONFIG_RU_SUBPATH)
|
15
|
-
end
|
16
|
-
|
17
|
-
def subs_include_paths_default
|
18
|
-
SUBS_PATHS_DEFAULT
|
19
|
-
end
|
20
|
-
|
21
|
-
def valid?
|
22
|
-
super && config_ru_path.exist?
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_rails_base0/apache_host'
|
4
|
-
require 'avm/eac_rails_base0/instance'
|
5
|
-
|
6
|
-
RSpec.describe ::Avm::EacRailsBase0::ApacheHost do
|
7
|
-
describe '#no_ssl_site_content' do
|
8
|
-
let(:instance) { ::Avm::EacRailsBase0::Instance.by_id('stub-app_0') }
|
9
|
-
let(:apache_host) { described_class.new(instance) }
|
10
|
-
let(:fixtures_dir) { ::Pathname.new('apache_host_spec_files').expand_path(__dir__) }
|
11
|
-
let(:expected_content) { fixtures_dir.join('apache_host_spec_no_ssl_content.conf').read }
|
12
|
-
|
13
|
-
before do
|
14
|
-
instance.entry('fs_path').write('/path/to/stub-app_0')
|
15
|
-
instance.entry('web.url').write('http://stubapp.net')
|
16
|
-
end
|
17
|
-
|
18
|
-
it do
|
19
|
-
expect(apache_host.no_ssl_site_content).to eq(expected_content)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|