fbe 0.0.43 → 0.0.45

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: '081da62424351c5ee65fc8a949e74f16326905f3a0748d89ba47d13ee2a5e5df'
4
- data.tar.gz: fd71a1f8d8fd721c992a46f16269357c7e784aac172b1909f09e97436190d971
3
+ metadata.gz: e4d0f09b1f8d0778a1de6ea5506c8516fcbfd73fb9f7d36454530291ca937be6
4
+ data.tar.gz: 7087a0ead0d76df576fb7c074fa1bb8d5a6bd03224a6134009aafdd74ec1175f
5
5
  SHA512:
6
- metadata.gz: 5752ff7c46fba04d57d6357209827994c45d693d9447a951ba6118dd56d9d2b96774bd141316ae9d17e1552ba98476be7ef1b8edb70538cf43ac6d80887b7e97
7
- data.tar.gz: 0a8a030cfd4781ef70841db89a6e4db6114e83083ae111e5d80fc51093795ba1251f400b5cb0cf795db3f15baef105079101d74213d68637801127e15cda912e
6
+ metadata.gz: 31b8948603e95f578821f376e4d05ceefaf1ce830509f462f7890d10c170878b847e0724ee4179464ef7cdde9cbd8218ab8ef2ffb90181ec076c8fb46d4b4b70
7
+ data.tar.gz: d57fbf933d93fa1c93c495d52868d67f6c755cf6730a7b56aef71875dbcfaea9c9c78bc06789d19a1835d399dac24b22d3fcdcef62fc1ff4ab7bb2986bc2e665
data/Gemfile.lock CHANGED
@@ -19,41 +19,54 @@ PATH
19
19
  GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
- actionpack (7.1.3.4)
23
- actionview (= 7.1.3.4)
24
- activesupport (= 7.1.3.4)
22
+ actionpack (7.2.0)
23
+ actionview (= 7.2.0)
24
+ activesupport (= 7.2.0)
25
25
  nokogiri (>= 1.8.5)
26
26
  racc
27
- rack (>= 2.2.4)
27
+ rack (>= 2.2.4, < 3.2)
28
28
  rack-session (>= 1.0.1)
29
29
  rack-test (>= 0.6.3)
30
30
  rails-dom-testing (~> 2.2)
31
31
  rails-html-sanitizer (~> 1.6)
32
- actionview (7.1.3.4)
33
- activesupport (= 7.1.3.4)
32
+ useragent (~> 0.16)
33
+ actionview (7.2.0)
34
+ activesupport (= 7.2.0)
34
35
  builder (~> 3.1)
35
36
  erubi (~> 1.11)
36
37
  rails-dom-testing (~> 2.2)
37
38
  rails-html-sanitizer (~> 1.6)
38
- activesupport (7.1.3.4)
39
+ activesupport (7.2.0)
39
40
  base64
40
41
  bigdecimal
41
- concurrent-ruby (~> 1.0, >= 1.0.2)
42
+ concurrent-ruby (~> 1.0, >= 1.3.1)
42
43
  connection_pool (>= 2.2.5)
43
44
  drb
44
45
  i18n (>= 1.6, < 2)
46
+ logger (>= 1.4.2)
45
47
  minitest (>= 5.1)
46
- mutex_m
47
- tzinfo (~> 2.0)
48
+ securerandom (>= 0.3)
49
+ tzinfo (~> 2.0, >= 2.0.5)
48
50
  addressable (2.8.7)
49
51
  public_suffix (>= 2.0.2, < 7.0)
50
52
  ansi (1.5.0)
51
53
  ast (2.4.2)
52
54
  backtrace (0.4.0)
53
55
  base64 (0.2.0)
56
+ baza.rb (0.0.4)
57
+ backtrace (> 0)
58
+ faraday (> 0)
59
+ faraday-http-cache (> 0)
60
+ faraday-multipart (> 0)
61
+ faraday-retry (> 0)
62
+ iri (> 0)
63
+ loog (> 0)
64
+ retries (~> 0)
65
+ tago (~> 0)
66
+ typhoeus (~> 1.3)
54
67
  bigdecimal (3.1.8)
55
68
  builder (3.3.0)
56
- concurrent-ruby (1.3.3)
69
+ concurrent-ruby (1.3.4)
57
70
  connection_pool (2.4.1)
58
71
  crack (1.0.0)
59
72
  bigdecimal
@@ -66,7 +79,7 @@ GEM
66
79
  erubi (1.13.0)
67
80
  ethon (0.16.0)
68
81
  ffi (>= 1.15.0)
69
- factbase (0.2.1)
82
+ factbase (0.3.0)
70
83
  backtrace (> 0)
71
84
  decoor (> 0)
72
85
  json (~> 2.7)
@@ -100,8 +113,9 @@ GEM
100
113
  reline (>= 0.4.2)
101
114
  iri (0.8.0)
102
115
  json (2.7.2)
103
- judges (0.22.1)
116
+ judges (0.25.0)
104
117
  backtrace (~> 0)
118
+ baza.rb (~> 0)
105
119
  concurrent-ruby (~> 1.2)
106
120
  factbase (~> 0)
107
121
  gli (~> 2.21)
@@ -127,7 +141,6 @@ GEM
127
141
  ruby-progressbar
128
142
  moments (0.3.0)
129
143
  multipart-post (2.4.1)
130
- mutex_m (0.2.0)
131
144
  net-http (0.4.1)
132
145
  uri
133
146
  nokogiri (1.16.7-arm64-darwin)
@@ -143,8 +156,8 @@ GEM
143
156
  faraday (>= 1, < 3)
144
157
  sawyer (~> 0.9)
145
158
  others (0.0.3)
146
- parallel (1.25.1)
147
- parser (3.3.4.0)
159
+ parallel (1.26.2)
160
+ parser (3.3.4.2)
148
161
  ast (~> 2.4.1)
149
162
  racc
150
163
  psych (5.1.2)
@@ -166,10 +179,10 @@ GEM
166
179
  rails-html-sanitizer (1.6.0)
167
180
  loofah (~> 2.21)
168
181
  nokogiri (~> 1.14)
169
- railties (7.1.3.4)
170
- actionpack (= 7.1.3.4)
171
- activesupport (= 7.1.3.4)
172
- irb
182
+ railties (7.2.0)
183
+ actionpack (= 7.2.0)
184
+ activesupport (= 7.2.0)
185
+ irb (~> 1.13)
173
186
  rackup (>= 1.0.0)
174
187
  rake (>= 12.2)
175
188
  thor (~> 1.0, >= 1.2.2)
@@ -182,7 +195,7 @@ GEM
182
195
  reline (0.5.9)
183
196
  io-console (~> 0.5)
184
197
  retries (0.0.5)
185
- rexml (3.3.4)
198
+ rexml (3.3.5)
186
199
  strscan
187
200
  rspec-core (3.13.0)
188
201
  rspec-support (~> 3.13.0)
@@ -223,6 +236,7 @@ GEM
223
236
  sawyer (0.9.2)
224
237
  addressable (>= 2.3.5)
225
238
  faraday (>= 0.17.3, < 3)
239
+ securerandom (0.3.1)
226
240
  simplecov (0.22.0)
227
241
  docile (~> 1.1)
228
242
  simplecov-html (~> 0.11)
@@ -242,6 +256,7 @@ GEM
242
256
  concurrent-ruby (~> 1.0)
243
257
  unicode-display_width (2.5.0)
244
258
  uri (0.13.0)
259
+ useragent (0.16.10)
245
260
  verbose (0.0.2)
246
261
  loog (~> 0.2)
247
262
  tago (~> 0.0)
data/lib/fbe/octo.rb CHANGED
@@ -358,6 +358,8 @@ class Fbe::FakeOctokit
358
358
  }
359
359
  else
360
360
  {
361
+ total_count: 1,
362
+ incomplete_results: false,
361
363
  items: [
362
364
  {
363
365
  number: 42,
data/lib/fbe/overwrite.rb CHANGED
@@ -39,6 +39,7 @@ require_relative 'fb'
39
39
  # @param [Any] vqlue The value to set
40
40
  def Fbe.overwrite(fact, property, value, fb: Fbe.fb)
41
41
  raise 'The fact is nil' if fact.nil?
42
+ return if !fact[property].nil? && fact[property].size == 1 && fact[property].first == value
42
43
  before = {}
43
44
  fact.all_properties.each do |prop|
44
45
  before[prop.to_s] = fact[prop]
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.43'
30
+ VERSION = '0.0.45'
31
31
  end
@@ -45,7 +45,7 @@ class QuotaTest < Minitest::Test
45
45
 
46
46
  def test_quota_middleware_pauses_when_quota_low
47
47
  loog = Loog::NULL
48
- pause = 1
48
+ pause = 0.1
49
49
  app = FakeApp.new
50
50
  middleware = Fbe::Middleware::Quota.new(app, loog:, pause:)
51
51
  start_time = Time.now
@@ -62,7 +62,7 @@ class QuotaTest < Minitest::Test
62
62
  end
63
63
 
64
64
  def test_quota_middleware_logs_when_quota_low
65
- pause = 1
65
+ pause = 0.1
66
66
  log_output = StringIO.new
67
67
  loog = Logger.new(log_output)
68
68
  app = FakeApp.new
@@ -139,7 +139,7 @@ class TestOcto < Minitest::Test
139
139
  def test_pauses_when_quota_is_exceeded
140
140
  WebMock.disable_net_connect!
141
141
  global = {}
142
- pause = 1
142
+ pause = 0.1
143
143
  o = Fbe.octo(loog: Loog::NULL, global:, options: Judges::Options.new({ 'github_api_pause' => pause }))
144
144
  limit = 100
145
145
  start_time = Time.now
@@ -46,6 +46,16 @@ class TestOverwrite < Minitest::Test
46
46
  assert_equal(2, fb.query('(always)').each.to_a.first['many'].size)
47
47
  end
48
48
 
49
+ def test_no_need_to_overwrite
50
+ fb = Factbase.new
51
+ f = fb.insert
52
+ f._id = 1
53
+ f.foo = 42
54
+ fb.insert._id = 2
55
+ Fbe.overwrite(f, :foo, 42, fb:)
56
+ assert_equal(1, fb.query('(always)').each.to_a.first._id)
57
+ end
58
+
49
59
  def test_simple_insert
50
60
  fb = Factbase.new
51
61
  f = fb.insert
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.43
4
+ version: 0.0.45
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-08-10 00:00:00.000000000 Z
11
+ date: 2024-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace