squared 0.7.14 → 0.7.15
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 +19 -1
- data/README.md +3 -3
- data/lib/squared/common/base.rb +2 -0
- data/lib/squared/common/format.rb +1 -1
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/project/docker.rb +1 -1
- data/lib/squared/workspace/project/git.rb +3 -3
- data/lib/squared/workspace/project/node.rb +34 -21
- data/lib/squared/workspace/project/ruby.rb +13 -17
- 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: 06724bcbd4880ed30f612cd24df3aaaf3faef5043ffa7211d48ca4cda7c87209
|
|
4
|
+
data.tar.gz: d40c633dafdf27ecdbaf236eaa7643fea3821a3ecae3c152522b50657ef7e5f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f739d48e406ae786159b843776f4b3c2b3d0e16029de9d6b180ae8921c7596cb7f318fd4f3492419c0c2e2f331ac3c5bb860487035d1bac46a0e71fd7ebb7aee
|
|
7
|
+
data.tar.gz: ad13adfe9feb573756cb277eaa11b1418129db2a9ffce3c99be93e725d2ca72b1c0df5e4886905bbb15a113676ad993f906fc2525fbdfcee552a31db3e4996a9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.15] - 2026-11-04
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Git command commit action pathspec was implemented.
|
|
8
|
+
- Common base argument TAB for column alignment was created.
|
|
9
|
+
- Node command package action deny can modify currently approved scripts.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Node command package action [approve|deny] uses install-scripts ls.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Bundle exec wrapper as a Hash did not support using alternate Gemfile.
|
|
18
|
+
- Common base ARG data objects were not frozen with __freeze__.
|
|
19
|
+
|
|
3
20
|
## [0.7.14] - 2026-10-22
|
|
4
21
|
|
|
5
22
|
### Changed
|
|
@@ -24,7 +41,7 @@
|
|
|
24
41
|
|
|
25
42
|
- OptionPartition did not parse quoted option values.
|
|
26
43
|
|
|
27
|
-
## [0.6.20]
|
|
44
|
+
## [0.6.20]
|
|
28
45
|
|
|
29
46
|
### Added
|
|
30
47
|
|
|
@@ -2052,6 +2069,7 @@
|
|
|
2052
2069
|
|
|
2053
2070
|
- Changelog was created.
|
|
2054
2071
|
|
|
2072
|
+
[0.7.15]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.15
|
|
2055
2073
|
[0.7.14]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.14
|
|
2056
2074
|
[0.7.13]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.13
|
|
2057
2075
|
[0.7.12]: https://github.com/anpham6/squared-ruby/releases/tag/v0.7.12
|
data/README.md
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
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 |
|
|
14
|
-
| 2025-06-16 | 0.5.0 | 2.5.0 | 3.4.4 |
|
|
13
|
+
| 2025-03-06 | 0.4.0 | | 3.4.2 | |
|
|
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
|
|
|
20
20
|
The range chart indicates the *latest* Ruby tested against at the time of release.
|
data/lib/squared/common/base.rb
CHANGED
|
@@ -13,6 +13,7 @@ module Squared
|
|
|
13
13
|
STRICT: false,
|
|
14
14
|
BANNER: true,
|
|
15
15
|
CHOICE: 25,
|
|
16
|
+
TAB: 4,
|
|
16
17
|
QUOTE: "'",
|
|
17
18
|
SPACE: ' => ',
|
|
18
19
|
SUCCESS: 'Success',
|
|
@@ -102,6 +103,7 @@ module Squared
|
|
|
102
103
|
|
|
103
104
|
def __freeze__
|
|
104
105
|
PATH.freeze
|
|
106
|
+
ARG.each_value { |val| val.freeze if val.is_a?(::Hash) || val.is_a?(::Array) }
|
|
105
107
|
ARG.freeze
|
|
106
108
|
VAR.each_value(&:freeze)
|
|
107
109
|
VAR[:theme].each_value { |val| val.freeze.each_value(&:freeze) }
|
data/lib/squared/version.rb
CHANGED
|
@@ -902,7 +902,7 @@ module Squared
|
|
|
902
902
|
|
|
903
903
|
puts "#{g + f} #{key}: #{Array(data[key]).join(', ')}" unless data[key].to_s.empty?
|
|
904
904
|
end
|
|
905
|
-
w = 9 + flag.to_s.size +
|
|
905
|
+
w = 9 + flag.to_s.size + ARG[:TAB] + ee.size
|
|
906
906
|
puts g + sub_style(ARG[:BORDER][6] + (ARG[:BORDER][1] * w), theme[:inline])
|
|
907
907
|
index += 1
|
|
908
908
|
next unless confirm("#{h + b}?", no ? 'N' : 'Y')
|
|
@@ -334,7 +334,7 @@ module Squared
|
|
|
334
334
|
subtasks({
|
|
335
335
|
'branch' => %i[create track delete move copy list all current].freeze,
|
|
336
336
|
'checkout' => %i[commit branch track detach path].freeze,
|
|
337
|
-
'commit' => %i[add all amend amend-orig fixup].freeze,
|
|
337
|
+
'commit' => %i[add all pathspec amend amend-orig fixup].freeze,
|
|
338
338
|
'diff' => %i[head branch files view between contain].freeze,
|
|
339
339
|
'range-diff' => %i[view between contain].freeze,
|
|
340
340
|
'fetch' => %i[origin remote all].freeze,
|
|
@@ -455,7 +455,7 @@ module Squared
|
|
|
455
455
|
if flag == :add
|
|
456
456
|
opts = param_guard(action, flag, args: args.to_a)
|
|
457
457
|
elsif (refs = args.to_a).empty?
|
|
458
|
-
refs = readline('Enter
|
|
458
|
+
refs = readline('Enter glob patterns', force: true).shellsplit
|
|
459
459
|
end
|
|
460
460
|
end
|
|
461
461
|
commit(flag, opts, refs: refs, ref: ref, squash: squash, pick: pick)
|
|
@@ -1548,7 +1548,7 @@ module Squared
|
|
|
1548
1548
|
fixup = flag == :fixup
|
|
1549
1549
|
amend = flag.match?(/^amend/) && !fixup
|
|
1550
1550
|
unless flag == :add || pick == 'reword'
|
|
1551
|
-
pathspec = if flag == :all || ((fixup || amend) && refs.size == 1 && refs.first == '*')
|
|
1551
|
+
pathspec = if flag == :all || ((flag == :pathspec || fixup || amend) && refs.size == 1 && refs.first == '*')
|
|
1552
1552
|
'--all'
|
|
1553
1553
|
elsif (refs = projectmap(refs)).empty?
|
|
1554
1554
|
raise 'no qualified pathspec'
|
|
@@ -11,7 +11,7 @@ module Squared
|
|
|
11
11
|
install_a: %w[audit=! bin-links=! engine-strict=!? foreground-scripts=!? fund=! ignore-scripts=!?
|
|
12
12
|
install-links=!? package-lock=! strict-peer-deps=!? include=b install-strategy=b omit=b].freeze,
|
|
13
13
|
install_b: %w[no-save B|save-bundle D|save-dev O|save-optional save-peer P|save-prod g|global=!?
|
|
14
|
-
S|save=!?].freeze,
|
|
14
|
+
min-release-age=i min-release-age-exclude=q S|save=!?].freeze,
|
|
15
15
|
install_c: %w[allow-directory=b? allow-file=b? allow-git=b? allow-remote=b?].freeze,
|
|
16
16
|
run: %w[foreground-scripts=!? if-present=!? ignore-scripts=!? script-shell=p].freeze,
|
|
17
17
|
exec: %w[c|call=q package=b].freeze,
|
|
@@ -316,27 +316,40 @@ module Squared
|
|
|
316
316
|
when 'package'
|
|
317
317
|
case flag
|
|
318
318
|
when :approve, :deny
|
|
319
|
-
format_desc
|
|
319
|
+
format_desc(action, flag, 'opts*', before: flag == :approve ? 'name*|:' : 'name*|:|::')
|
|
320
320
|
task flag do |_, args|
|
|
321
321
|
args = args.to_a
|
|
322
|
-
if args.first == ':'
|
|
322
|
+
if args.first == ':' || (all = args.first == '::')
|
|
323
323
|
args.shift
|
|
324
|
+
list = []
|
|
325
|
+
pad = 0
|
|
326
|
+
size = ->(s) { pad = [pad, s.size].max }
|
|
324
327
|
pwd_set do
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
328
|
+
json = JSON.parse(`#{npm_output('install-scripts ls --json')}`)
|
|
329
|
+
json&.fetch('allowScripts', [])&.each do |data|
|
|
330
|
+
line = data['changes']&.find { |item| item['change'] == 'pending' }
|
|
331
|
+
next unless line && line['key'] =~ /^(.+)@([^@]+)$/
|
|
332
|
+
|
|
333
|
+
size.call($1)
|
|
334
|
+
list << [$1, $2]
|
|
335
|
+
end
|
|
336
|
+
if all
|
|
337
|
+
current = read_package 'allowScripts'
|
|
338
|
+
current&.each_pair do |key, val|
|
|
339
|
+
next unless val
|
|
340
|
+
|
|
341
|
+
md = key.match(/^(.+?)(?:@([^@]+))?$/)
|
|
342
|
+
size.call(md[1])
|
|
343
|
+
list << [md[1], sub_style(md[2] || 'any', theme[:inline])]
|
|
344
|
+
end
|
|
337
345
|
end
|
|
338
|
-
args.concat(choice_index('Select packages', list, multiple: true, column: /^(\S+)/))
|
|
339
346
|
end
|
|
347
|
+
if list.empty?
|
|
348
|
+
puts log_message('no packages to review', subject: name, hint: "#{flag}-scripts")
|
|
349
|
+
exit 0
|
|
350
|
+
end
|
|
351
|
+
list.map! { |name, ver| name.ljust(pad + ARG[:TAB]) + ver }
|
|
352
|
+
args.concat(choice_index('Select packages', list, multiple: true, column: /^(\S+)/))
|
|
340
353
|
end
|
|
341
354
|
package flag, args
|
|
342
355
|
end
|
|
@@ -835,9 +848,9 @@ module Squared
|
|
|
835
848
|
end
|
|
836
849
|
print_item banner unless sync
|
|
837
850
|
if !found.empty?
|
|
838
|
-
col1 = width.call(found, 0) +
|
|
839
|
-
col2 = width.call(found, 1) +
|
|
840
|
-
col3 = pad.call(found.size, found).size + 2 + col1 + col2 + width.call(found, 2)
|
|
851
|
+
col1 = width.call(found, 0) + ARG[:TAB]
|
|
852
|
+
col2 = width.call(found, 1) + ARG[:TAB]
|
|
853
|
+
col3 = pad.call(found.size, found).size + (ARG[:TAB] / 2) + col1 + col2 + width.call(found, 2)
|
|
841
854
|
packages = []
|
|
842
855
|
pat = ->(a) { /("#{Regexp.escape(a[0])}"\s*:\s*)"([~^])#{'?' if a[4]}#{Regexp.escape(a[1])}"/ }
|
|
843
856
|
edit = lambda do |a, pkg, mod|
|
|
@@ -933,9 +946,9 @@ module Squared
|
|
|
933
946
|
end
|
|
934
947
|
end
|
|
935
948
|
elsif !avail.empty?
|
|
936
|
-
col1 = width.call(avail, 0) +
|
|
949
|
+
col1 = width.call(avail, 0) + ARG[:TAB]
|
|
937
950
|
col2 = width.call(avail, 1)
|
|
938
|
-
col3 = width.call(avail, 2) +
|
|
951
|
+
col3 = width.call(avail, 2) + ARG[:TAB]
|
|
939
952
|
avail.each_with_index do |item, i|
|
|
940
953
|
a, b, c, d = item
|
|
941
954
|
a = a.ljust(col1)
|
|
@@ -946,7 +946,7 @@ module Squared
|
|
|
946
946
|
end
|
|
947
947
|
s = '%2d. %s' % [start, line]
|
|
948
948
|
if ia
|
|
949
|
-
unless confirm_semver(s.ljust(col +
|
|
949
|
+
unless confirm_semver(s.ljust(col + ARG[:TAB] + line.size - n), type)
|
|
950
950
|
start += 1
|
|
951
951
|
next
|
|
952
952
|
end
|
|
@@ -1888,24 +1888,20 @@ module Squared
|
|
|
1888
1888
|
end
|
|
1889
1889
|
|
|
1890
1890
|
def bundle_args(*args)
|
|
1891
|
-
|
|
1892
|
-
app = args.first
|
|
1893
|
-
if val.is_a?(Hash)
|
|
1894
|
-
env = val[app.to_s] || val[app.to_sym]
|
|
1895
|
-
return args unless env
|
|
1896
|
-
|
|
1897
|
-
val = env.is_a?(String) ? basepath!(env) : true
|
|
1898
|
-
elsif app == 'ruby'
|
|
1899
|
-
return args
|
|
1900
|
-
end
|
|
1901
|
-
if val.is_a?(String)
|
|
1902
|
-
return args unless (val = basepath!(val))
|
|
1891
|
+
return args unless (val = @bundle[:exec])
|
|
1903
1892
|
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1893
|
+
app = args.first
|
|
1894
|
+
if val.is_a?(Hash)
|
|
1895
|
+
val = val[app.to_s] || val[app.to_sym]
|
|
1896
|
+
elsif app == 'ruby'
|
|
1897
|
+
return args
|
|
1898
|
+
end
|
|
1899
|
+
case val
|
|
1900
|
+
when String, Pathname
|
|
1901
|
+
val = basepath!(val, type: 'f')
|
|
1902
|
+
args.unshift("--gemfile=#{shell_escape(val.relative_path_from(path), quote: true)}") if val
|
|
1907
1903
|
end
|
|
1908
|
-
args
|
|
1904
|
+
val ? args.unshift('bundle', 'exec') : args
|
|
1909
1905
|
end
|
|
1910
1906
|
|
|
1911
1907
|
def bundle_load
|
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.7.
|
|
4
|
+
version: 0.7.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- An Pham
|
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
125
125
|
- !ruby/object:Gem::Version
|
|
126
126
|
version: '0'
|
|
127
127
|
requirements: []
|
|
128
|
-
rubygems_version: 4.0.
|
|
128
|
+
rubygems_version: 4.0.20
|
|
129
129
|
specification_version: 4
|
|
130
130
|
summary: Rake task generator for managing multi-language workspaces.
|
|
131
131
|
test_files: []
|