avm-tools 0.123.0 → 0.124.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avm/tools/version.rb +1 -1
- metadata +2 -25
- data/lib/avm/tools/runner/eac_redmine_base0/dev_docker.rb +0 -17
- data/sub/eac_docker/Gemfile +0 -5
- data/sub/eac_docker/eac_docker.gemspec +0 -19
- data/sub/eac_docker/lib/eac_docker/container.rb +0 -78
- data/sub/eac_docker/lib/eac_docker/debug.rb +0 -15
- data/sub/eac_docker/lib/eac_docker/executables.rb +0 -18
- data/sub/eac_docker/lib/eac_docker/images/base.rb +0 -14
- data/sub/eac_docker/lib/eac_docker/images/coded.rb +0 -43
- data/sub/eac_docker/lib/eac_docker/images/named.rb +0 -30
- data/sub/eac_docker/lib/eac_docker/images/templatized.rb +0 -41
- data/sub/eac_docker/lib/eac_docker/images.rb +0 -9
- data/sub/eac_docker/lib/eac_docker/registry.rb +0 -17
- data/sub/eac_docker/lib/eac_docker/rspec/setup.rb +0 -17
- data/sub/eac_docker/lib/eac_docker/rspec.rb +0 -9
- data/sub/eac_docker/lib/eac_docker/version.rb +0 -5
- data/sub/eac_docker/lib/eac_docker.rb +0 -7
- data/sub/eac_docker/spec/lib/eac_docker/executables_spec.rb +0 -9
- data/sub/eac_docker/spec/lib/eac_docker/images/coded_spec.rb +0 -12
- data/sub/eac_docker/spec/lib/eac_docker/images/coded_spec_files/image1/Dockerfile +0 -1
- data/sub/eac_docker/spec/lib/eac_docker/images/templatized_spec.rb +0 -18
- data/sub/eac_docker/spec/lib/eac_docker/images/templatized_spec_files/stub_docker_image/Dockerfile +0 -1
- data/sub/eac_docker/spec/rubocop_spec.rb +0 -3
- data/sub/eac_docker/spec/spec_helper.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08cbe8be7452f80405bfbc8fe71f64bc84b797af3399ee4d35c1d218065f7a98'
|
4
|
+
data.tar.gz: ae959f3f8c6c7e70da1c3dd4d425d8cda2fe73b27a8bd806b4bf24e7db424b53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef1e039ba2a5ff3be49286b37fb1d17b15561960d53458d55c011ecaec3e80bed22fd88caa5be6a8b5ba2ff09a1f60cddce412710f6aa44f64909c07ec4ce5d4
|
7
|
+
data.tar.gz: b560513dcf791a0bec5287054e3f4c18e5c71c3099b1b4f2d1617f8dd742cccfe6802a0c6547b46799bf8570b0aa498dab40dbaf299f26f6fa6b26cb74094cde
|
data/lib/avm/tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.124.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-parsers
|
@@ -377,7 +377,6 @@ files:
|
|
377
377
|
- lib/avm/tools/runner/config/load_path.rb
|
378
378
|
- lib/avm/tools/runner/eac_asciidoctor_base0.rb
|
379
379
|
- lib/avm/tools/runner/eac_redmine_base0.rb
|
380
|
-
- lib/avm/tools/runner/eac_redmine_base0/dev_docker.rb
|
381
380
|
- lib/avm/tools/runner/eac_redmine_base0/docker.rb
|
382
381
|
- lib/avm/tools/runner/eac_redmine_base0/project_rename.rb
|
383
382
|
- lib/avm/tools/runner/eac_webapp_base0.rb
|
@@ -552,28 +551,6 @@ files:
|
|
552
551
|
- sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb
|
553
552
|
- sub/avm-git/spec/rubocop_spec.rb
|
554
553
|
- sub/avm-git/spec/spec_helper.rb
|
555
|
-
- sub/eac_docker/Gemfile
|
556
|
-
- sub/eac_docker/eac_docker.gemspec
|
557
|
-
- sub/eac_docker/lib/eac_docker.rb
|
558
|
-
- sub/eac_docker/lib/eac_docker/container.rb
|
559
|
-
- sub/eac_docker/lib/eac_docker/debug.rb
|
560
|
-
- sub/eac_docker/lib/eac_docker/executables.rb
|
561
|
-
- sub/eac_docker/lib/eac_docker/images.rb
|
562
|
-
- sub/eac_docker/lib/eac_docker/images/base.rb
|
563
|
-
- sub/eac_docker/lib/eac_docker/images/coded.rb
|
564
|
-
- sub/eac_docker/lib/eac_docker/images/named.rb
|
565
|
-
- sub/eac_docker/lib/eac_docker/images/templatized.rb
|
566
|
-
- sub/eac_docker/lib/eac_docker/registry.rb
|
567
|
-
- sub/eac_docker/lib/eac_docker/rspec.rb
|
568
|
-
- sub/eac_docker/lib/eac_docker/rspec/setup.rb
|
569
|
-
- sub/eac_docker/lib/eac_docker/version.rb
|
570
|
-
- sub/eac_docker/spec/lib/eac_docker/executables_spec.rb
|
571
|
-
- sub/eac_docker/spec/lib/eac_docker/images/coded_spec.rb
|
572
|
-
- sub/eac_docker/spec/lib/eac_docker/images/coded_spec_files/image1/Dockerfile
|
573
|
-
- sub/eac_docker/spec/lib/eac_docker/images/templatized_spec.rb
|
574
|
-
- sub/eac_docker/spec/lib/eac_docker/images/templatized_spec_files/stub_docker_image/Dockerfile
|
575
|
-
- sub/eac_docker/spec/rubocop_spec.rb
|
576
|
-
- sub/eac_docker/spec/spec_helper.rb
|
577
554
|
- sub/eac_git/Gemfile
|
578
555
|
- sub/eac_git/eac_git.gemspec
|
579
556
|
- sub/eac_git/lib/eac_git.rb
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/docker/runner'
|
4
|
-
|
5
|
-
module Avm
|
6
|
-
module Tools
|
7
|
-
class Runner
|
8
|
-
class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
|
9
|
-
class DevDocker < ::Avm::Docker::Runner
|
10
|
-
def docker_image
|
11
|
-
::Avm::EacUbuntuBase0::DockerImage
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/sub/eac_docker/Gemfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
-
|
5
|
-
require 'eac_docker/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = 'eac_docker'
|
9
|
-
s.version = EacDocker::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 'eac_ruby_utils', '~> 0.74'
|
16
|
-
s.add_dependency 'eac_templates', '~> 0.1'
|
17
|
-
|
18
|
-
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.3', '>= 0.3.3'
|
19
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
|
-
module EacDocker
|
6
|
-
class Container
|
7
|
-
enable_immutable
|
8
|
-
immutable_accessor :interactive, :temporary, :tty, type: :boolean
|
9
|
-
immutable_accessor :env, type: :hash
|
10
|
-
immutable_accessor :capability, :command_arg, :volume, type: :array
|
11
|
-
attr_reader :id
|
12
|
-
common_constructor :image
|
13
|
-
|
14
|
-
def immutable_constructor_args
|
15
|
-
[image]
|
16
|
-
end
|
17
|
-
|
18
|
-
alias immutable_volume volume
|
19
|
-
|
20
|
-
def hostname
|
21
|
-
::EacDocker::Executables.docker.command(
|
22
|
-
'inspect', '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}',
|
23
|
-
id
|
24
|
-
).execute!.strip
|
25
|
-
end
|
26
|
-
|
27
|
-
def on_detached
|
28
|
-
command = ::EacDocker::Executables.docker.command(*(%w[run --detach] + run_command_args))
|
29
|
-
self.id = command.execute!.strip
|
30
|
-
begin
|
31
|
-
yield(self)
|
32
|
-
ensure
|
33
|
-
stop
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def volume(left_part, right_part = null)
|
38
|
-
immutable_volume(right_part.if_present(left_part) { |v| "#{left_part}:#{v}" })
|
39
|
-
end
|
40
|
-
|
41
|
-
def run_command
|
42
|
-
::EacDocker::Executables.docker.command('run', *run_command_args)
|
43
|
-
end
|
44
|
-
|
45
|
-
def run_command_args
|
46
|
-
run_command_boolean_args + run_command_capabilities_args + run_command_envs_args +
|
47
|
-
run_command_volumes_args + [image.provide.id] + command_args
|
48
|
-
end
|
49
|
-
|
50
|
-
def stop
|
51
|
-
::EacDocker::Executables.docker.command('stop', id).execute!
|
52
|
-
end
|
53
|
-
|
54
|
-
private
|
55
|
-
|
56
|
-
attr_writer :id
|
57
|
-
|
58
|
-
def run_command_boolean_args
|
59
|
-
r = []
|
60
|
-
r << '--interactive' if interactive?
|
61
|
-
r << '--tty' if tty?
|
62
|
-
r << '--rm' if temporary?
|
63
|
-
r
|
64
|
-
end
|
65
|
-
|
66
|
-
def run_command_capabilities_args
|
67
|
-
capabilities.flat_map { |capability| ['--cap-add', capability] }
|
68
|
-
end
|
69
|
-
|
70
|
-
def run_command_volumes_args
|
71
|
-
volumes.flat_map { |volume| ['--volume', volume] }
|
72
|
-
end
|
73
|
-
|
74
|
-
def run_command_envs_args
|
75
|
-
envs.flat_map { |name, value| ['--env', "#{name}=#{value}"] }
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,15 +0,0 @@
|
|
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,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
require 'eac_ruby_utils/envs'
|
5
|
-
|
6
|
-
module EacDocker
|
7
|
-
module Executables
|
8
|
-
class << self
|
9
|
-
def env
|
10
|
-
::EacRubyUtils::Envs.local
|
11
|
-
end
|
12
|
-
|
13
|
-
def docker
|
14
|
-
@docker ||= env.executable('docker', '--version')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_docker/debug'
|
4
|
-
require 'eac_docker/executables'
|
5
|
-
require 'eac_docker/images/base'
|
6
|
-
require 'eac_ruby_utils/core_ext'
|
7
|
-
|
8
|
-
module EacDocker
|
9
|
-
module Images
|
10
|
-
class Coded < ::EacDocker::Images::Base
|
11
|
-
enable_simple_cache
|
12
|
-
enable_immutable
|
13
|
-
immutable_accessor :tag
|
14
|
-
common_constructor :path do
|
15
|
-
self.path = path.to_pathname
|
16
|
-
end
|
17
|
-
|
18
|
-
def immutable_constructor_args
|
19
|
-
[path]
|
20
|
-
end
|
21
|
-
|
22
|
-
def provide
|
23
|
-
id
|
24
|
-
self
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def id_uncached
|
30
|
-
if ::EacDocker::Debug.enabled?
|
31
|
-
::EacDocker::Executables.docker.command(*build_args.excluding('--quiet')).system!
|
32
|
-
end
|
33
|
-
::EacDocker::Executables.docker.command(*build_args).execute!.strip
|
34
|
-
end
|
35
|
-
|
36
|
-
def build_args
|
37
|
-
args = %w[build --quiet]
|
38
|
-
args += ['--tag', tag] if tag.present?
|
39
|
-
args + [path.to_path]
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_docker/executables'
|
4
|
-
require 'eac_docker/images/base'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
|
7
|
-
module EacDocker
|
8
|
-
module Images
|
9
|
-
class Named < ::EacDocker::Images::Base
|
10
|
-
common_constructor :source_tag
|
11
|
-
|
12
|
-
def id
|
13
|
-
source_tag
|
14
|
-
end
|
15
|
-
|
16
|
-
def provide
|
17
|
-
provide_command.execute!
|
18
|
-
self
|
19
|
-
end
|
20
|
-
|
21
|
-
def provide_command
|
22
|
-
::EacDocker::Executables.docker.command(*docker_provide_args)
|
23
|
-
end
|
24
|
-
|
25
|
-
def docker_provide_args
|
26
|
-
['pull', source_tag]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_docker/images/base'
|
4
|
-
require 'eac_docker/images/coded'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
require 'eac_ruby_utils/fs/temp'
|
7
|
-
require 'eac_templates/patches/object/template'
|
8
|
-
|
9
|
-
module EacDocker
|
10
|
-
module Images
|
11
|
-
class Templatized < ::EacDocker::Images::Base
|
12
|
-
enable_immutable
|
13
|
-
immutable_accessor :tag
|
14
|
-
attr_reader :provide_dir
|
15
|
-
|
16
|
-
def id
|
17
|
-
tag
|
18
|
-
end
|
19
|
-
|
20
|
-
def provide
|
21
|
-
::EacRubyUtils::Fs::Temp.on_directory do |provide_dir|
|
22
|
-
begin
|
23
|
-
self.provide_dir = provide_dir
|
24
|
-
template.apply(self, provide_dir)
|
25
|
-
coded_image(provide_dir).tag(tag).provide
|
26
|
-
ensure
|
27
|
-
self.provide_dir = nil
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def coded_image(provide_dir)
|
33
|
-
::EacDocker::Images::Coded.new(provide_dir)
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
|
-
|
38
|
-
attr_writer :provide_dir
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_docker/executables'
|
4
|
-
|
5
|
-
module EacDocker
|
6
|
-
module Rspec
|
7
|
-
module Setup
|
8
|
-
def self.extended(obj)
|
9
|
-
obj.setup_conditional_docker_executable
|
10
|
-
end
|
11
|
-
|
12
|
-
def setup_conditional_docker_executable
|
13
|
-
conditional(:docker) { ::EacDocker::Executables.docker.validate }
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_docker/images/coded'
|
4
|
-
|
5
|
-
RSpec.describe(::EacDocker::Images::Coded, docker: true) do
|
6
|
-
let(:fixtures_dir) { ::Pathname.new('coded_spec_files').expand_path(__dir__) }
|
7
|
-
let(:instance) { described_class.new(fixtures_dir / 'image1') }
|
8
|
-
|
9
|
-
describe '#provide' do
|
10
|
-
it { expect { instance.provide }.not_to raise_error }
|
11
|
-
end
|
12
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
from ubuntu:bionic
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_docker/images/templatized'
|
4
|
-
require 'eac_templates/searcher'
|
5
|
-
|
6
|
-
RSpec.describe(::EacDocker::Images::Templatized, docker: true) do
|
7
|
-
let(:fixtures_dir) { ::Pathname.new('templatized_spec_files').expand_path(__dir__) }
|
8
|
-
let(:instance) { StubDockerImage.new }
|
9
|
-
|
10
|
-
before do
|
11
|
-
::EacTemplates::Searcher.default.included_paths << fixtures_dir
|
12
|
-
stub_const('StubDockerImage', Class.new(described_class))
|
13
|
-
end
|
14
|
-
|
15
|
-
describe '#provide' do
|
16
|
-
it { expect { instance.provide }.not_to raise_error }
|
17
|
-
end
|
18
|
-
end
|
data/sub/eac_docker/spec/lib/eac_docker/images/templatized_spec_files/stub_docker_image/Dockerfile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
from ubuntu:bionic
|