squared 0.3.3 → 0.3.4

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: a43b1a5fec18ebf3523f1c1c2ddfb231cd9ad45bf355b0859430c7a6ca530be3
4
- data.tar.gz: cc18478c20b2c20265db59b5e73ee5587139cc27925fd438a5897e5440736b82
3
+ metadata.gz: d145fb04de12033e30ded57091da96f9420dd32729fc59d2c362e8b99b9161d2
4
+ data.tar.gz: 3bcbe852a45c17e9b4d543b9e2b99cbe255feca020cdc3339cb4fb5bb1b985d4
5
5
  SHA512:
6
- metadata.gz: 13dfb9fbeb271d9b8dceb8f7558e777bb9bee68fb2f898725340791c484fb4b37c3f5666c9b48f01d7518e722ad24660309f24f5e26980527e20fbe7a0d6beb2
7
- data.tar.gz: c89f3475e9cbd5d794b3920e7e8cd628708c07247a720ed7ba83df505f350e4d568ec6fdc412df4257ae33c67b5132a1699ed2e83c132068d399cd1471a23b88
6
+ metadata.gz: a50b05c95dbf4c14bfb5056c7978fff1d41129d2425dc9fd6248a5086d3e068ff3692d02dda8a5f07c7c4e5280d0feddfcb995867f9c22fd22e8e666e4e71771
7
+ data.tar.gz: 8ce8ab2b30a2ce191cbbd2f411bab4a70bcd5a8d2d851e2cb1272af7cc34f7ecbf964505fc4b873cc556ba9c2c399c8b90dda62569c6b3f34a01b51ccc44a72b
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## [0.3.3] - 2024-03-02
3
+ ## [0.3.4] - 2025-03-06
4
+
5
+ ### Fixed
6
+
7
+ - Ruby bundle sub-commands used undefined method.
8
+ - Project graph did not display main tree branch.
9
+
10
+ ## [0.3.3] - 2025-03-02
4
11
 
5
12
  ### Fixed
6
13
 
@@ -10,19 +17,19 @@
10
17
  - Git list display did not support single grep pattern.
11
18
  - Gem outdated did not pass -C option for PWD.
12
19
 
13
- ## [0.3.2] - 2024-02-25
20
+ ## [0.3.2] - 2025-02-25
14
21
 
15
22
  ### Fixed
16
23
 
17
24
  - Task program command options used unrecognized symbol.
18
25
 
19
- ## [0.2.5] - 2024-02-25
26
+ ## [0.2.5] - 2025-02-25
20
27
 
21
28
  ### Fixed
22
29
 
23
30
  - See `0.1.5`.
24
31
 
25
- ## [0.1.5] - 2024-02-25
32
+ ## [0.1.5] - 2025-02-25
26
33
 
27
34
  ### Fixed
28
35
 
@@ -107,7 +114,7 @@
107
114
 
108
115
  - Project hash options duplicated dash prefix.
109
116
 
110
- ## [0.1.4] - 2024-02-05
117
+ ## [0.1.4] - 2025-02-05
111
118
 
112
119
  ### Fixed
113
120
 
@@ -204,7 +211,7 @@
204
211
  - Node tasks without any action are not displayed.
205
212
  - Git fetch commands that do not apply to pull are rejected.
206
213
 
207
- ## [0.1.3] - 2024-01-02
214
+ ## [0.1.3] - 2025-01-02
208
215
 
209
216
  ### Fixed
210
217
 
@@ -233,7 +240,7 @@
233
240
  - Workspace did not check base project for Windows filename.
234
241
  - Regexp for SemVer did not recognize package names.
235
242
 
236
- ## [0.1.1] - 2025-12-14
243
+ ## [0.1.1] - 2024-12-14
237
244
 
238
245
  ### Added
239
246
 
@@ -283,6 +290,7 @@
283
290
 
284
291
  - Changelog was created.
285
292
 
293
+ [0.3.4]: https://github.com/anpham6/squared/releases/tag/v0.3.4-ruby
286
294
  [0.3.3]: https://github.com/anpham6/squared/releases/tag/v0.3.3-ruby
287
295
  [0.3.2]: https://github.com/anpham6/squared/releases/tag/v0.3.2-ruby
288
296
  [0.3.1]: https://github.com/anpham6/squared/releases/tag/v0.3.1-ruby
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Squared
4
- VERSION = '0.3.3'
4
+ VERSION = '0.3.4'
5
5
  end
@@ -718,8 +718,8 @@ module Squared
718
718
  end
719
719
  end
720
720
 
721
- def graph_branch(target, data, tasks = nil, out = nil, sync: true, pass: [], done: [], depth: 0, last: false,
722
- single: false)
721
+ def graph_branch(target, data, tasks = nil, out = nil, sync: true, pass: [], done: [], depth: 0,
722
+ single: false, last: false, context: nil)
723
723
  tag = ->(proj) { "#{proj.name}#{SEM_VER =~ proj.version ? "@#{proj.version}" : ''}" }
724
724
  check = ->(deps) { deps.reject { |val| done.include?(val) } }
725
725
  dedupe = lambda do |name|
@@ -768,7 +768,7 @@ module Squared
768
768
  end
769
769
  unless start == proj.name || (none = check.(t).empty?)
770
770
  graph_branch(proj, data, tasks, out, sync: sync, pass: pass, done: done, depth: depth.succ,
771
- single: single, last: j == true)
771
+ single: single, last: j == true, context: target)
772
772
  end
773
773
  if !out
774
774
  if !tasks && (script = workspace.script_get(:graph, group: proj.group, ref: proj.allref))
@@ -790,8 +790,10 @@ module Squared
790
790
  else
791
791
  s = ''.dup
792
792
  k = 0
793
+ final = data.keys.last
793
794
  while k < depth
794
- s += "#{(last && !j) || (j && k > 0 && k == depth - 1) || single ? ' ' : a} "
795
+ indent = k > 0 && ((last && !j) || (j && k == depth - 1) || single)
796
+ s += "#{indent || (last && data[final].last == context) ? ' ' : a} "
795
797
  k += 1
796
798
  end
797
799
  s + "#{j ? d : c}#{b * 3} #{tag.(proj)}"
@@ -1203,7 +1203,7 @@ module Squared
1203
1203
  if size > 0
1204
1204
  styles = theme.fetch(:banner, []).reject { |s| s.to_s.end_with?('!') }
1205
1205
  styles << :bold if styles.size <= 1
1206
- puts print_footer("#{size} #{size == 1 ? type.sub(/s\z/, '') : type}",
1206
+ puts print_footer("#{size} #{size == 1 ? type.sub(/e?s\z/, '') : type}",
1207
1207
  sub: { pat: /\A(\d+)(.+)\z/, styles: styles })
1208
1208
  else
1209
1209
  puts empty_status("No #{type} were #{action}", 'grep', grep.is_a?(Array) ? case grep.size
@@ -505,7 +505,7 @@ module Squared
505
505
  args = option_sanitize(args, OPT_BUNDLE[flag.to_sym] + OPT_BUNDLE[:common]).first
506
506
  end
507
507
  raise_error('bundle', flag, hint: 'no command given') unless !args.empty? || flag == 'check'
508
- cmd.merge!(args)
508
+ cmd.merge(args)
509
509
  run(from: :"bundle:#{flag}")
510
510
  end
511
511
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - An Pham
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-02 00:00:00.000000000 Z
10
+ date: 2025-03-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake