squared 0.8.6 → 0.9.0.pre2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d49aff6b1cd9bedf0f0057bd7f9afe30cee588a2d86224f59585f53f16003ac6
4
- data.tar.gz: 445bcbd6ae09304dc4797404de44819600abae31b5f41f8bc61ce1951428a25c
3
+ metadata.gz: c463103c9731435a61c03a50774d321728675919d1299f92179ee3283c43c570
4
+ data.tar.gz: 608c26522a45d3a91dad5d3c8f094d9da571f8010a16bccc2bb88dc1a92bd90e
5
5
  SHA512:
6
- metadata.gz: 66c420cde0388bbb2c284fc83b365014bdd770cf30d9edb4a5c5b903b9c95752a87a3c8d951acd1c9b73473d2ce5b1167c6bff63fa582d75f79418ed80e468a5
7
- data.tar.gz: 0b89a2327e97e8f26e077134dfa228bfb1234a09cc6e499a96cd042d23d9e004aea623c63f8b34e3251b198b9f9806b6d191db9978f251c0d52608d1b4e452dd
6
+ metadata.gz: e352c390e9299f58b66066f3bdf28ad24d60496b00155eaf8d1dc26b64311f7fef2203bb861c17a021fecc16f2f09849a40d563179a1591eec8db25f502164d3
7
+ data.tar.gz: '0598d79fac00ed9a272582db5b655bd5cf75b5597f15d67ec48dd00b6be990e4ef9b171facf19a4c62c54616187f58c46c0f886853dea75ed4a694198640708f'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### Added
6
+
7
+ - Gem install global exe command "sqd" was created.
8
+ - Common base argument FORCE for session propagation was created.
9
+ - Common base argument YES for session propagation was created.
10
+ - Common base argument PAGE for prompt choice pagination was created.
11
+ - Ruby command gem action push option dry-run was implemented.
12
+ - Python task depend will install from pylock.toml when detected.
13
+ - Python task depend supports PDM package manager.
14
+ - Common base argument APP for application settings was created.
15
+ - Docker command network action [connect|disconnect] is interactive.
16
+ - Docker command run was implemented.
17
+ - Docker command container is interactive.
18
+ - Docker command network action rm is interactive.
19
+ - Docker command container action rm is interactive.
20
+ - Docker command run action entrypoint is interactive.
21
+ - Node command tsc accepts unfiltered arbitrary option flags.
22
+
23
+ ### Changed
24
+
25
+ - Ruby required version was changed to 2.7.0.
26
+ - Git commit hash detection supports up to SHA256.
27
+ - Git module revbuild uses a Monitor for file write synchronization.
28
+ - TypeScript base version was changed to v6.0 with support for v7.0.
29
+ - Common base argument CHOICE can be set to Float::INFINITY.
30
+ - OptionPartition singleton does not include Common::Prompt.
31
+ - Docker command image action ls without arguments is interactive.
32
+ - Application banner attributes with project references are segregated.
33
+ - Docker private method dnsname is compliant with RFC 1035.
34
+ - Node task depend uses automatic CI detection for NPM install.
35
+ - Repo sync option --fetch-submodules was renamed --recurse-submodules.
36
+ - Ruby command script does not run code until it has passed validation.
37
+ - Ruby gem io-console is used for default console size.
38
+ - Node program tsc boolean options support explicit values.
39
+
40
+ ### Removed
41
+
42
+ - Common prompt method choice keyword auto is implied with a list.
43
+ - Docker private method emptyargs was replaced with OptionPartition.clear.
44
+ - Docker private method charname was replaced with subdomainname.
45
+ - Git command show was relocated into command git action show.
46
+
3
47
  ## [0.8.6] - 2026-10-01
4
48
 
5
49
  ### Added
@@ -687,7 +731,7 @@
687
731
 
688
732
  ### Fixed
689
733
 
690
- - See `0.4.32`.
734
+ - See `0.5.18`.
691
735
 
692
736
  ## [0.4.32]
693
737
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # squared 0.8
1
+ # squared 0.9
2
2
 
3
3
  * [source](https://github.com/anpham6/squared-ruby)
4
4
  * [docs](https://squared.readthedocs.io)
@@ -10,13 +10,14 @@
10
10
  | 2024-12-07 | 0.1.0 | 2.4.0 | 3.3.6 | |
11
11
  | 2025-01-07 | 0.2.0 | | 3.4.0 | |
12
12
  | 2025-02-07 | 0.3.0 | | 3.4.1 | |
13
- | 2025-03-06 | 0.4.0 | | 3.4.2 | * |
13
+ | 2025-03-06 | 0.4.0 | | 3.4.2 | |
14
14
  | 2025-06-16 | 0.5.0 | 2.5.0 | 3.4.4 | |
15
15
  | ---------- | ----- | ----- | ----- | --- |
16
16
  | 2025-08-23 | 0.5.5 | | 3.4.5 | |
17
- | 2025-10-31 | 0.6.0 | | 3.4.7 | * |
17
+ | 2025-10-31 | 0.6.0 | | 3.4.7 | |
18
18
  | 2026-01-07 | 0.7.0 | 2.5.0 | 4.0.0 | * |
19
19
  | 2026-06-16 | 0.8.0 | | 4.0.5 | * |
20
+ | 2026-10-12 | 0.9.0 | 2.7.0 | 4.0.7 | * |
20
21
 
21
22
  The range chart indicates the *latest* Ruby tested against at the time of release.
22
23
 
@@ -26,6 +27,41 @@ The range chart indicates the *latest* Ruby tested against at the time of releas
26
27
  gem install squared
27
28
  ```
28
29
 
30
+ ## CLI - sqd
31
+
32
+ There is an additional program wrapper for ``rake`` to be used when running batch commands and to enable global settings more easily.
33
+
34
+ ```xml
35
+ Usage: sqd [options] [rake options] [global...] [:targets...] -- [rake targets...]
36
+
37
+ -R, --ref STR,STR Run global commands by class reference
38
+ -G, --group STR,STR Run global commands by project group
39
+
40
+ -P, --project STR,PAT Run project commands with common arguments
41
+ -a, --project-args STR,STR Provide command arguments for :targets (multiple)
42
+ -e, --project-env KEY=STR Provide command ENV variables for :targets (multiple)
43
+
44
+ -s, --[no-]strict Do not run commands with invalid arguments
45
+ --update Use update strategy for applicable commands
46
+ -F, --force [STR,STR] Enable force through ENV by application
47
+ -y, --yes [STR,STR] Enable auto-approve through ENV by application
48
+ -d, --dry-run Run commands without any modifying actions
49
+
50
+ -S, --select PAGE[:CHOICE] Prompt menu selection pagination display (e.g. 15:75)
51
+
52
+ -p, --pipe 0|1|2 Set file descriptor for communication
53
+ -o, --pipe-out FILE Write command data stream to a file
54
+ --fail 0..4 Set application exception level
55
+ --log-level SEVERITY Set logger and exception state (debug, info, warn, error, fatal)
56
+
57
+ --[no-]banner Display executing command attributes
58
+ -x, --[no-]color Use enhanced styling for terminal output
59
+ -X, --plain Disable banner and styling for all commands
60
+ -v, --verbose Increase output verbosity (multiple)
61
+ --version Print the current version
62
+ -h, --help Print the command line options
63
+ ```
64
+
29
65
  ## Example - Rakefile
30
66
 
31
67
  Projects from any accessible folder can be added relative to the parent directory or absolutely. Missing projects will simply be excluded from the task runner.
@@ -54,7 +90,7 @@ require "squared/app" # All workspace related modules
54
90
  # sqd = /workspaces/squared/sqd
55
91
 
56
92
  # Load external Project classes (optional)
57
- Workspace::Application.load_ref("/home/user/.gem/ruby/4.0.0/gems/squared-0.7.0/lib/squared/workspace/project") # ref = :node => node.rb (absolute)
93
+ Workspace::Application.load_ref("/home/user/.gem/ruby/4.0.0/gems/squared-0.9.0/lib/squared/workspace/project") # ref = :node => node.rb (absolute)
58
94
  Workspace::Application.load_ref("lib/squared/workspace/project", gem: "squared") # bundle env (relative)
59
95
 
60
96
  Workspace::Application
@@ -69,38 +105,40 @@ Workspace::Application
69
105
  "CFLAGS" => "-fPIC -O1"
70
106
  })
71
107
  .add("optparse", doc: "rake rdoc", gemspec: "optparse.gemspec", group: "default") # Uses bundler/gem_tasks (without C extensions)
72
- .add("logger", copy: { from: "lib", glob: "**/*.rb", into: "/home/user/.local/gem/ruby/4.0.0/gems/logger-1.7.0" }, clean: ["tmp/"]) do # autodetect: true | "rvm" | "rbenv" | "asdf" | "bundler"
73
- self.gemdir = "/home/user/.local/gem/ruby/4.0.0/gems/logger-1.7.0" # Default for "into"
108
+ .add("logger", copy: { from: "lib", glob: "**/*.rb", into: "/home/user/.local/gem/ruby/4.0.0/gems/logger-1.7.0" }, clean: ["tmp/"]) do # autodetect: true | "rvm" | "rbenv" | "asdf" | "mise" | bundler"
109
+ self.gemdir = "/home/user/.local/gem/ruby/4.0.0/gems/logger-1.7.0" # Default for "into"
74
110
  end
75
- .add("e-mc", "emc", copy: { from: "publish", scope: "@e-mc", also: [:pir, "squared-express/"] }, ref: :node) # Node
111
+ .add("e-mc", "emc", copy: { from: "publish", scope: "@e-mc", also: [:pir, "squared-express/"] }, ref: :node)
76
112
  .add("pi-r", "pir", copy: { from: "publish", scope: "@pi-r" }, clean: ["publish/**/*.js", "tmp/"]) # Trailing slash required for directories
77
113
  .add("squared", init: "pnpm", script: ["build:stage1", "build:stage2"], group: "app") do # Use pnpm/yarn/berry for depend + Copy target (main)
78
114
  # Repo (global)
79
- as(:run, "build:dev", "dev") # npm run build:dev -> npm run dev
115
+ as(:run, "build:dev", "dev") # npm run build:dev -> npm run dev
80
116
  as(:run, { "build:dev": "dev", "build:prod": "prod" })
81
117
 
82
- add("publish/sqd-cli", "cli", exclude: [:git]) # rake cli:build
83
- add("publish/sqd-serve") # rake sqd-serve:build
118
+ add("publish/sqd-cli", "cli", exclude: [:git]) # rake cli:build
119
+ add("publish/sqd-serve") # rake sqd-serve:build
84
120
  add("publish/sqd-admin", group: "sqd", exclude: [:base])
85
121
  # OR
86
- with(exclude: [:base]) { add("publish/*", "packages") } # rake packages:sqd-serve:build
122
+ with(exclude: [:base]) { add("publish/*", "packages") } # rake packages:sqd-serve:publish
87
123
  # OR
88
- add(["publish/sqd-cli", "publish/sqd-serve"], true, exclude: [:base]) # rake squared:sqd-serve:build
124
+ add(["publish/sqd-cli", "publish/sqd-serve"], true, exclude: [:base]) # rake squared:sqd-serve:publish
89
125
 
90
126
  # Git
91
- revbuild(include: %w[src/ framework/ types/]) # Synchronous is recommended
127
+ revbuild(include: ["src/", "framework/", "types/"]) # Synchronous is recommended
92
128
  end
93
- .add("squared/sqd", exclude: :git, pass: [:node, "checkout", "bump"]) do # Skip initialize(:node) + squared:checkout:* + squared:bump:*
94
- apply :script, "build:sqd" # Override detection
95
- apply :depend, false #
96
- apply :clean, ["build/sqd/"] # variable_set (alias)
129
+ .add("squared/sqd", exclude: :git, pass: [:node, "checkout", "bump"]) do # Skip initialize(:node) + squared:checkout:* + squared:bump:*
130
+ apply :script, "build:sqd" # Override detection
131
+ apply :depend, false #
132
+ apply :clean, ["build/sqd/"] # variable_set (alias)
97
133
  end
98
- .with(:docker, only: ["build", "compose"], hide: [:windows?]) do # When true hide entire group (formerly pass 0.6.0)
99
- add("squared", "docker", file: "Dockerfile", context: ".", tag: "latest", registry: "localhost:5000", username: "squared", # compose publish => { oci: "oci://docker.io" }
134
+ .with(:docker, only: ["build", "compose"], hide: [:windows?]) do # When true hide entire group
135
+ add("squared", "docker", file: "Dockerfile", tag: "latest",
136
+ registry: "localhost:5000", username: "squared", # compose publish => { oci: "oci://docker.io" }
100
137
  args: "--ssh=default",
138
+ context: ".", # Optional
101
139
  client: { config: '/home/user/.docker', tls: true }, # global options
102
140
  secrets: ["id=github,env=GITHUB_TOKEN"],
103
- mounts: ["src=.,dst=/project,ro,bind-propagation=rshared"]) do # Docker
141
+ mounts: ["src=.,dst=/project,ro,bind-propagation=rshared"]) do
104
142
  series(:clean) do # run | depend | doc | lint | test | copy | clean
105
143
  File.read(basepath("docker-bake.hcl"))
106
144
  .scan(/\btags\s+=\s+\["([^"]+)"\]/)
@@ -152,11 +190,13 @@ Python.options(:build, "build:dev", opts: ["no-deps"]) # inherits
152
190
 
153
191
  Workspace::Application
154
192
  .new(ENV["SQUARED_HOME"], prefix: "rb", common: false) # Local styles
155
- .group("ruby", "default", run: "rake build", copy: "rake install", clean: "rake clean", rubygems: 3, ref: :ruby, override: { # legacy: gem 3.6 | bundler 2.7 => ["3", "2.7"]
156
- pathname: {
157
- run: "rake compile" # rake rb:pathname:build
158
- }
159
- })
193
+ .group("ruby", "default", rubygems: 3, # legacy: gem 3.6 | bundler 2.7 => ["3", "2.7"]
194
+ run: "rake build", copy: "rake install", clean: "rake clean",
195
+ override: {
196
+ pathname: { run: "rake compile" } # rake rb:pathname:build
197
+ },
198
+ ref: :ruby
199
+ )
160
200
  .add("squared") do
161
201
  apply :run, proc { # rake rb:squared:build
162
202
  tsc(with: scriptname || "build:dev", verbose: true) # Repo (global)
@@ -174,7 +214,7 @@ Workspace::Application
174
214
  .each(&:join)
175
215
  }
176
216
  apply :lint, proc {
177
- bundle("exec", "-A --cache=true", with: "lint", verbose: true) # bundle exec --gemfile="/squared/Gemfile" rubocop --parallel -A --cache=true
217
+ bundle("exec", "-A --cache=true", with: "lint", verbose: true) # bundle exec --gemfile="/squared/Gemfile" rubocop --parallel -A --cache=true
178
218
  }
179
219
  end
180
220
  .with(:python, editable: false) do # ref=Symbol | group=String
@@ -216,8 +256,8 @@ Workspace::Application
216
256
  add("android-docs", "android", archive: "https://github.com/anpham6/android-docs/archive/refs/tags/v0.3.0.zip")
217
257
  add("chrome-docs", "chrome", archive: {
218
258
  uri: "https://github.com/anpham6/chrome-docs/archive/refs/tags/v0.5.0.tar.gz", # URI.open (required)
219
- digest: "e3d55d2004d4770dd663254c9272dc3baad0d57a5bd14ca767de6546cdf14680", # SHA1 | SHA256 | SHA384 | SHA512 | MD5
220
- digest: "rmd160:47b7790a511eed675fec1a3e742845fef058799b", # RMD160
259
+ digest: "e3d55d2004d4770dd663254c9272dc3baad0d57a5bd14ca767de6546cdf14680", # SHA1 | SHA256 | SHA384 | SHA512 | MD5 (length)
260
+ digest: "rmd160:47b7790a511eed675fec1a3e742845fef058799b", # RMD160 (prefix)
221
261
  ext: "tar.gz", # zip | tar | tar.gz | tgz | tar.xz | txz | 7z
222
262
  depth: 1, # nested directories (e.g. --strip-components)
223
263
  headers: { # URI.open
@@ -225,7 +265,7 @@ Workspace::Application
225
265
  }
226
266
  })
227
267
  end
228
- .add("squared", release: "https://github.com/anpham6/squared/archive/refs/tags/??") # squared:unpack:zip[v5.4.0,/tmp/squared]
268
+ .add("squared", release: "https://github.com/anpham6/squared/archive/refs/tags/??") # squared:unpack:zip[v5.8.4,/tmp/squared]
229
269
  ```
230
270
 
231
271
  ### Clone
@@ -238,8 +278,8 @@ Workspace::Application
238
278
  .git(
239
279
  "emc": "https://github.com/anpham6/e-mc", # rake emc:clone
240
280
  "pir": { # rake pir:clone
241
- uri: "https://github.com/anpham6/pi-r", #
242
- options: { #
281
+ uri: "https://github.com/anpham6/pi-r",
282
+ options: {
243
283
  "origin": "github", # --origin=github
244
284
  "recurse-submodules": false, # --no-recurse-submodules
245
285
  "shallow-exclude": ["v0.0.1", "v0.0.2"] # --shallow-exclude=v0.0.1 --shallow-exclude=v0.0.2
@@ -261,7 +301,7 @@ Workspace::Application
261
301
  )
262
302
  .with(:node) do # rake clone:node
263
303
  add("e-mc", "emc") do # https://github.com/anpham6/e-mc
264
- revbuild(before: %w[status squared:status], # emc:status + squared:status (always)
304
+ revbuild(before: ["status", "squared:status"], # emc:status + squared:status (always)
265
305
  after: "refresh") # emc:refresh (changed)
266
306
  end #
267
307
  add("pi-r", "pir") # https://github.com/anpham6/pi-r
@@ -304,7 +344,7 @@ Workspace::Application
304
344
  chain "all", "build", with: "pir" # step: 3
305
345
  end
306
346
  add("squared") do
307
- revbuild(include: %w[src/ framework/ types/]) # Git revision build command (optional)
347
+ revbuild(include: ["src/", "framework/", "types/"]) # Git revision build command (optional)
308
348
  chain "all", "revbuild", after: "express:build" # step: 4
309
349
  chain "publish", "bump:patch", "publish:latest", step: 0, sync: true # rake publish
310
350
  end
@@ -318,7 +358,7 @@ Workspace::Application
318
358
  chain "all", "doc", with: "squared", before: "squared:revbuild" # Same
319
359
  end
320
360
  end
321
- .chain("all", "status", with: "squared", after: "android-docs") # Global tasks (e.g. without ":")
361
+ .chain("all", "status", with: "squared", after: "android-docs") # Global tasks (without ":")
322
362
  .build
323
363
  ```
324
364
 
@@ -339,50 +379,50 @@ Threaded is the default when there are two or more tasks. Using ``with`` and eit
339
379
  ```ruby
340
380
  Workspace::Application
341
381
  .new(main: "squared")
342
- .graph(["depend"], ref: :git) # Optional
382
+ .graph(["depend"], ref: :git) # Optional
343
383
  .with(:python) do
344
- doc(windows? ? ".\make.bat html" : "make html") # rake android-docs:doc | rake doc:python
345
- add("android-docs", "android", venv: "/home/user/.venv") # rake android-docs:depend
346
- add("chrome-docs", "chrome", graph: "android", venv: %w[.venv --clear]) do # /workspaces/chrome-docs/.venv
347
- apply :dependindex, 1 # Use Poetry for dependencies (optional)
384
+ doc(windows? ? ".\make.bat html" : "make html") # rake android-docs:doc | rake doc:python
385
+ add("android-docs", "android", venv: "/home/user/.venv") # rake android-docs:depend
386
+ add("chrome-docs", "chrome", graph: "android", venv: [".venv", "--clear"]) do # /workspaces/chrome-docs/.venv
387
+ apply :dependindex, 1 # Use Poetry for dependencies
348
388
  end
349
389
  end
350
390
  .with(:node) do
351
- graph(["build", "copy"], on: { # Overrides "git"
391
+ graph(["build", "copy"], on: { # Overrides "git"
352
392
  first: proc { puts "1" },
353
393
  last: proc { puts "2" }
354
394
  })
355
- script("build:dev") # npm run build:dev
395
+ script("build:dev") # npm run build:dev
356
396
  # OR
357
- run([nil, "build:dev", { "PATH" => "~/.bin" }, "--workspace", "--silent"]) # PATH="~/.bin" npm run build:dev --workspace -- --silent
397
+ run([nil, "build:dev", { "PATH" => "~/.bin" }, "--workspace", "--silent"]) # PATH="~/.bin" npm run build:dev --workspace -- --silent
358
398
  # OR
359
- run({ # Same
360
- script: "build:dev", #
361
- env: { "PATH" => "~/.bin" }, #
362
- opts: "--workspace", #
363
- args: "--silent" #
399
+ run({
400
+ script: "build:dev",
401
+ env: { "PATH" => "~/.bin" },
402
+ opts: "--workspace",
403
+ args: "--silent"
364
404
  })
365
405
 
366
406
  add("e-mc", "emc") do
367
- first("build", "emc:clean", "emc:depend") # rake emc:clean && rake emc:depend && rake emc:build && echo "123"
368
- last("build", out: "123") { |out: nil| puts out } #
369
- error("build") { |err: nil| log.debug err } #
407
+ first("build", "emc:clean", "emc:depend") # rake emc:clean && rake emc:depend && rake emc:build && echo "123"
408
+ last("build", out: "123") { |out: nil| puts out } #
409
+ error("build") { |err: nil| log.debug err } #
370
410
  end
371
411
  add("pi-r", "pir", graph: "emc", first: {
372
- build: proc { puts self.name } # puts "pir"
412
+ build: proc { puts self.name } # puts "pir"
373
413
  })
374
414
  add("squared-express", "express", graph: "pir")
375
415
  add("squared", graph: ["chrome", "express"]) do
376
- first("git:ls-files") { puts "1" } # skipped
377
- first("git:ls-files", override: true) { puts "2" } # puts "2"
378
- last("git:ls-files") { puts workspace.root } # puts "/workspaces" (does not run when error is raised)
379
- error("git:ls-files") { |err| err.is_a?(TypeError) } # return true to suppress error
416
+ first("git:ls-files") { puts "1" } # skipped
417
+ first("git:ls-files", override: true) { puts "2" } # puts "2"
418
+ last("git:ls-files") { puts workspace.root } # puts "/workspaces" (does not run when error is raised)
419
+ error("git:ls-files") { |err| err.is_a?(TypeError) } # return true to suppress error
380
420
  end
381
421
  end
382
422
  .with(:ruby) do
383
- run("gem build") # gem build
423
+ run("gem build") # gem build
384
424
  # OR
385
- run("gem build", on: { first: -> { p "2" }, last: -> { p "4" } }) do # run | depend | graph | clean | doc | lint | test
425
+ run("gem build", on: { first: -> { p "2" }, last: -> { p "4" } }) do # run | depend | graph | clean | doc | lint | test
386
426
  p "1"
387
427
  end
388
428
  # OR
@@ -390,42 +430,42 @@ Workspace::Application
390
430
  p "1"
391
431
  end
392
432
  # OR
393
- run(["gem build", "--force", { "RUBY_VERSION" => "4.0.0" }]) # RUBY_VERSION="4.0.0" gem build --force
433
+ run(["gem build", "--force", { "RUBY_VERSION" => "4.0.0" }]) # RUBY_VERSION="4.0.0" gem build --force
394
434
  # OR
395
- run({ #
396
- command: "gem build", # RUBY_VERSION="4.0.0" gem build --silent --force
397
- opts: "--force", # composable
398
- env: { "PATH" => "~/.bin" }, #
399
- args: { silent: true } #
435
+ run({
436
+ command: "gem build", # RUBY_VERSION="4.0.0" gem build --silent --force (composable)
437
+ opts: "--force",
438
+ env: { "PATH" => "~/.bin" },
439
+ args: { silent: true }
400
440
  })
401
441
  # OR
402
- run(["gem pristine", ["gem build", "gem cleanup"], nil, "--debug"]) # gem pristine --debug && gem build --debug && gem cleanup --debug
442
+ run(["gem pristine", ["gem build", "gem cleanup"], nil, "--debug"]) # gem pristine --debug && gem build --debug && gem cleanup --debug
403
443
  #
404
444
  # All commands are either Array or Hash
405
445
  #
406
- run([ # PATH="~/.bin" GEM_HOME="~/.gems/ruby-4.0.0" (merged)
407
- ["gem pristine", "--all", { "PATH" => "~/.bin" }, "--silent"], # gem pristine --silent --all
408
- ["gem build", { strict: true }, { "GEM_HOME" => "~/.gems/ruby-4.0.0" }] # gem build --strict
409
- ]) #
446
+ run([ # PATH="~/.bin" GEM_HOME="~/.gems/ruby-4.0.0" (merged)
447
+ ["gem pristine", "--all", { "PATH" => "~/.bin" }, "--silent"], # gem pristine --silent --all
448
+ ["gem build", { strict: true }, { "GEM_HOME" => "~/.gems/ruby-4.0.0" }] # gem build --strict
449
+ ])
410
450
  # OR
411
- run([ # Same
412
- { #
413
- env: { "PATH" => "~/.bin" }, #
414
- command: "gem pristine", #
415
- opts: "--all", args: "--silent" #
416
- }, #
417
- { #
418
- env: { "GEM_HOME" => "~/.gems/ruby-4.0.0" }, #
419
- command: "gem build", #
420
- opts: { strict: true } #
421
- } #
451
+ run([
452
+ {
453
+ env: { "PATH" => "~/.bin" },
454
+ command: "gem pristine",
455
+ opts: "--all", args: "--silent"
456
+ },
457
+ {
458
+ env: { "GEM_HOME" => "~/.gems/ruby-4.0.0" },
459
+ command: "gem build",
460
+ opts: { strict: true }
461
+ }
422
462
  ])
423
463
 
424
- add("pathname", test: ["rake test", { jobs: ENV["RAKE_JOBS"] }]) # rake test --jobs 4
464
+ add("pathname", test: ["rake test", { jobs: ENV["RAKE_JOBS"] }]) # rake test --jobs 4
425
465
  add("fileutils", graph: "pathname")
426
- add("optparse", run: "gem build", env: { "PATH" => "~/.bin" }, opts: "-v") # PATH="~/.bin" gem build -v
466
+ add("optparse", run: "gem build", env: { "PATH" => "~/.bin" }, opts: "-v") # PATH="~/.bin" gem build -v
427
467
  add("rake", graph: ["fileutils", "optparse"])
428
- banner(command: false) # Always hide banner
468
+ banner(command: false) # Always hide banner
429
469
  end
430
470
  .build
431
471
  ```
@@ -545,32 +585,31 @@ Non-task:
545
585
 
546
586
  Most project classes will inherit from `Git` which enables these tasks:
547
587
 
548
- | Task | Git | Command |
549
- | :-------------- | :--------------- | :-------------------------------------------------------- |
550
- | branch | branch | create track delete move copy list current |
551
- | checkout | checkout | commit branch track detach path |
552
- | commit | commit | add all amend amend-orig fixup |
553
- | diff | diff | head branch files view between contain |
554
- | fetch | fetch | origin remote all |
555
- | files | ls-files | cached modified deleted others |
556
- | git | | add blame clean grep mv revert rm sparse-checkout status |
557
- | log | log | view between contain |
558
- | merge | merge | commit no-commit send |
559
- | pull | pull | origin remote all |
560
- | push | push | origin remote commit all tags |
561
- | range-diff | range-diff | view between contain |
562
- | rebase | rebase | branch onto send |
563
- | remote | remote | add select |
564
- | refs | ls-remote --refs | heads tags remote |
565
- | reset | reset | commit index patch mode undo |
566
- | restore | restore | source staged worktree |
567
- | rev | rev | commit branch build output |
568
- | sparse-checkout | sparse-checkout | add reapply list clean disable |
569
- | show | show | format oneline textconv |
570
- | stash | stash | push pop apply branch drop clear list all staged worktree |
571
- | submodule | submodule | status update branch url sync |
572
- | switch | switch | branch create detach |
573
- | tag | tag | add sign delete list |
588
+ | Task | Git | Command |
589
+ | :-------------- | :--------------- | :------------------------------------------------------------- |
590
+ | branch | branch | create track delete move copy list current |
591
+ | checkout | checkout | commit branch track detach path |
592
+ | commit | commit | add all amend amend-orig fixup |
593
+ | diff | diff | head branch files view between contain |
594
+ | fetch | fetch | origin remote all |
595
+ | files | ls-files | cached modified deleted others |
596
+ | git | | add blame clean grep mv revert rm show sparse-checkout status |
597
+ | log | log | view between contain |
598
+ | merge | merge | commit no-commit send |
599
+ | pull | pull | origin remote all |
600
+ | push | push | origin remote commit all tags |
601
+ | range-diff | range-diff | view between contain |
602
+ | rebase | rebase | branch onto send |
603
+ | remote | remote | add select |
604
+ | refs | ls-remote --refs | heads tags remote |
605
+ | reset | reset | commit index patch mode undo |
606
+ | restore | restore | source staged worktree |
607
+ | rev | rev | commit branch build output |
608
+ | sparse-checkout | sparse-checkout | add reapply list clean disable |
609
+ | stash | stash | push pop apply branch drop clear list all staged worktree |
610
+ | submodule | submodule | status update branch url sync |
611
+ | switch | switch | branch create detach |
612
+ | tag | tag | add sign delete list |
574
613
 
575
614
  You can disable all of them at once using the `exclude` property.
576
615
 
@@ -613,7 +652,7 @@ Common::PATH.update({
613
652
  gem: "~/.rvm/gems/ruby-4.0.0/bin/gem",
614
653
  bundle: "~/.rvm/gems/ruby-4.0.0/bin/bundle",
615
654
  rake: "~/.rvm/gems/ruby-4.0.0/bin/rake",
616
- npm: "/opt/node/v22.0.0/bin/npm",
655
+ npm: "/opt/node/v26.0.0/bin/npm",
617
656
  python: "#{ENV["PYTHONPATH"]}/bin/python"
618
657
  })
619
658
  ```
@@ -662,7 +701,9 @@ REVBUILD_FORCE=1 # Rebuild all targets (GIT_FORCE)
662
701
  REVBUILD_FORCE_${NAME}=1 # Rebuild project
663
702
 
664
703
  PREREQS_${NAME}=build,copy # Class method name to invoke
665
- PREREQS_${REF}=depend # e.g. Node
704
+ PREREQS_${REF}=depend # e.g. RUBY
705
+
706
+ DRY_RUN=true # 0,false (global: bin)
666
707
  ```
667
708
 
668
709
  ### Graph
@@ -756,8 +797,8 @@ DOCKER_Y=1 # confirm all
756
797
 
757
798
  TAG_${NAME}=1.0.0 # initialize
758
799
 
759
- BUILD_SQUARED_OPTS="NODE_TAG=24 RUBY_VERSION=4.0.0" DOCKER_SQUARED_OPTS="--no-cache --label=v1" rake squared:build
760
- docker build --no-cache --label=v1 --build-arg="NODE_TAG=24" --build-arg="RUBY_VERSION=4.0.0" .
800
+ BUILD_DOCKER_OPTS="NODE_TAG=26 RUBY_VERSION=4.0.0" DOCKER_DOCKER_OPTS="--no-cache --label=v1" rake docker:build # project: docker | ref: :docker
801
+ docker build --no-cache --label=v1 --build-arg="NODE_TAG=26" --build-arg="RUBY_VERSION=4.0.0" .
761
802
  ```
762
803
 
763
804
  | Command | Flag | ENV |
@@ -832,8 +873,8 @@ require "squared/workspace/repo"
832
873
 
833
874
  Workspace::Application
834
875
  .new(main: "squared")
835
- .repo("https://github.com/anpham6/squared-repo", "nightly", script: ["build:dev", "prod"], install: "#{ENV["HOME"]}/.bin", # install: first only
836
- ref: %i[node -docker]) # exclude: -docker
876
+ .repo("https://github.com/anpham6/squared-repo", "nightly", script: ["build:dev", "prod"], install: "/usr/local/bin", # first only (install)
877
+ ref: %i[node -docker]) # -docker (exclude)
837
878
  .repo("https://github.com/anpham6/squared-repo", name: "doc", doc: true, test: true, ref: :python)
838
879
  .add("squared", script: ["build:stage1", "build:stage2"])
839
880
  .with(:python) do