mumuki-html-runner 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/checker/css.rb +20 -3
- data/lib/version.rb +1 -1
- 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: 0caaee6c380613c257179cff73cc6645b1813222cdfd09a6bfd10be6f7bedc2a
|
4
|
+
data.tar.gz: d0316965c38bc179e30708bcaf3c443266cff16cbca0498b984af0a0b42b340f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e82c357e97974349bcd8a9253577ce4b2a8885fff62ba4f270d7ec02251b25aa3a090a2bde951ca3ec5d64f2cc58d989388454435c1f669523af7b901a0aacaf
|
7
|
+
data.tar.gz: ecd19037e01106431311268f6063df6da350980fe32a3a98956956ec1da811b4e37cef68e7d8c63ee6c8545b0017f97bbf8ca864add2eba31bb328651c3e4eba
|
data/lib/checker/css.rb
CHANGED
@@ -8,6 +8,10 @@ class String
|
|
8
8
|
def words
|
9
9
|
split(' ')
|
10
10
|
end
|
11
|
+
|
12
|
+
def comma_separated_words
|
13
|
+
split(',').map(&:strip)
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
module Checker
|
@@ -35,17 +39,30 @@ module Checker
|
|
35
39
|
end
|
36
40
|
|
37
41
|
def self.inspect_property(parser, inspection, binding)
|
38
|
-
property,
|
42
|
+
property, _ = parse_target(inspection.target)
|
39
43
|
parser.dig(binding, property).present?
|
40
44
|
end
|
41
45
|
|
42
46
|
def self.inspect_property_and_value(parser, inspection, binding)
|
43
47
|
property, value = parse_target(inspection.target)
|
44
|
-
parser.dig(binding, property)
|
48
|
+
actual_value = parser.dig(binding, property) || ''
|
49
|
+
values_match? value, actual_value
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.values_match?(inspection_value, actual_value)
|
53
|
+
if inspection_value.include? ','
|
54
|
+
comma_separated_values_match? inspection_value, actual_value
|
55
|
+
else
|
56
|
+
actual_value.words.include? inspection_value
|
57
|
+
end
|
45
58
|
end
|
46
59
|
|
47
60
|
def self.parse_target(target)
|
48
|
-
|
61
|
+
target.to_s.split(':')
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.comma_separated_values_match?(inspection_value, actual_value)
|
65
|
+
inspection_value.comma_separated_words == actual_value.comma_separated_words
|
49
66
|
end
|
50
67
|
end
|
51
68
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-html-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
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: 2019-
|
11
|
+
date: 2019-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
|
-
rubygems_version: 3.0.
|
179
|
+
rubygems_version: 3.0.4
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
182
|
summary: HTML Runner for Mumuki
|