squared 0.7.11 → 0.7.13
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 +4 -4
- data/CHANGELOG.md +50 -1
- data/lib/squared/common/prompt.rb +3 -1
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/project/docker.rb +27 -15
- data/lib/squared/workspace/project/git.rb +6 -7
- data/lib/squared/workspace/project/node.rb +6 -6
- data/lib/squared/workspace/project/support/optionpartition.rb +9 -3
- data/lib/squared/workspace/repo.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 493f110582768ad2833f1a7a9f873cc5efd129866bf9acd4576b745bbfb6569a
|
|
4
|
+
data.tar.gz: 0bcd73d87fa78c2aea93b73bbbef7443fbcac9d4401414c4c62c19813709906a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e0f39d08c1481ce320e263ebd17127616d3056bc96d720a55f68a0a279f70babb88f52366a481d12348ce7884b69642db88d4d1b1d6b82907b326f528942579f
|
|
7
|
+
data.tar.gz: 0623ff277e624a6e553b2ff3879b48868ab450e7cff1eee030ab06dc09c982dc01e7e18ca9b33d8f2f6a596f0a3c8e2815624426a1399bcc2149081e03a82aef
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.13] - 2026-09-25
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- OptionPartition did not parse quoted option values.
|
|
8
|
+
|
|
9
|
+
## [0.6.20] - 2026-09-25
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Prompt choice optional selection can be bypassed with a single dash.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Git interactive commit selection did not accept additional values.
|
|
18
|
+
|
|
19
|
+
## [0.7.12] - 2026-09-23
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- See `0.4.42`.
|
|
24
|
+
|
|
25
|
+
## [0.6.19]
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- See `0.4.42`.
|
|
30
|
+
|
|
31
|
+
## [0.5.27]
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- See `0.4.42`.
|
|
36
|
+
|
|
37
|
+
## [0.4.42]
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- OptionPartition did not strip pre-existing quotes when parsing options.
|
|
42
|
+
- Node command outdated did not strip styling from semver in package.json.
|
|
43
|
+
- Git command show did not recognize object names.
|
|
44
|
+
- Docker destination mounts that are not absolute are treated as errors.
|
|
45
|
+
- Docker source mounts for any named volumes or images were inoperable.
|
|
46
|
+
|
|
3
47
|
## [0.7.11] - 2026-09-04
|
|
4
48
|
|
|
5
49
|
### Added
|
|
@@ -19,7 +63,6 @@
|
|
|
19
63
|
### Fixed
|
|
20
64
|
|
|
21
65
|
- Git action grep did not recognize format and max-count.
|
|
22
|
-
- Node command nvm did not quote executable path.
|
|
23
66
|
|
|
24
67
|
## [0.5.26]
|
|
25
68
|
|
|
@@ -1991,6 +2034,8 @@
|
|
|
1991
2034
|
|
|
1992
2035
|
- Changelog was created.
|
|
1993
2036
|
|
|
2037
|
+
[0.7.13]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.13
|
|
2038
|
+
[0.7.12]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.12
|
|
1994
2039
|
[0.7.11]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.11
|
|
1995
2040
|
[0.7.10]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.10
|
|
1996
2041
|
[0.7.9]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.9
|
|
@@ -2003,6 +2048,8 @@
|
|
|
2003
2048
|
[0.7.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.2
|
|
2004
2049
|
[0.7.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.1
|
|
2005
2050
|
[0.7.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.0
|
|
2051
|
+
[0.6.20]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.20
|
|
2052
|
+
[0.6.19]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.19
|
|
2006
2053
|
[0.6.18]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.18
|
|
2007
2054
|
[0.6.17]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.17
|
|
2008
2055
|
[0.6.16]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.16
|
|
@@ -2022,6 +2069,7 @@
|
|
|
2022
2069
|
[0.6.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.2
|
|
2023
2070
|
[0.6.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.1
|
|
2024
2071
|
[0.6.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.0
|
|
2072
|
+
[0.5.27]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.27
|
|
2025
2073
|
[0.5.26]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.26
|
|
2026
2074
|
[0.5.25]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.25
|
|
2027
2075
|
[0.5.24]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.24
|
|
@@ -2049,6 +2097,7 @@
|
|
|
2049
2097
|
[0.5.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.2-ruby
|
|
2050
2098
|
[0.5.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.1-ruby
|
|
2051
2099
|
[0.5.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.0-ruby
|
|
2100
|
+
[0.4.42]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.42
|
|
2052
2101
|
[0.4.41]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.41
|
|
2053
2102
|
[0.4.40]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.40
|
|
2054
2103
|
[0.4.39]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.39
|
data/lib/squared/version.rb
CHANGED
|
@@ -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=
|
|
20
|
-
sbom=
|
|
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
|
|
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-
|
|
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-
|
|
534
|
-
raise_error ArgumentError, "
|
|
535
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -1528,7 +1528,7 @@ module Squared
|
|
|
1528
1528
|
end
|
|
1529
1529
|
if (n = op.index('>'))
|
|
1530
1530
|
patch = op.slice!(n, 2)[1]
|
|
1531
|
-
elsif !op.exist?(op.last)
|
|
1531
|
+
elsif !op.last.include?('*') && !op.exist?(op.last)
|
|
1532
1532
|
patch ||= op.pop
|
|
1533
1533
|
end
|
|
1534
1534
|
append_pathspec op.extras
|
|
@@ -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|
|
|
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]
|
|
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
|
|
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
|
|
@@ -2105,7 +2104,7 @@ module Squared
|
|
|
2105
2104
|
ret = choice_index('Choose a commit', git_spawn(cmd, stdout: false), column: /^(\S+)/, force: force, **kwargs)
|
|
2106
2105
|
case ret
|
|
2107
2106
|
when Array
|
|
2108
|
-
ret.map { |val| val&.stripstyle }
|
|
2107
|
+
ret.map { |val| val.is_a?(Array) ? val.map { |s| s&.stripstyle } : val&.stripstyle }
|
|
2109
2108
|
when String
|
|
2110
2109
|
ret.stripstyle
|
|
2111
2110
|
else
|
|
@@ -859,17 +859,17 @@ module Squared
|
|
|
859
859
|
end
|
|
860
860
|
a = a.ljust(col1)
|
|
861
861
|
b = b.ljust(col2)
|
|
862
|
-
sub_style
|
|
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
|
|
870
|
-
sub_style
|
|
869
|
+
a = sub_style a, theme[:major]
|
|
870
|
+
c = sub_style c, :bold, color(:green)
|
|
871
871
|
else
|
|
872
|
-
sub_style
|
|
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
|
|
946
|
-
sub_style
|
|
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
|
-
|
|
382
|
+
kwargs[:double] = true if has.call(qq)
|
|
383
|
+
add quote_option(key, val, **kwargs)
|
|
378
384
|
elsif has.call(p)
|
|
379
|
-
if
|
|
380
|
-
add shell_option(key, val,
|
|
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.
|
|
4
|
+
version: 0.7.13
|
|
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.
|
|
128
|
+
rubygems_version: 4.0.20
|
|
129
129
|
specification_version: 4
|
|
130
130
|
summary: Rake task generator for managing multi-language workspaces.
|
|
131
131
|
test_files: []
|