squared 0.6.18 → 0.6.20
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 +37 -2
- data/lib/squared/common/prompt.rb +5 -2
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/project/docker.rb +23 -13
- data/lib/squared/workspace/project/git.rb +5 -5
- data/lib/squared/workspace/project/node.rb +6 -6
- data/lib/squared/workspace/project/support/optionpartition.rb +10 -6
- 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: bb99c8ca17b63b3aa50d1fff702d84c9a3b878ad49bac62ff385b1da86e2870f
|
|
4
|
+
data.tar.gz: 3abf7aae865ba509a9e194532a3d5537be98f1fdc90994e6a6f24acd874ff45d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebe845b8986e0a760156f11a42e837ce874859da1392890a8e1419df66964d501b8aa57e24ade1f02928e6b324ba2c25b61c2be86e0238bc96fa6f142e428a57
|
|
7
|
+
data.tar.gz: b9ed85962f324e1bfccbccb16ac6d8d01b4ba15bf5b058769d99f92288fb75b51f7b8c338fbb2c8a14ac9aa7155f33ef4903ac4e92c199c71f0cefcd6b877cab
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.20] - 2026-09-25
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Prompt choice optional selection can be bypassed with a single dash.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Git interactive commit selection did not accept additional values.
|
|
12
|
+
|
|
13
|
+
## [0.6.19] - 2026-09-23
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- See `0.4.42`.
|
|
18
|
+
|
|
19
|
+
## [0.5.27] - 2026-09-23
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- See `0.4.42`.
|
|
24
|
+
|
|
25
|
+
## [0.4.42] - 2026-09-23
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- OptionPartition did not strip pre-existing quotes when parsing options.
|
|
30
|
+
- Node command outdated did not strip styling from semver in package.json.
|
|
31
|
+
- Git command show did not recognize object names.
|
|
32
|
+
- Docker destination mounts that are not absolute are treated as errors.
|
|
33
|
+
- Docker source mounts for any named volumes or images were inoperable.
|
|
34
|
+
|
|
3
35
|
## [0.6.18] - 2026-09-04
|
|
4
36
|
|
|
5
37
|
### Added
|
|
@@ -9,7 +41,6 @@
|
|
|
9
41
|
### Fixed
|
|
10
42
|
|
|
11
43
|
- Git action grep did not recognize format and max-count.
|
|
12
|
-
- Node command nvm did not quote executable path.
|
|
13
44
|
|
|
14
45
|
## [0.5.26] - 2026-09-04
|
|
15
46
|
|
|
@@ -328,7 +359,7 @@
|
|
|
328
359
|
|
|
329
360
|
### Fixed
|
|
330
361
|
|
|
331
|
-
- See `0.
|
|
362
|
+
- See `0.4.32`.
|
|
332
363
|
|
|
333
364
|
## [0.4.32] - 2025-11-25
|
|
334
365
|
|
|
@@ -1791,6 +1822,8 @@
|
|
|
1791
1822
|
|
|
1792
1823
|
- Changelog was created.
|
|
1793
1824
|
|
|
1825
|
+
[0.6.20]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.20
|
|
1826
|
+
[0.6.19]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.19
|
|
1794
1827
|
[0.6.18]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.18
|
|
1795
1828
|
[0.6.17]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.17
|
|
1796
1829
|
[0.6.16]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.16
|
|
@@ -1810,6 +1843,7 @@
|
|
|
1810
1843
|
[0.6.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.2
|
|
1811
1844
|
[0.6.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.1
|
|
1812
1845
|
[0.6.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.0
|
|
1846
|
+
[0.5.27]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.27
|
|
1813
1847
|
[0.5.26]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.26
|
|
1814
1848
|
[0.5.25]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.25
|
|
1815
1849
|
[0.5.24]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.24
|
|
@@ -1837,6 +1871,7 @@
|
|
|
1837
1871
|
[0.5.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.2-ruby
|
|
1838
1872
|
[0.5.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.1-ruby
|
|
1839
1873
|
[0.5.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.0-ruby
|
|
1874
|
+
[0.4.42]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.42
|
|
1840
1875
|
[0.4.41]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.41
|
|
1841
1876
|
[0.4.40]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.40
|
|
1842
1877
|
[0.4.39]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.39
|
|
@@ -85,8 +85,11 @@ module Squared
|
|
|
85
85
|
between = ->(s) { s.match?(/^\d+$/) && s.to_i.between?(min, max <= min ? Float::INFINITY : max) }
|
|
86
86
|
Timeout.timeout(timeout) do
|
|
87
87
|
while (ch = Readline.readline(msg))
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
ch.strip!
|
|
89
|
+
unless ch.empty?
|
|
90
|
+
if ch == '-' && !force
|
|
91
|
+
break
|
|
92
|
+
elsif multiple
|
|
90
93
|
k = if ch == '*'
|
|
91
94
|
(min..max).to_a
|
|
92
95
|
else
|
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,
|
|
@@ -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-
|
|
83
|
+
image: %w[image-subpath].freeze
|
|
84
84
|
}.freeze,
|
|
85
85
|
ls: {
|
|
86
86
|
compose: %w[Name Image Command Service RunningFor Status Ports CreatedAt ExitCode Health ID Labels
|
|
@@ -489,20 +489,30 @@ module Squared
|
|
|
489
489
|
end
|
|
490
490
|
end
|
|
491
491
|
case k
|
|
492
|
-
when 'readonly', 'ro'
|
|
493
|
-
args << k
|
|
492
|
+
when 'readonly', 'ro', 'volume-nocopy', 'bind-create-src'
|
|
493
|
+
args << k if %w[bind volume].include?(type)
|
|
494
494
|
next
|
|
495
|
-
when 'source', 'src', 'destination', 'dst', 'target', 'volume-subpath', 'image-
|
|
496
|
-
|
|
495
|
+
when 'source', 'src', 'destination', 'dst', 'target', 'volume-subpath', 'image-subpath'
|
|
496
|
+
raise_error ArgumentError, "no path value: #{k}", hint: flag unless v
|
|
497
|
+
case k
|
|
498
|
+
when 'source', 'src'
|
|
499
|
+
if type == 'bind'
|
|
500
|
+
v = basepath v
|
|
501
|
+
elsif type == 'tmpfs'
|
|
502
|
+
next
|
|
503
|
+
end
|
|
504
|
+
when 'destination', 'dst', 'target'
|
|
505
|
+
puts log_message("path is not absolute: #{v}", subject: from, hint: k) unless v.start_with?('/')
|
|
506
|
+
end
|
|
497
507
|
v = shell_quote(v, option: false, force: false) if q == ''
|
|
498
508
|
end
|
|
499
509
|
args << "#{k}=#{q + v + q}"
|
|
500
510
|
elsif !silent?
|
|
501
|
-
log_message('unrecognized option', subject: from, hint: k)
|
|
511
|
+
puts log_message('unrecognized option', subject: from, hint: k)
|
|
502
512
|
end
|
|
503
513
|
end
|
|
504
514
|
raise_error TypeError, 'none specified', hint: flag unless type
|
|
505
|
-
|
|
515
|
+
op << "--mount type=#{type},#{args.join(',')}"
|
|
506
516
|
end
|
|
507
517
|
end
|
|
508
518
|
append_command(flag, id || tagmain, op.extras)
|
|
@@ -511,7 +521,7 @@ module Squared
|
|
|
511
521
|
op.append(escape: true, strip: /^:/)
|
|
512
522
|
when :commit
|
|
513
523
|
latest = op.shift || tagmain
|
|
514
|
-
|
|
524
|
+
op << id << latest
|
|
515
525
|
raise_error ArgumentError, "unrecognized args: #{op.join(', ')}", hint: flag unless op.empty?
|
|
516
526
|
return unless confirm_command(cmd.to_s, title: from, target: id, as: latest)
|
|
517
527
|
|
|
@@ -532,7 +542,7 @@ module Squared
|
|
|
532
542
|
else
|
|
533
543
|
if op.empty?
|
|
534
544
|
ps, status, no = filter_ps flag, from
|
|
535
|
-
|
|
545
|
+
op << '--no-stream' if flag == :stats
|
|
536
546
|
list_image(flag, ps, no: no, hint: status, from: from) { |img| run(cmd.temp(img), from: from) }
|
|
537
547
|
return
|
|
538
548
|
end
|
|
@@ -1727,7 +1727,7 @@ module Squared
|
|
|
1727
1727
|
cmd << '--textconv'
|
|
1728
1728
|
append_value(files.flat_map { |val| Dir[val] }
|
|
1729
1729
|
.select { |val| projectpath?(val) }
|
|
1730
|
-
.map! { |val|
|
|
1730
|
+
.map! { |val| "HEAD:#{val}" })
|
|
1731
1731
|
source(banner: false)
|
|
1732
1732
|
return
|
|
1733
1733
|
when :oneline
|
|
@@ -1741,11 +1741,11 @@ module Squared
|
|
|
1741
1741
|
else
|
|
1742
1742
|
opts << format if format
|
|
1743
1743
|
end
|
|
1744
|
-
list = OPT_GIT[:show] + OPT_GIT[:diff][:show] + OPT_GIT[:log]
|
|
1744
|
+
list = OPT_GIT[:show] + OPT_GIT[:diff][:show] + collect_hash(OPT_GIT[:log], pass: [:base])
|
|
1745
1745
|
op = OptionPartition.new(opts, list, cmd,
|
|
1746
1746
|
project: self,
|
|
1747
1747
|
no: OPT_GIT[:no][:show] + collect_hash(OPT_GIT[:no][:log], pass: [:base]))
|
|
1748
|
-
op.append
|
|
1748
|
+
op.append
|
|
1749
1749
|
source(exception: false, banner: flag != :oneline)
|
|
1750
1750
|
end
|
|
1751
1751
|
|
|
@@ -1799,7 +1799,7 @@ module Squared
|
|
|
1799
1799
|
when :revert
|
|
1800
1800
|
list.concat(VAL_GIT[:rebase][:send])
|
|
1801
1801
|
end
|
|
1802
|
-
op = OptionPartition.new(opts, list, cmd, project: self, no: OPT_GIT[:no][flag],
|
|
1802
|
+
op = OptionPartition.new(opts, list, cmd, project: self, no: OPT_GIT[:no][flag],
|
|
1803
1803
|
first: case flag
|
|
1804
1804
|
when :blame, :revert then nil
|
|
1805
1805
|
else matchpathspec
|
|
@@ -2021,7 +2021,7 @@ module Squared
|
|
|
2021
2021
|
ret = choice_index('Choose a commit', git_spawn(cmd, stdout: false), column: /^(\S+)/, force: force, **kwargs)
|
|
2022
2022
|
case ret
|
|
2023
2023
|
when Array
|
|
2024
|
-
ret.map { |val| val&.stripstyle }
|
|
2024
|
+
ret.map { |val| val.is_a?(Array) ? val.map { |s| s&.stripstyle } : val&.stripstyle }
|
|
2025
2025
|
when String
|
|
2026
2026
|
ret.stripstyle
|
|
2027
2027
|
else
|
|
@@ -777,17 +777,17 @@ module Squared
|
|
|
777
777
|
end
|
|
778
778
|
a = a.ljust(col1)
|
|
779
779
|
b = b.ljust(col2)
|
|
780
|
-
sub_style
|
|
780
|
+
b = sub_style b, theme[:current] if theme[:current] && !stdin?
|
|
781
781
|
if cur == -1
|
|
782
782
|
c = 'SKIP'
|
|
783
783
|
elsif modified == cur
|
|
784
784
|
c = 'FAIL'
|
|
785
785
|
elsif !stdin?
|
|
786
786
|
if d == 1
|
|
787
|
-
sub_style
|
|
788
|
-
sub_style
|
|
787
|
+
a = sub_style a, theme[:major]
|
|
788
|
+
c = sub_style c, :bold, color(:green)
|
|
789
789
|
else
|
|
790
|
-
sub_style
|
|
790
|
+
c = sub_style(c, **opt_style(color(d == 3 ? :green : :yellow), SEM_VER, d))
|
|
791
791
|
end
|
|
792
792
|
g = item
|
|
793
793
|
end
|
|
@@ -860,8 +860,8 @@ module Squared
|
|
|
860
860
|
b = sub_style b.ljust(col2), color(d ? :red : :yellow)
|
|
861
861
|
c = c.ljust(col3)
|
|
862
862
|
unless d
|
|
863
|
-
sub_style
|
|
864
|
-
sub_style
|
|
863
|
+
a = sub_style a, theme[:active]
|
|
864
|
+
c = sub_style c, color(:green)
|
|
865
865
|
pending += 1
|
|
866
866
|
end
|
|
867
867
|
puts "#{pad.call(i, avail)}. #{(a + c + b).subhint(d ? 'locked' : 'latest')}"
|
|
@@ -332,23 +332,27 @@ module Squared
|
|
|
332
332
|
if opt =~ OPT_VALUE
|
|
333
333
|
key = $1
|
|
334
334
|
val = $2
|
|
335
|
+
if val =~ /\A(["'])(.+)\1\z/
|
|
336
|
+
val = $2
|
|
337
|
+
double = $1 == '"'
|
|
338
|
+
end
|
|
335
339
|
merge = m.include?(key)
|
|
336
340
|
if e.include?(key)
|
|
337
|
-
add shell_option(key, val, merge: merge, sep: sep)
|
|
341
|
+
add shell_option(key, val, double: double, merge: merge, sep: sep)
|
|
338
342
|
elsif q.include?(key)
|
|
339
|
-
add quote_option(key, val, double: qq.include?(key), merge: merge, sep: sep)
|
|
343
|
+
add quote_option(key, val, double: double || qq.include?(key), merge: merge, sep: sep)
|
|
340
344
|
elsif p.include?(key)
|
|
341
|
-
if
|
|
342
|
-
add shell_option(key, val, double:
|
|
345
|
+
if !double.nil?
|
|
346
|
+
add shell_option(key, val, double: double, merge: merge, sep: sep, escape: false)
|
|
343
347
|
elsif path
|
|
344
348
|
add quote_option(key, path + val, merge: merge, sep: sep)
|
|
345
349
|
else
|
|
346
350
|
push opt
|
|
347
351
|
end
|
|
348
352
|
elsif b.include?(key) || (bl.include?(key) && %w[true false].include?(val)) || numcheck.call(key, val)
|
|
349
|
-
add basic_option(key, val, merge: merge, sep: sep)
|
|
353
|
+
add basic_option(key, val, double: double, merge: merge, sep: sep)
|
|
350
354
|
elsif merge
|
|
351
|
-
add basic_option(key, val, merge: true, sep: sep)
|
|
355
|
+
add basic_option(key, val, double: double, merge: true, sep: sep)
|
|
352
356
|
else
|
|
353
357
|
push opt
|
|
354
358
|
end
|
|
@@ -251,7 +251,7 @@ module Squared
|
|
|
251
251
|
|
|
252
252
|
def repo_run(cmd, exception: false)
|
|
253
253
|
puts log_message(cmd, subject: main, hint: root) if verbose
|
|
254
|
-
Common::System.shell(cmd, chdir: root, exception: exception)
|
|
254
|
+
Common::System.shell(cmd, chdir: root, exception: exception || env('REPO_FAIL', equals: %w[1 true]))
|
|
255
255
|
end
|
|
256
256
|
|
|
257
257
|
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.6.
|
|
4
|
+
version: 0.6.20
|
|
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.
|
|
127
|
+
rubygems_version: 4.0.20
|
|
128
128
|
specification_version: 4
|
|
129
129
|
summary: Rake task generator for managing multi-language workspaces.
|
|
130
130
|
test_files: []
|