avm-tools 0.103.0 → 0.103.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avm/data/package/dump.rb +1 -1
  3. data/lib/avm/git/issue/complete.rb +1 -1
  4. data/lib/avm/git/issue/deliver.rb +1 -1
  5. data/lib/avm/instances/base/dockerizable.rb +2 -1
  6. data/lib/avm/launcher/instances/runner_helper.rb +1 -1
  7. data/lib/avm/{core_ext.rb → tools/core_ext.rb} +0 -0
  8. data/lib/avm/tools/runner/app_src/eac_asciidoctor_base0/build.rb +1 -1
  9. data/lib/avm/tools/runner/app_src/info.rb +1 -1
  10. data/lib/avm/tools/runner/app_src/test.rb +1 -1
  11. data/lib/avm/tools/runner/app_src/update.rb +1 -1
  12. data/lib/avm/tools/runner/config.rb +1 -1
  13. data/lib/avm/tools/runner/config/load_path.rb +1 -1
  14. data/lib/avm/tools/runner/git.rb +1 -1
  15. data/lib/avm/tools/runner/git/dirty_files.rb +1 -1
  16. data/lib/avm/tools/runner/git/issue.rb +1 -1
  17. data/lib/avm/tools/runner/git/issue/complete.rb +1 -1
  18. data/lib/avm/tools/runner/git/issue/deliver.rb +1 -1
  19. data/lib/avm/tools/runner/git/revisions_test.rb +1 -1
  20. data/lib/avm/tools/runner/git/subrepo.rb +1 -1
  21. data/lib/avm/tools/runner/git/subrepo/check.rb +1 -1
  22. data/lib/avm/tools/runner/git/subrepo/clone.rb +1 -1
  23. data/lib/avm/tools/runner/git/subrepo/fix.rb +1 -1
  24. data/lib/avm/tools/runner/launcher.rb +1 -1
  25. data/lib/avm/tools/runner/ruby/rubocop.rb +1 -1
  26. data/lib/avm/tools/runner/self.rb +1 -1
  27. data/lib/avm/tools/version.rb +1 -1
  28. data/vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/logs.rb +1 -1
  29. data/vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  30. data/vendor/avm-eac_redmine_base0/Gemfile +5 -0
  31. data/vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +19 -0
  32. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0.rb +2 -2
  33. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/apache_host.rb +0 -0
  34. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/core_update.rb +0 -0
  35. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/data_unit.rb +0 -0
  36. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/deploy.rb +0 -0
  37. data/{lib → vendor/avm-eac_redmine_base0/lib}/avm/eac_redmine_base0/instance.rb +2 -2
  38. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +55 -0
  39. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/patches/object/template.rb +7 -0
  40. data/vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +7 -0
  41. data/vendor/avm-eac_redmine_base0/spec/rubocop_spec.rb +3 -0
  42. data/vendor/avm-eac_redmine_base0/spec/spec_helper.rb +102 -0
  43. data/{template → vendor/avm-eac_redmine_base0/template}/avm/eac_redmine_base0/deploy/config/install.sh.template +0 -0
  44. data/{template → vendor/avm-eac_redmine_base0/template}/avm/eac_redmine_base0/deploy/config/secrets.yml +0 -0
  45. data/{template/avm/eac_redmine_base0 → vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances}/docker_image/Dockerfile.template +1 -1
  46. data/{template/avm/eac_redmine_base0 → vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances}/docker_image/apache_http_virtualhost.conf.template +0 -0
  47. data/{template/avm/eac_redmine_base0 → vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances}/docker_image/apache_https_virtualhost.conf.template +0 -0
  48. data/vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/install_settings.sh.template +24 -0
  49. data/{template/avm/eac_redmine_base0 → vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances}/docker_image/start.sh.template +0 -0
  50. data/vendor/avm/avm.gemspec +1 -1
  51. data/vendor/avm/lib/avm/docker/runner.rb +4 -8
  52. data/{lib → vendor/avm/lib}/avm/instances/docker_image.rb +0 -0
  53. data/vendor/avm/lib/avm/version.rb +1 -1
  54. data/vendor/eac_docker/eac_docker.gemspec +1 -1
  55. data/vendor/eac_docker/lib/eac_docker/debug.rb +15 -0
  56. data/vendor/eac_docker/lib/eac_docker/images/coded.rb +4 -0
  57. data/vendor/eac_docker/lib/eac_docker/images/templatized.rb +12 -2
  58. data/vendor/eac_docker/lib/eac_docker/version.rb +1 -1
  59. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/boolean.rb +1 -1
  60. data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  61. metadata +25 -18
  62. data/lib/avm/eac_redmine_base0/docker_image.rb +0 -52
  63. data/template/avm/eac_redmine_base0/docker_image/install_settings.sh.template +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bffe9e6a04311e0c66d08f3b7ba116722ae23aa59707b96bd565988d1e3b3ff
4
- data.tar.gz: bf8b80f6b8328e3327b78af66c3d7961ba81d2157d1133ca39ccd62bb18b8249
3
+ metadata.gz: bee250c84ba8f56a38c3e10bc301116cab8098d23cf7f75a5027a7ae43b66d80
4
+ data.tar.gz: db17fbed340f859c761618bb94f6d83baa59b6e4c6d15fd7d053589d875175d3
5
5
  SHA512:
6
- metadata.gz: fde4268d2ead8d77d08cb6e6c2c617126372bc4a6fef6adb582702544f1e16c1a82d7a99178e4ab092dd53504bed2abdf3c3ad11c6e8987d42f98469f07cd0ab
7
- data.tar.gz: 75f730ff566ca0c50d3cf0f0a76eb68c2f9526186f66522d54376eb85ffdeaa0410b83cca52f0e96b98dd9eafe8611f0b06bc6c70ff4850a7b9aea679749ebba
6
+ metadata.gz: 7088176c3a9109762de09fbd347836bc9f86fb856f1fc4703c7f7f91e5309b596935466231dd8bb316285ae613a29f611bc992d8ae43cc03f8daf308bce0740c
7
+ data.tar.gz: ff79f6f21852b281262254df6d3f0eccab89129f972b83e8b9e524edfee9e32484afe0cbf46f502284c0df6d3fe5c8cc57c3a342c9331e0b7be0c468fbf0738d
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/files/rotate'
5
5
  require 'minitar'
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Git
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'clipboard'
5
5
 
6
6
  module Avm
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_docker/executables'
3
4
  require 'eac_ruby_utils/core_ext'
4
5
  require 'avm/docker/container'
5
6
 
@@ -16,7 +17,7 @@ module Avm
16
17
  end
17
18
 
18
19
  def docker_container_exist?
19
- ::Avm::Executables.docker.command.append(
20
+ ::EacDocker::Executables.docker.command.append(
20
21
  ['ps', '-qaf', "name=#{docker_container_name}"]
21
22
  ).execute!.present?
22
23
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Launcher
File without changes
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/eac_asciidoctor_base0/sources/build'
5
5
  require 'os'
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Tools
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Tools
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Tools
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Tools
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'avm/apps/config'
4
4
  require 'avm/self'
5
- require 'avm/core_ext'
5
+ require 'avm/tools/core_ext'
6
6
 
7
7
  module Avm
8
8
  module Tools
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/launcher/git/base'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Tools
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/git/issue/complete'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/git/issue/complete'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/git/issue/deliver'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/git/revision_test'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Tools
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'eac_git/local'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'eac_git/local'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'eac_git/local'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
 
5
5
  module Avm
6
6
  module Tools
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/ruby/rubocop'
5
5
 
6
6
  module Avm
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
3
+ require 'avm/tools/core_ext'
4
4
  require 'avm/self'
5
5
 
6
6
  module Avm
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.103.0'
5
+ VERSION = '0.103.1'
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'avm/core_ext'
4
3
  require 'avm/eac_webapp_base0/runner'
4
+ require 'eac_cli/core_ext'
5
5
 
6
6
  module Avm
7
7
  module EacRailsBase1
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase1
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
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_redmine_base0/version'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'avm-eac_redmine_base0'
9
+ s.version = Avm::EacRedmineBase0::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-eac_rails_base1', '~> 0.1'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.68'
17
+
18
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
19
+ end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_ruby_utils/require_sub'
3
+ require 'eac_ruby_utils/core_ext'
4
4
 
5
5
  module Avm
6
6
  module EacRedmineBase0
7
- ::EacRubyUtils.require_sub(__FILE__)
7
+ require_sub __FILE__
8
8
  end
9
9
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/eac_redmine_base0/data_unit'
4
- require 'avm/eac_redmine_base0/docker_image'
4
+ require 'avm/eac_redmine_base0/instances/docker_image'
5
5
  require 'avm/eac_webapp_base0/instance'
6
6
  require 'avm/eac_rails_base1/instance'
7
7
 
@@ -11,7 +11,7 @@ module Avm
11
11
  FILES_UNITS = { files: 'files' }.freeze
12
12
 
13
13
  def docker_image_class
14
- ::Avm::EacRedmineBase0::DockerImage
14
+ ::Avm::EacRedmineBase0::Instances::DockerImage
15
15
  end
16
16
 
17
17
  def docker_run_arguments
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+ require 'avm/instances/docker_image'
5
+ require 'avm/eac_redmine_base0/patches/object/template'
6
+
7
+ module Avm
8
+ module EacRedmineBase0
9
+ module Instances
10
+ class DockerImage < ::Avm::Instances::DockerImage
11
+ enable_simple_cache
12
+
13
+ REDMINE_SOURCE_HOST_SUBPATH = 'redmine_source'
14
+
15
+ def avm_fs_cache_object_id
16
+ instance.id
17
+ end
18
+
19
+ def redmine_user
20
+ 'redmine'
21
+ end
22
+
23
+ def redmine_user_home
24
+ "/home/#{redmine_user}"
25
+ end
26
+
27
+ def redmine_path
28
+ "#{redmine_user_home}/redmine_app"
29
+ end
30
+
31
+ def start_path
32
+ '/start.sh'
33
+ end
34
+
35
+ private
36
+
37
+ def git_repo_uncached
38
+ ::EacGit::Local.new(instance.source_instance.fs_path)
39
+ end
40
+
41
+ def redmine_source_git_id
42
+ git_repo.rev_parse('HEAD')
43
+ end
44
+
45
+ def redmine_source_path_uncached
46
+ r = provide_dir.join(REDMINE_SOURCE_HOST_SUBPATH)
47
+ ::FileUtils.rm_rf(r.to_path)
48
+ r.mkpath
49
+ git_repo.commit(redmine_source_git_id).archive_to_dir(r).system!
50
+ REDMINE_SOURCE_HOST_SUBPATH
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,7 @@
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')
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module EacRedmineBase0
5
+ VERSION = '0.1.0'
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ ::EacRubyGemSupport::Rspec.default.describe_rubocop
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by the `rspec --init` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
6
+ # this file to always be loaded, without a need to explicitly require it in any
7
+ # files.
8
+ #
9
+ # Given that it is always loaded, you are encouraged to keep this file as
10
+ # light-weight as possible. Requiring heavyweight dependencies from this file
11
+ # will add to the boot time of your test suite on EVERY test run, even for an
12
+ # individual file that may not need all of that loaded. Instead, consider making
13
+ # a separate helper file that requires the additional dependencies and performs
14
+ # the additional setup, and require it from the spec files that actually need
15
+ # it.
16
+ #
17
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18
+ RSpec.configure do |config|
19
+ # rspec-expectations config goes here. You can use an alternate
20
+ # assertion/expectation library such as wrong or the stdlib/minitest
21
+ # assertions if you prefer.
22
+ config.expect_with :rspec do |expectations|
23
+ # This option will default to `true` in RSpec 4. It makes the `description`
24
+ # and `failure_message` of custom matchers include text for helper methods
25
+ # defined using `chain`, e.g.:
26
+ # be_bigger_than(2).and_smaller_than(4).description
27
+ # # => "be bigger than 2 and smaller than 4"
28
+ # ...rather than:
29
+ # # => "be bigger than 2"
30
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
31
+ end
32
+
33
+ # rspec-mocks config goes here. You can use an alternate test double
34
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
35
+ config.mock_with :rspec do |mocks|
36
+ # Prevents you from mocking or stubbing a method that does not exist on
37
+ # a real object. This is generally recommended, and will default to
38
+ # `true` in RSpec 4.
39
+ mocks.verify_partial_doubles = true
40
+ end
41
+
42
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
43
+ # have no way to turn it off -- the option exists only for backwards
44
+ # compatibility in RSpec 3). It causes shared context metadata to be
45
+ # inherited by the metadata hash of host groups and examples, rather than
46
+ # triggering implicit auto-inclusion in groups with matching metadata.
47
+ config.shared_context_metadata_behavior = :apply_to_host_groups
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ # # This allows you to limit a spec run to individual examples or groups
52
+ # # you care about by tagging them with `:focus` metadata. When nothing
53
+ # # is tagged with `:focus`, all examples get run. RSpec also provides
54
+ # # aliases for `it`, `describe`, and `context` that include `:focus`
55
+ # # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
56
+ # config.filter_run_when_matching :focus
57
+ #
58
+ # # Allows RSpec to persist some state between runs in order to support
59
+ # # the `--only-failures` and `--next-failure` CLI options. We recommend
60
+ # # you configure your source control system to ignore this file.
61
+ # config.example_status_persistence_file_path = "spec/examples.txt"
62
+ #
63
+ # # Limits the available syntax to the non-monkey patched syntax that is
64
+ # # recommended. For more details, see:
65
+ # # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
66
+ # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
67
+ # # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
68
+ # config.disable_monkey_patching!
69
+ #
70
+ # # This setting enables warnings. It's recommended, but in some cases may
71
+ # # be too noisy due to issues in dependencies.
72
+ # config.warnings = true
73
+ #
74
+ # # Many RSpec users commonly either run the entire suite or an individual
75
+ # # file, and it's useful to allow more verbose output when running an
76
+ # # individual spec file.
77
+ # if config.files_to_run.one?
78
+ # # Use the documentation formatter for detailed output,
79
+ # # unless a formatter has already been configured
80
+ # # (e.g. via a command-line flag).
81
+ # config.default_formatter = "doc"
82
+ # end
83
+ #
84
+ # # Print the 10 slowest examples and example groups at the
85
+ # # end of the spec run, to help surface which specs are running
86
+ # # particularly slow.
87
+ # config.profile_examples = 10
88
+ #
89
+ # # Run specs in random order to surface order dependencies. If you find an
90
+ # # order dependency and want to debug it, you can fix the order by providing
91
+ # # the seed, which is printed after each run.
92
+ # # --seed 1234
93
+ # config.order = :random
94
+ #
95
+ # # Seed global randomization in this process using the `--seed` CLI option.
96
+ # # Setting this allows you to use `--seed` to deterministically reproduce
97
+ # # test failures related to randomization by passing the same `--seed` value
98
+ # # as the one that triggered the failure.
99
+ # Kernel.srand config.seed
100
+ require 'eac_ruby_gem_support/rspec'
101
+ ::EacRubyGemSupport::Rspec.setup(::File.expand_path('..', __dir__))
102
+ end
@@ -44,4 +44,4 @@ RUN /bin/chmod +x '%%start_path%%'
44
44
  RUN /bin/chown '%%redmine_user%%:%%redmine_user%%' '%%start_path%%'
45
45
  USER '%%redmine_user%%'
46
46
  WORKDIR '%%redmine_user_home%%'
47
- ENTRYPOINT '%%start_path%%'
47
+ CMD '%%start_path%%'
@@ -0,0 +1,24 @@
1
+ # Git Hosting
2
+ export redmine_git_hosting_ssh_key_name=redmine_git_hosting_id
3
+ export git_repositories_hierarchical_organisation=false
4
+
5
+ # Web
6
+ if [ '%%WEB.SCHEME%%' == 'https' ]; then
7
+ export address_https='true'
8
+ else
9
+ export address_https='false'
10
+ fi
11
+ export address_host='%%WEB.AUTHORITY%%'
12
+ export address_path='%%WEB.PATH%%'
13
+
14
+ # Mail settings
15
+ export smtp_server='%%MAILER.SMTP.ADDRESS%%'
16
+ export smtp_port='%%MAILER.SMTP.PORT%%'
17
+ export smtp_domain='%%MAILER.SMTP.DOMAIN%%'
18
+ export smtp_tls='%%MAILER.SMTP.TLS%%'
19
+ export smtp_enable_starttls_auto='%%MAILER.SMTP.STARTTLS_AUTO%%'
20
+ export smtp_openssl_verify_mode='%%MAILER.SMTP.OPENSSL_VERIFY_MODE%%'
21
+ export smtp_authentication='%%MAILER.SMTP.AUTHENTICATION%%'
22
+ export smtp_username='%%MAILER.SMTP.USERNAME%%'
23
+ export smtp_password='%%MAILER.SMTP.PASSWORD%%'
24
+ export mail_from='%%MAILER.FROM%%'
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'eac_docker', '~> 0.2', '>= 0.2.2'
15
+ s.add_dependency 'eac_docker', '~> 0.3'
16
16
  s.add_dependency 'eac_ruby_utils', '~> 0.68'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
@@ -6,6 +6,8 @@ require 'eac_ruby_utils/core_ext'
6
6
  module Avm
7
7
  module Docker
8
8
  class Runner
9
+ DOCKER_DEFAULT_REGISTRY_METHOD = :docker_default_registry
10
+
9
11
  enable_speaker
10
12
  enable_simple_cache
11
13
 
@@ -92,17 +94,11 @@ module Avm
92
94
  end
93
95
 
94
96
  def registry_from_instance
95
- if if_respond(:use_default_registry?, true)
96
- instance.docker_registry_optional.if_present { |v| ::EacDocker::Registry.new(v) }
97
- else
98
- ::EacDocker::Registry.new(instance.docker_registry)
99
- end
97
+ instance.docker_registry_optional.if_present { |v| ::EacDocker::Registry.new(v) }
100
98
  end
101
99
 
102
100
  def registry_from_default
103
- return nil unless if_respond(:use_default_registry?, true)
104
-
105
- nyi 'Was "::Avm::Docker::Registry.default"'
101
+ if_respond(DOCKER_DEFAULT_REGISTRY_METHOD, nil)
106
102
  end
107
103
 
108
104
  def snapshot?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'eac_ruby_utils', '~> 0.64'
15
+ s.add_dependency 'eac_ruby_utils', '~> 0.69', '>= 0.69.1'
16
16
  s.add_dependency 'eac_templates', '~> 0.1'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/boolean'
4
+
5
+ module EacDocker
6
+ module Debug
7
+ class << self
8
+ ENABLE_ENVVAR = 'EAC_DOCKER_DEBUG'
9
+
10
+ def enabled?
11
+ ::EacRubyUtils::Boolean.parse(ENV[ENABLE_ENVVAR])
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_docker/debug'
3
4
  require 'eac_docker/executables'
4
5
  require 'eac_docker/images/base'
5
6
  require 'eac_ruby_utils/core_ext'
@@ -26,6 +27,9 @@ module EacDocker
26
27
  private
27
28
 
28
29
  def id_uncached
30
+ if ::EacDocker::Debug.enabled?
31
+ ::EacDocker::Executables.docker.command(*build_args.excluding('--quiet')).system!
32
+ end
29
33
  ::EacDocker::Executables.docker.command(*build_args).execute!.strip
30
34
  end
31
35
 
@@ -11,17 +11,27 @@ module EacDocker
11
11
  class Templatized < ::EacDocker::Images::Base
12
12
  enable_immutable
13
13
  immutable_accessor :tag
14
+ attr_reader :provide_dir
14
15
 
15
16
  def provide
16
17
  ::EacRubyUtils::Fs::Temp.on_directory do |provide_dir|
17
- template.apply(self, provide_dir)
18
- coded_image(provide_dir).tag(tag).provide
18
+ begin
19
+ self.provide_dir = provide_dir
20
+ template.apply(self, provide_dir)
21
+ coded_image(provide_dir).tag(tag).provide
22
+ ensure
23
+ self.provide_dir = nil
24
+ end
19
25
  end
20
26
  end
21
27
 
22
28
  def coded_image(provide_dir)
23
29
  ::EacDocker::Images::Coded.new(provide_dir)
24
30
  end
31
+
32
+ private
33
+
34
+ attr_writer :provide_dir
25
35
  end
26
36
  end
27
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacDocker
4
- VERSION = '0.2.2'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -6,7 +6,7 @@ module EacRubyUtils
6
6
  def parse(value)
7
7
  return parse_string(value) if value.is_a?(::String)
8
8
  return parse_string(value.to_s) if value.is_a?(::Symbol)
9
- return parse_number(value) if value.is_a?(::Number)
9
+ return parse_number(value) if value.is_a?(::Numeric)
10
10
 
11
11
  value ? true : false
12
12
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.69.0'
4
+ VERSION = '0.69.1'
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.103.0
4
+ version: 0.103.1
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-07-05 00:00:00.000000000 Z
11
+ date: 2021-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -338,7 +338,6 @@ files:
338
338
  - lib/avm.rb
339
339
  - lib/avm/app_src.rb
340
340
  - lib/avm/cached_download.rb
341
- - lib/avm/core_ext.rb
342
341
  - lib/avm/data.rb
343
342
  - lib/avm/data/instance.rb
344
343
  - lib/avm/data/instance/files_unit.rb
@@ -358,13 +357,6 @@ files:
358
357
  - lib/avm/eac_rails_base0/apache_path.rb
359
358
  - lib/avm/eac_rails_base0/deploy.rb
360
359
  - lib/avm/eac_rails_base0/instance.rb
361
- - lib/avm/eac_redmine_base0.rb
362
- - lib/avm/eac_redmine_base0/apache_host.rb
363
- - lib/avm/eac_redmine_base0/core_update.rb
364
- - lib/avm/eac_redmine_base0/data_unit.rb
365
- - lib/avm/eac_redmine_base0/deploy.rb
366
- - lib/avm/eac_redmine_base0/docker_image.rb
367
- - lib/avm/eac_redmine_base0/instance.rb
368
360
  - lib/avm/eac_ubuntu_base0.rb
369
361
  - lib/avm/eac_ubuntu_base0/apache.rb
370
362
  - lib/avm/eac_ubuntu_base0/apache/resource.rb
@@ -467,7 +459,6 @@ files:
467
459
  - lib/avm/instances/base/auto_values/web.rb
468
460
  - lib/avm/instances/base/dockerizable.rb
469
461
  - lib/avm/instances/base/entry_keys.rb
470
- - lib/avm/instances/docker_image.rb
471
462
  - lib/avm/instances/entries.rb
472
463
  - lib/avm/instances/entry.rb
473
464
  - lib/avm/instances/entry_keys.rb
@@ -578,6 +569,7 @@ files:
578
569
  - lib/avm/stereotypes.rb
579
570
  - lib/avm/sync.rb
580
571
  - lib/avm/tools.rb
572
+ - lib/avm/tools/core_ext.rb
581
573
  - lib/avm/tools/runner.rb
582
574
  - lib/avm/tools/runner/app_src.rb
583
575
  - lib/avm/tools/runner/app_src/eac_asciidoctor_base0.rb
@@ -639,13 +631,6 @@ files:
639
631
  - template/avm/eac_rails_base0/apache_path/extra_content.conf
640
632
  - template/avm/eac_rails_base0/deploy/config/database.yml.template
641
633
  - template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template
642
- - template/avm/eac_redmine_base0/deploy/config/install.sh.template
643
- - template/avm/eac_redmine_base0/deploy/config/secrets.yml
644
- - template/avm/eac_redmine_base0/docker_image/Dockerfile.template
645
- - template/avm/eac_redmine_base0/docker_image/apache_http_virtualhost.conf.template
646
- - template/avm/eac_redmine_base0/docker_image/apache_https_virtualhost.conf.template
647
- - template/avm/eac_redmine_base0/docker_image/install_settings.sh.template
648
- - template/avm/eac_redmine_base0/docker_image/start.sh.template
649
634
  - template/avm/eac_ubuntu_base0/docker_image/Dockerfile
650
635
  - template/avm/eac_webapp_base0/apache_host/no_ssl.conf
651
636
  - template/avm/eac_webapp_base0/apache_path/default.conf
@@ -710,6 +695,26 @@ files:
710
695
  - vendor/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb
711
696
  - vendor/avm-eac_rails_base1/spec/rubocop_spec.rb
712
697
  - vendor/avm-eac_rails_base1/spec/spec_helper.rb
698
+ - vendor/avm-eac_redmine_base0/Gemfile
699
+ - vendor/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec
700
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0.rb
701
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/apache_host.rb
702
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/core_update.rb
703
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/data_unit.rb
704
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/deploy.rb
705
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instance.rb
706
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb
707
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/patches/object/template.rb
708
+ - vendor/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb
709
+ - vendor/avm-eac_redmine_base0/spec/rubocop_spec.rb
710
+ - vendor/avm-eac_redmine_base0/spec/spec_helper.rb
711
+ - vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/install.sh.template
712
+ - vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/deploy/config/secrets.yml
713
+ - vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template
714
+ - vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_http_virtualhost.conf.template
715
+ - vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_https_virtualhost.conf.template
716
+ - vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/install_settings.sh.template
717
+ - vendor/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/start.sh.template
713
718
  - vendor/avm-eac_webapp_base0/Gemfile
714
719
  - vendor/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec
715
720
  - vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0.rb
@@ -741,6 +746,7 @@ files:
741
746
  - vendor/avm/lib/avm/docker/container.rb
742
747
  - vendor/avm/lib/avm/docker/image.rb
743
748
  - vendor/avm/lib/avm/docker/runner.rb
749
+ - vendor/avm/lib/avm/instances/docker_image.rb
744
750
  - vendor/avm/lib/avm/version.rb
745
751
  - vendor/avm/lib/avm/version_number.rb
746
752
  - vendor/avm/spec/rubocop_spec.rb
@@ -846,6 +852,7 @@ files:
846
852
  - vendor/eac_docker/eac_docker.gemspec
847
853
  - vendor/eac_docker/lib/eac_docker.rb
848
854
  - vendor/eac_docker/lib/eac_docker/container.rb
855
+ - vendor/eac_docker/lib/eac_docker/debug.rb
849
856
  - vendor/eac_docker/lib/eac_docker/executables.rb
850
857
  - vendor/eac_docker/lib/eac_docker/images.rb
851
858
  - vendor/eac_docker/lib/eac_docker/images/base.rb
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/core_ext'
4
- require 'avm/instances/docker_image'
5
-
6
- module Avm
7
- module EacRedmineBase0
8
- class DockerImage < ::Avm::Instances::DockerImage
9
- enable_simple_cache
10
-
11
- REDMINE_SOURCE_HOST_SUBPATH = 'redmine_source'
12
-
13
- def avm_fs_cache_object_id
14
- instance.id
15
- end
16
-
17
- def redmine_user
18
- 'redmine'
19
- end
20
-
21
- def redmine_user_home
22
- "/home/#{redmine_user}"
23
- end
24
-
25
- def redmine_path
26
- "#{redmine_user_home}/redmine_app"
27
- end
28
-
29
- def start_path
30
- '/start.sh'
31
- end
32
-
33
- private
34
-
35
- def git_repo_uncached
36
- ::EacGit::Local.new(instance.source_instance.fs_path)
37
- end
38
-
39
- def redmine_source_git_id
40
- git_repo.rev_parse('HEAD')
41
- end
42
-
43
- def redmine_source_path_uncached
44
- r = provide_dir.join(REDMINE_SOURCE_HOST_SUBPATH)
45
- ::FileUtils.rm_rf(r.to_path)
46
- r.mkpath
47
- git_repo.commit(redmine_source_git_id).archive_to_dir(r).system!
48
- REDMINE_SOURCE_HOST_SUBPATH
49
- end
50
- end
51
- end
52
- end
@@ -1,29 +0,0 @@
1
- # Database (PostgreSQL)
2
- export postgresql_database=redmine
3
- export postgresql_database_test=redmine_test
4
- export postgresql_user=redmine
5
- export postgresql_password=redmine
6
-
7
- # Git hosting
8
- export gitolite_user=git
9
- export gitolite_user_home="/var/lib/$gitolite_user"
10
- export redmine_git_hosting_ssh_key_name=redmine_git_hosting_id
11
- export git_repositories_hierarchical_organisation=false
12
-
13
- # Address
14
- export address_https=false
15
- export address_host="%%web.hostname%%"
16
- export address_port=
17
- export address_path=
18
-
19
- # Mail
20
- export smtp_server='mail.trf1.jus.br'
21
- export smtp_port='25'
22
- export smtp_domain='trf1.jus.br'
23
- export smtp_tls='false'
24
- export smtp_enable_starttls_auto=''
25
- export smtp_openssl_verify_mode=''
26
- export smtp_authentication='none'
27
- export smtp_username=''
28
- export smtp_password=''
29
- export mail_from='"redmine-trf1_0" <redmine@trf1.jus.br>'