eac_tools 0.55.0 → 0.55.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +50 -60
  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-eac_ruby_base1/avm-eac_ruby_base1.gemspec +3 -2
  10. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/launcher_stereotypes/base/publish.rb +2 -0
  11. data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
  12. data/sub/avm-tools/avm-tools.gemspec +1 -1
  13. data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
  14. data/sub/eac_cli/eac_cli.gemspec +1 -1
  15. data/sub/eac_cli/lib/eac_cli/runner_with_set.rb +2 -0
  16. data/sub/eac_cli/lib/eac_cli/version.rb +1 -1
  17. data/sub/eac_docker/eac_docker.gemspec +1 -1
  18. data/sub/eac_docker/lib/eac_docker/container.rb +5 -0
  19. data/sub/eac_docker/lib/eac_docker/rspec/stub_image.rb +40 -0
  20. data/sub/eac_docker/lib/eac_docker/version.rb +1 -1
  21. data/sub/eac_ruby_base0/eac_ruby_base0.gemspec +4 -4
  22. data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner/prepend.rb +26 -0
  23. data/sub/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +2 -10
  24. data/sub/eac_ruby_base0/lib/eac_ruby_base0/version.rb +1 -1
  25. data/sub/eac_ruby_utils/lib/eac_ruby_utils/immutable/hash_accessor.rb +23 -12
  26. data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
  27. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/{immutable_spec.rb → immutable/array_accessor_spec.rb} +4 -3
  28. data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/immutable/hash_accessor_spec.rb +42 -0
  29. metadata +20 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae856818c701f2192ec09610cac0d471e150e435c7700028e93f2b3e511e49f5
4
- data.tar.gz: 9214f069183c0b48d954c883e3a1f2e0f59d7a3227c1089b4315c70464a9028f
3
+ metadata.gz: f422d1a69e178f4f0643f72beb0c158f48c2ded6e611953f7c2ee64c8c23aad2
4
+ data.tar.gz: 33310a5babdc387e1087e5b32a3b40eb9ddc551dd9be0fa1109874debd509029
5
5
  SHA512:
6
- metadata.gz: b0b1c879ce8f91b853f1677f217c2e4c89f63a63de8a3525e9ce422a47a819a94cd83aee66d4edbc8d8a8ada4b7f153098eb2f365bd4a5e3e304d6bc7c4a1f45
7
- data.tar.gz: 4b8ec43cea4942df3538d83fa40627d53e668066d6961d4b3bf1a26c2f2a0922890b3d846f56e501d64c0fb81e1e11e727b6f347a613886d442c52fcedd399c8
6
+ metadata.gz: 2ebc2f2627a4c1d3b36c8149fb9689ba453d4d83e35de12dfb6bd0725b87c8468446c3ed7f20753f60e914910b53ca06e881ff3fbd7eb4514b962632f12a34ab
7
+ data.tar.gz: ee550bf4b5ccc5c7996a2e816f24a5fe7861e47a2c8c23e2f86c6c455b64651d3de8190b8b0ce6d3ccf1b570a517e5d1af7d3611a7303242872d65b342604985
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eac_tools (0.55.0)
4
+ eac_tools (0.55.2)
5
5
  avm (~> 0.62)
6
6
  avm-eac_asciidoctor_base0 (~> 0.15)
7
7
  avm-eac_generic_base0 (~> 0.10)
@@ -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.1)
17
17
  avm-eac_webapp_base0 (~> 0.13, >= 0.13.1)
18
18
  avm-eac_wordpress_base0 (~> 0.3)
19
- avm-tools (~> 0.145)
20
- eac_ruby_utils (~> 0.111)
19
+ avm-tools (~> 0.145, >= 0.145.1)
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.1)
123
+ aranha-parsers (~> 0.16)
124
+ avm (~> 0.62)
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
@@ -173,7 +175,7 @@ PATH
173
175
  PATH
174
176
  remote: sub/avm-tools
175
177
  specs:
176
- avm-tools (0.145.0)
178
+ avm-tools (0.145.1)
177
179
  aranha-parsers (~> 0.14, >= 0.14.4)
178
180
  avm (~> 0.62)
179
181
  avm-eac_ruby_base1 (~> 0.29)
@@ -183,7 +185,7 @@ PATH
183
185
  clipboard (~> 1.3, >= 1.3.6)
184
186
  curb (~> 0.9, >= 0.9.11)
185
187
  eac_git (~> 0.14)
186
- eac_ruby_base0 (~> 0.17, >= 0.17.1)
188
+ eac_ruby_base0 (~> 0.17, >= 0.17.2)
187
189
  eac_templates (~> 0.3, >= 0.3.2)
188
190
  git (~> 1.13, >= 1.13.1)
189
191
  ruby-progressbar (~> 1.11)
@@ -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.1)
248
- avm-eac_ruby_base1 (~> 0.27, >= 0.27.1)
249
- eac_cli (~> 0.30)
250
- eac_fs (~> 0.15)
251
- eac_ruby_utils (~> 0.107, >= 0.107.1)
249
+ eac_ruby_base0 (0.17.3)
250
+ avm-eac_ruby_base1 (~> 0.29)
251
+ eac_cli (~> 0.30, >= 0.30.1)
252
+ eac_fs (~> 0.16)
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.4.2)
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.0'
4
+ VERSION = '0.55.2'
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
@@ -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.62'
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRubyBase1
5
- VERSION = '0.29.0'
5
+ VERSION = '0.29.1'
6
6
  end
7
7
  end
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.add_dependency 'clipboard', '~> 1.3', '>= 1.3.6'
24
24
  s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
25
25
  s.add_dependency 'eac_git', '~> 0.14'
26
- s.add_dependency 'eac_ruby_base0', '~> 0.17', '>= 0.17.1'
26
+ s.add_dependency 'eac_ruby_base0', '~> 0.17', '>= 0.17.2'
27
27
  s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.2'
28
28
  s.add_dependency 'git', '~> 1.13', '>= 1.13.1'
29
29
  s.add_dependency 'ruby-progressbar', '~> 1.11'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.145.0'
5
+ VERSION = '0.145.1'
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
@@ -12,10 +12,10 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.files = Dir['{lib}/**/*']
14
14
 
15
- s.add_dependency 'avm-eac_ruby_base1', '~> 0.27', '>= 0.27.1'
16
- s.add_dependency 'eac_cli', '~> 0.30'
17
- s.add_dependency 'eac_fs', '~> 0.15'
18
- s.add_dependency 'eac_ruby_utils', '~> 0.107', '>= 0.107.1'
15
+ s.add_dependency 'avm-eac_ruby_base1', '~> 0.29'
16
+ s.add_dependency 'eac_cli', '~> 0.30', '>= 0.30.1'
17
+ s.add_dependency 'eac_fs', '~> 0.16'
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
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/core_ext'
4
+ require 'eac_cli/speaker'
5
+ require 'eac_cli/speaker/input_blocked'
6
+ require 'eac_config/node'
7
+ require 'eac_fs/contexts'
8
+ require 'eac_ruby_utils/speaker'
9
+
10
+ module EacRubyBase0
11
+ module Runner
12
+ module Prepend
13
+ def run
14
+ if parsed.version?
15
+ show_version
16
+ else
17
+ run_with_subcommand
18
+ end
19
+ end
20
+
21
+ def run_run
22
+ on_context { super }
23
+ end
24
+ end
25
+ end
26
+ end
@@ -9,10 +9,12 @@ require 'eac_ruby_utils/speaker'
9
9
 
10
10
  module EacRubyBase0
11
11
  module Runner
12
+ require_sub __FILE__
12
13
  enable_speaker
13
14
  common_concern do
14
15
  include ::EacCli::RunnerWith::Help
15
16
  include ::EacCli::RunnerWith::Subcommands
17
+ prepend ::EacRubyBase0::Runner::Prepend
16
18
  runner_definition do
17
19
  bool_opt '-q', '--quiet', 'Quiet mode.'
18
20
  bool_opt '-I', '--no-input', 'Fail if a input is requested.'
@@ -23,16 +25,6 @@ module EacRubyBase0
23
25
  end
24
26
  end
25
27
 
26
- def run
27
- on_context do
28
- if parsed.version?
29
- show_version
30
- else
31
- run_with_subcommand
32
- end
33
- end
34
- end
35
-
36
28
  def application_version
37
29
  runner_context.call(:application).version.to_s
38
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyBase0
4
- VERSION = '0.17.1'
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.0
4
+ version: 0.55.2
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-20 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
@@ -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.1
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.1
199
205
  - !ruby/object:Gem::Dependency
200
206
  name: avm-eac_webapp_base0
201
207
  requirement: !ruby/object:Gem::Requirement
@@ -237,6 +243,9 @@ dependencies:
237
243
  - - "~>"
238
244
  - !ruby/object:Gem::Version
239
245
  version: '0.145'
246
+ - - ">="
247
+ - !ruby/object:Gem::Version
248
+ version: 0.145.1
240
249
  type: :runtime
241
250
  prerelease: false
242
251
  version_requirements: !ruby/object:Gem::Requirement
@@ -244,20 +253,23 @@ dependencies:
244
253
  - - "~>"
245
254
  - !ruby/object:Gem::Version
246
255
  version: '0.145'
256
+ - - ">="
257
+ - !ruby/object:Gem::Version
258
+ version: 0.145.1
247
259
  - !ruby/object:Gem::Dependency
248
260
  name: eac_ruby_utils
249
261
  requirement: !ruby/object:Gem::Requirement
250
262
  requirements:
251
263
  - - "~>"
252
264
  - !ruby/object:Gem::Version
253
- version: '0.111'
265
+ version: '0.112'
254
266
  type: :runtime
255
267
  prerelease: false
256
268
  version_requirements: !ruby/object:Gem::Requirement
257
269
  requirements:
258
270
  - - "~>"
259
271
  - !ruby/object:Gem::Version
260
- version: '0.111'
272
+ version: '0.112'
261
273
  - !ruby/object:Gem::Dependency
262
274
  name: eac_ruby_gem_support
263
275
  requirement: !ruby/object:Gem::Requirement
@@ -1338,6 +1350,7 @@ files:
1338
1350
  - sub/eac_docker/lib/eac_docker/registry.rb
1339
1351
  - sub/eac_docker/lib/eac_docker/rspec.rb
1340
1352
  - sub/eac_docker/lib/eac_docker/rspec/setup.rb
1353
+ - sub/eac_docker/lib/eac_docker/rspec/stub_image.rb
1341
1354
  - sub/eac_docker/lib/eac_docker/version.rb
1342
1355
  - sub/eac_docker/spec/lib/eac_docker/executables_spec.rb
1343
1356
  - sub/eac_docker/spec/lib/eac_docker/images/coded_spec.rb
@@ -1610,6 +1623,7 @@ files:
1610
1623
  - sub/eac_ruby_base0/lib/eac_ruby_base0/rspec.rb
1611
1624
  - sub/eac_ruby_base0/lib/eac_ruby_base0/rspec/setup.rb
1612
1625
  - sub/eac_ruby_base0/lib/eac_ruby_base0/runner.rb
1626
+ - sub/eac_ruby_base0/lib/eac_ruby_base0/runner/prepend.rb
1613
1627
  - sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb
1614
1628
  - sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmation.rb
1615
1629
  - sub/eac_ruby_base0/lib/eac_ruby_base0/runner_with/input.rb
@@ -1818,7 +1832,8 @@ files:
1818
1832
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/extname_spec.rb
1819
1833
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp/directory_spec.rb
1820
1834
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/fs/temp_spec.rb
1821
- - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/immutable_spec.rb
1835
+ - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/immutable/array_accessor_spec.rb
1836
+ - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/immutable/hash_accessor_spec.rb
1822
1837
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb
1823
1838
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/listable_spec.rb
1824
1839
  - sub/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb