eac_tools 0.55.1 → 0.55.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +51 -61
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/aranha-parsers/aranha-parsers.gemspec +5 -4
  5. data/sub/aranha-parsers/lib/aranha/parsers/source_address/fetch_content_error.rb +6 -0
  6. data/sub/aranha-parsers/lib/aranha/parsers/source_address/hash_http_base.rb +5 -3
  7. data/sub/aranha-parsers/lib/aranha/parsers/source_address/http_get.rb +5 -4
  8. data/sub/aranha-parsers/lib/aranha/parsers/version.rb +1 -1
  9. data/sub/avm/avm.gemspec +4 -4
  10. data/sub/avm/lib/avm/sources/base/update.rb +0 -4
  11. data/sub/avm/lib/avm/sources/base/update_subs.rb +19 -0
  12. data/sub/avm/lib/avm/sources/update_error.rb +8 -0
  13. data/sub/avm/lib/avm/version.rb +1 -1
  14. data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +3 -2
  15. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb +2 -0
  16. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/rubygems/version_file.rb +2 -0
  17. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/update.rb +3 -0
  18. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version.rb +31 -0
  19. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base.rb +0 -18
  20. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  21. data/sub/eac_cli/eac_cli.gemspec +1 -1
  22. data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +2 -0
  23. data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
  24. data/sub/eac_docker/eac_docker.gemspec +1 -1
  25. data/sub/eac_docker/lib/eac_docker/container.rb +5 -0
  26. data/sub/eac_docker/lib/eac_docker/rspec/stub_image.rb +40 -0
  27. data/sub/eac_docker/lib/eac_docker/version.rb +1 -1
  28. data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +2 -2
  29. data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  30. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/hash_accessor.rb +23 -12
  31. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  32. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/{immutable_spec.rb → immutable/array_accessor_spec.rb} +4 -3
  33. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/immutable/hash_accessor_spec.rb +42 -0
  34. metadata +18 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4daef05ed4a65ea9e4d8ec9922eb47d1419ba99d14ec280791f1b387c5bf68df
4
- data.tar.gz: 69d71f09d7b2d97523f653f463f4c72acaf2625727ccded7aed36223a0e83637
3
+ metadata.gz: a5d1418c152dd790a2e5831c10b72496700195606bb8d15f69a2e4a36939b420
4
+ data.tar.gz: '0959271a81984ccfd30ffe65aaa5537770720443b02511a5c7a3b6464cde0003'
5
5
  SHA512:
6
- metadata.gz: f1906620490db991897f7a4e7bdff752587d8935884ef5713526999119d201eb82d1a5e6011192133cd9e1e5456f3ecfb22b554ebd72e17354c6a99d63233e00
7
- data.tar.gz: 6c5efd979d44070f7fd30afe7135b5e99044e0b94fafbdf017979549dda6b5cadfb9a51615e2c5ca3956475dfe3f316bcde05a75a25e81b5a8346e862b167259
6
+ metadata.gz: 1f781a034585d43fbf20d9c367e3b3a4f8a0eb4f608143469c267a30bc609c61ac9ee5b406cb24cc2c881a618b7acc79620a53832545b1897763c69a19e850d4
7
+ data.tar.gz: bfeda693a8d2af8d1741249374cd1536475a5230196c1dd69988871616be4bfc12d319e566086f8974cdc9dd3242f95c35a01b3111e617088ed8911da9f4a11e
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.55.1)
5
- avm (~> 0.62)
4
+ eac_tools (0.55.3)
5
+ avm (~> 0.63)
6
6
  avm-eac_asciidoctor_base0 (~> 0.15)
7
7
  avm-eac_generic_base0 (~> 0.10)
8
8
  avm-eac_latex_base0 (~> 0.3)
@@ -13,23 +13,24 @@ PATH
13
13
  avm-eac_rails_base1 (~> 0.8)
14
14
  avm-eac_redmine_base0 (~> 0.18)
15
15
  avm-eac_redmine_plugin_base0 (~> 0.4)
16
- avm-eac_ruby_base1 (~> 0.29)
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
19
  avm-tools (~> 0.145, >= 0.145.1)
20
- eac_ruby_utils (~> 0.111)
20
+ eac_ruby_utils (~> 0.112)
21
21
 
22
22
  PATH
23
23
  remote: sub/aranha-parsers
24
24
  specs:
25
- aranha-parsers (0.14.4)
25
+ aranha-parsers (0.16.0)
26
26
  activesupport (>= 4.0.0)
27
27
  addressable (~> 2.8, >= 2.8.1)
28
- curb (~> 0.9, >= 0.9.11)
29
- eac_ruby_utils (~> 0.106)
28
+ eac_ruby_utils (~> 0.112)
29
+ faraday (~> 2.7, >= 2.7.4)
30
+ faraday-follow_redirects (~> 0.3)
30
31
  faraday-gzip (~> 0.1)
31
- faraday_middleware (~> 1.2)
32
- nokogiri (~> 1.13, >= 1.13.9)
32
+ faraday-retry (~> 2.1)
33
+ nokogiri (~> 1.14, >= 1.14.2)
33
34
  ofx-parser (~> 1.1)
34
35
 
35
36
  PATH
@@ -118,10 +119,11 @@ PATH
118
119
  PATH
119
120
  remote: sub/avm-eac_ruby_base1
120
121
  specs:
121
- avm-eac_ruby_base1 (0.29.0)
122
- avm (~> 0.61)
122
+ avm-eac_ruby_base1 (0.29.2)
123
+ aranha-parsers (~> 0.16)
124
+ avm (~> 0.63)
123
125
  avm-eac_generic_base0 (~> 0.10)
124
- eac_ruby_utils (~> 0.110, >= 0.110.1)
126
+ eac_ruby_utils (~> 0.112)
125
127
 
126
128
  PATH
127
129
  remote: sub/avm-eac_ubuntu_base0
@@ -191,14 +193,14 @@ PATH
191
193
  PATH
192
194
  remote: sub/avm
193
195
  specs:
194
- avm (0.62.0)
195
- aranha-parsers (~> 0.14, >= 0.14.4)
196
- eac_cli (~> 0.30)
196
+ avm (0.63.0)
197
+ aranha-parsers (~> 0.16)
198
+ eac_cli (~> 0.30, >= 0.30.1)
197
199
  eac_config (~> 0.12)
198
- eac_docker (~> 0.5)
200
+ eac_docker (~> 0.6)
199
201
  eac_fs (~> 0.16)
200
202
  eac_git (~> 0.14)
201
- eac_ruby_utils (~> 0.111)
203
+ eac_ruby_utils (~> 0.112)
202
204
  eac_templates (~> 0.3, >= 0.3.2)
203
205
  filesize (~> 0.2)
204
206
  htmlbeautifier (~> 1.4, >= 1.4.2)
@@ -207,10 +209,10 @@ PATH
207
209
  PATH
208
210
  remote: sub/eac_cli
209
211
  specs:
210
- eac_cli (0.30.0)
212
+ eac_cli (0.30.1)
211
213
  colorize (~> 0.8, >= 0.8.1)
212
214
  eac_config (~> 0.12)
213
- eac_ruby_utils (~> 0.107, >= 0.107.1)
215
+ eac_ruby_utils (~> 0.112)
214
216
 
215
217
  PATH
216
218
  remote: sub/eac_config
@@ -222,8 +224,8 @@ PATH
222
224
  PATH
223
225
  remote: sub/eac_docker
224
226
  specs:
225
- eac_docker (0.5.0)
226
- eac_ruby_utils (~> 0.104)
227
+ eac_docker (0.6.0)
228
+ eac_ruby_utils (~> 0.112)
227
229
  eac_templates (~> 0.3, >= 0.3.2)
228
230
 
229
231
  PATH
@@ -244,16 +246,16 @@ PATH
244
246
  PATH
245
247
  remote: sub/eac_ruby_base0
246
248
  specs:
247
- eac_ruby_base0 (0.17.2)
249
+ eac_ruby_base0 (0.17.3)
248
250
  avm-eac_ruby_base1 (~> 0.29)
249
- eac_cli (~> 0.30)
251
+ eac_cli (~> 0.30, >= 0.30.1)
250
252
  eac_fs (~> 0.16)
251
- eac_ruby_utils (~> 0.111)
253
+ eac_ruby_utils (~> 0.112)
252
254
 
253
255
  PATH
254
256
  remote: sub/eac_ruby_utils
255
257
  specs:
256
- eac_ruby_utils (0.111.0)
258
+ eac_ruby_utils (0.112.0)
257
259
  activesupport (>= 4, < 7)
258
260
  addressable (~> 2.8, >= 2.8.1)
259
261
  bundler
@@ -263,7 +265,7 @@ PATH
263
265
  GEM
264
266
  remote: https://rubygems.org/
265
267
  specs:
266
- activesupport (6.1.7.1)
268
+ activesupport (6.1.7.2)
267
269
  concurrent-ruby (~> 1.0, >= 1.0.2)
268
270
  i18n (>= 1.6, < 2)
269
271
  minitest (>= 5.1)
@@ -275,13 +277,16 @@ GEM
275
277
  ast (2.4.2)
276
278
  clipboard (1.3.6)
277
279
  colorize (0.8.1)
278
- concurrent-ruby (1.1.10)
280
+ concurrent-ruby (1.2.2)
279
281
  content-type (0.0.2)
280
282
  parslet (~> 2.0)
281
283
  curb (0.9.11)
282
284
  diff-lcs (1.5.0)
283
- eac_rest (0.6.1)
284
- eac_ruby_utils (~> 0.70)
285
+ eac_rest (0.7.1)
286
+ eac_fs (~> 0.16)
287
+ eac_ruby_utils (~> 0.112)
288
+ faraday (~> 2.7, >= 2.7.4)
289
+ faraday-multipart (~> 1.0, >= 1.0.4)
285
290
  eac_ruby_gem_support (0.5.1)
286
291
  eac_ruby_utils (~> 0.74)
287
292
  rspec (~> 3.9)
@@ -291,36 +296,21 @@ GEM
291
296
  eac_templates (0.3.2)
292
297
  eac_config (~> 0.11, >= 0.11.1)
293
298
  eac_ruby_utils (~> 0.102, >= 0.102.1)
294
- faraday (1.10.3)
295
- faraday-em_http (~> 1.0)
296
- faraday-em_synchrony (~> 1.0)
297
- faraday-excon (~> 1.1)
298
- faraday-httpclient (~> 1.0)
299
- faraday-multipart (~> 1.0)
300
- faraday-net_http (~> 1.0)
301
- faraday-net_http_persistent (~> 1.0)
302
- faraday-patron (~> 1.0)
303
- faraday-rack (~> 1.0)
304
- faraday-retry (~> 1.0)
299
+ faraday (2.7.4)
300
+ faraday-net_http (>= 2.0, < 3.1)
305
301
  ruby2_keywords (>= 0.0.4)
306
- faraday-em_http (1.0.0)
307
- faraday-em_synchrony (1.0.0)
308
- faraday-excon (1.1.0)
302
+ faraday-follow_redirects (0.3.0)
303
+ faraday (>= 1, < 3)
309
304
  faraday-gzip (0.1.0)
310
305
  faraday (>= 1.0)
311
306
  zlib (~> 2.1)
312
- faraday-httpclient (1.0.1)
313
307
  faraday-multipart (1.0.4)
314
308
  multipart-post (~> 2)
315
- faraday-net_http (1.0.1)
316
- faraday-net_http_persistent (1.2.0)
317
- faraday-patron (1.0.0)
318
- faraday-rack (1.0.0)
319
- faraday-retry (1.0.3)
320
- faraday_middleware (1.2.0)
321
- faraday (~> 1.0)
309
+ faraday-net_http (3.0.2)
310
+ faraday-retry (2.1.0)
311
+ faraday (~> 2.0)
322
312
  filesize (0.2.0)
323
- git (1.13.1)
313
+ git (1.17.2)
324
314
  addressable (~> 2.8)
325
315
  rchardet (~> 1.8)
326
316
  hpricot (0.8.6)
@@ -329,22 +319,22 @@ GEM
329
319
  concurrent-ruby (~> 1.0)
330
320
  jaro_winkler (1.5.4)
331
321
  minitar (0.9)
332
- minitest (5.17.0)
333
- multipart-post (2.2.3)
322
+ minitest (5.18.0)
323
+ multipart-post (2.3.0)
334
324
  net-ssh (4.2.0)
335
- nokogiri (1.14.0-x86_64-linux)
325
+ nokogiri (1.14.2-x86_64-linux)
336
326
  racc (~> 1.4)
337
327
  ofx-parser (1.1.0)
338
328
  hpricot (>= 0.6)
339
329
  os (1.1.4)
340
330
  parallel (1.22.1)
341
331
  parseconfig (1.1.2)
342
- parser (3.2.0.0)
332
+ parser (3.2.1.1)
343
333
  ast (~> 2.4.1)
344
334
  parslet (2.0.0)
345
335
  public_suffix (5.0.1)
346
336
  racc (1.6.2)
347
- rack (3.0.4.1)
337
+ rack (3.0.5)
348
338
  rainbow (3.1.1)
349
339
  rchardet (1.8.0)
350
340
  rexml (3.2.5)
@@ -353,7 +343,7 @@ GEM
353
343
  rspec-core (~> 3.12.0)
354
344
  rspec-expectations (~> 3.12.0)
355
345
  rspec-mocks (~> 3.12.0)
356
- rspec-core (3.12.0)
346
+ rspec-core (3.12.1)
357
347
  rspec-support (~> 3.12.0)
358
348
  rspec-expectations (3.12.2)
359
349
  diff-lcs (>= 1.2.0, < 2.0)
@@ -376,12 +366,12 @@ GEM
376
366
  rubocop-rspec (1.38.1)
377
367
  rubocop (>= 0.68.1)
378
368
  ruby-filemagic (0.7.3)
379
- ruby-progressbar (1.11.0)
369
+ ruby-progressbar (1.13.0)
380
370
  ruby2_keywords (0.0.5)
381
- tzinfo (2.0.5)
371
+ tzinfo (2.0.6)
382
372
  concurrent-ruby (~> 1.0)
383
373
  unicode-display_width (1.6.1)
384
- zeitwerk (2.6.6)
374
+ zeitwerk (2.6.7)
385
375
  zlib (2.1.1)
386
376
 
387
377
  PLATFORMS
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacTools
4
- VERSION = '0.55.1'
4
+ VERSION = '0.55.3'
5
5
  end
@@ -14,11 +14,12 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency 'activesupport', '>= 4.0.0'
16
16
  s.add_dependency 'addressable', '~> 2.8', '>= 2.8.1'
17
- s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
18
- s.add_dependency 'eac_ruby_utils', '~> 0.106'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
18
+ s.add_dependency 'faraday', '~> 2.7', '>= 2.7.4'
19
+ s.add_dependency 'faraday-follow_redirects', '~> 0.3'
19
20
  s.add_dependency 'faraday-gzip', '~> 0.1'
20
- s.add_dependency 'faraday_middleware', '~> 1.2'
21
- s.add_dependency 'nokogiri', '~> 1.13', '>= 1.13.9'
21
+ s.add_dependency 'faraday-retry', '~> 2.1'
22
+ s.add_dependency 'nokogiri', '~> 1.14', '>= 1.14.2'
22
23
  s.add_dependency 'ofx-parser', '~> 1.1'
23
24
 
24
25
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
@@ -4,6 +4,12 @@ module Aranha
4
4
  module Parsers
5
5
  class SourceAddress
6
6
  class FetchContentError < ::RuntimeError
7
+ attr_reader :request
8
+
9
+ def initialize(msg, request)
10
+ super(msg)
11
+ @request = request
12
+ end
7
13
  end
8
14
  end
9
15
  end
@@ -3,7 +3,8 @@
3
3
  require 'aranha/parsers/source_address/fetch_content_error'
4
4
  require 'aranha/parsers/source_address/hash_http_base'
5
5
  require 'eac_ruby_utils/core_ext'
6
- require 'faraday_middleware'
6
+ require 'faraday'
7
+ require 'faraday/follow_redirects'
7
8
  require 'faraday/gzip'
8
9
  require 'yaml'
9
10
 
@@ -66,8 +67,9 @@ module Aranha
66
67
  req = faraday_request
67
68
  return req.body if req.status == 200
68
69
 
69
- raise ::Aranha::Parsers::SourceAddress::FetchContentError,
70
- "Get #{url} returned #{req.status.to_i}"
70
+ raise ::Aranha::Parsers::SourceAddress::FetchContentError.new(
71
+ "Get #{url} returned #{req.status.to_i}", req
72
+ )
71
73
  end
72
74
 
73
75
  def param(key, default_value)
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'addressable'
4
- require 'curb'
5
4
  require 'aranha/parsers/source_address/fetch_content_error'
6
- require 'faraday_middleware'
5
+ require 'faraday'
6
+ require 'faraday/retry'
7
7
 
8
8
  module Aranha
9
9
  module Parsers
@@ -46,8 +46,9 @@ module Aranha
46
46
  c = conn.get(url)
47
47
  return c.body if c.status == 200
48
48
 
49
- raise ::Aranha::Parsers::SourceAddress::FetchContentError,
50
- "Get #{url} returned #{c.status.to_i}"
49
+ raise ::Aranha::Parsers::SourceAddress::FetchContentError.new(
50
+ "Get #{url} returned #{c.status.to_i}", c
51
+ )
51
52
  end
52
53
 
53
54
  def serialize
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Parsers
5
- VERSION = '0.14.4'
5
+ VERSION = '0.16.0'
6
6
  end
7
7
  end
data/sub/avm/avm.gemspec CHANGED
@@ -12,13 +12,13 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.4'
16
- s.add_dependency 'eac_cli', '~> 0.30'
15
+ s.add_dependency 'aranha-parsers', '~> 0.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.5'
18
+ s.add_dependency 'eac_docker', '~> 0.6'
19
19
  s.add_dependency 'eac_fs', '~> 0.16'
20
20
  s.add_dependency 'eac_git', '~> 0.14'
21
- s.add_dependency 'eac_ruby_utils', '~> 0.111'
21
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
22
22
  s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.2'
23
23
  s.add_dependency 'filesize', '~> 0.2'
24
24
  s.add_dependency 'htmlbeautifier', '~> 1.4', '>= 1.4.2'
@@ -33,10 +33,6 @@ module Avm
33
33
  def update_self_commit_message
34
34
  i18n_translate(__method__)
35
35
  end
36
-
37
- def update_subs
38
- subs.each { |sub| update_sub(sub) }
39
- end
40
36
  end
41
37
  end
42
38
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module Sources
7
+ class Base
8
+ class UpdateSubs
9
+ enable_method_class
10
+
11
+ common_constructor :source
12
+
13
+ def result
14
+ source.subs.each { |sub| source.update_sub(sub) }
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Avm
4
+ module Sources
5
+ class UpdateError < ::RuntimeError
6
+ end
7
+ end
8
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Avm
4
- VERSION = '0.62.0'
4
+ VERSION = '0.63.0'
5
5
  end
@@ -12,9 +12,10 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib,locale,template}/**/*']
14
14
 
15
- s.add_dependency 'avm', '~> 0.61'
15
+ s.add_dependency 'aranha-parsers', '~> 0.16'
16
+ s.add_dependency 'avm', '~> 0.63'
16
17
  s.add_dependency 'avm-eac_generic_base0', '~> 0.10'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.110', '>= 0.110.1'
18
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
18
19
 
19
20
  s.add_development_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
20
21
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
@@ -103,6 +103,8 @@ module Avm
103
103
  "https://rubygems.org/api/v1/versions/#{gem_spec.name}.json"
104
104
  ).content
105
105
  )
106
+ rescue ::Aranha::Parsers::SourceAddress::FetchContentError => e
107
+ e.request.status == 404 ? [] : raise(e)
106
108
  end
107
109
 
108
110
  def gem_version_max_uncached
@@ -11,6 +11,8 @@ module Avm
11
11
  VERSION_LINE_PATTERN = /\A(\s*)VERSION\s*=\s*[\'\"]([^\'\"]+)[\'\"](\s*)\z/.freeze
12
12
 
13
13
  def value
14
+ return nil unless path.file?
15
+
14
16
  path.read.each_line.lazy.map { |line| line_value(line) }.find { |v| v }
15
17
  end
16
18
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/eac_generic_base0/sources/base'
4
+ require 'avm/sources/update_error'
4
5
  require 'eac_ruby_utils/core_ext'
5
6
 
6
7
  module Avm
@@ -14,6 +15,8 @@ module Avm
14
15
 
15
16
  def update_self_content
16
17
  bundle_update.execute!
18
+ rescue ::EacRubyUtils::Envs::ExecutionError
19
+ raise ::Avm::Sources::UpdateError
17
20
  end
18
21
  end
19
22
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRubyBase1
7
+ module Sources
8
+ class Base < ::Avm::EacGenericBase0::Sources::Base
9
+ module Version
10
+ # @return [Avm::VersionNumber]
11
+ def version
12
+ version_file.value.if_present { |v| ::Avm::VersionNumber.new(v) }
13
+ end
14
+
15
+ def version=(value)
16
+ version_file.value = value
17
+ end
18
+
19
+ # @return [Avm::EacRubyBase1::Rubygems::VersionFile]
20
+ def version_file
21
+ ::Avm::EacRubyBase1::Rubygems::VersionFile.new(version_file_path)
22
+ end
23
+
24
+ def version_file_path
25
+ path.join('lib', *gem_namespace_parts, 'version.rb')
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -55,24 +55,6 @@ module Avm
55
55
  def valid?
56
56
  gemfile_path.exist? || gemspec_path.present?
57
57
  end
58
-
59
- # @return [Avm::VersionNumber]
60
- def version
61
- version_file.value.if_present { |v| ::Avm::VersionNumber.new(v) }
62
- end
63
-
64
- def version=(value)
65
- version_file.value = value
66
- end
67
-
68
- # @return [Avm::EacRubyBase1::Rubygems::VersionFile]
69
- def version_file
70
- ::Avm::EacRubyBase1::Rubygems::VersionFile.new(version_file_path)
71
- end
72
-
73
- def version_file_path
74
- path.join('lib', *gem_namespace_parts, 'version.rb')
75
- end
76
58
  end
77
59
  end
78
60
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.29.0'
5
+ VERSION = '0.29.2'
6
6
  end
7
7
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency 'colorize', '~> 0.8', '>= 0.8.1'
16
16
  s.add_dependency 'eac_config', '~> 0.12'
17
- s.add_dependency 'eac_ruby_utils', '~> 0.107', '>= 0.107.1'
17
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
18
18
 
19
19
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
20
20
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'eac_ruby_utils/gems_registry'
4
+
3
5
  module EacCli
4
6
  class RunnerWithSet
5
7
  class << self
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.30.0'
4
+ VERSION = '0.30.1'
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.104'
15
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
16
16
  s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.2'
17
17
 
18
18
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
@@ -24,6 +24,11 @@ module EacDocker
24
24
  ).execute!.strip
25
25
  end
26
26
 
27
+ # @return [String]
28
+ def logs
29
+ ::EacDocker::Executables.docker.command('logs', id).execute!
30
+ end
31
+
27
32
  def on_detached
28
33
  command = ::EacDocker::Executables.docker.command(*(%w[run --detach] + run_command_args))
29
34
  self.id = command.execute!.strip
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacDocker
6
+ module Rspec
7
+ class StubImage
8
+ include ::ActiveSupport::Callbacks
9
+ define_callbacks :on_container
10
+ common_constructor :image
11
+
12
+ def build_container
13
+ image.provide.container.temporary(true)
14
+ end
15
+
16
+ def container
17
+ raise 'internal container is blank' if internal_container.blank?
18
+
19
+ internal_container
20
+ end
21
+
22
+ def on_container(&block)
23
+ raise 'A container was already created' if internal_container.present?
24
+
25
+ build_container.on_detached do |container|
26
+ self.internal_container = container
27
+ begin
28
+ run_callbacks(:on_container, &block)
29
+ ensure
30
+ self.internal_container = nil
31
+ end
32
+ end
33
+ end
34
+
35
+ private
36
+
37
+ attr_accessor :internal_container
38
+ end
39
+ end
40
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacDocker
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
15
  s.add_dependency 'avm-eac_ruby_base1', '~> 0.29'
16
- s.add_dependency 'eac_cli', '~> 0.30'
16
+ s.add_dependency 'eac_cli', '~> 0.30', '>= 0.30.1'
17
17
  s.add_dependency 'eac_fs', '~> 0.16'
18
- s.add_dependency 'eac_ruby_utils', '~> 0.111'
18
+ s.add_dependency 'eac_ruby_utils', '~> 0.112'
19
19
 
20
20
  s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
21
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.17.2'
4
+ VERSION = '0.17.3'
5
5
  end
@@ -7,35 +7,46 @@ module EacRubyUtils
7
7
  module Immutable
8
8
  class HashAccessor < ::EacRubyUtils::Immutable::BaseAccessor
9
9
  def apply(klass)
10
- apply_get(klass)
11
- apply_set(klass)
10
+ apply_plural(klass)
11
+ apply_singular(klass)
12
12
  end
13
13
 
14
14
  def immutable_value_get(object)
15
15
  super || {}
16
16
  end
17
17
 
18
- def immutable_value_set(object, key, value)
19
- duplicate_object(object) do |old_value|
20
- (old_value || {}).merge(key => value)
21
- end
18
+ def immutable_value_get_single(object, key)
19
+ immutable_value_get(object)[key]
20
+ end
21
+
22
+ def immutable_value_set(object, new_hash)
23
+ duplicate_object(object) { |_old_value| new_hash }
24
+ end
25
+
26
+ def immutable_value_set_single(object, key, value)
27
+ immutable_value_set(object, immutable_value_get(object).merge(key => value))
22
28
  end
23
29
 
24
30
  private
25
31
 
26
- def apply_get(klass)
32
+ def apply_plural(klass)
27
33
  accessor = self
28
- klass.send(:define_method, ::ActiveSupport::Inflector.pluralize(name)) do
29
- accessor.immutable_value_get(self)
34
+ klass.send(:define_method, ::ActiveSupport::Inflector.pluralize(name)) do |*args|
35
+ case args.count
36
+ when 0 then next accessor.immutable_value_get(self)
37
+ when 1 then next accessor.immutable_value_set(self, args[0])
38
+ else
39
+ raise ::ArgumentError, "wrong number of arguments (given #{args.count}, expected 0..1)"
40
+ end
30
41
  end
31
42
  end
32
43
 
33
- def apply_set(klass)
44
+ def apply_singular(klass)
34
45
  accessor = self
35
46
  klass.send(:define_method, name) do |*args|
36
47
  case args.count
37
- when 1 then next accessor.immutable_value_get(self, args[0])
38
- when 2 then next accessor.immutable_value_set(self, *args[0..1])
48
+ when 1 then next accessor.immutable_value_get_single(self, args[0])
49
+ when 2 then next accessor.immutable_value_set_single(self, *args[0..1])
39
50
  else
40
51
  raise ::ArgumentError, "wrong number of arguments (given #{args.count}, expected 1..2)"
41
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.111.0'
4
+ VERSION = '0.112.0'
5
5
  end
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ::RSpec.describe ::EacRubyUtils::Immutable do
3
+ require 'eac_ruby_utils/immutable'
4
+
5
+ ::RSpec.describe ::EacRubyUtils::Immutable::ArrayAccessor do
4
6
  let(:stub_class) do
5
- the_described_class = described_class
6
7
  ::Class.new do
7
- include the_described_class
8
+ include ::EacRubyUtils::Immutable
8
9
 
9
10
  immutable_accessor :array_attr, type: :array
10
11
  end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/immutable'
4
+
5
+ ::RSpec.describe ::EacRubyUtils::Immutable::HashAccessor do
6
+ let(:stub_class) do
7
+ ::Class.new do
8
+ include ::EacRubyUtils::Immutable
9
+
10
+ immutable_accessor :the_hash, type: :hash
11
+ end
12
+ end
13
+
14
+ let(:initial_instance) { stub_class.new }
15
+
16
+ it { expect(initial_instance.the_hashes).to eq({}) }
17
+ it { expect(initial_instance.the_hash('key_a')).to be_nil }
18
+
19
+ context 'when a single value is set' do
20
+ let(:change1_instance) { initial_instance.the_hash('key_a', 'A') }
21
+
22
+ before { change1_instance }
23
+
24
+ it { expect(initial_instance.the_hashes).to eq({}) }
25
+ it { expect(initial_instance.the_hash('key_a')).to be_nil }
26
+ it { expect(change1_instance.the_hashes).to eq({ 'key_a' => 'A' }) }
27
+ it { expect(change1_instance.the_hash('key_a')).to eq('A') }
28
+
29
+ context 'when all valuesare set' do
30
+ let(:change2_instance) { initial_instance.the_hashes('key_b' => 'B') }
31
+
32
+ before { change2_instance }
33
+
34
+ it { expect(change1_instance.the_hashes).to eq({ 'key_a' => 'A' }) }
35
+ it { expect(change1_instance.the_hash('key_a')).to eq('A') }
36
+ it { expect(change1_instance.the_hash('key_b')).to be_nil }
37
+ it { expect(change2_instance.the_hashes).to eq({ 'key_b' => 'B' }) }
38
+ it { expect(change2_instance.the_hash('key_a')).to be_nil }
39
+ it { expect(change2_instance.the_hash('key_b')).to eq('B') }
40
+ end
41
+ end
42
+ 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.1
4
+ version: 0.55.3
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-01-21 00:00:00.000000000 Z
11
+ date: 2023-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.62'
19
+ version: '0.63'
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.62'
26
+ version: '0.63'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: avm-eac_asciidoctor_base0
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -189,6 +189,9 @@ dependencies:
189
189
  - - "~>"
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0.29'
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: 0.29.2
192
195
  type: :runtime
193
196
  prerelease: false
194
197
  version_requirements: !ruby/object:Gem::Requirement
@@ -196,6 +199,9 @@ dependencies:
196
199
  - - "~>"
197
200
  - !ruby/object:Gem::Version
198
201
  version: '0.29'
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: 0.29.2
199
205
  - !ruby/object:Gem::Dependency
200
206
  name: avm-eac_webapp_base0
201
207
  requirement: !ruby/object:Gem::Requirement
@@ -256,14 +262,14 @@ dependencies:
256
262
  requirements:
257
263
  - - "~>"
258
264
  - !ruby/object:Gem::Version
259
- version: '0.111'
265
+ version: '0.112'
260
266
  type: :runtime
261
267
  prerelease: false
262
268
  version_requirements: !ruby/object:Gem::Requirement
263
269
  requirements:
264
270
  - - "~>"
265
271
  - !ruby/object:Gem::Version
266
- version: '0.111'
272
+ version: '0.112'
267
273
  - !ruby/object:Gem::Dependency
268
274
  name: eac_ruby_gem_support
269
275
  requirement: !ruby/object:Gem::Requirement
@@ -665,6 +671,7 @@ files:
665
671
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rake.rb
666
672
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/rubygems.rb
667
673
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/update.rb
674
+ - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version.rb
668
675
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/base/version_bump.rb
669
676
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/bundle_update.rb
670
677
  - sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/namespace_replacer.rb
@@ -1191,6 +1198,7 @@ files:
1191
1198
  - sub/avm/lib/avm/sources/base/testing.rb
1192
1199
  - sub/avm/lib/avm/sources/base/update.rb
1193
1200
  - sub/avm/lib/avm/sources/base/update_sub.rb
1201
+ - sub/avm/lib/avm/sources/base/update_subs.rb
1194
1202
  - sub/avm/lib/avm/sources/base/version_bump.rb
1195
1203
  - sub/avm/lib/avm/sources/configuration.rb
1196
1204
  - sub/avm/lib/avm/sources/configuration/rubocop.rb
@@ -1200,6 +1208,7 @@ files:
1200
1208
  - sub/avm/lib/avm/sources/tests/performer.rb
1201
1209
  - sub/avm/lib/avm/sources/tests/result.rb
1202
1210
  - sub/avm/lib/avm/sources/tests/single.rb
1211
+ - sub/avm/lib/avm/sources/update_error.rb
1203
1212
  - sub/avm/lib/avm/sync.rb
1204
1213
  - sub/avm/lib/avm/version.rb
1205
1214
  - sub/avm/lib/avm/version_number.rb
@@ -1344,6 +1353,7 @@ files:
1344
1353
  - sub/eac_docker/lib/eac_docker/registry.rb
1345
1354
  - sub/eac_docker/lib/eac_docker/rspec.rb
1346
1355
  - sub/eac_docker/lib/eac_docker/rspec/setup.rb
1356
+ - sub/eac_docker/lib/eac_docker/rspec/stub_image.rb
1347
1357
  - sub/eac_docker/lib/eac_docker/version.rb
1348
1358
  - sub/eac_docker/spec/lib/eac_docker/executables_spec.rb
1349
1359
  - sub/eac_docker/spec/lib/eac_docker/images/coded_spec.rb
@@ -1825,7 +1835,8 @@ files:
1825
1835
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb
1826
1836
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/directory_spec.rb
1827
1837
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb
1828
- - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/immutable_spec.rb
1838
+ - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/immutable/array_accessor_spec.rb
1839
+ - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/immutable/hash_accessor_spec.rb
1829
1840
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb
1830
1841
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb
1831
1842
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb