eac_tools 0.55.4 → 0.55.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +31 -27
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/aranha-parsers/lib/aranha/parsers/html/node/default/numeric_support.rb +65 -6
  5. data/sub/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
  6. data/sub/avm/avm.gemspec +2 -2
  7. data/sub/avm/lib/avm/docker/image.rb +3 -8
  8. data/sub/avm/lib/avm/launcher/paths/logical.rb +5 -12
  9. data/sub/avm/lib/avm/version.rb +1 -1
  10. data/sub/avm-eac_generic_base0/avm-eac_generic_base0.gemspec +2 -2
  11. data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/file_formats/base.rb +6 -0
  12. data/sub/avm-eac_generic_base0/lib/avm/eac_generic_base0/version.rb +1 -1
  13. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +5 -5
  14. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +0 -1
  15. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  16. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template +0 -4
  17. data/sub/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec +2 -2
  18. data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/version.rb +1 -1
  19. data/sub/avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/docker_image/Dockerfile.template +1 -0
  20. data/sub/avm-git/avm-git.gemspec +2 -2
  21. data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +8 -1
  22. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +17 -0
  23. data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo.rb +4 -2
  24. data/sub/avm-git/lib/avm/git/version.rb +1 -1
  25. data/sub/eac_docker/lib/eac_docker/images/templatized.rb +5 -1
  26. data/sub/eac_docker/lib/eac_docker/version.rb +1 -1
  27. metadata +22 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75bcf2f6a769a25493968518304b38335efd0d21224bcfec4eb8dd5a8b400332
4
- data.tar.gz: 8cb40df71049275a69e8f2b7d2d84dfcfd50409ec9d13ae17ac5db190c65639c
3
+ metadata.gz: e176be2d8f0c9e29fbc9ba3503447a80c898236928ee978f1f8e76654d9e9a72
4
+ data.tar.gz: 1dac337bac73121e65ac2860f120188db5346e432d482e1ee14bfe4fffb1f815
5
5
  SHA512:
6
- metadata.gz: 0bf07860c18f56f51eaf88a6eb127d9a913634b8c98ecb390dabe76b3157efebc63d2308b1cc8976fbf268c03fb737658fbff27db012fe61443f55deab3486a3
7
- data.tar.gz: 9ee0740def2a18d0a89ad44fbb3b2b13a21cd979306f667dd47a8450a45df0aab957f89008cb51da967cfcf4cc352cb7a52c90b32c2bc58de0a706cad834e9d8
6
+ metadata.gz: 56d88118b427b4287d6927928c4ad0c8b86f1c237630509ded2447e31cbd591333e32fb30093eb48f3f492070d124fae570b91644bff53dbf23611c1fefdc8c5
7
+ data.tar.gz: 516158a86f663a07d2ed65915ca4f8434e823a7bbfbd429f83c515cb1a3a3052d10549693c50c92d78862b0ce63af8425adde0c1efab0f214e9709171d21d1bd
data/Gemfile.lock CHANGED
@@ -1,29 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.55.4)
5
- avm (~> 0.64)
4
+ eac_tools (0.55.6)
5
+ avm (~> 0.64, >= 0.64.2)
6
6
  avm-eac_asciidoctor_base0 (~> 0.15)
7
- avm-eac_generic_base0 (~> 0.10)
7
+ avm-eac_generic_base0 (~> 0.11)
8
8
  avm-eac_latex_base0 (~> 0.3)
9
9
  avm-eac_php_base0 (~> 0.4, >= 0.4.1)
10
10
  avm-eac_postgresql_base0 (~> 0.2, >= 0.2.3)
11
11
  avm-eac_python_base0 (~> 0.2, >= 0.2.1)
12
12
  avm-eac_rails_base0 (~> 0.9)
13
13
  avm-eac_rails_base1 (~> 0.8)
14
- avm-eac_redmine_base0 (~> 0.18)
14
+ avm-eac_redmine_base0 (~> 0.18, >= 0.18.1)
15
15
  avm-eac_redmine_plugin_base0 (~> 0.4)
16
16
  avm-eac_ruby_base1 (~> 0.29, >= 0.29.2)
17
17
  avm-eac_webapp_base0 (~> 0.13, >= 0.13.1)
18
18
  avm-eac_wordpress_base0 (~> 0.3)
19
- avm-git (~> 0.13)
19
+ avm-git (~> 0.13, >= 0.13.1)
20
20
  avm-tools (~> 0.145, >= 0.145.1)
21
21
  eac_ruby_utils (~> 0.112)
22
22
 
23
23
  PATH
24
24
  remote: sub/aranha-parsers
25
25
  specs:
26
- aranha-parsers (0.16.0)
26
+ aranha-parsers (0.17.0)
27
27
  activesupport (>= 4.0.0)
28
28
  addressable (~> 2.8, >= 2.8.1)
29
29
  eac_ruby_utils (~> 0.112)
@@ -47,9 +47,9 @@ PATH
47
47
  PATH
48
48
  remote: sub/avm-eac_generic_base0
49
49
  specs:
50
- avm-eac_generic_base0 (0.10.0)
51
- avm (~> 0.61)
52
- eac_ruby_utils (~> 0.110, >= 0.110.1)
50
+ avm-eac_generic_base0 (0.11.0)
51
+ avm (~> 0.64, >= 0.64.1)
52
+ eac_ruby_utils (~> 0.112)
53
53
 
54
54
  PATH
55
55
  remote: sub/avm-eac_latex_base0
@@ -100,15 +100,15 @@ PATH
100
100
  PATH
101
101
  remote: sub/avm-eac_redmine_base0
102
102
  specs:
103
- avm-eac_redmine_base0 (0.18.0)
104
- avm (~> 0.57)
105
- avm-eac_generic_base0 (~> 0.8)
103
+ avm-eac_redmine_base0 (0.18.1)
104
+ avm (~> 0.64, >= 0.64.1)
105
+ avm-eac_generic_base0 (~> 0.11)
106
106
  avm-eac_rails_base1 (~> 0.8)
107
- avm-eac_ubuntu_base0 (~> 0.3)
107
+ avm-eac_ubuntu_base0 (~> 0.4, >= 0.4.1)
108
108
  curb (~> 0.9, >= 0.9.11)
109
109
  eac_fs (~> 0.16)
110
- eac_rest (~> 0.6, >= 0.6.1)
111
- eac_ruby_utils (~> 0.109)
110
+ eac_rest (~> 0.7, >= 0.7.2)
111
+ eac_ruby_utils (~> 0.112)
112
112
 
113
113
  PATH
114
114
  remote: sub/avm-eac_redmine_plugin_base0
@@ -129,9 +129,9 @@ PATH
129
129
  PATH
130
130
  remote: sub/avm-eac_ubuntu_base0
131
131
  specs:
132
- avm-eac_ubuntu_base0 (0.4.0)
133
- avm (~> 0.57)
134
- eac_ruby_utils (~> 0.109)
132
+ avm-eac_ubuntu_base0 (0.4.1)
133
+ avm (~> 0.64)
134
+ eac_ruby_utils (~> 0.112)
135
135
  eac_templates (~> 0.3, >= 0.3.2)
136
136
 
137
137
  PATH
@@ -166,12 +166,12 @@ PATH
166
166
  PATH
167
167
  remote: sub/avm-git
168
168
  specs:
169
- avm-git (0.13.0)
170
- avm (~> 0.64)
169
+ avm-git (0.13.1)
170
+ avm (~> 0.64, >= 0.64.2)
171
171
  avm-files (~> 0.6)
172
172
  eac_git (~> 0.14, >= 0.14.1)
173
173
  eac_ruby_utils (~> 0.112)
174
- git (~> 1.17, >= 1.17.2)
174
+ git (~> 1.18)
175
175
 
176
176
  PATH
177
177
  remote: sub/avm-tools
@@ -194,11 +194,11 @@ PATH
194
194
  PATH
195
195
  remote: sub/avm
196
196
  specs:
197
- avm (0.64.0)
198
- aranha-parsers (~> 0.16)
197
+ avm (0.64.2)
198
+ aranha-parsers (~> 0.17)
199
199
  eac_cli (~> 0.30, >= 0.30.1)
200
200
  eac_config (~> 0.12)
201
- eac_docker (~> 0.6)
201
+ eac_docker (~> 0.7)
202
202
  eac_fs (~> 0.16)
203
203
  eac_git (~> 0.14, >= 0.14.1)
204
204
  eac_ruby_utils (~> 0.112)
@@ -225,7 +225,7 @@ PATH
225
225
  PATH
226
226
  remote: sub/eac_docker
227
227
  specs:
228
- eac_docker (0.6.0)
228
+ eac_docker (0.7.0)
229
229
  eac_ruby_utils (~> 0.112)
230
230
  eac_templates (~> 0.3, >= 0.3.2)
231
231
 
@@ -283,11 +283,15 @@ GEM
283
283
  parslet (~> 2.0)
284
284
  curb (0.9.11)
285
285
  diff-lcs (1.5.0)
286
- eac_rest (0.7.1)
286
+ eac_envs-http (0.2.0)
287
287
  eac_fs (~> 0.16)
288
288
  eac_ruby_utils (~> 0.112)
289
289
  faraday (~> 2.7, >= 2.7.4)
290
290
  faraday-multipart (~> 1.0, >= 1.0.4)
291
+ eac_rest (0.7.3)
292
+ eac_envs-http (~> 0.2)
293
+ eac_fs (~> 0.16)
294
+ eac_ruby_utils (~> 0.112)
291
295
  eac_ruby_gem_support (0.5.1)
292
296
  eac_ruby_utils (~> 0.74)
293
297
  rspec (~> 3.9)
@@ -311,7 +315,7 @@ GEM
311
315
  faraday-retry (2.1.0)
312
316
  faraday (~> 2.0)
313
317
  filesize (0.2.0)
314
- git (1.17.2)
318
+ git (1.18.0)
315
319
  addressable (~> 2.8)
316
320
  rchardet (~> 1.8)
317
321
  hpricot (0.8.6)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.55.4'
4
+ VERSION = '0.55.6'
5
5
  end
@@ -9,6 +9,34 @@ module Aranha
9
9
  module Node
10
10
  class Default < ::Aranha::Parsers::Html::Node::Base
11
11
  module NumericSupport
12
+ # @param node [Nokogiri::XML::Element]
13
+ # @param xpath [String]
14
+ # @return [Float]
15
+ def decimal_comma_value(node, xpath)
16
+ parse_decimal_comma(node, xpath, true)
17
+ end
18
+
19
+ # @param node [Nokogiri::XML::Element]
20
+ # @param xpath [String]
21
+ # @return [Float, nil]
22
+ def decimal_comma_optional_value(node, xpath)
23
+ parse_decimal_comma(node, xpath, false)
24
+ end
25
+
26
+ # @param node [Nokogiri::XML::Element]
27
+ # @param xpath [String]
28
+ # @return [Float]
29
+ def decimal_dot_value(node, xpath)
30
+ parse_decimal_dot(node, xpath, true)
31
+ end
32
+
33
+ # @param node [Nokogiri::XML::Element]
34
+ # @param xpath [String]
35
+ # @return [Float, nil]
36
+ def decimal_dot_optional_value(node, xpath)
37
+ parse_decimal_dot(node, xpath, false)
38
+ end
39
+
12
40
  def integer_value(node, xpath)
13
41
  r = string_value(node, xpath)
14
42
  return nil if r.blank?
@@ -33,12 +61,20 @@ module Aranha
33
61
  parse_float(node, xpath, false)
34
62
  end
35
63
 
64
+ # @deprecated Use {#decimal_dot_value} instead.
65
+ # @param node [Nokogiri::XML::Element]
66
+ # @param xpath [String]
67
+ # @return [Float]
36
68
  def us_decimal_value(node, xpath)
37
- parse_us_decimal(node, xpath, true)
69
+ decimal_dot_value(node, xpath)
38
70
  end
39
71
 
72
+ # @deprecated Use {#decimal_dot_optional_value} instead.
73
+ # @param node [Nokogiri::XML::Element]
74
+ # @param xpath [String]
75
+ # @return [Float, nil]
40
76
  def us_decimal_optional_value(node, xpath)
41
- parse_us_decimal(node, xpath, false)
77
+ decimal_dot_optional_value(node, xpath)
42
78
  end
43
79
 
44
80
  private
@@ -53,15 +89,38 @@ module Aranha
53
89
  end
54
90
  end
55
91
 
56
- def parse_us_decimal(node, xpath, required)
92
+ # @param node [Nokogiri::XML::Element]
93
+ # @param xpath [String]
94
+ # @param required [Boolean]
95
+ # @param separator [String]
96
+ # @param delimiter [String]
97
+ # @return [Float, nil]
98
+ def parse_decimal(node, xpath, required, separator, delimiter)
57
99
  s = string_value(node, xpath)
58
- m = /\d+(?:[\.\,](\d+))?/.match(s)
100
+ m = /\d+(?:[#{::Regexp.quote(separator + delimiter)}](\d+))?/.match(s)
59
101
  if m
60
- m[0].delete(',').to_f
102
+ m[0].delete(delimiter).to_f
61
103
  elsif required
62
- raise "US decimal value not found in \"#{s}\""
104
+ raise "decimal [Separator=\"#{separator}, Delimiter=\"#{delimiter}\"] value not " \
105
+ "found in \"#{s}\""
63
106
  end
64
107
  end
108
+
109
+ # @param node [Nokogiri::XML::Element]
110
+ # @param xpath [String]
111
+ # @param required [Boolean]
112
+ # @return [Float, nil]
113
+ def parse_decimal_dot(node, xpath, required)
114
+ parse_decimal(node, xpath, required, '.', ',')
115
+ end
116
+
117
+ # @param node [Nokogiri::XML::Element]
118
+ # @param xpath [String]
119
+ # @param required [Boolean]
120
+ # @return [Float, nil]
121
+ def parse_decimal_comma(node, xpath, required)
122
+ parse_decimal(node, xpath, required, ',', '.')
123
+ end
65
124
  end
66
125
  end
67
126
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Parsers
5
- VERSION = '0.16.0'
5
+ VERSION = '0.17.0'
6
6
  end
7
7
  end
data/sub/avm/avm.gemspec CHANGED
@@ -12,10 +12,10 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'aranha-parsers', '~> 0.16'
15
+ s.add_dependency 'aranha-parsers', '~> 0.17'
16
16
  s.add_dependency 'eac_cli', '~> 0.30', '>= 0.30.1'
17
17
  s.add_dependency 'eac_config', '~> 0.12'
18
- s.add_dependency 'eac_docker', '~> 0.6'
18
+ s.add_dependency 'eac_docker', '~> 0.7'
19
19
  s.add_dependency 'eac_fs', '~> 0.16'
20
20
  s.add_dependency 'eac_git', '~> 0.14', '>= 0.14.1'
21
21
  s.add_dependency 'eac_ruby_utils', '~> 0.112'
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/version'
4
+ require 'avm/entries/jobs/with_variables_source'
4
5
  require 'eac_ruby_utils/core_ext'
5
6
  require 'eac_docker/images/templatized'
6
7
  require 'eac_docker/registry'
@@ -8,6 +9,8 @@ require 'eac_docker/registry'
8
9
  module Avm
9
10
  module Docker
10
11
  class Image < ::EacDocker::Images::Templatized
12
+ prepend ::Avm::Entries::Jobs::WithVariablesSource
13
+
11
14
  DEFAULT_REGISTRY_NAME = 'local'
12
15
 
13
16
  class << self
@@ -41,14 +44,6 @@ module Avm
41
44
  ::EacDocker::Executables.docker.command.append(['push', tag]).system!
42
45
  end
43
46
 
44
- def read_entry(path, options = {})
45
- method = path.gsub('.', '_')
46
- return send(method) if respond_to?(path, true)
47
- return instance.read_entry(path, options) if respond_to?(:instance)
48
-
49
- raise "Method \"#{method}\" not found for entry \"#{path}\""
50
- end
51
-
52
47
  def run(instance)
53
48
  run_run(instance) if container_exist?(instance)
54
49
  end
@@ -2,13 +2,13 @@
2
2
 
3
3
  require 'avm/launcher/paths/real'
4
4
  require 'avm/launcher/stereotype'
5
+ require 'eac_ruby_utils/core_ext'
5
6
 
6
7
  module Avm
7
8
  module Launcher
8
9
  module Paths
9
10
  class Logical
10
- include ::Comparable
11
- include ::EacRubyUtils::SimpleCache
11
+ enable_simple_cache
12
12
 
13
13
  class << self
14
14
  def from_h(context, hash)
@@ -17,18 +17,11 @@ module Avm
17
17
  end
18
18
  end
19
19
 
20
- attr_reader :context, :real, :logical, :parent_path
21
-
22
- def initialize(context, parent_path, real, logical)
23
- @context = context
24
- @parent_path = parent_path
25
- @real = ::Avm::Launcher::Paths::Real.new(real)
26
- @logical = logical
20
+ common_constructor :context, :parent_path, :real, :logical do
21
+ self.real = ::Avm::Launcher::Paths::Real.new(real)
27
22
  end
28
23
 
29
- def <=>(other)
30
- [logical, real] <=> [other.logical, other.real]
31
- end
24
+ compare_by :logical, :real
32
25
 
33
26
  def to_s
34
27
  logical
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.64.0'
4
+ VERSION = '0.64.2'
5
5
  end
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.61'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.110', '>= 0.110.1'
15
+ s.add_dependency 'avm', '~> 0.64', '>= 0.64.1'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
19
19
  end
@@ -18,6 +18,12 @@ module Avm
18
18
  files.each { |file| file_apply(file) }
19
19
  end
20
20
 
21
+ # @param file [Pathname]
22
+ # @return [Boolean]
23
+ def match?(file)
24
+ super(file) || !file.exist?
25
+ end
26
+
21
27
  def file_apply(file)
22
28
  file.write(string_apply(file.read))
23
29
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacGenericBase0
5
- VERSION = '0.10.0'
5
+ VERSION = '0.11.0'
6
6
  end
7
7
  end
@@ -12,14 +12,14 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.57'
16
- s.add_dependency 'avm-eac_generic_base0', '~> 0.8'
15
+ s.add_dependency 'avm', '~> 0.64', '>= 0.64.1'
16
+ s.add_dependency 'avm-eac_generic_base0', '~> 0.11'
17
17
  s.add_dependency 'avm-eac_rails_base1', '~> 0.8'
18
- s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
18
+ s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.4', '>= 0.4.1'
19
19
  s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
20
20
  s.add_dependency 'eac_fs', '~> 0.16'
21
- s.add_dependency 'eac_rest', '~> 0.6', '>= 0.6.1'
22
- s.add_dependency 'eac_ruby_utils', '~> 0.109'
21
+ s.add_dependency 'eac_rest', '~> 0.7', '>= 0.7.2'
22
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
23
23
 
24
24
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
25
25
  end
@@ -11,7 +11,6 @@ module Avm
11
11
  class DockerImage < ::Avm::Instances::DockerImage
12
12
  enable_simple_cache
13
13
 
14
- BASE_IMAGE = 'ubuntu:20.04'
15
14
  INSTALLER_TARGET_TASK_WITH_WEB_PATH_BLANK = 'redmine_as_apache_base'
16
15
  INSTALLER_TARGET_TASK_WITH_WEB_PATH_PRESENT = 'redmine_as_apache_path'
17
16
  REDMINE_SOURCE_HOST_SUBPATH = 'redmine_source'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRedmineBase0
5
- VERSION = '0.18.0'
5
+ VERSION = '0.18.1'
6
6
  end
7
7
  end
@@ -1,9 +1,5 @@
1
1
  FROM '%%base_image%%'
2
2
  USER root
3
- RUN apt-get update -y
4
- RUN DEBIAN_FRONTEND=noninteractive apt-get install -y sudo tzdata git apt-utils
5
- RUN ln -fs /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
6
- RUN dpkg-reconfigure --frontend noninteractive tzdata
7
3
 
8
4
  # Redmine / Código-fonte
9
5
  RUN echo '%%redmine_source_git_id%%' '%%redmine_user_home%%/redmine_source_git_id'
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.57'
16
- s.add_dependency 'eac_ruby_utils', '~> 0.109'
15
+ s.add_dependency 'avm', '~> 0.64'
16
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
17
17
  s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.2'
18
18
 
19
19
  s.add_development_dependency 'avm-eac_ubuntu_base0'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacUbuntuBase0
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
7
7
  end
@@ -1,6 +1,7 @@
1
1
  FROM ubuntu:20.04
2
2
 
3
3
  # Base system update
4
+ ENV DEBIAN_FRONTEND=noninteractive
4
5
  RUN apt-get update -y
5
6
  RUN apt-get dist-upgrade -y
6
7
 
@@ -12,11 +12,11 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.64'
15
+ s.add_dependency 'avm', '~> 0.64', '>= 0.64.2'
16
16
  s.add_dependency 'avm-files', '~> 0.6'
17
17
  s.add_dependency 'eac_git', '~> 0.14', '>= 0.14.1'
18
18
  s.add_dependency 'eac_ruby_utils', '~> 0.112'
19
- s.add_dependency 'git', '~> 1.17', '>= 1.17.2'
19
+ s.add_dependency 'git', '~> 1.18'
20
20
 
21
21
  s.add_development_dependency 'aranha-parsers', '~> 0.8', '>= 0.8.5'
22
22
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.4'
@@ -15,6 +15,8 @@ module Avm
15
15
  CHECKERS = %w[remote_url remote_fetch publish_remote_no_exist remote_equal remote_following
16
16
  local_following].freeze
17
17
 
18
+ DEFAULT_REMOTE_REF = 'master'
19
+
18
20
  REMOTE_UNAVAILABLE_MESSAGES = ['could not resolve host', 'connection timed out',
19
21
  'no route to host'].map(&:downcase).freeze
20
22
 
@@ -108,7 +110,7 @@ module Avm
108
110
 
109
111
  def remote_sha_uncached
110
112
  remote_fetch
111
- b = sgit.git.branches["#{remote_name}/master"]
113
+ b = sgit.git.branches["#{remote_name}/#{remote_ref}"]
112
114
  b ? b.gcommit.sha : nil
113
115
  end
114
116
 
@@ -119,6 +121,11 @@ module Avm
119
121
  def remote_name
120
122
  ::Avm::Git::Launcher::WarpBase::TARGET_REMOTE
121
123
  end
124
+
125
+ # @return [String]
126
+ def remote_ref
127
+ DEFAULT_REMOTE_REF
128
+ end
122
129
  end
123
130
  end
124
131
  end
@@ -7,6 +7,23 @@ module Avm
7
7
  module LauncherStereotypes
8
8
  class GitSubrepo
9
9
  class Publish < ::Avm::Git::Launcher::PublishBase
10
+ # @return [Pathname]
11
+ def config_path
12
+ instance.parent.warped.to_pathname.join(
13
+ "./#{instance.to_parent_path}",
14
+ ::Avm::Git::LauncherStereotypes::GitSubrepo::CONFIG_SUBPATH
15
+ )
16
+ end
17
+
18
+ # @return [EacGit::Local::Subrepo::Config]
19
+ def config
20
+ ::EacGit::Local::Subrepo::Config.from_file(config_path)
21
+ end
22
+
23
+ # @return [String]
24
+ def remote_ref
25
+ config.remote_branch || super
26
+ end
10
27
  end
11
28
  end
12
29
  end
@@ -11,9 +11,11 @@ module Avm
11
11
  require_sub __FILE__
12
12
  include Avm::Launcher::Stereotype
13
13
 
14
+ CONFIG_SUBPATH = '.gitrepo'
15
+
14
16
  class << self
15
17
  def match?(path)
16
- File.exist?(path.real.subpath('.gitrepo')) && subrepo_url(path.real) != 'none'
18
+ File.exist?(path.real.subpath(CONFIG_SUBPATH)) && subrepo_url(path.real) != 'none'
17
19
  end
18
20
 
19
21
  def color
@@ -21,7 +23,7 @@ module Avm
21
23
  end
22
24
 
23
25
  def subrepo_url(path)
24
- File.read(path.subpath('.gitrepo')).each_line do |l|
26
+ File.read(path.subpath(CONFIG_SUBPATH)).each_line do |l|
25
27
  m = /remote\s*=\s(.+)/.match(l)
26
28
  return m[1] if m
27
29
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Git
5
- VERSION = '0.13.0'
5
+ VERSION = '0.13.1'
6
6
  end
7
7
  end
@@ -35,8 +35,12 @@ module EacDocker
35
35
 
36
36
  protected
37
37
 
38
+ def variables_source
39
+ self
40
+ end
41
+
38
42
  def write_in_provide_dir
39
- template.apply(self, provide_dir)
43
+ template.apply(variables_source, provide_dir)
40
44
  end
41
45
 
42
46
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacDocker
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.55.4
4
+ version: 0.55.6
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: 2023-03-21 00:00:00.000000000 Z
11
+ date: 2023-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.64'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.64.2
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0.64'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.64.2
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: avm-eac_asciidoctor_base0
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +50,14 @@ dependencies:
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '0.10'
53
+ version: '0.11'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '0.10'
60
+ version: '0.11'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: avm-eac_latex_base0
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -161,6 +167,9 @@ dependencies:
161
167
  - - "~>"
162
168
  - !ruby/object:Gem::Version
163
169
  version: '0.18'
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: 0.18.1
164
173
  type: :runtime
165
174
  prerelease: false
166
175
  version_requirements: !ruby/object:Gem::Requirement
@@ -168,6 +177,9 @@ dependencies:
168
177
  - - "~>"
169
178
  - !ruby/object:Gem::Version
170
179
  version: '0.18'
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: 0.18.1
171
183
  - !ruby/object:Gem::Dependency
172
184
  name: avm-eac_redmine_plugin_base0
173
185
  requirement: !ruby/object:Gem::Requirement
@@ -243,6 +255,9 @@ dependencies:
243
255
  - - "~>"
244
256
  - !ruby/object:Gem::Version
245
257
  version: '0.13'
258
+ - - ">="
259
+ - !ruby/object:Gem::Version
260
+ version: 0.13.1
246
261
  type: :runtime
247
262
  prerelease: false
248
263
  version_requirements: !ruby/object:Gem::Requirement
@@ -250,6 +265,9 @@ dependencies:
250
265
  - - "~>"
251
266
  - !ruby/object:Gem::Version
252
267
  version: '0.13'
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: 0.13.1
253
271
  - !ruby/object:Gem::Dependency
254
272
  name: avm-tools
255
273
  requirement: !ruby/object:Gem::Requirement