code_terminator 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/code_terminator/css.rb +3 -3
- data/lib/code_terminator/html.rb +7 -7
- data/lib/code_terminator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 949cebfd58ffc8becc819fd57942345d3b3c3ab8
|
4
|
+
data.tar.gz: 5fcb038dceb83b816101d07d76943d7c6402b95c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 883c59775ed18fa8015d83ae01adf9f4c7cde0651b77ac2a09586a859d0beb3350f86cc93810900931e922b662bce6a7771406ca5c79bfd6b92fff5d00205f28
|
7
|
+
data.tar.gz: 1bc326c2d295513333eb15a7c6a18e9eec31f37915ef3d56cd3a9ab5dd5246c5f43015460a69168b5ffb19b55d1f02b8f5a071e1030eb5f3420a56dce176d762
|
data/lib/code_terminator/css.rb
CHANGED
@@ -218,18 +218,18 @@ class CodeTerminator::Css
|
|
218
218
|
if e[:value]==""
|
219
219
|
property = e[:property] + ": "
|
220
220
|
if parser_property.empty? { |s| s.include?(property) }
|
221
|
-
css_errors << new_error(element: e, type: 111, description: "Make sure the property #{property} is in the selector
|
221
|
+
css_errors << new_error(element: e, type: 111, description: "Make sure the property _#{property}_ is in the selector **#{item}**.")
|
222
222
|
end
|
223
223
|
else
|
224
224
|
property = e[:property] + ": " + e[:value]
|
225
225
|
if !parser_property.include?(property)
|
226
|
-
css_errors << new_error(element: e, type: 111, description: "Make sure the property #{property} is in the selector
|
226
|
+
css_errors << new_error(element: e, type: 111, description: "Make sure the property _#{property}_ is in the selector **#{item}**.")
|
227
227
|
end
|
228
228
|
end
|
229
229
|
|
230
230
|
else
|
231
231
|
node = Hash.new
|
232
|
-
css_errors << new_error(element: e, type: 101, description: "Add #{property} inside
|
232
|
+
css_errors << new_error(element: e, type: 101, description: "Add _#{property}_ inside **#{item}**.")
|
233
233
|
end
|
234
234
|
end
|
235
235
|
end
|
data/lib/code_terminator/html.rb
CHANGED
@@ -270,7 +270,7 @@ class CodeTerminator::Html
|
|
270
270
|
if !e[:content].nil?
|
271
271
|
if code.css(e[:parent]).count < 2
|
272
272
|
if code.css(e[:parent]).text != e[:content]
|
273
|
-
html_errors << new_error(element: e, type: 330, description: "The text inside
|
273
|
+
html_errors << new_error(element: e, type: 330, description: "The text inside `<#{e[:parent]}>` should be #{e[:content]}.")
|
274
274
|
end
|
275
275
|
else
|
276
276
|
exist = false
|
@@ -282,7 +282,7 @@ class CodeTerminator::Html
|
|
282
282
|
#end
|
283
283
|
end
|
284
284
|
if !exist
|
285
|
-
html_errors << new_error(element: e, type: 330, description: "The text inside
|
285
|
+
html_errors << new_error(element: e, type: 330, description: "The text inside `<#{e[:parent]}>` should be #{e[:content]}.")
|
286
286
|
end
|
287
287
|
end
|
288
288
|
end
|
@@ -296,11 +296,11 @@ class CodeTerminator::Html
|
|
296
296
|
if !e[:attribute].nil?
|
297
297
|
# Check the tag's attributes
|
298
298
|
if tag.attribute(e[:attribute]).nil?
|
299
|
-
html_errors << new_error(element: e, type: 334, description: "
|
299
|
+
html_errors << new_error(element: e, type: 334, description: "`<#{e[:tag]}>` should have an attribute named #{e[:attribute]}.")
|
300
300
|
else
|
301
301
|
if tag.attribute(e[:attribute]).value != e[:value]
|
302
302
|
exist_in_body << false
|
303
|
-
error333 = new_error(element: e, type: 333, description: "Make sure that the attribute #{e[:attribute]} in
|
303
|
+
error333 = new_error(element: e, type: 333, description: "Make sure that the attribute #{e[:attribute]} in `<#{e[:tag]}>` has the value #{e[:value]}.")
|
304
304
|
else
|
305
305
|
exist_in_body << true
|
306
306
|
end
|
@@ -313,7 +313,7 @@ class CodeTerminator::Html
|
|
313
313
|
|
314
314
|
if tag.count < 2 && !tag.first.nil?
|
315
315
|
if tag.first.parent.name != e[:parent]
|
316
|
-
html_errors << new_error(element: e, type: 440, description: "Remember to add the
|
316
|
+
html_errors << new_error(element: e, type: 440, description: "Remember to add the `<#{e[:tag]}>` tag inside `<#{e[:parent]}>`.")
|
317
317
|
end
|
318
318
|
else
|
319
319
|
exist_in_parent = false
|
@@ -323,7 +323,7 @@ class CodeTerminator::Html
|
|
323
323
|
end
|
324
324
|
end
|
325
325
|
if !exist_in_parent
|
326
|
-
html_errors << new_error(element: e, type: 440, description: "Remember to add the
|
326
|
+
html_errors << new_error(element: e, type: 440, description: "Remember to add the `<#{e[:tag]}>` tag inside `<#{e[:parent]}>`.")
|
327
327
|
end
|
328
328
|
end
|
329
329
|
end
|
@@ -332,7 +332,7 @@ class CodeTerminator::Html
|
|
332
332
|
else
|
333
333
|
# Check that the tag is present
|
334
334
|
if code.at_css(e[:tag]).nil?
|
335
|
-
html_errors << new_error(element: e, type: 404, description: "Remember to add the
|
335
|
+
html_errors << new_error(element: e, type: 404, description: "Remember to add the `<#{e[:tag]}>` tag.")
|
336
336
|
end
|
337
337
|
end
|
338
338
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_terminator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evelin Ponce
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|