squared 0.5.22 → 0.5.24
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 +52 -0
- data/lib/squared/common/shell.rb +18 -11
- data/lib/squared/common/system.rb +2 -1
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/application.rb +4 -2
- data/lib/squared/workspace/project/base.rb +25 -14
- data/lib/squared/workspace/project/docker.rb +4 -14
- data/lib/squared/workspace/project/git.rb +15 -14
- data/lib/squared/workspace/project/node.rb +1 -1
- data/lib/squared/workspace/project/python.rb +8 -7
- data/lib/squared/workspace/project/ruby.rb +4 -3
- data/lib/squared/workspace/project/support/class.rb +5 -5
- 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: '028d4b5e86e6d05c09f73ecab333c5332dc87e6a4fc9491965eb5ed51f34499e'
|
|
4
|
+
data.tar.gz: 464d5a95488fafbcc13f0569ccc31d80732e5181572627ca02bd58ec040819c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25457fbc4821b604ccbe49e7ac6dbcdd677996ead1d39a089e8f745a7ee2d94215c065c54aa7abb9335c04cb72dc73832ca209cb8e8bda6dc9979f84dcda66c5
|
|
7
|
+
data.tar.gz: 10e04c8c835b34ec1bb2f34e14a4f4ac25551b89ee7f1bd07cdd9d3503f87d3fff1980073ac6142a37c184d05e704a6b0d8608d50023f94511db197d2a659e83
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,55 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.24] - 2026-06-14
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- See `0.4.38`.
|
|
8
|
+
|
|
9
|
+
## [0.4.38] - 2026-06-14
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Application project commands can be defined without a reference.
|
|
14
|
+
- Git command branch action all was implemented.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Override alias methods were created for suffix "!" to "\_".
|
|
19
|
+
- Project banners do not display boolean attributes.
|
|
20
|
+
- OptionPartition method append strips single quotes when quoting strings.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Application methods log and exclude were non-functional.
|
|
25
|
+
- Docker command bake action build does not support changing context.
|
|
26
|
+
- Project base method semver did not include prerelease delimiter.
|
|
27
|
+
- Project session cleanup did not compare by reference.
|
|
28
|
+
|
|
29
|
+
## [0.5.23] - 2026-04-29
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- See `0.4.37`.
|
|
34
|
+
|
|
35
|
+
## [0.4.37] - 2026-04-29
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Project base method dependindex replaces private instance variable.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- Ruby command version did not abort asdf "Not installed" error.
|
|
44
|
+
- Git command pull action all did not pass option flags to branches.
|
|
45
|
+
- Python command exec did not activate virtual environment.
|
|
46
|
+
- Docker command bake did not reinsert failed check for context directory.
|
|
47
|
+
- Common method shell_quote argument preserve did not bypass requoting.
|
|
48
|
+
|
|
3
49
|
## [0.5.22] - 2026-03-11
|
|
4
50
|
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
5
53
|
- Project base run command was not covered due to lack of type checking.
|
|
6
54
|
|
|
7
55
|
## [0.4.36] - 2026-03-11
|
|
@@ -1372,6 +1420,8 @@
|
|
|
1372
1420
|
|
|
1373
1421
|
- Changelog was created.
|
|
1374
1422
|
|
|
1423
|
+
[0.5.24]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.24
|
|
1424
|
+
[0.5.23]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.23
|
|
1375
1425
|
[0.5.22]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.22
|
|
1376
1426
|
[0.5.21]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.21
|
|
1377
1427
|
[0.5.20]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.20
|
|
@@ -1395,6 +1445,8 @@
|
|
|
1395
1445
|
[0.5.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.2-ruby
|
|
1396
1446
|
[0.5.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.1-ruby
|
|
1397
1447
|
[0.5.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.0-ruby
|
|
1448
|
+
[0.4.38]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.38
|
|
1449
|
+
[0.4.37]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.37
|
|
1398
1450
|
[0.4.36]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.36
|
|
1399
1451
|
[0.4.35]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.35
|
|
1400
1452
|
[0.4.34]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.34
|
data/lib/squared/common/shell.rb
CHANGED
|
@@ -48,24 +48,31 @@ 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
|
+
return val if option && val.match?(/\A(?:-[^=\s-](?:=|\s+)?|(--)?[^=\s-][^=\s]*(?(1)(?:=|\s+)|=))(["']).+\2\z/m)
|
|
54
55
|
|
|
55
|
-
if option
|
|
56
|
-
pat = /\A(?:-[^=\s-](?:=|\s+)?|(--)?[^=\s-][^=\s]*(?(1)(?:=|\s+)|=))(["']).+\2\z/m
|
|
57
|
-
return val if val.match?(pat)
|
|
58
|
-
end
|
|
59
|
-
q = ->(s) { s.gsub("'\\\\''", "'") }
|
|
60
56
|
if val =~ QUOTE_VALUE
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
if pass == '"' || pass == "'"
|
|
58
|
+
return val if pass == $1
|
|
59
|
+
elsif pass || ($1 == '"' && Rake::Win32.windows? && val.match?(/(?:[#{File::SEPARATOR} ]|\\")/o))
|
|
60
|
+
return val
|
|
61
|
+
end
|
|
62
|
+
case preserve
|
|
63
|
+
when false
|
|
64
|
+
base = $2
|
|
65
|
+
when '"'
|
|
66
|
+
base = $2 if $1 == "'"
|
|
67
|
+
when "'"
|
|
68
|
+
base = $2 if $1 == '"'
|
|
69
|
+
end
|
|
64
70
|
end
|
|
71
|
+
q = -> { (base || val).gsub("'\\\\''", "'") }
|
|
65
72
|
if double || Rake::Win32.windows? || (ARG[:QUOTE] == '"' && !override)
|
|
66
|
-
"\"#{q.call
|
|
73
|
+
"\"#{q.call.gsub(/(?<!\\)"/, '\\"')}\""
|
|
67
74
|
else
|
|
68
|
-
|
|
75
|
+
"'#{q.call.gsub("'", "'\\\\''")}'"
|
|
69
76
|
end
|
|
70
77
|
end
|
|
71
78
|
|
|
@@ -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
|
@@ -844,7 +844,7 @@ module Squared
|
|
|
844
844
|
log_console(*args, pipe: kwargs[:pipe] || pipe)
|
|
845
845
|
end
|
|
846
846
|
|
|
847
|
-
def script_command(task, val, group, ref, on, &blk)
|
|
847
|
+
def script_command(task, val, group, ref, on = nil, &blk)
|
|
848
848
|
if block_given?
|
|
849
849
|
val = Struct::RunData.new(val, blk)
|
|
850
850
|
elsif !val
|
|
@@ -855,7 +855,7 @@ module Squared
|
|
|
855
855
|
items = as_a(group, :to_sym)
|
|
856
856
|
else
|
|
857
857
|
label = :ref
|
|
858
|
-
items = as_a(ref, :to_sym)
|
|
858
|
+
items = as_a(ref || :_, :to_sym)
|
|
859
859
|
end
|
|
860
860
|
items.each do |name|
|
|
861
861
|
@script[label][name][task] = val
|
|
@@ -888,6 +888,8 @@ module Squared
|
|
|
888
888
|
nil
|
|
889
889
|
elsif ref && target[:ref].key?(ref)
|
|
890
890
|
target[:ref][ref]
|
|
891
|
+
else
|
|
892
|
+
target[:ref][:_]
|
|
891
893
|
end
|
|
892
894
|
end
|
|
893
895
|
|
|
@@ -20,7 +20,7 @@ module Squared
|
|
|
20
20
|
VAR_SET = %i[parent global script index envname desc dependfile dependindex theme archive env dev prod graph
|
|
21
21
|
pass only exclude asdf].freeze
|
|
22
22
|
BLK_SET = %i[run depend doc lint test copy clean].freeze
|
|
23
|
-
SEM_VER = /\b(\d+)(?:(\.)(\d+))?(?:(\.)(\d+))?[-.]?(\S+)?\b/.freeze
|
|
23
|
+
SEM_VER = /\b(\d+)(?:(\.)(\d+))?(?:(\.)(\d+))?(?:([-.])?(\S+))?\b/.freeze
|
|
24
24
|
URI_SCHEME = %r{\A([a-z][a-z\d+-.]*)://[^@:\[\]\\^<>|\s]}i.freeze
|
|
25
25
|
TASK_METADATA = Rake::TaskManager.record_task_metadata
|
|
26
26
|
private_constant :VAR_SET, :BLK_SET, :SEM_VER, :URI_SCHEME, :TASK_METADATA
|
|
@@ -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
|
|
@@ -1339,7 +1339,7 @@ module Squared
|
|
|
1339
1339
|
return cmd unless cmd.respond_to?(:done)
|
|
1340
1340
|
|
|
1341
1341
|
raise_error('no args added', hint: cmd.first) unless cmd.size > 1
|
|
1342
|
-
@session = nil if cmd
|
|
1342
|
+
@session = nil if cmd.equal?(@session)
|
|
1343
1343
|
cmd.done
|
|
1344
1344
|
end
|
|
1345
1345
|
|
|
@@ -1475,7 +1475,7 @@ module Squared
|
|
|
1475
1475
|
__send__ meth
|
|
1476
1476
|
end
|
|
1477
1477
|
end
|
|
1478
|
-
val = val.
|
|
1478
|
+
val = val.reject { |item| !item || item == true }.join(s)
|
|
1479
1479
|
next unless found && !val.empty?
|
|
1480
1480
|
elsif (val = __send__(val)).nil?
|
|
1481
1481
|
next
|
|
@@ -1847,9 +1847,9 @@ module Squared
|
|
|
1847
1847
|
|
|
1848
1848
|
a, b = [a.first, b.first].map! do |c|
|
|
1849
1849
|
d = begin
|
|
1850
|
-
Integer(c[
|
|
1850
|
+
Integer(c[6]).to_s
|
|
1851
1851
|
rescue StandardError
|
|
1852
|
-
c[
|
|
1852
|
+
c[6] ? '-1' : '0'
|
|
1853
1853
|
end
|
|
1854
1854
|
[c[0], c[2], c[4] || '0', d]
|
|
1855
1855
|
end
|
|
@@ -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)
|
|
@@ -2113,7 +2124,7 @@ module Squared
|
|
|
2113
2124
|
end
|
|
2114
2125
|
|
|
2115
2126
|
def semmajor?(cur, want)
|
|
2116
|
-
(cur[0] == '0' && want[0] == '0' ? cur[2] != want[2] : cur[0] != want[0]) && !want[
|
|
2127
|
+
(cur[0] == '0' && want[0] == '0' ? cur[2] != want[2] : cur[0] != want[0]) && !want[6]
|
|
2117
2128
|
end
|
|
2118
2129
|
|
|
2119
2130
|
def printfirst?
|
|
@@ -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,
|
|
@@ -328,19 +328,8 @@ module Squared
|
|
|
328
328
|
append_tag(tag || option('tag', ignore: false) || self.tag)
|
|
329
329
|
append_context context
|
|
330
330
|
when :bake
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
op.reset
|
|
334
|
-
if Dir.exist?(args.last)
|
|
335
|
-
if projectpath?(val = args.pop)
|
|
336
|
-
context = val
|
|
337
|
-
else
|
|
338
|
-
op.push(val)
|
|
339
|
-
end
|
|
340
|
-
end
|
|
341
|
-
op.append(args, escape: true, strip: /^:/)
|
|
342
|
-
contextdir context if context
|
|
343
|
-
end
|
|
331
|
+
op.append(escape: true, strip: /^:/, clear: true)
|
|
332
|
+
op.push(context) if context
|
|
344
333
|
end
|
|
345
334
|
op.clear(pass: false)
|
|
346
335
|
run(from: :"buildx:#{flag}")
|
|
@@ -373,6 +362,7 @@ module Squared
|
|
|
373
362
|
end
|
|
374
363
|
run(from: :"compose:#{flag}")
|
|
375
364
|
end
|
|
365
|
+
alias compose_ compose!
|
|
376
366
|
|
|
377
367
|
def container(flag, opts = [], id: nil)
|
|
378
368
|
cmd, opts = docker_session('container', flag, opts: opts)
|
|
@@ -342,7 +342,7 @@ module Squared
|
|
|
342
342
|
end
|
|
343
343
|
|
|
344
344
|
subtasks({
|
|
345
|
-
'branch' => %i[create track delete move copy list current].freeze,
|
|
345
|
+
'branch' => %i[create track delete move copy list all current].freeze,
|
|
346
346
|
'checkout' => %i[commit branch track detach path].freeze,
|
|
347
347
|
'commit' => %i[add all amend amend-orig fixup].freeze,
|
|
348
348
|
'diff' => %i[head branch files view between contain].freeze,
|
|
@@ -698,12 +698,7 @@ module Squared
|
|
|
698
698
|
task flag do |_, args|
|
|
699
699
|
branch flag, args.to_a
|
|
700
700
|
end
|
|
701
|
-
when :
|
|
702
|
-
format_desc action, flag
|
|
703
|
-
task flag do
|
|
704
|
-
branch flag
|
|
705
|
-
end
|
|
706
|
-
else
|
|
701
|
+
when :move, :copy
|
|
707
702
|
format_desc action, flag, 'branch,oldbranch?'
|
|
708
703
|
task flag, [:branch, :oldbranch] do |_, args|
|
|
709
704
|
if (branch = args.branch)
|
|
@@ -714,6 +709,11 @@ module Squared
|
|
|
714
709
|
end
|
|
715
710
|
branch(flag, refs: [oldbranch, branch])
|
|
716
711
|
end
|
|
712
|
+
else
|
|
713
|
+
format_desc action, flag
|
|
714
|
+
task flag do
|
|
715
|
+
branch flag
|
|
716
|
+
end
|
|
717
717
|
end
|
|
718
718
|
when 'switch'
|
|
719
719
|
case flag
|
|
@@ -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
|
|
@@ -1361,6 +1357,7 @@ module Squared
|
|
|
1361
1357
|
append_pathspec op.extras
|
|
1362
1358
|
source(exception: false)
|
|
1363
1359
|
end
|
|
1360
|
+
alias log_ log!
|
|
1364
1361
|
|
|
1365
1362
|
def diff(flag, opts = [], refs: [], branch: nil, range: [], index: [])
|
|
1366
1363
|
cmd, opts = git_session('diff', opts: opts)
|
|
@@ -1809,6 +1806,10 @@ module Squared
|
|
|
1809
1806
|
|
|
1810
1807
|
def source(cmd = @session, exception: true, io: false, sync: true, stdout: false, stderr: false, banner: true,
|
|
1811
1808
|
multiple: false, hint: nil, from: nil, send: :system, **kwargs)
|
|
1809
|
+
unless cmd
|
|
1810
|
+
print_error('no git session started', subject: project, hint: from, pass: true)
|
|
1811
|
+
return
|
|
1812
|
+
end
|
|
1812
1813
|
cmd = cmd.target if cmd.is_a?(OptionPartition)
|
|
1813
1814
|
if io && banner == false
|
|
1814
1815
|
from = nil
|
|
@@ -1995,7 +1996,7 @@ module Squared
|
|
|
1995
1996
|
end
|
|
1996
1997
|
op << '--verbose' if (flag || from == :fetch) && stdout? && !op.arg?('quiet')
|
|
1997
1998
|
if remote
|
|
1998
|
-
op.append(remote
|
|
1999
|
+
op.append(remote)
|
|
1999
2000
|
if (val = option('refspec', target: target, strict: true))
|
|
2000
2001
|
op.append(*split_escape(val))
|
|
2001
2002
|
else
|
|
@@ -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
|
|
@@ -176,11 +176,11 @@ module Squared
|
|
|
176
176
|
end
|
|
177
177
|
break
|
|
178
178
|
end
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
next if found.anybits?(1)
|
|
180
|
+
|
|
181
|
+
puts log_message(found == 0 ? Logger::INFO : Logger::WARN,
|
|
182
|
+
"no scripts #{found == 0 ? 'found' : 'executed'}",
|
|
183
|
+
subject: name, hint: pyprojectfile)
|
|
184
184
|
end
|
|
185
185
|
when 'exec'
|
|
186
186
|
format_desc action, nil, 'command|:,args*'
|
|
@@ -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
|
|
@@ -525,6 +525,7 @@ module Squared
|
|
|
525
525
|
op.clear
|
|
526
526
|
run(from: :"#{flag}:build")
|
|
527
527
|
end
|
|
528
|
+
alias build_ build!
|
|
528
529
|
|
|
529
530
|
def publish(flag, opts = [], test: false)
|
|
530
531
|
case flag
|
|
@@ -7,7 +7,7 @@ module Squared
|
|
|
7
7
|
GEMFILE = %w[Gemfile Gemfile.lock gem.deps.rb gems.rb Isolate].freeze
|
|
8
8
|
DIR_RUBY = (GEMFILE + Rake::Application::DEFAULT_RAKEFILES + ['README.rdoc']).freeze
|
|
9
9
|
OPT_RUBY = {
|
|
10
|
-
ruby: %w[0=im?
|
|
10
|
+
ruby: %w[a c l n p s S w 0=im? C=pm e=q E=bm F=qm i=bm? I=pm r=bm W=bm? x=pm? d|debug jit rjit verbose
|
|
11
11
|
y|yydebug backtrace-limit=i crash-report=q disable=q dump=q enable=q encoding=b external-encoding=b
|
|
12
12
|
internal-encoding=b parser=b].freeze,
|
|
13
13
|
rake: %w[A|all B|build-all comments n|dry-run m|multitask P|prereqs q|quiet X|no-deprecation-warnings
|
|
@@ -530,7 +530,7 @@ module Squared
|
|
|
530
530
|
.each do |val|
|
|
531
531
|
next unless val.empty? || File.exist?(val.sub('$HOME', Dir.home))
|
|
532
532
|
|
|
533
|
-
trim = ->(s) { s
|
|
533
|
+
trim = ->(s) { s =~ /^\D+\d+\.\d+(?:\.\S+)?/ ? $&.sub(/^([a-z]+)-/i, '\1 ') : s }
|
|
534
534
|
ver = '.ruby-version'
|
|
535
535
|
out << trim.call(case (cmd = File.basename(val))
|
|
536
536
|
when 'rvm'
|
|
@@ -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`
|
|
@@ -21,7 +21,7 @@ module Squared
|
|
|
21
21
|
include Prompt
|
|
22
22
|
|
|
23
23
|
def append(target, *args, delim: false, escape: false, quote: true, strip: nil, force: true, double: false,
|
|
24
|
-
**)
|
|
24
|
+
preserve: true, **)
|
|
25
25
|
return if (ret = args.flatten).empty?
|
|
26
26
|
|
|
27
27
|
target << '--' if delim && !target.include?('--')
|
|
@@ -35,7 +35,7 @@ module Squared
|
|
|
35
35
|
if !(pa = val.is_a?(Pathname)) && escape
|
|
36
36
|
shell_escape(val, quote: quote, double: double)
|
|
37
37
|
elsif quote || pa
|
|
38
|
-
shell_quote(val, force: force, double: double)
|
|
38
|
+
shell_quote(val, force: force, double: double, preserve: preserve)
|
|
39
39
|
else
|
|
40
40
|
val
|
|
41
41
|
end
|
|
@@ -294,9 +294,9 @@ module Squared
|
|
|
294
294
|
self
|
|
295
295
|
end
|
|
296
296
|
|
|
297
|
-
def append(*args, **kwargs)
|
|
298
|
-
args = extras if args.empty?
|
|
299
|
-
OptionPartition.append(target, *args, **kwargs)
|
|
297
|
+
def append(*args, clear: false, preserve: '"', **kwargs)
|
|
298
|
+
args = clear ? extras.dup.tap { extras.clear } : extras if args.empty?
|
|
299
|
+
OptionPartition.append(target, *args, preserve: preserve, **kwargs)
|
|
300
300
|
self
|
|
301
301
|
end
|
|
302
302
|
|
|
@@ -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.24
|
|
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.10
|
|
128
128
|
specification_version: 4
|
|
129
129
|
summary: Rake task generator for managing multi-language workspaces.
|
|
130
130
|
test_files: []
|