avm-tools 0.113.2 → 0.113.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/eac_writings_base0/commons.rb +1 -1
  3. data/lib/avm/patches/i18n.rb +2 -2
  4. data/lib/avm/ruby/gems/generator.rb +1 -1
  5. data/lib/avm/tools/runner/config/load_path.rb +0 -1
  6. data/lib/avm/tools/runner/self.rb +2 -2
  7. data/lib/avm/tools/runner.rb +2 -2
  8. data/lib/avm/tools/self.rb +36 -0
  9. data/lib/avm/tools/version.rb +1 -1
  10. data/sub/avm/lib/avm/instances/application.rb +4 -0
  11. data/sub/avm/lib/avm/instances/entry_keys.rb +1 -1
  12. data/sub/avm/lib/avm/sources/base.rb +1 -1
  13. data/sub/avm/lib/avm/version.rb +1 -1
  14. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +1 -1
  15. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  16. data/sub/avm-eac_postgresql_base0/Gemfile +5 -0
  17. data/sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec +19 -0
  18. data/{lib/avm/postgresql → sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0}/instance/data_unit.rb +1 -1
  19. data/{lib/avm/postgresql → sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0}/instance.rb +3 -3
  20. data/{lib/avm/postgresql → sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0}/instance_with.rb +3 -3
  21. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +7 -0
  22. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0.rb +9 -0
  23. data/sub/avm-eac_postgresql_base0/spec/rubocop_spec.rb +3 -0
  24. data/sub/avm-eac_postgresql_base0/spec/spec_helper.rb +4 -0
  25. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +3 -2
  26. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb +1 -1
  27. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb +1 -1
  28. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  29. data/sub/avm-eac_rails_base0/spec/spec_helper.rb +5 -0
  30. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +2 -1
  31. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  32. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +1 -1
  33. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +1 -1
  34. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  35. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +1 -1
  36. data/sub/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec +1 -1
  37. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/docker_image.rb +1 -1
  38. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base.rb +4 -0
  39. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/version.rb +1 -1
  40. data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base/docker_spec.rb +14 -0
  41. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +3 -1
  42. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +1 -2
  43. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +1 -1
  44. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instance.rb +2 -2
  45. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  46. data/{template → sub/avm-eac_webapp_base0/template}/avm/eac_webapp_base0/apache_host/no_ssl.conf +0 -0
  47. data/{template → sub/avm-eac_webapp_base0/template}/avm/eac_webapp_base0/apache_path/default.conf +0 -0
  48. data/sub/eac_config/lib/eac_config/rspec/setup.rb +19 -0
  49. data/sub/eac_config/lib/eac_config/version.rb +1 -1
  50. data/sub/eac_fs/lib/eac_fs/logs/file.rb +2 -0
  51. data/sub/eac_fs/lib/eac_fs/version.rb +1 -1
  52. data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/mkpath_s.rb +12 -0
  53. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  54. data/sub/eac_templates/lib/eac_templates/core_ext.rb +4 -0
  55. data/sub/eac_templates/lib/eac_templates/from_all_gems.rb +4 -0
  56. data/sub/eac_templates/lib/eac_templates/from_gem.rb +35 -0
  57. data/sub/eac_templates/lib/eac_templates/version.rb +1 -1
  58. metadata +19 -17
  59. data/lib/avm/patches/object/template.rb +0 -7
  60. data/lib/avm/patches/object.rb +0 -4
  61. data/lib/avm/postgresql.rb +0 -9
  62. data/lib/avm/self/root.rb +0 -13
  63. data/lib/avm/self.rb +0 -30
  64. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/patches/object/template.rb +0 -7
  65. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/patches/object.rb +0 -4
  66. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/patches.rb +0 -4
  67. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/patches/object/template.rb +0 -7
  68. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/patches/object/template.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdbfe65243619913d183eadb8935248cf9da66a5c4808ac38d3de51413cc17cb
4
- data.tar.gz: 1d7bf55929f81dbf1a98436530815c29ceb0f808fb78b91f49c7845e88d10525
3
+ metadata.gz: 3df7ad19d9031c2e3d94cb8051798479282760386da32c55533f461a85d51580
4
+ data.tar.gz: 69fe1de1ee67d5000c1a56aae122d1bf98e55a65b175616c73e9a99d28c4d472
5
5
  SHA512:
6
- metadata.gz: 8cfaa26b21b5ef1e97a3ae19209ad2876e79c63d2a36bcf57ff2977dd96a2158e5f46763399b33f4a923a69570b8a721111ae31ac87e3465113bdfc774ab8d6f
7
- data.tar.gz: aacf553c790da7d6e8a8609d349d25290de3eda05add3c964425f3a10f3faf16268139b3edd04a9b432ef1f399e892d0eece7904b69701574078a6903d18a8c9
6
+ metadata.gz: 92453344e1eb2751ed5d653cb11fea487284315750b9e61e3044da5883c9aed8ec46d1ab5979489c1c733ed963ab844ede90a4bf81dbb0f1e8c6414bb35fceab
7
+ data.tar.gz: c882830e166e9f7f59b1fca59d3658afccd2e3ad9dc6bf8929af4dae6a2ae6531537a9c97e924fdcd450c342d276b8d6029f917735c71702de8c9304884545ef
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/patches/object/template'
3
+ require 'eac_templates/core_ext'
4
4
  require 'singleton'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/self/root'
3
+ require 'avm/tools/self'
4
4
  require 'i18n'
5
5
 
6
6
  module Avm
@@ -12,7 +12,7 @@ module Avm
12
12
  end
13
13
 
14
14
  def locale_files_paths
15
- ::Avm::Self.root.join('locale').glob('*.yml')
15
+ ::Avm::Tools::Self.root.join('locale').glob('*.yml')
16
16
  end
17
17
  end
18
18
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/patches/object/template'
3
+ require 'eac_templates/core_ext'
4
4
  require 'eac_ruby_utils/core_ext'
5
5
 
6
6
  module Avm
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/self'
4
3
  require 'avm/tools/core_ext'
5
4
  require 'eac_config/node'
6
5
  require 'eac_ruby_utils/recursive_builder'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/tools/core_ext'
4
- require 'avm/self'
4
+ require 'avm/tools/self'
5
5
 
6
6
  module Avm
7
7
  module Tools
@@ -14,7 +14,7 @@ module Avm
14
14
  end
15
15
 
16
16
  def instance
17
- ::Avm::Self.instance
17
+ ::Avm::Tools::Self.instance
18
18
  end
19
19
  end
20
20
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/self'
3
+ require 'avm/tools/self'
4
4
  require 'avm/registry'
5
5
  require 'avm/tools/version'
6
6
  require 'eac_ruby_base0/runner'
@@ -16,7 +16,7 @@ module Avm
16
16
  end
17
17
 
18
18
  def application
19
- ::Avm::Self.application
19
+ ::Avm::Tools::Self.application
20
20
  end
21
21
 
22
22
  def extra_available_subcommands
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/old_configs_bridge'
4
+ require 'eac_ruby_base0/application'
5
+ require 'eac_ruby_utils/require_sub'
6
+ require 'avm/instances/base'
7
+
8
+ module Avm
9
+ module Tools
10
+ module Self
11
+ ::EacRubyUtils.require_sub(__FILE__)
12
+
13
+ class << self
14
+ def application
15
+ @application ||= ::EacRubyBase0::Application.new(root.to_path)
16
+ end
17
+
18
+ # @return [EacCli::OldConfigsBridge]
19
+ def build_config(path = nil)
20
+ ::EacCli::OldConfigsBridge.new(
21
+ application.name,
22
+ path.if_present({}) { |v| { storage_path: v } }
23
+ )
24
+ end
25
+
26
+ def instance
27
+ @instance ||= ::Avm::Tools::Self::Instance.by_id('avm-tools_self')
28
+ end
29
+
30
+ def root
31
+ ::Pathname.new('../../..').expand_path(__dir__)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.113.2'
5
+ VERSION = '0.113.3'
6
6
  end
7
7
  end
@@ -20,6 +20,10 @@ module Avm
20
20
  def instance(suffix)
21
21
  ::Avm::Instances::Base.new(self, suffix)
22
22
  end
23
+
24
+ def name
25
+ entry(::Avm::Instances::EntryKeys::NAME).read
26
+ end
23
27
  end
24
28
  end
25
29
  end
@@ -42,7 +42,7 @@ module Avm
42
42
  end
43
43
 
44
44
  {
45
- '' => %w[fs_path host_id source_instance_id],
45
+ '' => %w[fs_path host_id name source_instance_id],
46
46
  database: %w[id hostname limit name password port system timeout username extra],
47
47
  docker: %w[registry],
48
48
  mailer: {
@@ -37,7 +37,7 @@ module Avm
37
37
 
38
38
  # @return [Enumerable<Avm::Sources::Base>]
39
39
  def subs
40
- scm.subs.map { |subrepo| self.class.new(subrepo.path, parent: self) }
40
+ scm.subs.map { |subrepo| ::Avm::Registry.sources.detect(subrepo.path, parent: self) }
41
41
  end
42
42
 
43
43
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.1'
5
5
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.authors = ['Put here the authors']
11
11
  s.summary = 'Put here de description.'
12
12
 
13
- s.files = Dir['{lib}/**/*']
13
+ s.files = Dir['{lib,template}/**/*']
14
14
 
15
15
  s.add_dependency 'asciidoctor', '~> 2.0', '>= 2.0.12'
16
16
  s.add_dependency 'avm-eac_webapp_base0', '~> 0.2'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacAsciidoctorBase0
5
- VERSION = '0.3.2'
5
+ VERSION = '0.3.3'
6
6
  end
7
7
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+
5
+ require 'avm/eac_postgresql_base0/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'avm-eac_postgresql_base0'
9
+ s.version = Avm::EacPostgresqlBase0::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.12', '>= 0.12.1'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.82'
17
+
18
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
19
+ end
@@ -3,7 +3,7 @@
3
3
  require 'avm/data/instance/unit'
4
4
 
5
5
  module Avm
6
- module Postgresql
6
+ module EacPostgresqlBase0
7
7
  class Instance
8
8
  class DataUnit < ::Avm::Data::Instance::Unit
9
9
  EXTENSION = '.pgdump.gz'
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/postgresql/instance/data_unit'
3
+ require 'avm/eac_postgresql_base0/instance/data_unit'
4
4
 
5
5
  module Avm
6
- module Postgresql
6
+ module EacPostgresqlBase0
7
7
  class Instance
8
8
  def initialize(env, connection_params)
9
9
  @env = env
@@ -11,7 +11,7 @@ module Avm
11
11
  end
12
12
 
13
13
  def data_unit
14
- ::Avm::Postgresql::Instance::DataUnit.new(self)
14
+ ::Avm::EacPostgresqlBase0::Instance::DataUnit.new(self)
15
15
  end
16
16
 
17
17
  def dump_command
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/instances/entry_keys'
4
- require 'avm/postgresql/instance'
4
+ require 'avm/eac_postgresql_base0/instance'
5
5
 
6
6
  module Avm
7
- module Postgresql
7
+ module EacPostgresqlBase0
8
8
  module InstanceWith
9
9
  def pg
10
- @pg ||= ::Avm::Postgresql::Instance.new(
10
+ @pg ||= ::Avm::EacPostgresqlBase0::Instance.new(
11
11
  host_env, user: read_entry(::Avm::Instances::EntryKeys::DATABASE_USERNAME),
12
12
  password: read_entry(::Avm::Instances::EntryKeys::DATABASE_PASSWORD),
13
13
  name: read_entry(::Avm::Instances::EntryKeys::DATABASE_NAME)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module EacPostgresqlBase0
5
+ VERSION = '0.1.0'
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacPostgresqlBase0
7
+ require_sub __FILE__
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::EacRubyUtils::Rspec.default_setup.describe_rubocop
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/rspec/default_setup'
4
+ ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
@@ -10,10 +10,11 @@ Gem::Specification.new do |s|
10
10
  s.authors = ['Put here the authors']
11
11
  s.summary = 'Put here de description.'
12
12
 
13
- s.files = Dir['{lib}/**/*']
13
+ s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_rails_base1', '~> 0.1', '>= 0.1.2'
15
+ s.add_dependency 'avm-eac_rails_base1', '~> 0.1', '>= 0.1.3'
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.80', '>= 0.80.2'
17
17
 
18
+ s.add_development_dependency 'eac_cli', '~> 0.24', '~> 0.24.1'
18
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
19
20
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_rails_base0/patches/object/template'
3
+ require 'eac_templates/core_ext'
4
4
  require 'avm/eac_webapp_base0/apache_path'
5
5
  require 'eac_ruby_utils/core_ext'
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/eac_rails_base0/patches/object/template'
3
+ require 'eac_templates/core_ext'
4
4
  require 'avm/eac_webapp_base0/deploy'
5
5
  require 'avm/instances/entry_keys'
6
6
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase0
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
@@ -2,3 +2,8 @@
2
2
 
3
3
  require 'eac_ruby_utils/rspec/default_setup'
4
4
  ::EacRubyUtils::Rspec.default_setup_create(::File.expand_path('..', __dir__))
5
+
6
+ require 'eac_cli/old_configs_bridge'
7
+ ::EacRubyUtils::Rspec.default_setup.stub_eac_config_node do |file|
8
+ ::EacCli::OldConfigsBridge.new(file)
9
+ end
@@ -12,7 +12,8 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_webapp_base0', '~> 0.1'
15
+ s.add_dependency 'avm-eac_webapp_base0', '~> 0.2', '>= 0.2.1'
16
+ s.add_dependency 'eac_ruby_gems_utils', '~> 0.9', '>= 0.9.9'
16
17
  s.add_dependency 'eac_ruby_utils', '~> 0.68'
17
18
 
18
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase1
5
- VERSION = '0.1.2'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.authors = ['Put here the authors']
11
11
  s.summary = 'Put here de description.'
12
12
 
13
- s.files = Dir['{lib}/**/*']
13
+ s.files = Dir['{lib,template}/**/*']
14
14
 
15
15
  s.add_dependency 'avm-eac_rails_base1', '~> 0.1'
16
16
  s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.2'
@@ -3,7 +3,7 @@
3
3
  require 'eac_ruby_utils/core_ext'
4
4
  require 'avm/eac_ubuntu_base0/instances/base'
5
5
  require 'avm/instances/docker_image'
6
- require 'avm/eac_redmine_base0/patches/object/template'
6
+ require 'eac_templates/core_ext'
7
7
 
8
8
  module Avm
9
9
  module EacRedmineBase0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.authors = ['Put here the authors']
11
11
  s.summary = 'Put here de description.'
12
12
 
13
- s.files = Dir['{lib}/**/*']
13
+ s.files = Dir['{lib,locale}/**/*']
14
14
 
15
15
  s.add_dependency 'avm', '~> 0.9'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.1'
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency 'avm', '~> 0.7'
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.77', '>= 0.77.1'
17
- s.add_dependency 'eac_templates', '~> 0.2'
17
+ s.add_dependency 'eac_templates', '~> 0.3'
18
18
 
19
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
20
20
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/docker/image'
4
- require 'avm/eac_ubuntu_base0/patches/object/template'
4
+ require 'eac_templates/from_all_gems'
5
5
  require 'eac_ruby_utils/core_ext'
6
6
 
7
7
  module Avm
@@ -13,6 +13,10 @@ module Avm
13
13
 
14
14
  INSTANCE_ID = 'eac-ubuntu-base0_self'
15
15
 
16
+ runner_with :help, :subcommands do
17
+ subcommands
18
+ end
19
+
16
20
  private
17
21
 
18
22
  def instance_uncached
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacUbuntuBase0
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_ubuntu_base0/runners/base'
4
+ require 'avm/eac_ubuntu_base0/runners/base/docker'
5
+
6
+ ::RSpec.describe ::Avm::EacUbuntuBase0::Runners::Base::Docker do
7
+ it do
8
+ expect { run_command('--registry-name', 'testing', '--image-name') }.not_to raise_error
9
+ end
10
+
11
+ def run_command(*argv)
12
+ ::Avm::EacUbuntuBase0::Runners::Base.run(argv: %w[docker] + argv)
13
+ end
14
+ end
@@ -10,10 +10,12 @@ Gem::Specification.new do |s|
10
10
  s.authors = ['Put here the authors']
11
11
  s.summary = 'Put here de description.'
12
12
 
13
- s.files = Dir['{lib}/**/*']
13
+ s.files = Dir['{lib,template}/**/*']
14
14
 
15
15
  s.add_dependency 'avm', '~> 0.1'
16
16
  s.add_dependency 'avm-eac_generic_base0', '~> 0.1'
17
+ s.add_dependency 'avm-eac_postgresql_base0', '~> 0.1'
18
+ s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.2.1'
17
19
  s.add_dependency 'eac_ruby_utils', '~> 0.68'
18
20
 
19
21
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
@@ -2,9 +2,8 @@
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
4
  require 'avm/jobs/base'
5
- require 'avm/patches/object/template'
6
5
  require 'avm/eac_ubuntu_base0/apache'
7
- require 'avm/patches/object/template'
6
+ require 'eac_templates/core_ext'
8
7
 
9
8
  module Avm
10
9
  module EacWebappBase0
@@ -3,8 +3,8 @@
3
3
  require 'active_support/callbacks'
4
4
  require 'avm/jobs/base'
5
5
  require 'avm/git'
6
- require 'avm/patches/object/template'
7
6
  require 'eac_ruby_utils/core_ext'
7
+ require 'eac_templates/core_ext'
8
8
  require 'avm/launcher/git/base'
9
9
  require 'net/http'
10
10
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/instances/base'
4
- require 'avm/postgresql/instance_with'
4
+ require 'avm/eac_postgresql_base0/instance_with'
5
5
  require 'avm/data/instance/files_unit'
6
6
  require 'avm/data/instance/package'
7
7
  require 'avm/eac_webapp_base0/deploy/file_unit'
@@ -10,7 +10,7 @@ module Avm
10
10
  module EacWebappBase0
11
11
  class Instance < ::Avm::Instances::Base
12
12
  require_sub __FILE__
13
- include ::Avm::Postgresql::InstanceWith
13
+ include ::Avm::EacPostgresqlBase0::InstanceWith
14
14
 
15
15
  FILES_UNITS = [].freeze
16
16
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacWebappBase0
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
@@ -1,7 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'eac_ruby_utils/core_ext'
4
+ require 'eac_ruby_utils/fs/temp'
4
5
  require 'eac_config/envvars_node'
6
+ require 'eac_config/node'
7
+ require 'eac_config/yaml_file_node'
5
8
 
6
9
  module EacConfig
7
10
  module Rspec
@@ -25,6 +28,22 @@ module EacConfig
25
28
  def envvars_load_path_entry
26
29
  ::EacConfig::EnvvarsNode.new.load_path.entry
27
30
  end
31
+
32
+ def stub_eac_config_node(&node_builder)
33
+ parent_self = self
34
+ rspec_config.around do |example|
35
+ ::EacRubyUtils::Fs::Temp.on_file do |file|
36
+ ::EacConfig::Node
37
+ .context.on(parent_self.stub_eac_config_node_build(file, &node_builder)) do
38
+ example.run
39
+ end
40
+ end
41
+ end
42
+ end
43
+
44
+ def stub_eac_config_node_build(file, &node_builder)
45
+ node_builder.present? ? node_builder.call(file) : ::EacConfig::YamlFileNode.new(file)
46
+ end
28
47
  end
29
48
  end
30
49
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacConfig
4
- VERSION = '0.5.3'
4
+ VERSION = '0.6.0'
5
5
  end
@@ -11,6 +11,8 @@ module EacFs
11
11
  TRUNCATE_DEFAULT_LENGTH = 1000
12
12
  TRUNCATE_APPEND_TEXT = '(...) '
13
13
 
14
+ delegate :remove, to: :file
15
+
14
16
  def file_size
15
17
  file.file? ? file.size : 0
16
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacFs
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+
5
+ class Pathname
6
+ # Execute .mkpath and return +self+.
7
+ # @return [Pathname]
8
+ def mkpath_s
9
+ mkpath
10
+ self
11
+ end
12
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.81.0'
4
+ VERSION = '0.82.0'
5
5
  end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/patches'
4
+ require 'eac_templates/from_all_gems'
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/from_gem'
4
+ ::EacTemplates::FromGem.include_all
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/searcher'
4
+
5
+ module EacTemplates
6
+ class FromGem
7
+ class << self
8
+ def include_all(searcher = nil)
9
+ ::Gem::Specification.each { |gemspec| new(gemspec, searcher).include }
10
+ end
11
+ end
12
+
13
+ TEMPLATES_DIR_SUBPATH = 'template'
14
+
15
+ common_constructor :gemspec, :searcher, default: [nil] do
16
+ self.searcher ||= ::EacTemplates::Searcher.default
17
+ end
18
+
19
+ # @return [Boolean]
20
+ delegate :exist?, to: :path
21
+
22
+ # @return [Pathname]
23
+ def include
24
+ return nil unless exist?
25
+
26
+ searcher.included_paths << path
27
+ path
28
+ end
29
+
30
+ # @return [Pathname]
31
+ def path
32
+ gemspec.gem_dir.to_pathname.join(TEMPLATES_DIR_SUBPATH)
33
+ end
34
+ end
35
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTemplates
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  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.113.2
4
+ version: 0.113.3
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: 2021-12-06 00:00:00.000000000 Z
11
+ date: 2021-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -330,12 +330,6 @@ files:
330
330
  - lib/avm/patches/eac_ruby_gems_utils.rb
331
331
  - lib/avm/patches/eac_ruby_gems_utils/gem.rb
332
332
  - lib/avm/patches/i18n.rb
333
- - lib/avm/patches/object.rb
334
- - lib/avm/patches/object/template.rb
335
- - lib/avm/postgresql.rb
336
- - lib/avm/postgresql/instance.rb
337
- - lib/avm/postgresql/instance/data_unit.rb
338
- - lib/avm/postgresql/instance_with.rb
339
333
  - lib/avm/projects.rb
340
334
  - lib/avm/projects/stereotype.rb
341
335
  - lib/avm/projects/stereotype/job_comparator.rb
@@ -375,8 +369,6 @@ files:
375
369
  - lib/avm/ruby/rubocop/_configured.rb
376
370
  - lib/avm/ruby/rubocop/_envvar.rb
377
371
  - lib/avm/ruby/rubocop/_gemfile.rb
378
- - lib/avm/self.rb
379
- - lib/avm/self/root.rb
380
372
  - lib/avm/stereotypes.rb
381
373
  - lib/avm/tools.rb
382
374
  - lib/avm/tools/app_src.rb
@@ -439,6 +431,7 @@ files:
439
431
  - lib/avm/tools/runner/self.rb
440
432
  - lib/avm/tools/runner/self/docker.rb
441
433
  - lib/avm/tools/runner/self/registry.rb
434
+ - lib/avm/tools/self.rb
442
435
  - lib/avm/tools/version.rb
443
436
  - sub/avm-eac_asciidoctor_base0/Gemfile
444
437
  - sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec
@@ -467,6 +460,15 @@ files:
467
460
  - sub/avm-eac_generic_base0/spec/lib/avm/eac_generic_base0/sources/base_spec.rb
468
461
  - sub/avm-eac_generic_base0/spec/rubocop_spec.rb
469
462
  - sub/avm-eac_generic_base0/spec/spec_helper.rb
463
+ - sub/avm-eac_postgresql_base0/Gemfile
464
+ - sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec
465
+ - sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0.rb
466
+ - sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance.rb
467
+ - sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb
468
+ - sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance_with.rb
469
+ - sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb
470
+ - sub/avm-eac_postgresql_base0/spec/rubocop_spec.rb
471
+ - sub/avm-eac_postgresql_base0/spec/spec_helper.rb
470
472
  - sub/avm-eac_rails_base0/Gemfile
471
473
  - sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec
472
474
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0.rb
@@ -474,9 +476,6 @@ files:
474
476
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb
475
477
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb
476
478
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/instance.rb
477
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/patches.rb
478
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/patches/object.rb
479
- - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/patches/object/template.rb
480
479
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb
481
480
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb
482
481
  - sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb
@@ -515,7 +514,6 @@ files:
515
514
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/deploy.rb
516
515
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instance.rb
517
516
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb
518
- - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/patches/object/template.rb
519
517
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb
520
518
  - sub/avm-eac_redmine_base0/spec/rubocop_spec.rb
521
519
  - sub/avm-eac_redmine_base0/spec/spec_helper.rb
@@ -550,11 +548,11 @@ files:
550
548
  - sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/docker_image.rb
551
549
  - sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances.rb
552
550
  - sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances/base.rb
553
- - sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/patches/object/template.rb
554
551
  - sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base.rb
555
552
  - sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base/docker.rb
556
553
  - sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/version.rb
557
554
  - sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/docker_image_spec.rb
555
+ - sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base/docker_spec.rb
558
556
  - sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base_spec.rb
559
557
  - sub/avm-eac_ubuntu_base0/spec/rubocop_spec.rb
560
558
  - sub/avm-eac_ubuntu_base0/spec/spec_helper.rb
@@ -586,6 +584,8 @@ files:
586
584
  - sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/sources/base_spec.rb
587
585
  - sub/avm-eac_webapp_base0/spec/rubocop_spec.rb
588
586
  - sub/avm-eac_webapp_base0/spec/spec_helper.rb
587
+ - sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/apache_host/no_ssl.conf
588
+ - sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/apache_path/default.conf
589
589
  - sub/avm-files/Gemfile
590
590
  - sub/avm-files/avm-files.gemspec
591
591
  - sub/avm-files/lib/avm/files.rb
@@ -1281,6 +1281,7 @@ files:
1281
1281
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/object/to_pathname.rb
1282
1282
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname.rb
1283
1283
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb
1284
+ - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/mkpath_s.rb
1284
1285
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/parent_n.rb
1285
1286
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp.rb
1286
1287
  - sub/eac_ruby_utils/lib/eac_ruby_utils/patches/regexp/if_match.rb
@@ -1362,8 +1363,11 @@ files:
1362
1363
  - sub/eac_templates/Gemfile
1363
1364
  - sub/eac_templates/eac_templates.gemspec
1364
1365
  - sub/eac_templates/lib/eac_templates.rb
1366
+ - sub/eac_templates/lib/eac_templates/core_ext.rb
1365
1367
  - sub/eac_templates/lib/eac_templates/directory.rb
1366
1368
  - sub/eac_templates/lib/eac_templates/file.rb
1369
+ - sub/eac_templates/lib/eac_templates/from_all_gems.rb
1370
+ - sub/eac_templates/lib/eac_templates/from_gem.rb
1367
1371
  - sub/eac_templates/lib/eac_templates/patches.rb
1368
1372
  - sub/eac_templates/lib/eac_templates/patches/module.rb
1369
1373
  - sub/eac_templates/lib/eac_templates/patches/module/erb_template.rb
@@ -1391,8 +1395,6 @@ files:
1391
1395
  - sub/eac_templates/spec/lib/object/template_spec_files/path/my_stub_with_template
1392
1396
  - sub/eac_templates/spec/rubocop_spec.rb
1393
1397
  - sub/eac_templates/spec/spec_helper.rb
1394
- - template/avm/eac_webapp_base0/apache_host/no_ssl.conf
1395
- - template/avm/eac_webapp_base0/apache_path/default.conf
1396
1398
  - template/avm/eac_wordpress_base0/deploy/wp-config.php.template
1397
1399
  - template/avm/eac_writings_base0/commons/all.tex
1398
1400
  - template/avm/eac_writings_base0/commons/ebook.tex
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/self/root'
4
- require 'eac_templates/patches/object/template'
5
-
6
- ::EacTemplates::Searcher.default.included_paths <<
7
- ::Avm::Self.root.join('template').to_path
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub(__FILE__)
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub(__FILE__)
5
-
6
- module Avm
7
- module Postgresql
8
- end
9
- end
data/lib/avm/self/root.rb DELETED
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'pathname'
4
-
5
- module Avm
6
- module Self
7
- class << self
8
- def root
9
- ::Pathname.new('../../..').expand_path(__dir__)
10
- end
11
- end
12
- end
13
- end
data/lib/avm/self.rb DELETED
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_cli/old_configs_bridge'
4
- require 'eac_ruby_base0/application'
5
- require 'eac_ruby_utils/require_sub'
6
- require 'avm/instances/base'
7
-
8
- module Avm
9
- module Self
10
- ::EacRubyUtils.require_sub(__FILE__)
11
-
12
- class << self
13
- def application
14
- @application ||= ::EacRubyBase0::Application.new(root.to_path)
15
- end
16
-
17
- # @return [EacCli::OldConfigsBridge]
18
- def build_config(path = nil)
19
- ::EacCli::OldConfigsBridge.new(
20
- application.name,
21
- path.if_present({}) { |v| { storage_path: v } }
22
- )
23
- end
24
-
25
- def instance
26
- @instance ||= ::Avm::Self::Instance.by_id('avm-tools_self')
27
- end
28
- end
29
- end
30
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'eac_templates/patches/object/template'
5
-
6
- ::EacTemplates::Searcher.default.included_paths <<
7
- __dir__.to_pathname.expand_path.parent_n(5).join('template')
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub __FILE__
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/require_sub'
4
- ::EacRubyUtils.require_sub __FILE__
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'eac_templates/patches/object/template'
5
-
6
- ::EacTemplates::Searcher.default.included_paths <<
7
- __dir__.to_pathname.expand_path.parent_n(5).join('template')
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'eac_templates/patches/object/template'
5
-
6
- ::EacTemplates::Searcher.default.included_paths <<
7
- __dir__.to_pathname.expand_path.parent_n(5).join('template')