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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43678016289325cc51c7f82a3c3696d8113641032b2c1b97f4a68ce4835bc3c6
4
- data.tar.gz: b237d0b7ec9d0fe5e8dc110accf493fbd17ac35d55bb3f2e14856b1f277922f9
3
+ metadata.gz: 486815bf234d3b10dec624d384e8926afaf81b9ae7a6f4c74ea08d741e359f71
4
+ data.tar.gz: 78a694eb41920fe2586da2a67f28c16355f7e5a8e41a9eeb494ed94603d0a50d
5
5
  SHA512:
6
- metadata.gz: 134703fbbf89aa87c224e1efa93752e7f7681b82586ce56325b31cd342ac72fda98ba38136a747b54e9e635068e372f0236fe837caa569f6b1072048719e4371
7
- data.tar.gz: a224bb63533f2f352c4a4be7cfa51ea9030a6fe7c3d0258bfb15a63f711678994fa60007207ee1823960c0dc1b60b9ccda5ac0d339c395400de98abc42e02f2e
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/ignore_whitespace'
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
- failure: '**%{actual}** does not match the expected expression.'
7
+ failure: '**%{actual}** does not match the expected expression.'
8
8
  valid_ip:
9
9
  failure: '**%{actual}** is not a valid IP address.'
@@ -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.'
@@ -0,0 +1,5 @@
1
+ module TextChecker::LenientBlank
2
+ def self.apply(text)
3
+ text.gsub("\t", ' ').squeeze(' ')
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module TextChecker::Multiline
2
+ def self.apply(text)
3
+ text.gsub("\r\n", "\n")
4
+ end
5
+ end
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
@@ -1,3 +1,3 @@
1
1
  module TextVersionHook
2
- VERSION = '1.4.0'
2
+ VERSION = '1.6.0'
3
3
  end
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.0
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: 2020-07-14 00:00:00.000000000 Z
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
- rubyforge_project:
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