squared 0.4.41 → 0.4.42
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 +11 -0
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/project/docker.rb +22 -12
- data/lib/squared/workspace/project/git.rb +4 -3
- data/lib/squared/workspace/project/node.rb +1 -1
- data/lib/squared/workspace/project/support/class.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: 6e6b403849f7b4bf8d7cbab3a7ec6c31a6231896ec0e3413f5053c1dfbaf9dfa
|
|
4
|
+
data.tar.gz: 6939f1e9faa5b82dd0ebd5ce2fdbc0243862e79b65c7e946bfa59a9d9a462eeb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 488c383693a1779b1ef64ebfc5b97f147f89aaaa5a07cc3f1286ecc6e6a47fa31f722d9bcc134a59ff56a55cb8ba6d4a6c76af084b8fe1c605adf33d4cb69c89
|
|
7
|
+
data.tar.gz: 4f2cdb13799b7c290098d380ab7d83b9053ce393a33ed6aea00f28e0061fc39290e430085c73ad5d0886839f84b8b2728394646b52765fec74d1bd1c6a9530ac
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.42] - 2026-09-23
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- OptionPartition did not strip pre-existing quotes when parsing options.
|
|
8
|
+
- Node command outdated did not strip styling from semver in package.json.
|
|
9
|
+
- Git command show did not recognize object names.
|
|
10
|
+
- Docker destination mounts that are not absolute are treated as errors.
|
|
11
|
+
- Docker source mounts for any named volumes or images were inoperable.
|
|
12
|
+
|
|
3
13
|
## [0.4.41] - 2026-09-04
|
|
4
14
|
|
|
5
15
|
### Added
|
|
@@ -1263,6 +1273,7 @@
|
|
|
1263
1273
|
|
|
1264
1274
|
- Changelog was created.
|
|
1265
1275
|
|
|
1276
|
+
[0.4.42]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.42
|
|
1266
1277
|
[0.4.41]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.41
|
|
1267
1278
|
[0.4.40]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.40
|
|
1268
1279
|
[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 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-
|
|
83
|
+
image: %w[image-subpath].freeze
|
|
84
84
|
}.freeze
|
|
85
85
|
}.freeze
|
|
86
86
|
private_constant :COMPOSEFILE, :BAKEFILE, :OPT_DOCKER, :VAL_DOCKER
|
|
@@ -389,20 +389,30 @@ module Squared
|
|
|
389
389
|
end
|
|
390
390
|
end
|
|
391
391
|
case k
|
|
392
|
-
when 'readonly', 'ro'
|
|
393
|
-
args << k
|
|
392
|
+
when 'readonly', 'ro', 'volume-nocopy', 'bind-create-src'
|
|
393
|
+
args << k if %w[bind volume].include?(type)
|
|
394
394
|
next
|
|
395
|
-
when 'source', 'src', 'destination', 'dst', 'target', 'volume-subpath', 'image-
|
|
396
|
-
|
|
395
|
+
when 'source', 'src', 'destination', 'dst', 'target', 'volume-subpath', 'image-subpath'
|
|
396
|
+
raise_error ArgumentError, "no path value: #{k}", hint: flag unless v
|
|
397
|
+
case k
|
|
398
|
+
when 'source', 'src'
|
|
399
|
+
if type == 'bind'
|
|
400
|
+
v = basepath v
|
|
401
|
+
elsif type == 'tmpfs'
|
|
402
|
+
next
|
|
403
|
+
end
|
|
404
|
+
when 'destination', 'dst', 'target'
|
|
405
|
+
puts log_message("path is not absolute: #{v}", subject: from, hint: k) unless v.start_with?('/')
|
|
406
|
+
end
|
|
397
407
|
v = shell_quote(v, option: false, force: false) if q == ''
|
|
398
408
|
end
|
|
399
409
|
args << "#{k}=#{q + v + q}"
|
|
400
410
|
elsif verbose
|
|
401
|
-
log_message(Logger::INFO, 'unrecognized option', subject: from, hint: k)
|
|
411
|
+
puts log_message(Logger::INFO, 'unrecognized option', subject: from, hint: k)
|
|
402
412
|
end
|
|
403
413
|
end
|
|
404
414
|
raise_error('missing type', hint: flag) unless type
|
|
405
|
-
|
|
415
|
+
op << "--mount type=#{type},#{args.join(',')}"
|
|
406
416
|
end
|
|
407
417
|
end
|
|
408
418
|
append_command(flag, id || tagmain, op.extras)
|
|
@@ -411,7 +421,7 @@ module Squared
|
|
|
411
421
|
op.append(escape: true, strip: /^:/)
|
|
412
422
|
when :commit
|
|
413
423
|
latest = op.shift || tagmain
|
|
414
|
-
|
|
424
|
+
op << id << latest
|
|
415
425
|
raise_error("unknown args: #{op.join(', ')}", hint: flag) unless op.empty?
|
|
416
426
|
return unless confirm_command(cmd.to_s, title: from, target: id, as: latest)
|
|
417
427
|
|
|
@@ -1668,7 +1668,7 @@ module Squared
|
|
|
1668
1668
|
cmd << '--textconv'
|
|
1669
1669
|
append_value(files.flat_map { |val| Dir[val] }
|
|
1670
1670
|
.select { |val| projectpath?(val) }
|
|
1671
|
-
.map! { |val|
|
|
1671
|
+
.map! { |val| "HEAD:#{val}" })
|
|
1672
1672
|
source(banner: false)
|
|
1673
1673
|
return
|
|
1674
1674
|
when :oneline
|
|
@@ -1682,10 +1682,11 @@ module Squared
|
|
|
1682
1682
|
else
|
|
1683
1683
|
opts << format if format
|
|
1684
1684
|
end
|
|
1685
|
-
|
|
1685
|
+
list = OPT_GIT[:show] + OPT_GIT[:diff][:show] + collect_hash(OPT_GIT[:log], pass: [:base])
|
|
1686
|
+
op = OptionPartition.new(opts, list, cmd,
|
|
1686
1687
|
project: self,
|
|
1687
1688
|
no: OPT_GIT[:no][:show] + collect_hash(OPT_GIT[:no][:log], pass: [:base]))
|
|
1688
|
-
op.append
|
|
1689
|
+
op.append
|
|
1689
1690
|
source(exception: false, banner: flag != :oneline)
|
|
1690
1691
|
end
|
|
1691
1692
|
|
|
@@ -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
|
|
284
|
-
add shell_option(key, val, double:
|
|
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
|
|
@@ -237,7 +237,7 @@ module Squared
|
|
|
237
237
|
|
|
238
238
|
def repo_run(cmd, exception: false)
|
|
239
239
|
puts log_message(Logger::INFO, cmd, subject: main, hint: root) if verbose
|
|
240
|
-
Common::System.shell(cmd, chdir: root, exception: exception)
|
|
240
|
+
Common::System.shell(cmd, chdir: root, exception: exception || %w[1 true].include?(env('REPO_FAIL')))
|
|
241
241
|
end
|
|
242
242
|
|
|
243
243
|
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.4.
|
|
4
|
+
version: 0.4.42
|
|
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.21
|
|
129
129
|
specification_version: 4
|
|
130
130
|
summary: Rake task generator for managing multi-language workspaces.
|
|
131
131
|
test_files: []
|