avm-tools 0.122.0 → 0.125.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/runner/application_stereotypes/list.rb +31 -0
- data/lib/avm/tools/runner/application_stereotypes.rb +16 -0
- data/lib/avm/tools/runner/instance/info.rb +1 -0
- data/lib/avm/tools/runner/instance.rb +6 -1
- data/lib/avm/tools/version.rb +1 -1
- metadata +6 -50
- data/lib/avm/tools/runner/eac_redmine_base0/dev_docker.rb +0 -17
- data/lib/avm/tools/runner/eac_redmine_base0/docker.rb +0 -17
- data/lib/avm/tools/runner/eac_redmine_base0/project_rename.rb +0 -56
- data/lib/avm/tools/runner/eac_redmine_base0.rb +0 -15
- 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: ec6a01dc5543c0357fec16954454c2cf11f58f0cb3050a65708f0cac8654bf2d
|
4
|
+
data.tar.gz: f3018fcfb1a77e24d702c6a0b243a29c720ef50231a4701d637ff56860f21899
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aca9d07857cc1895551ba4b5cc7d76b8b5011faac5db8299279ffbf2557b87d57d2b610dbfe6cd922bdad87103b88fd8fa17e339ab533a469bb204c095452981
|
7
|
+
data.tar.gz: 59a08cf9fc751507296d351d0eb45c972ec399df96c7bb327b65b0968880afbf8ea3292d067d14b6dcf35e38938e61419a1a25b66cacdf30b0833aad7a37fb7d
|
@@ -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
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/instances/base'
|
4
|
+
require 'avm/registry'
|
4
5
|
require 'eac_cli/core_ext'
|
5
6
|
|
6
7
|
module Avm
|
@@ -14,10 +15,14 @@ module Avm
|
|
14
15
|
subcommands
|
15
16
|
end
|
16
17
|
|
18
|
+
def extra_available_subcommands
|
19
|
+
instance.if_present({}, &:extra_available_subcommands)
|
20
|
+
end
|
21
|
+
|
17
22
|
private
|
18
23
|
|
19
24
|
def instance_uncached
|
20
|
-
::Avm::
|
25
|
+
::Avm::Registry.instances.detect(parsed.instance_id)
|
21
26
|
end
|
22
27
|
end
|
23
28
|
end
|
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.125.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-26 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.
|
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.
|
40
|
+
version: '0.27'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: avm-eac_asciidoctor_base0
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,26 +72,6 @@ dependencies:
|
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0.3'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: avm-eac_redmine_base0
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0.5'
|
82
|
-
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: 0.5.2
|
85
|
-
type: :runtime
|
86
|
-
prerelease: false
|
87
|
-
version_requirements: !ruby/object:Gem::Requirement
|
88
|
-
requirements:
|
89
|
-
- - "~>"
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '0.5'
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 0.5.2
|
95
75
|
- !ruby/object:Gem::Dependency
|
96
76
|
name: avm-eac_ruby_base1
|
97
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -371,13 +351,11 @@ files:
|
|
371
351
|
- lib/avm/tools/runner/app_src/test.rb
|
372
352
|
- lib/avm/tools/runner/app_src/update.rb
|
373
353
|
- lib/avm/tools/runner/app_src/version_bump.rb
|
354
|
+
- lib/avm/tools/runner/application_stereotypes.rb
|
355
|
+
- lib/avm/tools/runner/application_stereotypes/list.rb
|
374
356
|
- lib/avm/tools/runner/config.rb
|
375
357
|
- lib/avm/tools/runner/config/load_path.rb
|
376
358
|
- lib/avm/tools/runner/eac_asciidoctor_base0.rb
|
377
|
-
- lib/avm/tools/runner/eac_redmine_base0.rb
|
378
|
-
- lib/avm/tools/runner/eac_redmine_base0/dev_docker.rb
|
379
|
-
- lib/avm/tools/runner/eac_redmine_base0/docker.rb
|
380
|
-
- lib/avm/tools/runner/eac_redmine_base0/project_rename.rb
|
381
359
|
- lib/avm/tools/runner/eac_webapp_base0.rb
|
382
360
|
- lib/avm/tools/runner/eac_wordpress_base0.rb
|
383
361
|
- lib/avm/tools/runner/eac_writings_base0.rb
|
@@ -550,28 +528,6 @@ files:
|
|
550
528
|
- sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb
|
551
529
|
- sub/avm-git/spec/rubocop_spec.rb
|
552
530
|
- sub/avm-git/spec/spec_helper.rb
|
553
|
-
- sub/eac_docker/Gemfile
|
554
|
-
- sub/eac_docker/eac_docker.gemspec
|
555
|
-
- sub/eac_docker/lib/eac_docker.rb
|
556
|
-
- sub/eac_docker/lib/eac_docker/container.rb
|
557
|
-
- sub/eac_docker/lib/eac_docker/debug.rb
|
558
|
-
- sub/eac_docker/lib/eac_docker/executables.rb
|
559
|
-
- sub/eac_docker/lib/eac_docker/images.rb
|
560
|
-
- sub/eac_docker/lib/eac_docker/images/base.rb
|
561
|
-
- sub/eac_docker/lib/eac_docker/images/coded.rb
|
562
|
-
- sub/eac_docker/lib/eac_docker/images/named.rb
|
563
|
-
- sub/eac_docker/lib/eac_docker/images/templatized.rb
|
564
|
-
- sub/eac_docker/lib/eac_docker/registry.rb
|
565
|
-
- sub/eac_docker/lib/eac_docker/rspec.rb
|
566
|
-
- sub/eac_docker/lib/eac_docker/rspec/setup.rb
|
567
|
-
- sub/eac_docker/lib/eac_docker/version.rb
|
568
|
-
- sub/eac_docker/spec/lib/eac_docker/executables_spec.rb
|
569
|
-
- sub/eac_docker/spec/lib/eac_docker/images/coded_spec.rb
|
570
|
-
- sub/eac_docker/spec/lib/eac_docker/images/coded_spec_files/image1/Dockerfile
|
571
|
-
- sub/eac_docker/spec/lib/eac_docker/images/templatized_spec.rb
|
572
|
-
- sub/eac_docker/spec/lib/eac_docker/images/templatized_spec_files/stub_docker_image/Dockerfile
|
573
|
-
- sub/eac_docker/spec/rubocop_spec.rb
|
574
|
-
- sub/eac_docker/spec/spec_helper.rb
|
575
531
|
- sub/eac_git/Gemfile
|
576
532
|
- sub/eac_git/eac_git.gemspec
|
577
533
|
- 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
|
@@ -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 Docker < ::Avm::Docker::Runner
|
10
|
-
def use_default_registry?
|
11
|
-
false
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'eac_cli/core_ext'
|
4
|
-
require 'avm/eac_rails_base1/runner/code_runner'
|
5
|
-
|
6
|
-
module Avm
|
7
|
-
module Tools
|
8
|
-
class Runner
|
9
|
-
class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
|
10
|
-
class ProjectRename
|
11
|
-
runner_with ::Avm::EacRailsBase1::RunnerWith::Bundle do
|
12
|
-
pos_arg :from
|
13
|
-
pos_arg :to
|
14
|
-
end
|
15
|
-
|
16
|
-
def run
|
17
|
-
bundle_run
|
18
|
-
end
|
19
|
-
|
20
|
-
def start_banner
|
21
|
-
infov 'From', from
|
22
|
-
infov 'To', to
|
23
|
-
end
|
24
|
-
|
25
|
-
delegate :from, :to, to: :parsed
|
26
|
-
|
27
|
-
def bundle_args
|
28
|
-
%w[exec rails runner] + [code]
|
29
|
-
end
|
30
|
-
|
31
|
-
def code
|
32
|
-
<<~CODE
|
33
|
-
from_arg = '#{from}'
|
34
|
-
to_arg = '#{to}'
|
35
|
-
project = ::Project.where(identifier: from_arg).first
|
36
|
-
if project.present?
|
37
|
-
puts "Project found: \#{project}"
|
38
|
-
puts "Renaming..."
|
39
|
-
project.update_column(:identifier, to_arg)
|
40
|
-
puts "Renamed. Testing..."
|
41
|
-
project = ::Project.where(identifier: to_arg).first
|
42
|
-
if project
|
43
|
-
puts "Project found: \#{project}"
|
44
|
-
else
|
45
|
-
fail "After rename: project not found with identifier \\"\#{to_arg}\\""
|
46
|
-
end
|
47
|
-
else
|
48
|
-
fail "Before rename: project not found with identifier \\"\#{from_arg}\\""
|
49
|
-
end
|
50
|
-
CODE
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'avm/eac_rails_base1/runner'
|
4
|
-
require 'avm/eac_redmine_base0'
|
5
|
-
require 'eac_ruby_utils/core_ext'
|
6
|
-
|
7
|
-
module Avm
|
8
|
-
module Tools
|
9
|
-
class Runner
|
10
|
-
class EacRedmineBase0 < ::Avm::EacRailsBase1::Runner
|
11
|
-
require_sub __FILE__
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
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
|