mumuki-text-runner 1.4.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/checker.rb +3 -1
- data/lib/comparators/comparator.rb +3 -1
- data/lib/locales/en.yml +1 -1
- data/lib/locales/pt.yml +9 -0
- data/lib/options/lenient_blank.rb +5 -0
- data/lib/options/multiline.rb +5 -0
- data/lib/test_hook.rb +3 -1
- data/lib/version_hook.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486815bf234d3b10dec624d384e8926afaf81b9ae7a6f4c74ea08d741e359f71
|
4
|
+
data.tar.gz: 78a694eb41920fe2586da2a67f28c16355f7e5a8e41a9eeb494ed94603d0a50d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 241b8b2d2cc1839a9a3faa830c7d4d0b5c412bf8078a97d7a2edea1029ec16a2d7194198f9d5a7c86b512e851ad423cd29c77e189becbf4ea5f850b7f60427df
|
7
|
+
data.tar.gz: 948448f5ceac662501bded0f32ab93fc0bc562339557346b281db2c3690a8fdf62f9f0b81f027f9d0006f9ae4cc9e105f15281b4bf06561662093926f73ec984
|
data/lib/checker.rb
CHANGED
@@ -5,8 +5,10 @@ class TextChecker < Mumukit::Metatest::Checker
|
|
5
5
|
require_relative './comparators/regexp_comparator'
|
6
6
|
require_relative './comparators/valid_ip_comparator'
|
7
7
|
|
8
|
-
require_relative './options/
|
8
|
+
require_relative './options/lenient_blank'
|
9
9
|
require_relative './options/ignore_case'
|
10
|
+
require_relative './options/ignore_whitespace'
|
11
|
+
require_relative './options/multiline'
|
10
12
|
|
11
13
|
COMPARATORS = {
|
12
14
|
match: TextChecker::RegexpComparator,
|
@@ -15,8 +15,10 @@ class TextChecker::Comparator
|
|
15
15
|
|
16
16
|
def modifiers
|
17
17
|
modifiers = []
|
18
|
-
modifiers << TextChecker::IgnoreWhitespace if @config[:ignore_whitespace]
|
19
18
|
modifiers << TextChecker::IgnoreCase if @config[:ignore_case]
|
19
|
+
modifiers << TextChecker::LenientBlank if @config[:lenient_blank]
|
20
|
+
modifiers << TextChecker::IgnoreWhitespace if @config[:ignore_whitespace]
|
21
|
+
modifiers << TextChecker::Multiline if @config[:multiline]
|
20
22
|
modifiers
|
21
23
|
end
|
22
24
|
|
data/lib/locales/en.yml
CHANGED
@@ -4,6 +4,6 @@ en:
|
|
4
4
|
contain:
|
5
5
|
failure: '**%{actual}** does not contain the right value.'
|
6
6
|
expression:
|
7
|
-
|
7
|
+
failure: '**%{actual}** does not match the expected expression.'
|
8
8
|
valid_ip:
|
9
9
|
failure: '**%{actual}** is not a valid IP address.'
|
data/lib/locales/pt.yml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
pt:
|
2
|
+
equality:
|
3
|
+
failure: '**%{actual}** não é o valor correto.'
|
4
|
+
contain:
|
5
|
+
failure: '**%{actual}** não contém o valor correto.'
|
6
|
+
expression:
|
7
|
+
failure: '**%{actual}** não corresponde à expressão correta.'
|
8
|
+
valid_ip:
|
9
|
+
failure: '**%{actual}** não é um endereço IP válido.'
|
data/lib/test_hook.rb
CHANGED
@@ -30,7 +30,9 @@ class TextTestHook < Mumukit::Hook
|
|
30
30
|
postconditions: { equal: {
|
31
31
|
expected: parsed_test['equal'],
|
32
32
|
ignore_case: parsed_test['ignore_case'].present?,
|
33
|
-
ignore_whitespace: parsed_test['ignore_whitespace'].present
|
33
|
+
ignore_whitespace: parsed_test['ignore_whitespace'].present?,
|
34
|
+
lenient_blank: parsed_test['lenient_blank'].present?,
|
35
|
+
multiline: parsed_test['multiline'].present? } }
|
34
36
|
}]
|
35
37
|
end
|
36
38
|
|
data/lib/version_hook.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-text-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -123,9 +123,12 @@ files:
|
|
123
123
|
- lib/comparators/valid_ip_comparator.rb
|
124
124
|
- lib/locales/en.yml
|
125
125
|
- lib/locales/es.yml
|
126
|
+
- lib/locales/pt.yml
|
126
127
|
- lib/metadata_hook.rb
|
127
128
|
- lib/options/ignore_case.rb
|
128
129
|
- lib/options/ignore_whitespace.rb
|
130
|
+
- lib/options/lenient_blank.rb
|
131
|
+
- lib/options/multiline.rb
|
129
132
|
- lib/test_hook.rb
|
130
133
|
- lib/text_runner.rb
|
131
134
|
- lib/version_hook.rb
|
@@ -148,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
151
|
- !ruby/object:Gem::Version
|
149
152
|
version: '0'
|
150
153
|
requirements: []
|
151
|
-
|
152
|
-
rubygems_version: 2.7.7
|
154
|
+
rubygems_version: 3.0.3
|
153
155
|
signing_key:
|
154
156
|
specification_version: 4
|
155
157
|
summary: Text Runner for Mumuki
|