squared 0.2.12 → 0.2.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 +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/application.rb +11 -12
- data/lib/squared/workspace/project/base.rb +10 -5
- 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: 55acca920e2d36f1ce57ef7cb2f70c4eba31ff643436713bce561822dbb0f266
|
4
|
+
data.tar.gz: 83172faeb6c7638f1528bf401915134ce3a388d47cdd6934dfcd71af77723d38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d7b1de764a624c7f6424c2e1ceea431b7f1e28362510bb772cc83e43075310949a7644696926991025db0e511c534bb21e01d6c6ecb45f45f93a51d10ba79ab
|
7
|
+
data.tar.gz: 73745e3f8035184b1995cd8d5a2cc26a21bfe93b462e94e6be62795ba34d4c0646b22b70cd3f1017a18f60d1e8dcec4b558932e3423b418461807b4af25d4e3c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.2.13] - 2025-07-16
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
- Project graph did not ignore circular references.
|
8
|
+
|
9
|
+
## [0.1.10] - 2025-07-16
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
|
13
|
+
- Module namespaces were not combined in the right order.
|
14
|
+
- Workspace group tasks were not registered.
|
15
|
+
|
3
16
|
## [0.2.12] - 2025-07-05
|
4
17
|
|
5
18
|
### Fixed
|
@@ -307,6 +320,7 @@
|
|
307
320
|
|
308
321
|
- Changelog was created.
|
309
322
|
|
323
|
+
[0.2.13]: https://github.com/anpham6/squared/releases/tag/v0.2.13-ruby
|
310
324
|
[0.2.12]: https://github.com/anpham6/squared/releases/tag/v0.2.12-ruby
|
311
325
|
[0.2.11]: https://github.com/anpham6/squared/releases/tag/v0.2.11-ruby
|
312
326
|
[0.2.10]: https://github.com/anpham6/squared/releases/tag/v0.2.10-ruby
|
@@ -320,6 +334,7 @@
|
|
320
334
|
[0.2.2]: https://github.com/anpham6/squared/releases/tag/v0.2.2-ruby
|
321
335
|
[0.2.1]: https://github.com/anpham6/squared/releases/tag/v0.2.1-ruby
|
322
336
|
[0.2.0]: https://github.com/anpham6/squared/releases/tag/v0.2.0-ruby
|
337
|
+
[0.1.10]: https://github.com/anpham6/squared/releases/tag/v0.1.10-ruby
|
323
338
|
[0.1.9]: https://github.com/anpham6/squared/releases/tag/v0.1.9-ruby
|
324
339
|
[0.1.8]: https://github.com/anpham6/squared/releases/tag/v0.1.8-ruby
|
325
340
|
[0.1.7]: https://github.com/anpham6/squared/releases/tag/v0.1.7-ruby
|
data/lib/squared/version.rb
CHANGED
@@ -627,20 +627,19 @@ module Squared
|
|
627
627
|
end
|
628
628
|
|
629
629
|
def data_get(*args, group: nil, ref: nil, target: nil)
|
630
|
-
if group
|
631
|
-
|
632
|
-
elsif ref
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
ref.each do |key|
|
637
|
-
next unless (ret = target[:ref][key])
|
630
|
+
if group && (ret = target[:group][group.to_sym])
|
631
|
+
ret
|
632
|
+
elsif ref
|
633
|
+
if ref.is_a?(Enumerable)
|
634
|
+
ref.each do |key|
|
635
|
+
next unless (ret = target[:ref][key])
|
638
636
|
|
639
|
-
|
637
|
+
return ret if args.empty? || args.any? { |val| ret.key?(val) }
|
638
|
+
end
|
639
|
+
nil
|
640
|
+
else
|
641
|
+
target[:ref][ref]
|
640
642
|
end
|
641
|
-
nil
|
642
|
-
elsif ref
|
643
|
-
target[:ref][ref]
|
644
643
|
end
|
645
644
|
end
|
646
645
|
|
@@ -745,7 +745,7 @@ module Squared
|
|
745
745
|
done
|
746
746
|
end
|
747
747
|
|
748
|
-
def graph_collect(target, start = [], data: {})
|
748
|
+
def graph_collect(target, start = [], data: {}, root: [])
|
749
749
|
deps = []
|
750
750
|
(start.empty? ? target.instance_variable_get(:@graph) : start)&.each do |val|
|
751
751
|
if (obj = workspace.find(name: val))
|
@@ -756,14 +756,19 @@ module Squared
|
|
756
756
|
items = workspace.find(group: val, ref: val.to_sym)
|
757
757
|
end
|
758
758
|
items.each do |proj|
|
759
|
-
|
760
|
-
|
759
|
+
name = proj.name
|
760
|
+
if proj.graph? && !data.key?(name) && !root.include?(name)
|
761
|
+
graph_collect(proj, data: data, root: root + [name, target.name])
|
762
|
+
end
|
763
|
+
next if (objs = data.fetch(name, [])).include?(target)
|
761
764
|
|
762
765
|
deps << proj
|
763
|
-
deps
|
766
|
+
deps.concat(objs)
|
764
767
|
end
|
765
768
|
end
|
766
|
-
|
769
|
+
deps.uniq!
|
770
|
+
deps.delete(target)
|
771
|
+
data[target.name] = deps
|
767
772
|
data
|
768
773
|
end
|
769
774
|
|