factbase 0.10.1 → 0.10.2
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/.github/workflows/benchmark.yml +1 -0
- data/.github/workflows/typos.yml +19 -0
- data/.gitignore +2 -2
- data/.rubocop.yml +1 -0
- data/Gemfile.lock +7 -6
- data/REUSE.toml +8 -7
- data/lib/factbase/cached/cached_fact.rb +4 -0
- data/lib/factbase/cached/cached_factbase.rb +2 -2
- data/lib/factbase/indexed/indexed_fact.rb +4 -0
- data/lib/factbase/indexed/indexed_factbase.rb +2 -2
- data/lib/factbase.rb +1 -1
- data/test/factbase/test_query.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fd3c455b06a6b4ef8b25495c251b040b32ad8bbffd668452ba0ea5aac492cd5
|
4
|
+
data.tar.gz: c90678471389952b279788986431ae1a760aeadfac1de3dca398f83cac411c24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92491db37e79d3585c42c77be9b34ba3fa571d7b2edb2013d3b400946789a8affa01c189b62908a4dc6f98e29446b1175dded6378f18e6efcdc1a9c875294a91
|
7
|
+
data.tar.gz: 56a04945eff49360290f349dd110f504dddd1708ad1b6708097c402a5403ba7984b7a59c29ee3cb6525bdeec61b73e90028fa11d65d660fe777bcaa80bfbbd20
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 Yegor Bugayenko
|
2
|
+
# SPDX-License-Identifier: MIT
|
3
|
+
---
|
4
|
+
# yamllint disable rule:line-length
|
5
|
+
name: typos
|
6
|
+
'on':
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
pull_request:
|
11
|
+
branches:
|
12
|
+
- master
|
13
|
+
jobs:
|
14
|
+
typos:
|
15
|
+
timeout-minutes: 15
|
16
|
+
runs-on: ubuntu-24.04
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v4
|
19
|
+
- uses: crate-ci/typos@v1.32.0
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -26,11 +26,12 @@ GEM
|
|
26
26
|
elapsed (0.0.1)
|
27
27
|
loog (> 0)
|
28
28
|
tago (> 0)
|
29
|
-
json (2.
|
30
|
-
language_server-protocol (3.17.0.
|
29
|
+
json (2.12.0)
|
30
|
+
language_server-protocol (3.17.0.5)
|
31
31
|
lint_roller (1.1.0)
|
32
32
|
logger (1.7.0)
|
33
|
-
loog (0.6.
|
33
|
+
loog (0.6.1)
|
34
|
+
logger (~> 1.0)
|
34
35
|
minitest (5.25.5)
|
35
36
|
minitest-reporters (1.7.1)
|
36
37
|
ansi
|
@@ -52,10 +53,10 @@ GEM
|
|
52
53
|
ast (~> 2.4.1)
|
53
54
|
racc
|
54
55
|
prism (1.4.0)
|
55
|
-
psych (5.2.
|
56
|
+
psych (5.2.6)
|
56
57
|
date
|
57
58
|
stringio
|
58
|
-
qbash (0.4.
|
59
|
+
qbash (0.4.5)
|
59
60
|
backtrace (> 0)
|
60
61
|
elapsed (> 0)
|
61
62
|
loog (> 0)
|
@@ -67,7 +68,7 @@ GEM
|
|
67
68
|
psych (>= 4.0.0)
|
68
69
|
regexp_parser (2.10.0)
|
69
70
|
rexml (3.4.1)
|
70
|
-
rubocop (1.75.
|
71
|
+
rubocop (1.75.6)
|
71
72
|
json (~> 2.3)
|
72
73
|
language_server-protocol (~> 3.17.0.2)
|
73
74
|
lint_roller (~> 1.1.0)
|
data/REUSE.toml
CHANGED
@@ -4,9 +4,17 @@
|
|
4
4
|
version = 1
|
5
5
|
[[annotations]]
|
6
6
|
path = [
|
7
|
+
".DS_Store",
|
8
|
+
".gitattributes",
|
9
|
+
".gitignore",
|
10
|
+
".pdd",
|
7
11
|
"**.json",
|
8
12
|
"**.md",
|
13
|
+
"**.png",
|
9
14
|
"**.txt",
|
15
|
+
"**/.DS_Store",
|
16
|
+
"**/.gitignore",
|
17
|
+
"**/.pdd",
|
10
18
|
"**/*.csv",
|
11
19
|
"**/*.jpg",
|
12
20
|
"**/*.json",
|
@@ -16,15 +24,8 @@ path = [
|
|
16
24
|
"**/*.svg",
|
17
25
|
"**/*.txt",
|
18
26
|
"**/*.vm",
|
19
|
-
"**/.DS_Store",
|
20
|
-
"**/.gitignore",
|
21
|
-
"**/.pdd",
|
22
27
|
"**/CNAME",
|
23
28
|
"**/Gemfile.lock",
|
24
|
-
".DS_Store",
|
25
|
-
".gitattributes",
|
26
|
-
".gitignore",
|
27
|
-
".pdd",
|
28
29
|
"Gemfile.lock",
|
29
30
|
"README.md",
|
30
31
|
"renovate.json",
|
@@ -22,9 +22,9 @@ class Factbase::CachedFactbase
|
|
22
22
|
# @param [Factbase] origin Original factbase to decorate
|
23
23
|
# @param [Hash] cache Cache to use
|
24
24
|
def initialize(origin, cache = {})
|
25
|
-
raise '
|
25
|
+
raise 'Wrong type of original' unless origin.respond_to?(:query)
|
26
26
|
@origin = origin
|
27
|
-
raise '
|
27
|
+
raise 'Wrong type of cache' unless cache.is_a?(Hash)
|
28
28
|
@cache = cache
|
29
29
|
end
|
30
30
|
|
@@ -22,9 +22,9 @@ class Factbase::IndexedFactbase
|
|
22
22
|
# @param [Factbase] origin Original factbase to decorate
|
23
23
|
# @param [Hash] idx Index to use
|
24
24
|
def initialize(origin, idx = {})
|
25
|
-
raise '
|
25
|
+
raise 'Wrong type of original' unless origin.respond_to?(:query)
|
26
26
|
@origin = origin
|
27
|
-
raise '
|
27
|
+
raise 'Wrong type of index' unless idx.is_a?(Hash)
|
28
28
|
@idx = idx
|
29
29
|
end
|
30
30
|
|
data/lib/factbase.rb
CHANGED
@@ -82,7 +82,7 @@ require 'yaml'
|
|
82
82
|
# License:: MIT
|
83
83
|
class Factbase
|
84
84
|
# Current version of the gem (changed by .rultor.yml on every release)
|
85
|
-
VERSION = '0.10.
|
85
|
+
VERSION = '0.10.2' unless const_defined?(:VERSION)
|
86
86
|
|
87
87
|
# An exception that may be thrown in a transaction, to roll it back.
|
88
88
|
class Rollback < StandardError; end
|
data/test/factbase/test_query.rb
CHANGED
@@ -197,7 +197,7 @@ class TestQuery < Factbase::Test
|
|
197
197
|
end
|
198
198
|
end
|
199
199
|
|
200
|
-
def
|
200
|
+
def test_finds_with_substitution
|
201
201
|
maps = [{ 'foo' => [42] }, { 'bar' => [7] }, { 'foo' => [666] }]
|
202
202
|
with_factbases(maps) do |badge, fb|
|
203
203
|
assert_equal(0, fb.query('(eq 2 (agg (eq foo $foo) (count)))').each.to_a.size, "with #{badge}")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- ".github/workflows/pdd.yml"
|
158
158
|
- ".github/workflows/rake.yml"
|
159
159
|
- ".github/workflows/reuse.yml"
|
160
|
+
- ".github/workflows/typos.yml"
|
160
161
|
- ".github/workflows/xcop.yml"
|
161
162
|
- ".github/workflows/yamllint.yml"
|
162
163
|
- ".gitignore"
|