eac_tools 0.47.2 → 0.48.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +55 -50
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +2 -2
  5. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  6. data/sub/avm-eac_php_base0/avm-eac_php_base0.gemspec +2 -2
  7. data/sub/avm-eac_php_base0/lib/avm/eac_php_base0/version.rb +1 -1
  8. data/sub/avm-eac_postgresql_base0/avm-eac_postgresql_base0.gemspec +1 -1
  9. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance/data_unit.rb +13 -7
  10. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/instance.rb +16 -1
  11. data/sub/avm-eac_postgresql_base0/lib/avm/eac_postgresql_base0/version.rb +1 -1
  12. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
  13. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  14. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +3 -3
  15. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb +1 -0
  16. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/bundle.rb +28 -0
  17. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/code_runner.rb +28 -0
  18. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/log.rb +45 -0
  19. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs/clear.rb +27 -0
  20. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/logs.rb +19 -0
  21. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/rails_server.rb +34 -0
  22. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler/systemd_unit.rb +48 -0
  23. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/runners/tasks_scheduler.rb +19 -0
  24. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/{runner.rb → instances/runners.rb} +4 -3
  25. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  26. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +3 -3
  27. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb +1 -1
  28. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  29. data/sub/avm-eac_ubuntu_base0/Gemfile +5 -0
  30. data/sub/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec +21 -0
  31. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/apache/resource.rb +59 -0
  32. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/apache.rb +26 -0
  33. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/docker_image.rb +29 -0
  34. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances/base.rb +22 -0
  35. data/sub/{avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners.rb → avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances.rb} +2 -2
  36. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/rspec/ssh_docker_server.rb +84 -0
  37. data/sub/{avm-eac_rails_base0/lib/avm/eac_rails_base0/runners.rb → avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/rspec.rb} +2 -2
  38. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base/docker.rb +19 -0
  39. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base.rb +28 -0
  40. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/version.rb +7 -0
  41. data/sub/{avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners.rb → avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0.rb} +2 -4
  42. data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/docker_image_spec.rb +16 -0
  43. data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base/docker_spec.rb +14 -0
  44. data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base_spec.rb +7 -0
  45. data/sub/avm-eac_ubuntu_base0/spec/rubocop_spec.rb +3 -0
  46. data/sub/avm-eac_ubuntu_base0/spec/spec_helper.rb +4 -0
  47. data/sub/avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/docker_image/Dockerfile.template +24 -0
  48. data/sub/{avm-tools/spec/spec_helper/stub_templates/stubbed_docker_server → avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server}/Dockerfile +0 -0
  49. data/sub/{avm-tools/spec/spec_helper/stub_templates/stubbed_docker_server → avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server}/id_rsa +0 -0
  50. data/sub/{avm-tools/spec/spec_helper/stub_templates/stubbed_docker_server → avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server}/id_rsa.pub +0 -0
  51. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
  52. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  53. data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
  54. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
  55. data/sub/avm-tools/avm-tools.gemspec +3 -3
  56. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  57. data/sub/avm-tools/spec/lib/avm/tools/runner/git/deploy_spec.rb +4 -2
  58. data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +1 -0
  59. data/sub/eac_ruby_utils/lib/eac_ruby_utils/envs/composite_command.rb +14 -2
  60. data/sub/eac_ruby_utils/lib/eac_ruby_utils/gems_registry/gem.rb +2 -1
  61. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  62. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/{command_spec.rb → command/base_example.rb} +2 -5
  63. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/local_env_spec.rb +11 -0
  64. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/envs/command/ssh_env_spec.rb +17 -0
  65. metadata +64 -66
  66. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners/base.rb +0 -13
  67. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/runners.rb +0 -11
  68. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/runners/base.rb +0 -26
  69. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/bundle.rb +0 -26
  70. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/code_runner.rb +0 -26
  71. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/log.rb +0 -43
  72. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs/clear.rb +0 -26
  73. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb +0 -18
  74. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/rails_server.rb +0 -32
  75. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +0 -46
  76. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler.rb +0 -17
  77. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +0 -25
  78. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner.rb +0 -12
  79. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/runners/base.rb +0 -14
  80. data/sub/avm-tools/spec/spec_helper/stubbed_docker_server.rb +0 -93
  81. data/sub/avm-tools/spec/spec_helper/templates.rb +0 -5
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase1
7
- class Runner < ::Avm::EacWebappBase0::Runner
8
- class TasksScheduler
9
- require_sub __FILE__
10
-
11
- runner_with :help, :subcommands do
12
- subcommands
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_redmine_base0/instances/base'
4
- require 'avm/eac_redmine_base0/instances/deploy'
5
- require 'avm/eac_redmine_base0/instances/apache_host'
6
- require 'avm/eac_rails_base1/runner'
7
- require 'eac_ruby_utils/core_ext'
8
-
9
- module Avm
10
- module EacRedmineBase0
11
- module Runners
12
- class Base < ::Avm::EacRailsBase1::Runner
13
- require_sub __FILE__
14
-
15
- STEREOTYPE_NAME = 'EacRedmineBase0'
16
-
17
- class << self
18
- def stereotype_name
19
- STEREOTYPE_NAME
20
- end
21
- end
22
- end
23
- end
24
- end
25
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/instances/runner'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module EacWebappBase0
8
- class Runner < ::Avm::Instances::Runner
9
- require_sub __FILE__
10
- end
11
- end
12
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/runner'
4
- require 'eac_ruby_utils/core_ext'
5
-
6
- module Avm
7
- module EacWordpressBase0
8
- module Runners
9
- class Base < ::Avm::EacWebappBase0::Runner
10
- require_sub __FILE__
11
- end
12
- end
13
- end
14
- end
@@ -1,93 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_docker/images/templatized'
4
- require 'eac_ruby_utils/core_ext'
5
- require_relative 'templates'
6
-
7
- class StubbedDockerServer < ::EacDocker::Images::Templatized
8
- class << self
9
- enable_simple_cache
10
-
11
- def on_run
12
- instance.on_run { yield }
13
- end
14
-
15
- delegate :env, to: :instance
16
-
17
- private
18
-
19
- def instance_uncached
20
- new.tag('avm_stubbed_docker_server')
21
- end
22
- end
23
-
24
- def env
25
- raise '@env is blank' if @env.blank?
26
-
27
- @env
28
- end
29
-
30
- def on_run
31
- on_container do
32
- on_env do
33
- yield
34
- end
35
- end
36
- end
37
-
38
- private
39
-
40
- def container
41
- raise '@container is blank' if @container.blank?
42
-
43
- @container
44
- end
45
-
46
- def env_identity_file
47
- template.child('id_rsa').path
48
- end
49
-
50
- def env_identity_file_good_permissions
51
- r = ::EacRubyUtils::Fs::Temp.file
52
- ::FileUtils.cp env_identity_file, r
53
- r.chmod(0o600)
54
- r
55
- end
56
-
57
- def close_env
58
- @identity_file.remove
59
- @env = nil
60
- end
61
-
62
- def on_env
63
- open_env
64
- begin
65
- yield
66
- ensure
67
- close_env
68
- end
69
- end
70
-
71
- def on_container
72
- provide.container.temporary(true).on_detached do |container|
73
- @container = container
74
- begin
75
- yield
76
- ensure
77
- @container = nil
78
- end
79
- end
80
- end
81
-
82
- def open_env
83
- raise 'Environment already open' if @env.present?
84
-
85
- @identity_file = env_identity_file_good_permissions
86
- @env = ::EacRubyUtils::Envs::SshEnv.new(
87
- "ssh://root@#{container.hostname}" \
88
- '?StrictHostKeyChecking=no' \
89
- '&BatchMode=yes' \
90
- "&IdentityFile=#{@identity_file}"
91
- )
92
- end
93
- end
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_templates/patches/object/template'
4
-
5
- ::EacTemplates::Searcher.default.included_paths << ::File.join(__dir__, 'stub_templates')