squared 0.5.22 → 0.5.23
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 +24 -0
- data/lib/squared/common/shell.rb +5 -5
- data/lib/squared/common/system.rb +2 -1
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/project/base.rb +19 -8
- data/lib/squared/workspace/project/docker.rb +2 -2
- data/lib/squared/workspace/project/git.rb +2 -6
- data/lib/squared/workspace/project/python.rb +2 -2
- data/lib/squared/workspace/project/ruby.rb +2 -1
- 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: 45a01f6cbe5a1aac8bb8569a17d8e1367e2b31bb4cd38ed3be1a406462983f48
|
|
4
|
+
data.tar.gz: 5380204c9a5c8e411448b437b67f037d89ac30a6835158dfbaad3e704bef9739
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 168617a435a76d164f939965060d5e75fe7d3e4195fc09b6dce3870397df137c0760d2a99c599bcb05df65a1d78f184d9bb8e1df6de761a70f9a344c7950ba31
|
|
7
|
+
data.tar.gz: 3c825837cb557a12c4df649833340d26add03f391ebbd382afee1dcbf7d2971f538588af7c08b39494d6b76e2c7202d1e7a974339ba68b4fa4f4720ebab64b79
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.23] - 2026-04-29
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- See `0.4.37`.
|
|
8
|
+
|
|
9
|
+
## [0.4.37] - 2026-04-29
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Project base method dependindex replaces private instance variable.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Ruby command version did not abort asdf "Not installed" error.
|
|
18
|
+
- Git command pull action all did not pass option flags to branches.
|
|
19
|
+
- Python command exec did not activate virtual environment.
|
|
20
|
+
- Docker command bake did not reinsert failed check for context directory.
|
|
21
|
+
- Common method shell_quote argument preserve did not bypass requoting.
|
|
22
|
+
|
|
3
23
|
## [0.5.22] - 2026-03-11
|
|
4
24
|
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
5
27
|
- Project base run command was not covered due to lack of type checking.
|
|
6
28
|
|
|
7
29
|
## [0.4.36] - 2026-03-11
|
|
@@ -1372,6 +1394,7 @@
|
|
|
1372
1394
|
|
|
1373
1395
|
- Changelog was created.
|
|
1374
1396
|
|
|
1397
|
+
[0.5.23]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.23
|
|
1375
1398
|
[0.5.22]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.22
|
|
1376
1399
|
[0.5.21]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.21
|
|
1377
1400
|
[0.5.20]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.20
|
|
@@ -1395,6 +1418,7 @@
|
|
|
1395
1418
|
[0.5.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.2-ruby
|
|
1396
1419
|
[0.5.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.1-ruby
|
|
1397
1420
|
[0.5.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.0-ruby
|
|
1421
|
+
[0.4.37]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.37
|
|
1398
1422
|
[0.4.36]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.36
|
|
1399
1423
|
[0.4.35]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.35
|
|
1400
1424
|
[0.4.34]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.34
|
data/lib/squared/common/shell.rb
CHANGED
|
@@ -48,7 +48,7 @@ module Squared
|
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
def shell_quote(val, option: true, force: true, double: false, preserve: true, override: false)
|
|
51
|
+
def shell_quote(val, option: true, force: true, double: false, preserve: true, pass: false, override: false)
|
|
52
52
|
val = val.to_s
|
|
53
53
|
return val if (!force && !val.include?(' ')) || val.empty?
|
|
54
54
|
|
|
@@ -56,16 +56,16 @@ module Squared
|
|
|
56
56
|
pat = /\A(?:-[^=\s-](?:=|\s+)?|(--)?[^=\s-][^=\s]*(?(1)(?:=|\s+)|=))(["']).+\2\z/m
|
|
57
57
|
return val if val.match?(pat)
|
|
58
58
|
end
|
|
59
|
-
q = ->(s) { s.gsub("'\\\\''", "'") }
|
|
60
59
|
if val =~ QUOTE_VALUE
|
|
61
|
-
return val if $1 == '"' && Rake::Win32.windows? && val.match?(/(?:[#{File::SEPARATOR} ]|\\")/o)
|
|
60
|
+
return val if pass || ($1 == '"' && Rake::Win32.windows? && val.match?(/(?:[#{File::SEPARATOR} ]|\\")/o))
|
|
62
61
|
|
|
63
62
|
base = $2 unless preserve
|
|
64
63
|
end
|
|
64
|
+
q = -> { (base || val).gsub("'\\\\''", "'") }
|
|
65
65
|
if double || Rake::Win32.windows? || (ARG[:QUOTE] == '"' && !override)
|
|
66
|
-
"\"#{q.call
|
|
66
|
+
"\"#{q.call.gsub(/(?<!\\)"/, '\\"')}\""
|
|
67
67
|
else
|
|
68
|
-
|
|
68
|
+
"'#{q.call.gsub("'", "'\\\\''")}'"
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -9,6 +9,7 @@ module Squared
|
|
|
9
9
|
module_function
|
|
10
10
|
|
|
11
11
|
def shell(*args, name: :system, **kwargs)
|
|
12
|
+
kwargs.delete(:exception) unless name == :system
|
|
12
13
|
if RUBY_ENGINE == 'jruby' && Rake::Win32.windows?
|
|
13
14
|
e = kwargs[:exception]
|
|
14
15
|
if (dir = kwargs[:chdir]) && ((pwd = Dir.pwd) != dir)
|
|
@@ -24,7 +25,7 @@ module Squared
|
|
|
24
25
|
else
|
|
25
26
|
return Kernel.send(name, *args, **kwargs)
|
|
26
27
|
end
|
|
27
|
-
return ret unless e && !ret
|
|
28
|
+
return ret unless e && !ret
|
|
28
29
|
|
|
29
30
|
raise $?.to_s
|
|
30
31
|
end
|
data/lib/squared/version.rb
CHANGED
|
@@ -886,7 +886,7 @@ module Squared
|
|
|
886
886
|
end
|
|
887
887
|
|
|
888
888
|
def run(cmd = @session, var = nil, exception: self.exception, sync: true, from: nil, banner: true, chdir: path,
|
|
889
|
-
interactive: nil, hint: nil, series: true, **)
|
|
889
|
+
interactive: nil, hint: nil, series: true, send: :system, **)
|
|
890
890
|
unless cmd
|
|
891
891
|
print_error('no command session started', subject: project, hint: from, pass: true)
|
|
892
892
|
return
|
|
@@ -923,7 +923,7 @@ module Squared
|
|
|
923
923
|
end
|
|
924
924
|
end
|
|
925
925
|
args = var.is_a?(Hash) ? [var, cmd] : [cmd]
|
|
926
|
-
ret = shell(*args, chdir: chdir, exception: exception)
|
|
926
|
+
ret = shell(*args, name: send, chdir: chdir, exception: exception)
|
|
927
927
|
end
|
|
928
928
|
rescue StandardError => e
|
|
929
929
|
on_error(e, from, exception: true)
|
|
@@ -982,7 +982,7 @@ module Squared
|
|
|
982
982
|
run_set(output[0], *args, **kwargs)
|
|
983
983
|
when :dependfile
|
|
984
984
|
@dependindex = nil
|
|
985
|
-
@dependfile =
|
|
985
|
+
@dependfile = (basepath(*args) if val)
|
|
986
986
|
else
|
|
987
987
|
instance_variable_set(:"@#{key}", val)
|
|
988
988
|
end
|
|
@@ -1080,7 +1080,7 @@ module Squared
|
|
|
1080
1080
|
end
|
|
1081
1081
|
|
|
1082
1082
|
def dependtype(*)
|
|
1083
|
-
|
|
1083
|
+
dependindex&.succ || 0
|
|
1084
1084
|
end
|
|
1085
1085
|
|
|
1086
1086
|
def log
|
|
@@ -2059,10 +2059,21 @@ module Squared
|
|
|
2059
2059
|
end
|
|
2060
2060
|
end
|
|
2061
2061
|
|
|
2062
|
-
def dependfile_set(list)
|
|
2063
|
-
@dependindex =
|
|
2064
|
-
|
|
2065
|
-
|
|
2062
|
+
def dependfile_set(list, default: 0)
|
|
2063
|
+
@dependindex = if @dependname
|
|
2064
|
+
@dependfile = basepath @dependname
|
|
2065
|
+
list.index(@dependname)
|
|
2066
|
+
else
|
|
2067
|
+
list.index { |file| basepath(file).exist? }.tap do |i|
|
|
2068
|
+
@dependfile = basepath(list[i || default])
|
|
2069
|
+
end
|
|
2070
|
+
end || (list unless enabled?)
|
|
2071
|
+
end
|
|
2072
|
+
|
|
2073
|
+
def dependindex
|
|
2074
|
+
dependfile_set @dependindex if @dependindex.is_a?(Array)
|
|
2075
|
+
|
|
2076
|
+
@dependindex unless @dependindex.is_a?(Array)
|
|
2066
2077
|
end
|
|
2067
2078
|
|
|
2068
2079
|
def as_get(val, from)
|
|
@@ -20,7 +20,7 @@ module Squared
|
|
|
20
20
|
sbom=q].freeze
|
|
21
21
|
}.freeze,
|
|
22
22
|
compose: {
|
|
23
|
-
common: %w[all-resources compatibility dry-run ansi
|
|
23
|
+
common: %w[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=e].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,
|
|
@@ -335,7 +335,7 @@ module Squared
|
|
|
335
335
|
if projectpath?(val = args.pop)
|
|
336
336
|
context = val
|
|
337
337
|
else
|
|
338
|
-
|
|
338
|
+
args << val
|
|
339
339
|
end
|
|
340
340
|
end
|
|
341
341
|
op.append(args, escape: true, strip: /^:/)
|
|
@@ -984,12 +984,8 @@ module Squared
|
|
|
984
984
|
printsucc
|
|
985
985
|
end
|
|
986
986
|
op = OptionPartition.new(opts, OPT_GIT[:pull], cmd, project: self, no: OPT_GIT[:no][:pull])
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
else
|
|
990
|
-
opts = op.uniq(opts)
|
|
991
|
-
matchmap op
|
|
992
|
-
end
|
|
987
|
+
opts -= op.extras
|
|
988
|
+
reg = matchmap op
|
|
993
989
|
session_done op.target
|
|
994
990
|
heads = []
|
|
995
991
|
cur = nil
|
|
@@ -87,7 +87,7 @@ module Squared
|
|
|
87
87
|
initialize_build(Python.ref, **kwargs)
|
|
88
88
|
initialize_env(**kwargs)
|
|
89
89
|
end
|
|
90
|
-
dependfile_set
|
|
90
|
+
dependfile_set(DEP_PYTHON, default: 2)
|
|
91
91
|
editable_set editable
|
|
92
92
|
venv_set kwargs[:venv]
|
|
93
93
|
end
|
|
@@ -196,7 +196,7 @@ module Squared
|
|
|
196
196
|
end
|
|
197
197
|
args.join(' ')
|
|
198
198
|
end
|
|
199
|
-
|
|
199
|
+
run(cmd, send: :exec, banner: false)
|
|
200
200
|
end
|
|
201
201
|
end
|
|
202
202
|
else
|
|
@@ -548,7 +548,8 @@ module Squared
|
|
|
548
548
|
ver = '.tool-versions'
|
|
549
549
|
opt = [@asdf.first]
|
|
550
550
|
opt.unshift('--no-header') unless @@asdf[1] == 15
|
|
551
|
-
`asdf current #{opt.join(' ')}`[/^\S+\s+\S+/, 0]
|
|
551
|
+
exit 1 unless (cur = `asdf current #{opt.join(' ')}`[/^\S+\s+\S+/, 0])
|
|
552
|
+
cur.sub(/\s+/, ' ')
|
|
552
553
|
else
|
|
553
554
|
ver = nil
|
|
554
555
|
`ruby --version`
|
|
@@ -16,7 +16,7 @@ module Squared
|
|
|
16
16
|
attr_reader :manifest_url, :manifest
|
|
17
17
|
|
|
18
18
|
def repo(url, manifest = 'latest', run: nil, script: nil, args: nil, dev: nil, prod: nil,
|
|
19
|
-
ref: @ref, group: @group)
|
|
19
|
+
ref: @ref, group: @group, **)
|
|
20
20
|
@home = if (val = env('REPO_HOME'))
|
|
21
21
|
path = Pathname.new(val)
|
|
22
22
|
if main == path.basename.to_s
|
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.
|
|
4
|
+
version: 0.5.23
|
|
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.6
|
|
128
128
|
specification_version: 4
|
|
129
129
|
summary: Rake task generator for managing multi-language workspaces.
|
|
130
130
|
test_files: []
|