squared 0.4.12 → 0.4.13

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: 29f44c24914fda199da7719eed8e90da0b508d0c93cf234ff16581e7bf34d112
4
- data.tar.gz: aec5400d8d7abfc44c4abd31bf091de65873f177c57b0782118c081e5875009b
3
+ metadata.gz: 2bc10e49a42c1eda78b4ff20f734efffd74eda16bc8dae742d2a0f29c0f34851
4
+ data.tar.gz: 64b5e88317ba5208cc7824f40b9a4ff810a63197bc0b27813906a2293bbe1388
5
5
  SHA512:
6
- metadata.gz: 48e5e2e436689d44a146562e4d791cebf5e19da9ca012c7cdd1860b2fd370c163933fdf58638bf48d4a1b1111170f5f8ed890269388a965dcf2e9e47619a4ea6
7
- data.tar.gz: 816de955802b80b8687c6f8903187dfda9f60720696f4ea80ce1295df7e07a3c3bd38bf4b1da5f6ceb6f7ab0031953ccbab54a13adddc7a41c195adcb9f83912
6
+ metadata.gz: f34a4d13854343d0713e34bf964feda5206f1c9a60ec2781fca611e74f7257753e01a895e081663b0c2d154a4c4834c39fa478e4665c58982eea053b53fd9529
7
+ data.tar.gz: ff549d38162731add0bbb6dd8bd7566f2200d6006f92c268aa0af4271e4f6a60a5a407b6a3a48fbeeee035c0ede41c135f760eb907582ede90020a1c61c7d890
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.13] - 2025-06-16
4
+
5
+ ### Added
6
+
7
+ - Docker command image action tag was implemented.
8
+ - Docker command image action save was implemented.
9
+ - Docker command container action create was implemented.
10
+ - Node command exec with NPM and PNPM were implemented.
11
+ - Ruby command exec and config are interactive.
12
+ - Python command exec using Kernel.exec was implemented.
13
+ - Theme color "latest" for semver was created.
14
+ - Project can be sorted by graph using comparison operator.
15
+ - Project base command prereqs was created.
16
+ - Project setter methods for private variables with validation.
17
+
18
+ ### Changed
19
+
20
+ - Mismatched shell quoted options are fixed rather than wrapped.
21
+ - Python command venv action run was renamed exec.
22
+ - Ruby command file can accept a glob file pattern.
23
+
24
+ ### Fixed
25
+
26
+ - Shell option quote detection uses Regexp conditionals.
27
+ - Docker property registry did not detect nil values.
28
+ - Gem command exec did not include gem option flag.
29
+ - Project method variable_set did not call block.
30
+ - Project output divider was not printed when not verbose.
31
+
3
32
  ## [0.4.12] - 2025-05-18
4
33
 
5
34
  ### Added
@@ -707,6 +736,7 @@
707
736
 
708
737
  - Changelog was created.
709
738
 
739
+ [0.4.13]: https://github.com/anpham6/squared/releases/tag/v0.4.13-ruby
710
740
  [0.4.12]: https://github.com/anpham6/squared/releases/tag/v0.4.12-ruby
711
741
  [0.4.11]: https://github.com/anpham6/squared/releases/tag/v0.4.11-ruby
712
742
  [0.4.10]: https://github.com/anpham6/squared/releases/tag/v0.4.10-ruby
data/README.ruby.md CHANGED
@@ -480,6 +480,7 @@ Non-task:
480
480
  * warn
481
481
  * caution
482
482
  * current
483
+ * latest
483
484
  * extra
484
485
  * major
485
486
  * red
@@ -595,6 +596,9 @@ BANNER_${NAME}=0 #
595
596
 
596
597
  REVBUILD_FORCE=1 # Rebuild all targets
597
598
  REVBUILD_FORCE_${NAME}=1 # Rebuild project
599
+
600
+ PREREQS_${NAME}=build,copy # Class method name to invoke
601
+ PREREQS_${REF}=depend # e.g. Node
598
602
  ```
599
603
 
600
604
  ### Graph
@@ -637,7 +641,7 @@ GIT_AUTOSTASH_${NAME}=0 # rebase (project only)
637
641
  | checkout | track | COUNT=n |
638
642
  | checkout | global path | HEAD=s PATHSPEC=s |
639
643
  | checkout | * | FORCE MERGE |
640
- | clone | * | DEPTH=n ORIGIN=s BRANCH=s LOCAL=0,1 |
644
+ | clone | * | DEPTH=n ORIGIN=s BRANCH=s REVISION=s LOCAL=0,1 |
641
645
  | commit | * | UPSTREAM=s DRY_RUN EDIT=0 M|MESSAGE=s |
642
646
  | diff | -between -contain | MERGE_BASE |
643
647
  | diff | head branch | INDEX=n |
@@ -9,23 +9,23 @@ module Squared
9
9
  module_function
10
10
 
11
11
  def shell_escape(val, quote: false, force: false, double: false, option: false, override: false)
12
- if (r = /\A(--?)([^= ]+)((=|\s+)(["'])?(.+?)(["'])?)?\z/m.match(val = val.to_s))
13
- return val if !r[3] || (!r[5] && !r[6].match?(/\s/))
14
-
15
- combine = lambda do |opt|
16
- if r[2] =~ /\A(["'])(.+)\1\z/m
17
- double = $1 == '"'
18
- r[2] = $2
19
- override = true
20
- end
21
- r[1] + r[2] + r[4] + shell_quote(opt, double: double, force: force, override: override)
12
+ if (r = /\A(--?)([^= ]+)((=|\s+)(["'])?(?(5)(.*)\5|(.*)))?\z/m.match(val = val.to_s))
13
+ if (data = r[2].match(/\A(["'])(.+)\1\z/))
14
+ double = data[1] == '"'
15
+ override = true
16
+ elsif !r[3] || r[6]
17
+ return val
22
18
  end
23
- if r[5] == r[7]
24
- r[5] ? val : combine.call(r[6])
19
+ if r[7].match?(/\A["']/)
20
+ opt = "#{r[7]}#{r[7][0]}"
21
+ elsif r[7].match?(/["']\z/)
22
+ opt = "#{r[7][-1]}#{r[7]}"
25
23
  else
26
- force = true
27
- combine.call(r[5] + r[6] + r[7])
24
+ return val unless r[7].match?(/\s/)
25
+
26
+ opt = r[7]
28
27
  end
28
+ r[1] + (data ? data[2] : r[2]) + r[4] + shell_quote(opt, double: double, force: force, override: override)
29
29
  elsif option && val =~ /\A([^=]+)=(.+)\z/m
30
30
  return val if $2.match?(/\A(["']).+\1\z/m)
31
31
 
@@ -11,12 +11,12 @@ module Squared
11
11
  def shell(*args, **kwargs)
12
12
  if RUBY_VERSION < '2.6'
13
13
  exception = kwargs.delete(:exception)
14
- ret = system(*args, **kwargs)
14
+ ret = Kernel.system(*args, **kwargs)
15
15
  return ret if ret || !exception
16
16
 
17
17
  raise $?.to_s
18
18
  else
19
- system(*args, **kwargs)
19
+ Kernel.system(*args, **kwargs)
20
20
  end
21
21
  end
22
22
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Squared
4
- VERSION = '0.4.12'
4
+ VERSION = '0.4.13'
5
5
  end
@@ -344,6 +344,7 @@ module Squared
344
344
  elsif ref < Project::Base
345
345
  ref
346
346
  end) || @kind[name]&.last || Project::Base).new(self, path, name, **kwargs)
347
+ proj.__send__(:index_set, @project.size)
347
348
  @project[name] = proj
348
349
  __get__(:project)[name] = proj unless kwargs[:private]
349
350
  proj.instance_eval(&blk) if block_given?