avm-tools 0.121.1 → 0.123.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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/lib/avm/tools/runner/app_src/info.rb +19 -0
  4. data/lib/avm/tools/runner/application_stereotypes/list.rb +31 -0
  5. data/lib/avm/tools/runner/application_stereotypes.rb +16 -0
  6. data/lib/avm/tools/version.rb +1 -1
  7. metadata +6 -60
  8. data/sub/avm-eac_rails_base0/Gemfile +0 -5
  9. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +0 -19
  10. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_host.rb +0 -10
  11. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb +0 -19
  12. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb +0 -53
  13. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instance.rb +0 -11
  14. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb +0 -26
  15. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb +0 -11
  16. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb +0 -27
  17. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +0 -7
  18. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0.rb +0 -9
  19. data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec.rb +0 -22
  20. 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
  21. data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec.rb +0 -23
  22. data/sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec_files/stub-app_0_apache_path.conf +0 -14
  23. data/sub/avm-eac_rails_base0/spec/rubocop_spec.rb +0 -3
  24. data/sub/avm-eac_rails_base0/spec/spec_helper.rb +0 -5
  25. data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/apache_path/extra_content.conf +0 -5
  26. data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/database.yml.template +0 -21
  27. data/sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template +0 -11
  28. data/sub/eac_config/Gemfile +0 -5
  29. data/sub/eac_config/eac_config.gemspec +0 -19
  30. data/sub/eac_config/lib/eac_config/entry.rb +0 -53
  31. data/sub/eac_config/lib/eac_config/entry_path.rb +0 -41
  32. data/sub/eac_config/lib/eac_config/envvars_node/entry.rb +0 -54
  33. data/sub/eac_config/lib/eac_config/envvars_node.rb +0 -25
  34. data/sub/eac_config/lib/eac_config/load_nodes_search.rb +0 -39
  35. data/sub/eac_config/lib/eac_config/load_path.rb +0 -28
  36. data/sub/eac_config/lib/eac_config/node.rb +0 -67
  37. data/sub/eac_config/lib/eac_config/node_entry.rb +0 -22
  38. data/sub/eac_config/lib/eac_config/node_uri.rb +0 -38
  39. data/sub/eac_config/lib/eac_config/old_configs/base.rb +0 -43
  40. data/sub/eac_config/lib/eac_config/old_configs/file.rb +0 -47
  41. data/sub/eac_config/lib/eac_config/old_configs.rb +0 -75
  42. data/sub/eac_config/lib/eac_config/paths_hash/entry_key_error.rb +0 -8
  43. data/sub/eac_config/lib/eac_config/paths_hash/node.rb +0 -67
  44. data/sub/eac_config/lib/eac_config/paths_hash/path_search.rb +0 -39
  45. data/sub/eac_config/lib/eac_config/paths_hash.rb +0 -63
  46. data/sub/eac_config/lib/eac_config/rspec/setup.rb +0 -65
  47. data/sub/eac_config/lib/eac_config/rspec.rb +0 -9
  48. data/sub/eac_config/lib/eac_config/version.rb +0 -5
  49. data/sub/eac_config/lib/eac_config/yaml_file_node/entry.rb +0 -36
  50. data/sub/eac_config/lib/eac_config/yaml_file_node.rb +0 -47
  51. data/sub/eac_config/lib/eac_config.rb +0 -7
  52. data/sub/eac_config/spec/lib/eac_config/entry_path_spec.rb +0 -30
  53. data/sub/eac_config/spec/lib/eac_config/envvars_node/entry_spec.rb +0 -14
  54. data/sub/eac_config/spec/lib/eac_config/envvars_node_spec.rb +0 -40
  55. data/sub/eac_config/spec/lib/eac_config/old_configs_spec.rb +0 -46
  56. data/sub/eac_config/spec/lib/eac_config/paths_hash_spec.rb +0 -88
  57. data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec.rb +0 -52
  58. data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1.yaml +0 -6
  59. data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_1.yaml +0 -2
  60. data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2/storage1_2_1.yaml +0 -2
  61. data/sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2.yaml +0 -4
  62. data/sub/eac_config/spec/rubocop_spec.rb +0 -3
  63. 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: 967cef8db26ee403d534fb94d09e84c2dd36ac48fb84605026101fcbd7dc47cd
4
- data.tar.gz: 97222041d6e48ff6b84ea48ec05e906589362f6d62956a587de4659be3ae981a
3
+ metadata.gz: 96767c8dbc616d4e1166263ebe047b23bc3eb1cae43fd65c855a947a5917d95c
4
+ data.tar.gz: 6448c5cf800a4570db21975f553963f8099e20d32ba53e7f98b164ff0feeadcf
5
5
  SHA512:
6
- metadata.gz: ed1da1ca0f5cb9bf06d44e9a6161d13d4ab49a47a00f17edae422c6b8f602a41defbf81a703eb3786760c704a9afb0043c89a02e3ed120f77b80cbc4cdc98c80
7
- data.tar.gz: 9f73b0d5b97637f4a192375776494d2f813f5d6e2ffc1c3b3df8c4adf119e6dfe8641be1889d564c6ff69209b0602dc1d8ce192243a510f359c83017d8d9f0bf
6
+ metadata.gz: 4dfc6dfac366d17373285126d681067cf6143ce92030fb938ebf0c8bc8d7841daa4c032fe95344a8041b341d73df074fa62fb2c55c55ce4b3d6ec988c79e51cb
7
+ data.tar.gz: 7d5625ba838dd89125fed9d6b0e0c3d2ba8e833537c618410c1b102313374f95bd11361fcfa2f043d43d760a75375b43211ddc29c9a40444ee498feeeaf0c241
data/Gemfile CHANGED
@@ -10,3 +10,6 @@ Dir["#{gems_subdir}/*"].each do |dir|
10
10
 
11
11
  gem ::File.basename(dir), path: dir
12
12
  end
13
+
14
+ local_gemfile = ::File.join(::File.dirname(__FILE__), 'Gemfile.local')
15
+ eval_gemfile local_gemfile if ::File.exist?(local_gemfile)
@@ -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
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/tools/core_ext'
4
+
5
+ module Avm
6
+ module Tools
7
+ class Runner
8
+ class ApplicationStereotypes
9
+ class List
10
+ runner_with :help, :output
11
+
12
+ def run
13
+ infov 'Found', stereotypes.count
14
+ run_output
15
+ end
16
+
17
+ def output_content
18
+ stereotypes.map { |s| "#{s}\n" }.join
19
+ end
20
+
21
+ private
22
+
23
+ def stereotypes
24
+ ::Avm::Registry.application_stereotypes.available
25
+ .sort_by { |s| [s.name, s.namespace_module] }
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+
5
+ module Avm
6
+ module Tools
7
+ class Runner
8
+ class ApplicationStereotypes
9
+ require_sub __FILE__
10
+ runner_with :help, :subcommands do
11
+ subcommands
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.121.1'
5
+ VERSION = '0.123.0'
6
6
  end
7
7
  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.121.1
4
+ version: 0.123.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-07 00:00:00.000000000 Z
11
+ date: 2022-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.22'
33
+ version: '0.27'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.22'
40
+ version: '0.27'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: avm-eac_asciidoctor_base0
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -371,6 +371,8 @@ files:
371
371
  - lib/avm/tools/runner/app_src/test.rb
372
372
  - lib/avm/tools/runner/app_src/update.rb
373
373
  - lib/avm/tools/runner/app_src/version_bump.rb
374
+ - lib/avm/tools/runner/application_stereotypes.rb
375
+ - lib/avm/tools/runner/application_stereotypes/list.rb
374
376
  - lib/avm/tools/runner/config.rb
375
377
  - lib/avm/tools/runner/config/load_path.rb
376
378
  - lib/avm/tools/runner/eac_asciidoctor_base0.rb
@@ -439,26 +441,6 @@ files:
439
441
  - sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb
440
442
  - sub/avm-eac_postgresql_base0/spec/rubocop_spec.rb
441
443
  - sub/avm-eac_postgresql_base0/spec/spec_helper.rb
442
- - sub/avm-eac_rails_base0/Gemfile
443
- - sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec
444
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0.rb
445
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_host.rb
446
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb
447
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb
448
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instance.rb
449
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb
450
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb
451
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/sources/base.rb
452
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb
453
- - sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec.rb
454
- - sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_host_spec_files/apache_host_spec_no_ssl_content.conf
455
- - sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec.rb
456
- - sub/avm-eac_rails_base0/spec/lib/avm/eac_rails_base0/apache_path_spec_files/stub-app_0_apache_path.conf
457
- - sub/avm-eac_rails_base0/spec/rubocop_spec.rb
458
- - sub/avm-eac_rails_base0/spec/spec_helper.rb
459
- - sub/avm-eac_rails_base0/template/avm/eac_rails_base0/apache_path/extra_content.conf
460
- - sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/database.yml.template
461
- - sub/avm-eac_rails_base0/template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template
462
444
  - sub/avm-eac_ubuntu_base0/Gemfile
463
445
  - sub/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec
464
446
  - sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0.rb
@@ -570,42 +552,6 @@ files:
570
552
  - sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb
571
553
  - sub/avm-git/spec/rubocop_spec.rb
572
554
  - sub/avm-git/spec/spec_helper.rb
573
- - sub/eac_config/Gemfile
574
- - sub/eac_config/eac_config.gemspec
575
- - sub/eac_config/lib/eac_config.rb
576
- - sub/eac_config/lib/eac_config/entry.rb
577
- - sub/eac_config/lib/eac_config/entry_path.rb
578
- - sub/eac_config/lib/eac_config/envvars_node.rb
579
- - sub/eac_config/lib/eac_config/envvars_node/entry.rb
580
- - sub/eac_config/lib/eac_config/load_nodes_search.rb
581
- - sub/eac_config/lib/eac_config/load_path.rb
582
- - sub/eac_config/lib/eac_config/node.rb
583
- - sub/eac_config/lib/eac_config/node_entry.rb
584
- - sub/eac_config/lib/eac_config/node_uri.rb
585
- - sub/eac_config/lib/eac_config/old_configs.rb
586
- - sub/eac_config/lib/eac_config/old_configs/base.rb
587
- - sub/eac_config/lib/eac_config/old_configs/file.rb
588
- - sub/eac_config/lib/eac_config/paths_hash.rb
589
- - sub/eac_config/lib/eac_config/paths_hash/entry_key_error.rb
590
- - sub/eac_config/lib/eac_config/paths_hash/node.rb
591
- - sub/eac_config/lib/eac_config/paths_hash/path_search.rb
592
- - sub/eac_config/lib/eac_config/rspec.rb
593
- - sub/eac_config/lib/eac_config/rspec/setup.rb
594
- - sub/eac_config/lib/eac_config/version.rb
595
- - sub/eac_config/lib/eac_config/yaml_file_node.rb
596
- - sub/eac_config/lib/eac_config/yaml_file_node/entry.rb
597
- - sub/eac_config/spec/lib/eac_config/entry_path_spec.rb
598
- - sub/eac_config/spec/lib/eac_config/envvars_node/entry_spec.rb
599
- - sub/eac_config/spec/lib/eac_config/envvars_node_spec.rb
600
- - sub/eac_config/spec/lib/eac_config/old_configs_spec.rb
601
- - sub/eac_config/spec/lib/eac_config/paths_hash_spec.rb
602
- - sub/eac_config/spec/lib/eac_config/yaml_file_node_spec.rb
603
- - sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1.yaml
604
- - sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_1.yaml
605
- - sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2.yaml
606
- - sub/eac_config/spec/lib/eac_config/yaml_file_node_spec_files/storage1_2/storage1_2_1.yaml
607
- - sub/eac_config/spec/rubocop_spec.rb
608
- - sub/eac_config/spec/spec_helper.rb
609
555
  - sub/eac_docker/Gemfile
610
556
  - sub/eac_docker/eac_docker.gemspec
611
557
  - sub/eac_docker/lib/eac_docker.rb
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
@@ -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,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/apache_host'
4
-
5
- module Avm
6
- module EacRailsBase0
7
- class ApacheHost < ::Avm::EacRailsBase1::ApacheHost
8
- end
9
- end
10
- 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,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base1/instance'
4
-
5
- module Avm
6
- module EacRailsBase0
7
- class Instance < ::Avm::EacRailsBase1::Instance
8
- FILES_UNITS = { uploads: 'public/uploads' }.freeze
9
- end
10
- end
11
- 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,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase0
7
- module Runners
8
- require_sub __FILE__
9
- end
10
- end
11
- 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,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Avm
4
- module EacRailsBase0
5
- VERSION = '0.4.1'
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase0
7
- require_sub __FILE__
8
- end
9
- 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
@@ -1,11 +0,0 @@
1
- <VirtualHost *:80>
2
- ServerName "stubapp.net"
3
- DocumentRoot "/path/to/stub-app_0/public"
4
- PassengerEnabled On
5
-
6
- <Directory "/path/to/stub-app_0/public">
7
- Allow from all
8
- Options -MultiViews
9
- Require all granted
10
- </Directory>
11
- </VirtualHost>
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_rails_base0/apache_path'
4
- require 'avm/eac_rails_base0/instance'
5
-
6
- RSpec.describe ::Avm::EacRailsBase0::ApachePath do
7
- describe '#no_ssl_site_content' do
8
- let(:instance) { ::Avm::EacRailsBase0::Instance.by_id('stub-app_0') }
9
- let(:apache_path) { described_class.new(instance) }
10
- let(:fixtures_dir) { ::Pathname.new('apache_path_spec_files').expand_path(__dir__) }
11
- let(:expect_file) { fixtures_dir.join('stub-app_0_apache_path.conf') }
12
- let(:expected_content) { expect_file.read }
13
-
14
- before do
15
- instance.entry(::Avm::Instances::EntryKeys::FS_PATH).write('/path/to/stub-app_0')
16
- instance.entry('web.url').write('http://stubapp.net/stub-app_0')
17
- end
18
-
19
- it do
20
- expect(apache_path.content).to eq(expected_content)
21
- end
22
- end
23
- end
@@ -1,14 +0,0 @@
1
- <IfModule mod_passenger.c>
2
- Alias "/stub-app_0" "/path/to/stub-app_0/public"
3
- <Location "/stub-app_0">
4
- PassengerBaseURI "/stub-app_0"
5
- PassengerAppRoot "/path/to/stub-app_0"
6
- PassengerAppEnv production
7
- </Location>
8
-
9
- <Directory "/path/to/stub-app_0/public">
10
- Allow from all
11
- Options -MultiViews
12
- Require all granted
13
- </Directory>
14
- </IfModule>
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/rspec/default_setup'
4
- ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
5
- ::EacRubyUtils::Rspec.default_setup.stub_eac_config_node
@@ -1,5 +0,0 @@
1
- <Location "%%WEB.PATH%%">
2
- PassengerBaseURI "%%WEB.PATH%%"
3
- PassengerAppRoot "%%FS_PATH%%"
4
- PassengerAppEnv production
5
- </Location>
@@ -1,21 +0,0 @@
1
- default: &default
2
- adapter: %%DATABASE.SYSTEM%%
3
- pool: %%DATABASE.LIMIT%%
4
- timeout: %%DATABASE.TIMEOUT%%
5
- encoding: unicode
6
- username: %%DATABASE.USERNAME%%
7
- password: %%DATABASE.PASSWORD%%
8
- host: %%DATABASE.HOSTNAME%%
9
- port: %%DATABASE.PORT%%
10
- reconnect: true
11
-
12
- development: &development
13
- <<: *default
14
- database: %%DATABASE.NAME%%
15
-
16
- production:
17
- <<: *development
18
-
19
- test:
20
- <<: *default
21
- database: %%DATABASE.NAME%%_test
@@ -1,11 +0,0 @@
1
- ---
2
- action_mailer_smtp_address: '%%MAILER.SMTP.ADDRESS%%'
3
- action_mailer_smtp_port: '%%MAILER.SMTP.PORT%%'
4
- action_mailer_smtp_domain: '%%MAILER.SMTP.DOMAIN%%'
5
- action_mailer_smtp_username: '%%MAILER.SMTP.USERNAME%%'
6
- action_mailer_smtp_password: '%%MAILER.SMTP.PASSWORD%%'
7
- action_mailer_smtp_authentication: '%%MAILER.SMTP.AUTHENTICATION%%'
8
- action_mailer_smtp_enable_starttls_auto: '%%MAILER.SMTP.STARTTLS_AUTO%%'
9
- action_mailer_default_options_from: '%%MAILER.FROM%%'
10
- action_mailer_default_options_reply_to: '%%MAILER.REPLY_TO%%'
11
- action_mailer_default_url_host: '%%WEB.URL%%'
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- $LOAD_PATH.push File.expand_path('lib', __dir__)
4
-
5
- require 'eac_config/version'
6
-
7
- Gem::Specification.new do |s|
8
- s.name = 'eac_config'
9
- s.version = EacConfig::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 'addressable'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.83'
17
-
18
- s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
19
- end
@@ -1,53 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_config/entry_path'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module EacConfig
7
- class Entry
8
- enable_simple_cache
9
- common_constructor :root_node, :path do
10
- self.path = ::EacConfig::EntryPath.assert(path)
11
- end
12
-
13
- def found?
14
- node_entry.if_present(false, &:found?)
15
- end
16
-
17
- def found_node
18
- node_entry.if_present(&:node)
19
- end
20
-
21
- def secret_value
22
- node_entry.if_present(&:secret_value)
23
- end
24
-
25
- def value
26
- node_entry.if_present(&:value)
27
- end
28
-
29
- def value=(a_value)
30
- write_node.self_entry(path).value = a_value
31
- end
32
-
33
- def write_node
34
- root_node.write_node || root_node
35
- end
36
-
37
- private
38
-
39
- def node_entry_uncached
40
- node_entry_from_root || node_entry_from_load_path
41
- end
42
-
43
- def node_entry_from_load_path_uncached
44
- root_node.recursive_loaded_nodes.lazy.map { |loaded_node| loaded_node.self_entry(path) }
45
- .find(&:found?)
46
- end
47
-
48
- def node_entry_from_root_uncached
49
- e = root_node.self_entry(path)
50
- e.found? ? e : nil
51
- end
52
- end
53
- end