factbase 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/copyrights.yml +4 -0
- data/.github/workflows/xcop.yml +4 -0
- data/lib/factbase/terms/system.rb +1 -1
- data/lib/factbase.rb +1 -1
- data/test/factbase/terms/test_system.rb +12 -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: 776ba2273b1a5e1c8891d67796ddf15559c537e2ba7138129e1b750e64ffe649
|
4
|
+
data.tar.gz: a217e8041bc9558ee64c23bc6000e06b78b0e7a310bb052b88d2370fbad66a3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f60eae4b86b001ae6fa116a3970ed77cdbdbb24d97d038adc6f6ef9e80583718cbdd8e075964ed87caa7dd3ffc42f0f29a059f731a6baa4ab38b7124513c3ef8
|
7
|
+
data.tar.gz: d873fdcb2cad4c0f730020c2d903d5b051251c20541bb9979c8c24f674b1e92cef676ca213dcc95128f58b64e2769ee2ba2e4fa8bb53ac5b7060ae93a03f71bb
|
data/.github/workflows/xcop.yml
CHANGED
data/lib/factbase.rb
CHANGED
@@ -81,7 +81,7 @@ require 'yaml'
|
|
81
81
|
# License:: MIT
|
82
82
|
class Factbase
|
83
83
|
# Current version of the gem (changed by .rultor.yml on every release)
|
84
|
-
VERSION = '0.2.
|
84
|
+
VERSION = '0.2.1'
|
85
85
|
|
86
86
|
# An exception that may be thrown in a transaction, to roll it back.
|
87
87
|
class Rollback < StandardError; end
|
@@ -34,4 +34,16 @@ class TestSystem < Minitest::Test
|
|
34
34
|
t = Factbase::Term.new(:env, ['FOO', ''])
|
35
35
|
assert_equal('bar', t.evaluate(fact, []))
|
36
36
|
end
|
37
|
+
|
38
|
+
def test_default
|
39
|
+
ENV.delete('FOO')
|
40
|
+
t = Factbase::Term.new(:env, ['FOO', 'мой друг'])
|
41
|
+
assert_equal('мой друг', t.evaluate(fact, []))
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_when_default_is_absent
|
45
|
+
ENV.delete('FOO')
|
46
|
+
t = Factbase::Term.new(:env, ['FOO'])
|
47
|
+
assert_raises { t.evaluate(fact, []) }
|
48
|
+
end
|
37
49
|
end
|
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.2.
|
4
|
+
version: 0.2.1
|
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-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|