factbase 0.0.44 → 0.0.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/{license.yml → copyrights.yml} +3 -30
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/lib/factbase/looged.rb +8 -1
- data/lib/factbase.rb +1 -1
- data/test/factbase/test_looged.rb +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f50658ed4f005f217ac62d0d7915a02bda424b81b27b8fd28c04d72a87720f42
|
4
|
+
data.tar.gz: 96593b68ec2ead36739708e150794a640786f76bb015476a90f80814f0f211fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5595f2de94f831ed456771bfbf52efb86b2c3e29be426923dadcdee51389983ef2bedd2e41cdccb5246b91682cc7bb47164f7bf8adefbd2cf08f76812e8412a7
|
7
|
+
data.tar.gz: ccbf0464b43eb277c497e27f3827c7cd3051fc94e34c727c4c258d3a999d717a600635eda52c62a874165eb3bf7804a0665edbe1bdaf7eca47aa1e568db9bc17
|
@@ -18,40 +18,13 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
19
|
# SOFTWARE.
|
20
20
|
---
|
21
|
-
name:
|
21
|
+
name: copyrights
|
22
22
|
'on':
|
23
23
|
push:
|
24
|
-
branches:
|
25
|
-
- master
|
26
24
|
pull_request:
|
27
|
-
branches:
|
28
|
-
- master
|
29
25
|
jobs:
|
30
|
-
|
26
|
+
copyrights:
|
31
27
|
runs-on: ubuntu-22.04
|
32
28
|
steps:
|
33
29
|
- uses: actions/checkout@v4
|
34
|
-
-
|
35
|
-
run: |
|
36
|
-
header="Copyright (c) $(date +%Y) Yegor Bugayenko"
|
37
|
-
failed="false"
|
38
|
-
while IFS= read -r file; do
|
39
|
-
if ! grep -q "${header}" "${file}"; then
|
40
|
-
failed="true"
|
41
|
-
echo "⚠️ Copyright header is not found in: ${file}"
|
42
|
-
else
|
43
|
-
echo "File looks good: ${file}"
|
44
|
-
fi
|
45
|
-
done < <(find . -type f \( \
|
46
|
-
-name "Dockerfile" -o \
|
47
|
-
-name "LICENSE.txt" -o \
|
48
|
-
-name "Makefile" -o \
|
49
|
-
-name "Rakefile" -o \
|
50
|
-
-name "*.sh" -o \
|
51
|
-
-name "*.rb" -o \
|
52
|
-
-name "*.fe" -o \
|
53
|
-
-name "*.yml" \
|
54
|
-
\) -print)
|
55
|
-
if [ "${failed}" = "true" ]; then
|
56
|
-
exit 1
|
57
|
-
fi
|
30
|
+
- uses: yegor256/copyrights-action@0.0.4
|
data/Gemfile
CHANGED
@@ -28,7 +28,7 @@ gem 'rake', '13.2.1', require: false
|
|
28
28
|
gem 'rspec-rails', '6.1.2', require: false
|
29
29
|
gem 'rubocop', '1.64.1', require: false
|
30
30
|
gem 'rubocop-performance', '1.21.0', require: false
|
31
|
-
gem 'rubocop-rspec', '2.
|
31
|
+
gem 'rubocop-rspec', '2.31.0', require: false
|
32
32
|
gem 'simplecov', '0.22.0', require: false
|
33
33
|
gem 'simplecov-cobertura', '2.1.0', require: false
|
34
34
|
gem 'yard', '0.9.36', require: false
|
data/Gemfile.lock
CHANGED
@@ -145,7 +145,7 @@ GEM
|
|
145
145
|
rubocop-performance (1.21.0)
|
146
146
|
rubocop (>= 1.48.1, < 2.0)
|
147
147
|
rubocop-ast (>= 1.31.1, < 2.0)
|
148
|
-
rubocop-rspec (2.
|
148
|
+
rubocop-rspec (2.31.0)
|
149
149
|
rubocop (~> 1.40)
|
150
150
|
rubocop-capybara (~> 2.17)
|
151
151
|
rubocop-factory_bot (~> 2.22)
|
@@ -186,7 +186,7 @@ DEPENDENCIES
|
|
186
186
|
rspec-rails (= 6.1.2)
|
187
187
|
rubocop (= 1.64.1)
|
188
188
|
rubocop-performance (= 1.21.0)
|
189
|
-
rubocop-rspec (= 2.
|
189
|
+
rubocop-rspec (= 2.31.0)
|
190
190
|
simplecov (= 0.22.0)
|
191
191
|
simplecov-cobertura (= 2.1.0)
|
192
192
|
yard (= 0.9.36)
|
data/lib/factbase/looged.rb
CHANGED
@@ -52,7 +52,14 @@ class Factbase::Looged
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def txn(this = self, &)
|
55
|
-
|
55
|
+
r = false
|
56
|
+
@fb.txn(this) do |x|
|
57
|
+
tail = Factbase::Looged.elapsed do
|
58
|
+
r = yield x
|
59
|
+
end
|
60
|
+
@loog.debug("Txn #{r ? 'modified' : 'did nothing'} #{tail}")
|
61
|
+
end
|
62
|
+
r
|
56
63
|
end
|
57
64
|
|
58
65
|
def export
|
data/lib/factbase.rb
CHANGED
@@ -79,7 +79,7 @@ require 'yaml'
|
|
79
79
|
# License:: MIT
|
80
80
|
class Factbase
|
81
81
|
# Current version of the gem (changed by .rultor.yml on every release)
|
82
|
-
VERSION = '0.0.
|
82
|
+
VERSION = '0.0.45'
|
83
83
|
|
84
84
|
# An exception that may be thrown in a transaction, to roll it back.
|
85
85
|
class Rollback < StandardError; end
|
@@ -44,6 +44,16 @@ class TestLooged < Minitest::Test
|
|
44
44
|
assert_equal(2, fb.size)
|
45
45
|
end
|
46
46
|
|
47
|
+
def test_with_txn
|
48
|
+
fb = Factbase::Looged.new(Factbase.new, Loog::NULL)
|
49
|
+
assert(
|
50
|
+
fb.txn do |fbt|
|
51
|
+
fbt.insert.foo = 42
|
52
|
+
end
|
53
|
+
)
|
54
|
+
assert_equal(1, fb.size)
|
55
|
+
end
|
56
|
+
|
47
57
|
def test_returns_int
|
48
58
|
fb = Factbase.new
|
49
59
|
fb.insert
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
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-06-
|
11
|
+
date: 2024-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -82,7 +82,7 @@ files:
|
|
82
82
|
- ".gitattributes"
|
83
83
|
- ".github/workflows/actionlint.yml"
|
84
84
|
- ".github/workflows/codecov.yml"
|
85
|
-
- ".github/workflows/
|
85
|
+
- ".github/workflows/copyrights.yml"
|
86
86
|
- ".github/workflows/markdown-lint.yml"
|
87
87
|
- ".github/workflows/pdd.yml"
|
88
88
|
- ".github/workflows/rake.yml"
|