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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cddb3957ecbb2cce6a0957e00759aa8c54edc2b6ce1dae45509968cf22894c7a
4
- data.tar.gz: 880d4fdde6788b80ee1db1a94fdfeed15d98b8fe7a0d8c3c4c0b6611a5cfdf79
3
+ metadata.gz: 6fd3c455b06a6b4ef8b25495c251b040b32ad8bbffd668452ba0ea5aac492cd5
4
+ data.tar.gz: c90678471389952b279788986431ae1a760aeadfac1de3dca398f83cac411c24
5
5
  SHA512:
6
- metadata.gz: ddd8fce247c59e80ab719451fca226e0598459557cdd33cbcaf21fd8e12b6ae23b82e3cf3173d638414ad2654a6e3a40d6cc586a1d8804df9111a68474e87489
7
- data.tar.gz: 3ef80c4d7e05cc7daa9f8a4e9c38a47c7555693416ab521b2ef589b9abab6ba592e7484171b92df96e77333eae8f36bb85a19e4c9fb63cc2ae06cd3e7d4e2b72
6
+ metadata.gz: 92491db37e79d3585c42c77be9b34ba3fa571d7b2edb2013d3b400946789a8affa01c189b62908a4dc6f98e29446b1175dded6378f18e6efcdc1a9c875294a91
7
+ data.tar.gz: 56a04945eff49360290f349dd110f504dddd1708ad1b6708097c402a5403ba7984b7a59c29ee3cb6525bdeec61b73e90028fa11d65d660fe777bcaa80bfbbd20
@@ -43,6 +43,7 @@ jobs:
43
43
  rm stdout.txt
44
44
  - uses: peter-evans/create-pull-request@v7
45
45
  with:
46
+ sign-commits: true
46
47
  branch: benchmark-results
47
48
  commit-message: 'new benchmarking results'
48
49
  delete-branch: true
@@ -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
@@ -1,8 +1,8 @@
1
- *.gem
2
- .DS_Store
3
1
  .bundle/
2
+ .DS_Store
4
3
  .idea/
5
4
  .yardoc/
5
+ *.gem
6
6
  coverage/
7
7
  doc/
8
8
  node_modules/
data/.rubocop.yml CHANGED
@@ -46,3 +46,4 @@ Security/MarshalLoad:
46
46
  Enabled: false
47
47
  Layout/MultilineAssignmentLayout:
48
48
  Enabled: true
49
+ require: []
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.11.3)
30
- language_server-protocol (3.17.0.4)
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.0)
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.3)
56
+ psych (5.2.6)
56
57
  date
57
58
  stringio
58
- qbash (0.4.0)
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.4)
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",
@@ -20,6 +20,10 @@ class Factbase::CachedFact
20
20
  @cache = cache
21
21
  end
22
22
 
23
+ def to_s
24
+ @origin.to_s
25
+ end
26
+
23
27
  # When a method is missing, this method is called.
24
28
  others do |*args|
25
29
  @cache.clear if args[0].to_s.end_with?('=')
@@ -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 'Wront type of original' unless origin.respond_to?(:query)
25
+ raise 'Wrong type of original' unless origin.respond_to?(:query)
26
26
  @origin = origin
27
- raise 'Wront type of cache' unless cache.is_a?(Hash)
27
+ raise 'Wrong type of cache' unless cache.is_a?(Hash)
28
28
  @cache = cache
29
29
  end
30
30
 
@@ -20,6 +20,10 @@ class Factbase::IndexedFact
20
20
  @idx = idx
21
21
  end
22
22
 
23
+ def to_s
24
+ @origin.to_s
25
+ end
26
+
23
27
  # When a method is missing, this method is called.
24
28
  others do |*args|
25
29
  @idx.clear if args[0].to_s.end_with?('=')
@@ -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 'Wront type of original' unless origin.respond_to?(:query)
25
+ raise 'Wrong type of original' unless origin.respond_to?(:query)
26
26
  @origin = origin
27
- raise 'Wront type of index' unless idx.is_a?(Hash)
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.1' unless const_defined?(:VERSION)
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
@@ -197,7 +197,7 @@ class TestQuery < Factbase::Test
197
197
  end
198
198
  end
199
199
 
200
- def test_finds_with_subsitution
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.1
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"