squared 0.5.6 → 0.5.8
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 +65 -1
- data/README.md +16 -12
- data/lib/squared/common/format.rb +3 -7
- data/lib/squared/common/shell.rb +3 -3
- data/lib/squared/common/system.rb +2 -3
- data/lib/squared/common/utils.rb +5 -2
- data/lib/squared/config.rb +3 -3
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/application.rb +3 -1
- data/lib/squared/workspace/project/base.rb +88 -96
- data/lib/squared/workspace/project/docker.rb +16 -17
- data/lib/squared/workspace/project/git.rb +30 -33
- data/lib/squared/workspace/project/node.rb +38 -40
- data/lib/squared/workspace/project/python.rb +25 -33
- data/lib/squared/workspace/project/ruby.rb +106 -107
- data/lib/squared/workspace/project/support/class.rb +189 -57
- data/lib/squared/workspace/repo.rb +0 -3
- data/lib/squared/workspace/series.rb +16 -18
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec0306a0e60a4854a3c3be267b5c66577702dee8908bf36eb7c4ccfb98b2b4ff
|
4
|
+
data.tar.gz: 3463f8bce9cfe67a18a2e09d9d7358a4f8c8bebcddc9037612bfc1cb2b213d93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f47734d5f11de8e4106ab249a276b3e42ca9d70de61863a24f51e65b579a187a27cfad2b21593d9a79bb0aeb9a6a192775e3753d3ff02d546fee06057cf7cd1
|
7
|
+
data.tar.gz: 01b1520fe506cdb8d8e08213794aaa72d8a55e7ddb51b139573d67ee46e613d9ee600809799972b57a1f3435e8672f0b3ea3d8398e381cc72bdf955d9e330c58
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,63 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.5.8] - 2025-10-01
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
- See `0.4.21`.
|
8
|
+
|
9
|
+
## [0.4.21] - 2025-10-01
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- Project base method variable_set was aliased to the name apply.
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
|
17
|
+
- Project base method run visibility was changed to public.
|
18
|
+
- OptionPartition method uniq! returns self or nil.
|
19
|
+
|
20
|
+
### Fixed
|
21
|
+
|
22
|
+
- Docker attribute file did not search for nearest config.
|
23
|
+
- Project task run did not accept Proc or Method definitions.
|
24
|
+
- Gem command options were revalidated to 3.7.2.
|
25
|
+
- Bundler command options were revalidated to 2.7.2.
|
26
|
+
- Ruby class method bundle did not pass through commands.
|
27
|
+
- Ruby task ruby did not separate options and arguments.
|
28
|
+
- Pip commands uninstall and freeze did not filter options.
|
29
|
+
- Ruby command gem action update did not append packages.
|
30
|
+
- OptionPartition did not detect short options with a merged value.
|
31
|
+
- Gem commands option version did not use quotes.
|
32
|
+
- Git command pull action all used undefined delete_prefix! method.
|
33
|
+
- OptionPartition did not delete added values from extras.
|
34
|
+
- Python editable projects can override requirements detection.
|
35
|
+
- Project session method did delete short options with a merged value.
|
36
|
+
- Gem command install did not try to resolve local paths.
|
37
|
+
- Ruby commands did not always check for file target exists.
|
38
|
+
|
39
|
+
## [0.5.7] - 2025-09-14
|
40
|
+
|
41
|
+
### Fixed
|
42
|
+
|
43
|
+
- See `0.4.20`.
|
44
|
+
|
45
|
+
## [0.4.20] - 2025-09-14
|
46
|
+
|
47
|
+
### Changed
|
48
|
+
|
49
|
+
- Project banners when requested return consistent arguments.
|
50
|
+
|
51
|
+
### Fixed
|
52
|
+
|
53
|
+
- Workspace global as command alias used undefined parameter.
|
54
|
+
- Python did not separate dependency manager and build backend.
|
55
|
+
- Gem command build did not validate gemspec was located.
|
56
|
+
- Project class Ruby used glob methods not available in Ruby 2.4.
|
57
|
+
- Shell options support using boolean as values.
|
58
|
+
- Git command merge action commit failed when using interactive menu.
|
59
|
+
- NPM command line options did not support boolean flags.
|
60
|
+
|
3
61
|
## [0.5.6] - 2025-08-30
|
4
62
|
|
5
63
|
### Added
|
@@ -42,7 +100,7 @@
|
|
42
100
|
|
43
101
|
- Git command commit did not check for pushes with nothing staged.
|
44
102
|
- Git command submodule did not include name of command.
|
45
|
-
- Shellwords method shellsplit was missing from String class.
|
103
|
+
- Shellwords method shellsplit was missing from String class.
|
46
104
|
|
47
105
|
## [0.4.18] - 2025-08-23
|
48
106
|
|
@@ -1025,6 +1083,8 @@
|
|
1025
1083
|
|
1026
1084
|
- Changelog was created.
|
1027
1085
|
|
1086
|
+
[0.5.8]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.8
|
1087
|
+
[0.5.7]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.7
|
1028
1088
|
[0.5.6]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.6
|
1029
1089
|
[0.5.5]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.5
|
1030
1090
|
[0.5.4]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.4-ruby
|
@@ -1032,6 +1092,10 @@
|
|
1032
1092
|
[0.5.2]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.2-ruby
|
1033
1093
|
[0.5.1]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.1-ruby
|
1034
1094
|
[0.5.0]: https://github.com/anpham6/squared-ruby/releases/tag/v0.5.0-ruby
|
1095
|
+
[0.4.21]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.21
|
1096
|
+
[0.4.20]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.20
|
1097
|
+
[0.4.19]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.19
|
1098
|
+
[0.4.18]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.18
|
1035
1099
|
[0.4.17]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.17-ruby
|
1036
1100
|
[0.4.16]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.16-ruby
|
1037
1101
|
[0.4.15]: https://github.com/anpham6/squared-ruby/releases/tag/v0.4.15-ruby
|
data/README.md
CHANGED
@@ -108,9 +108,9 @@ Workspace::Application
|
|
108
108
|
revbuild(include: %w[src/ framework/ types/]) # Synchronous is recommended
|
109
109
|
end
|
110
110
|
.add("squared/sqd", exclude: :git, pass: [:node, "checkout", "bump"]) do # Skip initialize(:node) + squared:checkout:* + squared:bump:*
|
111
|
-
|
112
|
-
|
113
|
-
|
111
|
+
apply :script, "build:sqd" # Override detection
|
112
|
+
apply :depend, false #
|
113
|
+
apply :clean, ["build/sqd/"] # variable_set (alias)
|
114
114
|
end
|
115
115
|
.with(:docker, only: ["build", "compose"]) do
|
116
116
|
.add("squared", "docker", file: "Dockerfile", context: ".", tag: "latest", registry: "localhost:5000", username: "squared",
|
@@ -306,7 +306,7 @@ Workspace::Application
|
|
306
306
|
doc(windows? ? ".\make.bat html" : "make html") # rake android-docs:doc | rake doc:python
|
307
307
|
add("android-docs", "android", venv: "/home/user/.venv") # rake android-docs:depend
|
308
308
|
add("chrome-docs", "chrome", graph: "android", venv: %w[.venv --clear]) do # /workspaces/chrome-docs/.venv
|
309
|
-
|
309
|
+
apply :dependindex, 1 # Use Poetry for dependencies (optional)
|
310
310
|
end
|
311
311
|
end
|
312
312
|
.with(:node) do
|
@@ -498,21 +498,22 @@ Most project classes will inherit from `Git` which enables these tasks:
|
|
498
498
|
|
499
499
|
| Task | Git | Command |
|
500
500
|
| :--------- | :--------------- | :-------------------------------------------- |
|
501
|
-
| branch | branch | create
|
501
|
+
| branch | branch | create track delete move copy list current |
|
502
502
|
| checkout | checkout | commit branch track detach path |
|
503
503
|
| commit | commit | add all amend amend-orig fixup |
|
504
|
-
| diff | diff | head
|
504
|
+
| diff | diff | head branch files view between contain |
|
505
505
|
| fetch | fetch | origin remote all |
|
506
506
|
| files | ls-files | cached modified deleted others |
|
507
|
-
| git | | add blame clean mv rm
|
507
|
+
| git | | add blame clean mv revert rm status |
|
508
|
+
| log | log | view between contain |
|
508
509
|
| merge | merge | commit no-commit send |
|
509
510
|
| pull | pull | origin remote all |
|
510
511
|
| rebase | rebase | branch onto send |
|
511
512
|
| refs | ls-remote --refs | heads tags remote |
|
512
|
-
| reset | reset | commit index patch mode
|
513
|
-
| restore | restore | staged worktree
|
514
|
-
| rev | rev | commit output
|
515
|
-
| show | show | format oneline
|
513
|
+
| reset | reset | commit index patch mode undo |
|
514
|
+
| restore | restore | source staged worktree |
|
515
|
+
| rev | rev | commit build output |
|
516
|
+
| show | show | format oneline textconv |
|
516
517
|
| stash | stash | push pop apply branch drop clear list all |
|
517
518
|
| submodule | submodule | status update branch url sync |
|
518
519
|
| switch | switch | branch create detach |
|
@@ -599,6 +600,9 @@ BUILD_${NAME}_VERSION=0.1.0 # publish + detection
|
|
599
600
|
BANNER=0 # hide banner
|
600
601
|
BANNER_${NAME}=0 #
|
601
602
|
|
603
|
+
VERBOSE=0 # console output level
|
604
|
+
VERBOSE_${NAME}=0 # 0,1,2,n
|
605
|
+
|
602
606
|
REVBUILD_FORCE=1 # Rebuild all targets
|
603
607
|
REVBUILD_FORCE_${NAME}=1 # Rebuild project
|
604
608
|
|
@@ -641,7 +645,7 @@ GIT_AUTOSTASH_${NAME}=0 # rebase (project only)
|
|
641
645
|
| :--------- | :---------------- | :-------------------------------------------------------------------- |
|
642
646
|
| branch | create | TRACK=0,1,s F|FORCE |
|
643
647
|
| branch | move copy | F|FORCE |
|
644
|
-
| branch |
|
648
|
+
| branch | delete | COUNT=n |
|
645
649
|
| branch | global | SYNC |
|
646
650
|
| checkout | branch | DETACH TRACK=s COUNT=n |
|
647
651
|
| checkout | detach | REFLOG=1 |
|
@@ -191,7 +191,7 @@ module Squared
|
|
191
191
|
emphasize(args, title: title + (subject ? " #{subject}" : ''), sub: sub, pipe: -1)
|
192
192
|
else
|
193
193
|
msg = [log_title(level, color: color)]
|
194
|
-
msg << (color ? sub_style(subject, styles: (@theme && @theme[:subject]) || :bold) : subject) if subject
|
194
|
+
msg << (color ? sub_style(subject.to_s, styles: (@theme && @theme[:subject]) || :bold) : subject) if subject
|
195
195
|
msg << args.shift if msg.size == 1
|
196
196
|
message(msg.join(' '), *args, hint: hint)
|
197
197
|
end
|
@@ -225,12 +225,8 @@ module Squared
|
|
225
225
|
def emphasize(val, title: nil, footer: nil, right: false, cols: nil, sub: nil, pipe: nil,
|
226
226
|
border: @theme && @theme[:border])
|
227
227
|
n = 0
|
228
|
-
max = ->(
|
229
|
-
set =
|
230
|
-
ret = Array(v).map(&:to_s)
|
231
|
-
max.call(ret)
|
232
|
-
ret
|
233
|
-
end
|
228
|
+
max = ->(a) { n = [n, a.max_by(&:size).size].max }
|
229
|
+
set = ->(s) { Array(s).map(&:to_s).tap { |a| max.call(a) } }
|
234
230
|
title &&= set.call(title)
|
235
231
|
footer &&= set.call(footer)
|
236
232
|
if val.is_a?(::Array)
|
data/lib/squared/common/shell.rb
CHANGED
@@ -78,7 +78,7 @@ module Squared
|
|
78
78
|
a = '--'
|
79
79
|
b = '='
|
80
80
|
end
|
81
|
-
"#{a}#{flag}#{
|
81
|
+
"#{a}#{flag}#{unless val.nil?
|
82
82
|
"#{b}#{if escape
|
83
83
|
shell_escape(val, quote: quote, double: double, override: override)
|
84
84
|
elsif quote
|
@@ -98,8 +98,8 @@ module Squared
|
|
98
98
|
|
99
99
|
def shell_bin(name, env: true)
|
100
100
|
key = name.upcase
|
101
|
-
shell_quote((env && ENV["PATH_#{key}"]) || PATH[key] || PATH[key.to_sym] || name,
|
102
|
-
|
101
|
+
shell_quote((env && ENV["PATH_#{key}"]) || PATH[key] || PATH[key.to_sym] || name, option: false, force: false,
|
102
|
+
double: true)
|
103
103
|
end
|
104
104
|
|
105
105
|
def line_width(lines)
|
data/lib/squared/common/utils.rb
CHANGED
@@ -89,8 +89,11 @@ module Squared
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def time_since(val, ms: true)
|
92
|
-
|
93
|
-
|
92
|
+
time_epoch(ms: ms) - time_epoch(Time.parse(val), ms: ms)
|
93
|
+
end
|
94
|
+
|
95
|
+
def time_epoch(val = Time.now, ms: true)
|
96
|
+
val.utc.strftime(ms ? '%s%L' : '%s').to_i
|
94
97
|
end
|
95
98
|
|
96
99
|
def rand_s(size)
|
data/lib/squared/config.rb
CHANGED
@@ -213,7 +213,7 @@ module Squared
|
|
213
213
|
ext[0] = mime
|
214
214
|
elsif file
|
215
215
|
keys.prepend(file)
|
216
|
-
alt = basepath
|
216
|
+
alt = basepath "#{main}.{#{ext.join(',')}}"
|
217
217
|
file = Dir[alt].first
|
218
218
|
else
|
219
219
|
alt = main
|
@@ -347,8 +347,8 @@ module Squared
|
|
347
347
|
basepath(file = main + @ext).to_s rescue file
|
348
348
|
end
|
349
349
|
|
350
|
-
def basepath(
|
351
|
-
project ? project.basepath(
|
350
|
+
def basepath(*args)
|
351
|
+
project ? project.basepath(*args) : Pathname.pwd.join(*args)
|
352
352
|
end
|
353
353
|
end
|
354
354
|
end
|
data/lib/squared/version.rb
CHANGED