squared 0.5.26 → 0.5.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b8f593f81759da39eb42e2644e8947ed5d7ce8ff45410507c4432384ec63cc2
4
- data.tar.gz: c914a1fec5afe22e057b48f7ec4e08107222fe68364a2dfa6124c94fa03946ef
3
+ metadata.gz: c5c24126ebda5ad3652471df73d84a2a9cfee4869aec8d9d51866f6187c5bc2c
4
+ data.tar.gz: 7dbd9b710b61222cd52feadcbf3a275452c0a0c7bcc780588442a79cb255c1c3
5
5
  SHA512:
6
- metadata.gz: 4a8812a2ebae08ff07d54bab680e234d06ecc466877b493d6e2e037b0154e7350a9e77fdf2ab8a2227d2c8ddc9de1ca51f20a2ee2ef2c75e9db6314b0ab53c52
7
- data.tar.gz: 0be6c80075ba5e49b92d09660fd8a6ac4c595d9eec7cf577c81ac55162042aac55f0b2b127d4a792dac819181e7f0ef69cf8501b95eb4848901e2d07d4aba4e6
6
+ metadata.gz: 4bac4146c0083dc1783ae55e87026c1bdd4c3f8eb93f9e3adf0ce3cb8c2967ff96808972daa66c3bdbecb2dc59f83c7739ba03297f6e4b17b77bfd18dc249ae2
7
+ data.tar.gz: '044758d7290a4487c4db1f7beb0aeb3a1597e6f0b25b1f7e64fc148ca864cfc2dad30aa661ce0eba5bc7cb004b0088cf963367bb19e2abe983dbc4b9c9cf8c72'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.27] - 2026-09-23
4
+
5
+ ### Fixed
6
+
7
+ - See `0.4.42`.
8
+
9
+ ## [0.4.42] - 2026-09-23
10
+
11
+ ### Fixed
12
+
13
+ - OptionPartition did not strip pre-existing quotes when parsing options.
14
+ - Node command outdated did not strip styling from semver in package.json.
15
+ - Git command show did not recognize object names.
16
+ - Docker destination mounts that are not absolute are treated as errors.
17
+ - Docker source mounts for any named volumes or images were inoperable.
18
+
3
19
  ## [0.5.26] - 2026-09-04
4
20
 
5
21
  ### Fixed
@@ -1460,6 +1476,7 @@
1460
1476
 
1461
1477
  - Changelog was created.
1462
1478
 
1479
+ [0.5.27]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.27
1463
1480
  [0.5.26]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.26
1464
1481
  [0.5.25]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.25
1465
1482
  [0.5.24]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.24
@@ -1487,6 +1504,7 @@
1487
1504
  [0.5.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.2-ruby
1488
1505
  [0.5.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.1-ruby
1489
1506
  [0.5.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.0-ruby
1507
+ [0.4.42]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.42
1490
1508
  [0.4.41]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.41
1491
1509
  [0.4.40]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.40
1492
1510
  [0.4.39]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.39
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Squared
4
- VERSION = '0.5.26'
4
+ VERSION = '0.5.27'
5
5
  end
@@ -16,11 +16,11 @@ module Squared
16
16
  cgroup-parent=b iidfile=p label=q network=b no-cache-filter=b o|output=q platform=q
17
17
  q|quiet secret=qq shm-size=b ssh=qq t|tag=b target=b ulimit=q].freeze,
18
18
  bake: %w[print list=q set=q].freeze,
19
- shared: %w[check load no-cache pull push allow=q call=b? f|file=p metadata-file=p progress=b provenance=q
20
- sbom=q].freeze
19
+ shared: %w[check load no-cache pull push allow=qq call=b? f|file=p metadata-file=p progress=b provenance=b?
20
+ sbom=b?].freeze
21
21
  }.freeze,
22
22
  compose: {
23
- common: %w[all-resources compatibility dry-run ansi=b env-file=p f|file=p parallel=n profile=b progress=b
23
+ common: %w[1 all-resources compatibility dry-run ansi=b env-file=p f|file=p parallel=n profile=b progress=b
24
24
  project-directory=p p|project-name=b].freeze,
25
25
  build: %w[check no-cache print pull push with-dependencies q|quiet build-arg=qq builder=b m|memory=b
26
26
  provenance=q sbom=q ssh=qq].freeze,
@@ -77,10 +77,10 @@ module Squared
77
77
  VAL_DOCKER = {
78
78
  run: {
79
79
  common: %w[source src destination dst target readonly ro].freeze,
80
- bind: %w[bind-propagation].freeze,
80
+ bind: %w[bind-create-src bind-propagation].freeze,
81
81
  volume: %w[volume-subpath volume-nocopy volume-opt].freeze,
82
82
  tmpfs: %w[tmpfs-size tmpfs-mode].freeze,
83
- image: %w[image-path].freeze
83
+ image: %w[image-subpath].freeze
84
84
  }.freeze
85
85
  }.freeze
86
86
  private_constant :COMPOSEFILE, :BAKEFILE, :OPT_DOCKER, :VAL_DOCKER
@@ -400,20 +400,30 @@ module Squared
400
400
  end
401
401
  end
402
402
  case k
403
- when 'readonly', 'ro'
404
- args << k
403
+ when 'readonly', 'ro', 'volume-nocopy', 'bind-create-src'
404
+ args << k if %w[bind volume].include?(type)
405
405
  next
406
- when 'source', 'src', 'destination', 'dst', 'target', 'volume-subpath', 'image-path'
407
- v = basepath v
406
+ when 'source', 'src', 'destination', 'dst', 'target', 'volume-subpath', 'image-subpath'
407
+ raise_error ArgumentError, "no path value: #{k}", hint: flag unless v
408
+ case k
409
+ when 'source', 'src'
410
+ if type == 'bind'
411
+ v = basepath v
412
+ elsif type == 'tmpfs'
413
+ next
414
+ end
415
+ when 'destination', 'dst', 'target'
416
+ puts log_message("path is not absolute: #{v}", subject: from, hint: k) unless v.start_with?('/')
417
+ end
408
418
  v = shell_quote(v, option: false, force: false) if q == ''
409
419
  end
410
420
  args << "#{k}=#{q + v + q}"
411
421
  elsif verbose
412
- log_message(Logger::INFO, 'unrecognized option', subject: from, hint: k)
422
+ puts log_message(Logger::INFO, 'unrecognized option', subject: from, hint: k)
413
423
  end
414
424
  end
415
425
  raise_error('missing type', hint: flag) unless type
416
- cmd << "--mount type=#{type},#{args.join(',')}"
426
+ op << "--mount type=#{type},#{args.join(',')}"
417
427
  end
418
428
  end
419
429
  append_command(flag, id || tagmain, op.extras)
@@ -422,7 +432,7 @@ module Squared
422
432
  op.append(escape: true, strip: /^:/)
423
433
  when :commit
424
434
  latest = op.shift || tagmain
425
- cmd << id << latest
435
+ op << id << latest
426
436
  raise_error("unknown args: #{op.join(', ')}", hint: flag) unless op.empty?
427
437
  return unless confirm_command(cmd.to_s, title: from, target: id, as: latest)
428
438
 
@@ -1673,7 +1673,7 @@ module Squared
1673
1673
  cmd << '--textconv'
1674
1674
  append_value(files.flat_map { |val| Dir[val] }
1675
1675
  .select { |val| projectpath?(val) }
1676
- .map! { |val| shell_quote("HEAD:#{val}") })
1676
+ .map! { |val| "HEAD:#{val}" })
1677
1677
  source(banner: false)
1678
1678
  return
1679
1679
  when :oneline
@@ -1687,10 +1687,11 @@ module Squared
1687
1687
  else
1688
1688
  opts << format if format
1689
1689
  end
1690
- op = OptionPartition.new(opts, OPT_GIT[:show] + OPT_GIT[:diff][:show] + OPT_GIT[:log][:diff], cmd,
1690
+ list = OPT_GIT[:show] + OPT_GIT[:diff][:show] + collect_hash(OPT_GIT[:log], pass: [:base])
1691
+ op = OptionPartition.new(opts, list, cmd,
1691
1692
  project: self,
1692
1693
  no: OPT_GIT[:no][:show] + collect_hash(OPT_GIT[:no][:log], pass: [:base]))
1693
- op.append(delim: true)
1694
+ op.append
1694
1695
  source(exception: false, banner: flag != :oneline)
1695
1696
  end
1696
1697
 
@@ -611,7 +611,7 @@ module Squared
611
611
  capture
612
612
  else
613
613
  modified += 1
614
- "#{$1}\"#{$2 || (d == 1 && e ? '^' : '')}#{c}\""
614
+ "#{$1}\"#{$2 || (d == 1 && e ? '^' : '')}#{strip_style(c)}\""
615
615
  end
616
616
  end
617
617
  end
@@ -274,23 +274,27 @@ module Squared
274
274
  if opt =~ OPT_VALUE
275
275
  key = $1
276
276
  val = $2
277
+ if val =~ /\A(["'])(.+)\1\z/
278
+ val = $2
279
+ double = $1 == '"'
280
+ end
277
281
  merge = m.include?(key)
278
282
  if e.include?(key)
279
- add shell_option(key, val, merge: merge)
283
+ add shell_option(key, val, double: double, merge: merge)
280
284
  elsif q.include?(key)
281
- add quote_option(key, val, double: qq.include?(key), merge: merge)
285
+ add quote_option(key, val, double: double || qq.include?(key), merge: merge)
282
286
  elsif p.include?(key)
283
- if val =~ /\A(["']).+\1\z/
284
- add shell_option(key, val, double: $1 == '"', escape: false, merge: merge)
287
+ if !double.nil?
288
+ add shell_option(key, val, double: double, merge: merge, escape: false)
285
289
  elsif path
286
290
  add quote_option(key, path + val, merge: merge)
287
291
  else
288
292
  push opt
289
293
  end
290
294
  elsif b.include?(key) || (bl.include?(key) && %w[true false].include?(val)) || numcheck.call(key, val)
291
- add basic_option(key, val, merge: merge)
295
+ add basic_option(key, val, double: double, merge: merge)
292
296
  elsif merge
293
- add basic_option(key, val, merge: true)
297
+ add basic_option(key, val, double: double, merge: true)
294
298
  else
295
299
  push opt
296
300
  end
@@ -236,7 +236,7 @@ module Squared
236
236
 
237
237
  def repo_run(cmd, exception: false)
238
238
  puts log_message(Logger::INFO, cmd, subject: main, hint: root) if verbose
239
- Common::System.shell(cmd, chdir: root, exception: exception)
239
+ Common::System.shell(cmd, chdir: root, exception: exception || %w[1 true].include?(env('REPO_FAIL')))
240
240
  end
241
241
 
242
242
  def repo_bin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.26
4
+ version: 0.5.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - An Pham
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubygems_version: 4.0.19
127
+ rubygems_version: 4.0.21
128
128
  specification_version: 4
129
129
  summary: Rake task generator for managing multi-language workspaces.
130
130
  test_files: []