fbe 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce20c859a4a73ebc7c16726e6c11751f291889d9e47f29c901f9c260e3e98ca2
4
- data.tar.gz: 4925ec6f17748589aaa23560c5f2a81824ff8a7bfd9aa6f7ea9f0c04c08202ea
3
+ metadata.gz: edccc9ab59eb5ab03d811f50b8767dd78cceb04ae1f7100ff69087751c0a8a91
4
+ data.tar.gz: 381aa6f00db80c484e929aa139b252228fc932d96be2f0eab2d320e8e7066c0b
5
5
  SHA512:
6
- metadata.gz: 30cd3accfc71a0f7c3f2875b930bb262d50c362e26ae0c8ca0fee6faa088ef1d00eec238792d0096e90a3e2049a5238db0850d012049279f30389be575c0f048
7
- data.tar.gz: 6870bf7417ccc5e87ca0807f8563d7b1852e62b8a03001bea7d191b1684f4bfcdfa5479688fbd4b045a8478a5eacce4def75787abf4b566543fdc86b06fe38ca
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.56)
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.13.2)
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.1)
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.4)
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("(agg (and (eq what '#{@label}') (eq repository #{rid})) (first latest))").one
84
- Fbe.fb.query("(and (eq what '#{@label}') (eq repository #{rid}))").delete!
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
@@ -27,5 +27,5 @@
27
27
  # License:: MIT
28
28
  module Fbe
29
29
  # Current version of the gem (changed by .rultor.yml on every release)
30
- VERSION = '0.0.4'
30
+ VERSION = '0.0.5'
31
31
  end
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)))))
@@ -70,6 +70,7 @@ class TestConclude < Minitest::Test
70
70
  on '(exists foo)'
71
71
  maybe do |n, prev|
72
72
  n.repository = 111
73
+ n.where = 'github'
73
74
  n.issue = prev.foo
74
75
  n.who = 777
75
76
  n.when = Time.now
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
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-01 00:00:00.000000000 Z
11
+ date: 2024-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace