avm-eac_generic_base0 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 755fbb955c1b271bcd8bb889b29114402ad0d1914b1a24b53b1e3230f155f804
4
- data.tar.gz: d16e42b5d16154472bebe510de9a228993f419da9671f3a1d0b97a9e9e6910fc
3
+ metadata.gz: a6d6a1396364d1442f597be6c8dfbd99c21275ebf3d6611d1979c5fb7320ee2a
4
+ data.tar.gz: 5ca7404e4a63c0691e1fdb3596561bd4cfb3cbe5efc4dc0d0468cfb1ba75499f
5
5
  SHA512:
6
- metadata.gz: 40554f4cc836d4e0bb3a8d0b8afa0c1deb0248e59c0074b2c74d95510b6dd268ad5c26b183185506d5440963a2e9e762fa6261e8f14059b6d9f85171734ca402
7
- data.tar.gz: ecfdd62415aeeed0386d00be47c2034a904a963696db8b0e9d34e93f293b8ae2cc2d5e6ac857d308acaa4e606c77af9bbcaf8fbd31ac4af5388c1a3748cd25ec
6
+ metadata.gz: 8ac4509659b53a68bc816a8246ef585e2362156b4a1b24f5eea9bbbef933834e92c064725fb8b2a2f410b94806687102a61c1a9ce77bdc41054ac47ac75754e3
7
+ data.tar.gz: 0d1d068b8d574e464e0a1260be86d606504efa6f34d3cd1af55a2629dcb79f179b9177cabe8b6e47314640aa9a9ced12a934a408d1112ef37c7a63b79da0a519
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+
5
+ module Avm
6
+ module EacGenericBase0
7
+ module Sources
8
+ module Docker
9
+ class Runner
10
+ CONTAINER_SOURCE_PATH = '/app'
11
+
12
+ enable_abstract_methods
13
+ abstract_methods :docker_image
14
+
15
+ runner_with :help do
16
+ desc 'Run a Docker container with source mapped.'
17
+ arg_opt '-c', '--command-arg', 'Arguments for [COMMAND] [ARG...].', optional: true,
18
+ repeat: true
19
+ end
20
+
21
+ def run
22
+ start_banner
23
+ docker_container.run_command.system!
24
+ end
25
+
26
+ def start_banner
27
+ infov 'Image', docker_image
28
+ infov 'Command', ::Shellwords.join(command_args)
29
+ end
30
+
31
+ def bash_command_args
32
+ %w[/bin/bash]
33
+ end
34
+
35
+ def command_args
36
+ if parsed.command_arg.any?
37
+ parsed.command_arg
38
+ else
39
+ default_command_args
40
+ end
41
+ end
42
+
43
+ def default_command_args
44
+ bash_command_args
45
+ end
46
+
47
+ def docker_container
48
+ docker_image.container
49
+ .volume(runner_context.call(:subject).path, CONTAINER_SOURCE_PATH)
50
+ .interactive(true).tty(true).command_args(command_args)
51
+ end
52
+
53
+ # @return [EacDocker::Images::Base]
54
+ def docker_image
55
+ raise_abstract_method __method__
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacGenericBase0
7
+ module Sources
8
+ module Docker
9
+ require_sub __FILE__
10
+ end
11
+ end
12
+ end
13
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacGenericBase0
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-eac_generic_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-17 00:00:00.000000000 Z
11
+ date: 2022-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -16,34 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.24'
19
+ version: '0.28'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.24'
26
+ version: '0.28'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: eac_ruby_utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.05'
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 0.95.2
33
+ version: '0.96'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: '0.05'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 0.95.2
40
+ version: '0.96'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: eac_ruby_gem_support
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -68,6 +62,8 @@ files:
68
62
  - lib/avm/eac_generic_base0/sources.rb
69
63
  - lib/avm/eac_generic_base0/sources/base.rb
70
64
  - lib/avm/eac_generic_base0/sources/base/version_bump.rb
65
+ - lib/avm/eac_generic_base0/sources/docker.rb
66
+ - lib/avm/eac_generic_base0/sources/docker/runner.rb
71
67
  - lib/avm/eac_generic_base0/version.rb
72
68
  - locale/en.yml
73
69
  - locale/pt-BR.yml