squared 0.7.11 → 0.7.12

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: b2815cc0583f2f21107460840d1e73cbb74b7013d77c9f1ae65e6b4cd72bfe07
4
- data.tar.gz: c321afc376c0b219967d6318650143588099f0d734461c470970919bc03cf00b
3
+ metadata.gz: a1f82d48ab79c1dc869f6c34dbef07e57c7b1bd9cc0ce8b54582d2029d5e9889
4
+ data.tar.gz: 55526a1592b3b6ef2aec992288fd74b7772837abc733d4eb6dc69f9e7a208cc6
5
5
  SHA512:
6
- metadata.gz: 76adacb4694911e5b587c0f9871d8adc8cab9770cf9173d82452d58ad142e171b2a284f93f35769869b42a43f374e005daa595a6698537c07b74847a46e99df2
7
- data.tar.gz: 92f875447ab1969fb3374a686ec5766e0980f6536fa3859737d16207e763f6e68db07ad350419b85d53846e65e3f87aed29546eb182066ab27be9bd09f4f34cc
6
+ metadata.gz: 4b60c4bd1db9d601b87ae2e686c3d7ec2190cf766307186a682e10f0e200e5e5280196a7eb55d3c9821707189e9953b6ba1a76c2757ad1f10fec3c96e0d88a83
7
+ data.tar.gz: b4527aff9694bf17460b65f0395d30147faaf5ccaee9042ac47e5d81d5f988470ff8e878e20f6a8dc22c39d7bcc166e15e953443a0785d46a71c5cb2aece8871
data/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.12] - 2026-09-23
4
+
5
+ ### Fixed
6
+
7
+ - See `0.4.42`.
8
+
9
+ ## [0.6.19]
10
+
11
+ ### Fixed
12
+
13
+ - See `0.4.42`.
14
+
15
+ ## [0.5.27]
16
+
17
+ ### Fixed
18
+
19
+ - See `0.4.42`.
20
+
21
+ ## [0.4.42]
22
+
23
+ ### Fixed
24
+
25
+ - OptionPartition did not strip pre-existing quotes when parsing options.
26
+ - Node command outdated did not strip styling from semver in package.json.
27
+ - Git command show did not recognize object names.
28
+ - Docker destination mounts that are not absolute are treated as errors.
29
+ - Docker source mounts for any named volumes or images were inoperable.
30
+
3
31
  ## [0.7.11] - 2026-09-04
4
32
 
5
33
  ### Added
@@ -19,7 +47,6 @@
19
47
  ### Fixed
20
48
 
21
49
  - Git action grep did not recognize format and max-count.
22
- - Node command nvm did not quote executable path.
23
50
 
24
51
  ## [0.5.26]
25
52
 
@@ -1991,6 +2018,7 @@
1991
2018
 
1992
2019
  - Changelog was created.
1993
2020
 
2021
+ [0.7.12]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.12
1994
2022
  [0.7.11]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.11
1995
2023
  [0.7.10]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.10
1996
2024
  [0.7.9]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.9
@@ -2003,6 +2031,7 @@
2003
2031
  [0.7.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.2
2004
2032
  [0.7.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.1
2005
2033
  [0.7.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.0
2034
+ [0.6.19]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.19
2006
2035
  [0.6.18]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.18
2007
2036
  [0.6.17]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.17
2008
2037
  [0.6.16]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.16
@@ -2022,6 +2051,7 @@
2022
2051
  [0.6.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.2
2023
2052
  [0.6.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.1
2024
2053
  [0.6.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.0
2054
+ [0.5.27]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.27
2025
2055
  [0.5.26]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.26
2026
2056
  [0.5.25]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.25
2027
2057
  [0.5.24]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.24
@@ -2049,6 +2079,7 @@
2049
2079
  [0.5.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.2-ruby
2050
2080
  [0.5.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.1-ruby
2051
2081
  [0.5.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.0-ruby
2082
+ [0.4.42]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.42
2052
2083
  [0.4.41]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.41
2053
2084
  [0.4.40]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.40
2054
2085
  [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.7.11'
4
+ VERSION = '0.7.12'
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 ansi=b compatibility dry-run 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,
@@ -82,10 +82,10 @@ module Squared
82
82
  VAL_DOCKER = {
83
83
  run: {
84
84
  common: %w[source src destination dst target readonly ro].freeze,
85
- bind: %w[bind-propagation].freeze,
85
+ bind: %w[bind-create-src bind-propagation].freeze,
86
86
  volume: %w[volume-subpath volume-nocopy volume-opt].freeze,
87
87
  tmpfs: %w[tmpfs-size tmpfs-mode].freeze,
88
- image: %w[image-path].freeze
88
+ image: %w[image-subpath].freeze
89
89
  }.freeze,
90
90
  ls: {
91
91
  compose: %w[Name Image Command Service RunningFor Status Ports CreatedAt ExitCode Health ID Labels
@@ -527,21 +527,33 @@ module Squared
527
527
  end
528
528
  end
529
529
  case k
530
- when 'readonly', 'ro'
531
- out << k
530
+ when 'readonly', 'ro', 'volume-nocopy', 'bind-create-src'
531
+ out << k if %w[bind volume].include?(type)
532
532
  next
533
- when 'source', 'src', 'destination', 'dst', 'target', 'volume-subpath', 'image-path'
534
- raise_error ArgumentError, "#{k}: no path value", hint: flag unless v
535
- v = basepath v
533
+ when 'source', 'src', 'destination', 'dst', 'target', 'volume-subpath', 'image-subpath'
534
+ raise_error ArgumentError, "no path value: #{k}", hint: flag unless v
535
+ case k
536
+ when 'source', 'src'
537
+ if type == 'bind'
538
+ v = basepath v
539
+ elsif type == 'tmpfs'
540
+ next
541
+ end
542
+ when 'destination', 'dst', 'target'
543
+ unless v.start_with?('/')
544
+ print_error(Logger::ERROR, "path is not absolute: #{v}", subject: from, hint: k)
545
+ next
546
+ end
547
+ end
536
548
  v = shell_quote(v, option: false, force: false) if q == ''
537
549
  end
538
550
  out << "#{k}=#{q}#{v}#{q}"
539
551
  elsif !silent?
540
- log_message('unrecognized option', subject: from, hint: k)
552
+ puts log_message('unrecognized option', subject: from, hint: k)
541
553
  end
542
554
  end
543
555
  raise_error TypeError, 'none specified', hint: flag unless type
544
- cmd << "--mount type=#{type},#{args.join(',')}"
556
+ op << "--mount type=#{type},#{args.join(',')}"
545
557
  end
546
558
  end
547
559
  append_command(flag, id || tagmain, op.extras)
@@ -550,7 +562,7 @@ module Squared
550
562
  op.append(escape: true, strip: /^:/)
551
563
  when :commit
552
564
  latest = op.shift || tagmain
553
- cmd << id << latest
565
+ op << id << latest
554
566
  raise_error ArgumentError, "unrecognized args: #{op.join(', ')}", hint: flag unless op.empty?
555
567
  return unless confirm_command(cmd.to_s, title: from, target: id, as: latest)
556
568
 
@@ -571,7 +583,7 @@ module Squared
571
583
  else
572
584
  if op.empty?
573
585
  ps, status, no = filter_ps flag, from
574
- cmd << '--no-stream' if flag == :stats
586
+ op << '--no-stream' if flag == :stats
575
587
  list_image(flag, ps, no: no, hint: status, from: from) { |img| run(cmd.temp(img), from: from) }
576
588
  return
577
589
  end
@@ -644,7 +656,7 @@ module Squared
644
656
  registry = op.shift
645
657
  registry ||= option('registry') || @registry unless id.include?('/')
646
658
  end
647
- cmd << shell_quote(tagjoin(registry, id))
659
+ op << shell_quote(tagjoin(registry, id))
648
660
  when :push
649
661
  id ||= option('tag', ignore: false) || op.shift || tagmain
650
662
  registry ||= option('registry') || op.shift || @registry
@@ -1821,7 +1821,7 @@ module Squared
1821
1821
  cmd << '--textconv'
1822
1822
  append_value(files.flat_map { |val| Dir[val] }
1823
1823
  .select { |val| projectpath?(val) }
1824
- .map { |val| shell_quote("HEAD:#{val}") })
1824
+ .map { |val| "HEAD:#{val}" })
1825
1825
  source(banner: false)
1826
1826
  return
1827
1827
  when :oneline
@@ -1835,11 +1835,11 @@ module Squared
1835
1835
  else
1836
1836
  opts << format if format
1837
1837
  end
1838
- list = OPT_GIT[:show] + OPT_GIT[:diff][:show] + OPT_GIT[:log][:diff] + OPT_GIT[:log][:diff_context]
1838
+ list = OPT_GIT[:show] + OPT_GIT[:diff][:show] + collect_hash(OPT_GIT[:log], pass: [:base])
1839
1839
  op = OptionPartition.new(opts, list, cmd,
1840
1840
  project: self, strict: strict?,
1841
1841
  no: OPT_GIT[:no][:show] + collect_hash(OPT_GIT[:no][:log], pass: [:base]))
1842
- op.append(delim: true)
1842
+ op.append
1843
1843
  source(exception: false, banner: flag != :oneline)
1844
1844
  end
1845
1845
 
@@ -1915,8 +1915,7 @@ module Squared
1915
1915
  when :'sparse-checkout'
1916
1916
  cmd << 'set'
1917
1917
  end
1918
- op = OptionPartition.new(opts, list, cmd, project: self, strict: strict?,
1919
- no: OPT_GIT[:no][flag], single: /\A\d+\z/,
1918
+ op = OptionPartition.new(opts, list, cmd, project: self, strict: strict?, no: OPT_GIT[:no][flag],
1920
1919
  first: case flag
1921
1920
  when :blame, :revert, :'sparse-checkout' then nil
1922
1921
  else matchpathspec
@@ -859,17 +859,17 @@ module Squared
859
859
  end
860
860
  a = a.ljust(col1)
861
861
  b = b.ljust(col2)
862
- sub_style! b, theme[:current] if theme[:current] && !stdin?
862
+ b = sub_style b, theme[:current] if theme[:current] && !stdin?
863
863
  if cur == -1
864
864
  c = 'SKIP'
865
865
  elsif modified == cur
866
866
  c = 'FAIL'
867
867
  elsif !stdin?
868
868
  if d == 1
869
- sub_style! a, theme[:major]
870
- sub_style! c, :bold, color(:green)
869
+ a = sub_style a, theme[:major]
870
+ c = sub_style c, :bold, color(:green)
871
871
  else
872
- sub_style!(c, **opt_style(color(d == 3 ? :green : :yellow), SEM_VER, d))
872
+ c = sub_style(c, **opt_style(color(d == 3 ? :green : :yellow), SEM_VER, d))
873
873
  end
874
874
  g = item
875
875
  end
@@ -942,8 +942,8 @@ module Squared
942
942
  b = sub_style b.ljust(col2), color(d ? :red : :yellow)
943
943
  c = c.ljust(col3)
944
944
  unless d
945
- sub_style! a, theme[:active]
946
- sub_style! c, color(:green)
945
+ a = sub_style a, theme[:active]
946
+ c = sub_style c, color(:green)
947
947
  pending += 1
948
948
  end
949
949
  puts "#{pad.call(i, avail)}. #{(a + c + b).subhint(d ? 'locked' : 'latest')}"
@@ -364,6 +364,10 @@ module Squared
364
364
  if opt =~ OPT_VALUE
365
365
  key = $1
366
366
  val = $2
367
+ if val =~ /\A(["'])(.+)\1\z/
368
+ val = $2
369
+ double = $1 == '"'
370
+ end
367
371
  has = lambda do |a|
368
372
  return true if a.include?(key)
369
373
  return false unless (k = a.find { |s| s.end_with?(':*') })
@@ -371,13 +375,15 @@ module Squared
371
375
  key.start_with?(k.chomp('*')) && !key.end_with?(':')
372
376
  end
373
377
  kwargs = { sep: se[key] || sep, merge: has.call(m), switch: sw[key] }
378
+ kwargs[:double] = double unless double.nil?
374
379
  if has.call(e) || (has.call(bl) && %w[true false].include?(val))
375
380
  add shell_option(key, val, **kwargs)
376
381
  elsif has.call(q)
377
- add quote_option(key, val, double: has.call(qq), **kwargs)
382
+ kwargs[:double] = true if has.call(qq, key)
383
+ add quote_option(key, val, **kwargs)
378
384
  elsif has.call(p)
379
- if val =~ /\A(["']).+\1\z/
380
- add shell_option(key, val, double: $1 == '"', escape: false, **kwargs)
385
+ if !double.nil?
386
+ add shell_option(key, val, escape: false, **kwargs)
381
387
  elsif path
382
388
  add quote_option(key, path + val, **kwargs)
383
389
  else
@@ -280,7 +280,7 @@ module Squared
280
280
  env('REPO_OPTIONS', **kwargs) { |val| cmd << val } if options
281
281
  cmd = cmd.join(' ')
282
282
  puts log_message(cmd, subject: main, hint: root) if verbose
283
- Common::System.shell(cmd, chdir: root, exception: exception)
283
+ Common::System.shell(cmd, chdir: root, exception: exception || env('REPO_FAIL', equals: %w[1 true]))
284
284
  end
285
285
 
286
286
  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.7.11
4
+ version: 0.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - An Pham
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 4.0.19
128
+ rubygems_version: 4.0.21
129
129
  specification_version: 4
130
130
  summary: Rake task generator for managing multi-language workspaces.
131
131
  test_files: []