factbase 0.19.15 → 0.19.16
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/Gemfile.lock +2 -2
- data/lib/factbase/impatient.rb +7 -5
- data/lib/factbase/inv.rb +0 -8
- data/lib/factbase/terms/unique.rb +1 -1
- data/lib/factbase/version.rb +1 -1
- 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: c6b433b19e9886274a31ef1489db8fc911aeacb6de108fa2c6766dcce338f095
|
|
4
|
+
data.tar.gz: '08c3de0e9a7aeac3592ab713c7f683e0388d4c158367c3c28b36c851c0a43386'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7ebb39e5fe6079498a66df157d2fd78852bb709c144f948e4aa5f547a295c883a4b922b3f0d9e6c2d7a05c9c84625b4a08e17e4fd0f0a59f1ed4adc357d6a03
|
|
7
|
+
data.tar.gz: ad5d4d0954cb561b60312e379975a9ce6f61ab5f0945601f09f8e25e3897085318c78b13b9db38a081b72ad58137ed9e98e60375a243812a780b14f765b802c4
|
data/Gemfile.lock
CHANGED
|
@@ -78,7 +78,7 @@ GEM
|
|
|
78
78
|
tsort
|
|
79
79
|
regexp_parser (2.12.0)
|
|
80
80
|
rexml (3.4.4)
|
|
81
|
-
rubocop (1.88.
|
|
81
|
+
rubocop (1.88.2)
|
|
82
82
|
json (~> 2.3)
|
|
83
83
|
language_server-protocol (~> 3.17.0.2)
|
|
84
84
|
lint_roller (~> 1.1.0)
|
|
@@ -92,7 +92,7 @@ GEM
|
|
|
92
92
|
rubocop-ast (1.50.0)
|
|
93
93
|
parser (>= 3.3.7.2)
|
|
94
94
|
prism (~> 1.7)
|
|
95
|
-
rubocop-elegant (0.7.
|
|
95
|
+
rubocop-elegant (0.7.1)
|
|
96
96
|
lint_roller (~> 1.1)
|
|
97
97
|
rubocop (~> 1.75)
|
|
98
98
|
rubocop-minitest (0.39.1)
|
data/lib/factbase/impatient.rb
CHANGED
|
@@ -57,12 +57,14 @@ class Factbase::Impatient
|
|
|
57
57
|
|
|
58
58
|
def each(fb = @fb, params = {}, &)
|
|
59
59
|
return to_enum(__method__, fb, params) unless block_given?
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
yield(f)
|
|
64
|
-
n += 1
|
|
60
|
+
facts =
|
|
61
|
+
impatient('each') do
|
|
62
|
+
@fb.query(@term, @maps).each(fb, params).to_a
|
|
65
63
|
end
|
|
64
|
+
n = 0
|
|
65
|
+
facts.each do |f|
|
|
66
|
+
yield(f)
|
|
67
|
+
n += 1
|
|
66
68
|
end
|
|
67
69
|
n
|
|
68
70
|
end
|
data/lib/factbase/inv.rb
CHANGED
|
@@ -7,14 +7,6 @@ require 'decoor'
|
|
|
7
7
|
require 'others'
|
|
8
8
|
require_relative '../factbase'
|
|
9
9
|
|
|
10
|
-
# @todo #644:30min Add a test that validates YARD docstring examples
|
|
11
|
-
# match the actual API signatures. The docstring in this class was
|
|
12
|
-
# recently fixed because the block signature was documented as
|
|
13
|
-
# |f, fbt| but the actual implementation passes |property, value|.
|
|
14
|
-
# A general test that parses docstrings and checks their examples
|
|
15
|
-
# against the real method signatures would prevent this class of
|
|
16
|
-
# bugs from recurring across the codebase.
|
|
17
|
-
#
|
|
18
10
|
# A decorator of a Factbase, that checks invariants on every set.
|
|
19
11
|
#
|
|
20
12
|
# For example, you can use this decorator if you want to make sure that
|
|
@@ -25,6 +25,6 @@ class Factbase::Unique < Factbase::TermBase
|
|
|
25
25
|
vv = (0..(@operands.size - 1)).map { |i| _values(i, fact, maps, fb) }
|
|
26
26
|
return false if vv.any?(nil)
|
|
27
27
|
tuples = Enumerator.product(*vv).to_a
|
|
28
|
-
|
|
28
|
+
!@seen.intersect?(tuples).tap { tuples.each { |t| @seen << t } }
|
|
29
29
|
end
|
|
30
30
|
end
|
data/lib/factbase/version.rb
CHANGED