fbe 0.0.4 → 0.0.5
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 +4 -4
- data/lib/fbe/iterate.rb +5 -2
- data/lib/fbe.rb +1 -1
- data/rules/basic.fe +16 -7
- data/test/fbe/test_conclude.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edccc9ab59eb5ab03d811f50b8767dd78cceb04ae1f7100ff69087751c0a8a91
|
4
|
+
data.tar.gz: 381aa6f00db80c484e929aa139b252228fc932d96be2f0eab2d320e8e7066c0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45d8726787ae9bfdd718980a3cb43662a1e1accc166db30ea464f89328a676fa77fb7cbd7407fe65ff2ece0558aca8fdec8f06b6d0969f59cd2ce7ef88895d88
|
7
|
+
data.tar.gz: b03684b1597f8bbb7b80b28d67655c5a89e99afdbc6a9206b141a69a266065c5508ce7130ee073e09329f98eb717467c29ff9d7b3f97a76183dff50b4624e4e4
|
data/Gemfile.lock
CHANGED
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
erubi (1.13.0)
|
63
63
|
ethon (0.16.0)
|
64
64
|
ffi (>= 1.15.0)
|
65
|
-
factbase (0.0.
|
65
|
+
factbase (0.0.58)
|
66
66
|
backtrace (~> 0.3)
|
67
67
|
decoor (~> 0.0)
|
68
68
|
json (~> 2.7)
|
@@ -94,7 +94,7 @@ GEM
|
|
94
94
|
reline (>= 0.4.2)
|
95
95
|
iri (0.8.0)
|
96
96
|
json (2.7.2)
|
97
|
-
judges (0.
|
97
|
+
judges (0.15.0)
|
98
98
|
backtrace (~> 0.3)
|
99
99
|
concurrent-ruby (~> 1.2)
|
100
100
|
factbase (~> 0.0)
|
@@ -111,7 +111,7 @@ GEM
|
|
111
111
|
loofah (2.22.0)
|
112
112
|
crass (~> 1.0.2)
|
113
113
|
nokogiri (>= 1.12.0)
|
114
|
-
loog (0.5.
|
114
|
+
loog (0.5.2)
|
115
115
|
minitest (5.24.1)
|
116
116
|
moments (0.3.0)
|
117
117
|
multipart-post (2.4.1)
|
@@ -139,7 +139,7 @@ GEM
|
|
139
139
|
stringio
|
140
140
|
public_suffix (6.0.0)
|
141
141
|
racc (1.8.0)
|
142
|
-
rack (3.1.
|
142
|
+
rack (3.1.5)
|
143
143
|
rack-session (2.0.0)
|
144
144
|
rack (>= 3.0.0)
|
145
145
|
rack-test (2.1.0)
|
data/lib/fbe/iterate.rb
CHANGED
@@ -80,13 +80,16 @@ class Fbe::Iterate
|
|
80
80
|
seen[repo] = 0 if seen[repo].nil?
|
81
81
|
next if seen[repo] > @limit
|
82
82
|
rid = oct.repo_id_by_name(repo)
|
83
|
-
before = Fbe.fb.query(
|
84
|
-
|
83
|
+
before = Fbe.fb.query(
|
84
|
+
"(agg (and (eq what '#{@label}') (eq where 'github') (eq repository #{rid})) (first latest))"
|
85
|
+
).one
|
86
|
+
Fbe.fb.query("(and (eq what '#{@label}') (eq where 'github') (eq repository #{rid}))").delete!
|
85
87
|
before = before.nil? ? @since : before[0]
|
86
88
|
nxt = Fbe.fb.query(@query).one(before:, repository: rid)
|
87
89
|
after = nxt.nil? ? @since : yield(rid, nxt)
|
88
90
|
raise "Iterator must return an Integer, while #{after.class} returned" unless after.is_a?(Integer)
|
89
91
|
f = Fbe.fb.insert
|
92
|
+
f.where = 'github'
|
90
93
|
f.repository = rid
|
91
94
|
f.latest = after.nil? ? nxt : after
|
92
95
|
f.what = @label
|
data/lib/fbe.rb
CHANGED
data/rules/basic.fe
CHANGED
@@ -40,28 +40,40 @@
|
|
40
40
|
(not (matches details "^.{,80}$"))
|
41
41
|
(not (matches details "[^.]$")))))
|
42
42
|
|
43
|
+
(explain (when
|
44
|
+
(exists where)
|
45
|
+
(and
|
46
|
+
(eq "String" (type where))
|
47
|
+
(eq "github" where))))
|
48
|
+
|
43
49
|
(explain (when
|
44
50
|
(exists _id)
|
45
51
|
(eq "Integer" (type _id))))
|
52
|
+
|
46
53
|
(explain (when
|
47
54
|
(exists _time)
|
48
55
|
(eq "Time" (type _time))))
|
56
|
+
|
49
57
|
(explain (when
|
50
58
|
(exists _version)
|
51
59
|
(eq "String" (type _version))))
|
60
|
+
|
52
61
|
(explain (when
|
53
62
|
(exists why)
|
54
63
|
(eq "String" (type why))))
|
64
|
+
|
55
65
|
(explain (when
|
56
66
|
(exists issue)
|
57
67
|
(and
|
58
68
|
(eq "Integer" (type issue))
|
59
69
|
(gt issue 0))))
|
70
|
+
|
60
71
|
(explain (when
|
61
72
|
(exists repository)
|
62
73
|
(and
|
63
74
|
(eq "Integer" (type repository))
|
64
75
|
(gt repository 0))))
|
76
|
+
|
65
77
|
(explain (when
|
66
78
|
(exists who)
|
67
79
|
(and
|
@@ -76,6 +88,10 @@
|
|
76
88
|
(exists issue)
|
77
89
|
(exists repository)))
|
78
90
|
|
91
|
+
(explain (when
|
92
|
+
(exists repository)
|
93
|
+
(exists where)))
|
94
|
+
|
79
95
|
(explain (when
|
80
96
|
(exists award)
|
81
97
|
(and
|
@@ -83,10 +99,3 @@
|
|
83
99
|
(exists when)
|
84
100
|
(exists who)
|
85
101
|
(exists why))))
|
86
|
-
|
87
|
-
(explain (when
|
88
|
-
(eq what 'events-were-scanned')
|
89
|
-
(and
|
90
|
-
(exists repository)
|
91
|
-
(exists latest)
|
92
|
-
(eq "Integer" (type latest)))))
|
data/test/fbe/test_conclude.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fbe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|