code_terminator 0.2.0 → 0.2.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/code_terminator-0.2.0.gem +0 -0
- data/lib/code_terminator/css.rb +16 -7
- data/lib/code_terminator/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ec31a6b02faaf78713a74f007f1659012b6ded4
|
4
|
+
data.tar.gz: 43ad1af7c3de835a429342d5ce49a4f1853fa7a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acd64b3c2a183d5b44d470d78c5b16ccd81380186089da069e7efb6955c809c21bb782e255e1c7ac1f437ead221345936ec9f8171769f2b8672846a9d5a36d1d
|
7
|
+
data.tar.gz: e66667e08c5709f1eefa358d9b4f474faaa9d4663296ffe7b2054465425aabb6dbf465616b0a75dd3c108e1deddb17d4387a342c3d04883b3e43d68567b16c69
|
Binary file
|
data/lib/code_terminator/css.rb
CHANGED
@@ -88,14 +88,23 @@ class CodeTerminator::Css
|
|
88
88
|
def validate_syntax(code)
|
89
89
|
valid = true
|
90
90
|
tree = Crass.parse(code)
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
91
|
+
last = tree.length
|
92
|
+
if !tree[last-1].nil?
|
93
|
+
nodes = tree[last-1][:children]
|
94
|
+
if !nodes.nil?
|
95
|
+
nodes.each do |children|
|
96
|
+
if children[:node].to_s == "error"
|
97
|
+
valid = false
|
98
|
+
end
|
95
99
|
end
|
96
|
-
|
97
|
-
|
98
|
-
|
100
|
+
else
|
101
|
+
valid = false
|
102
|
+
end
|
103
|
+
else
|
104
|
+
valid = false
|
105
|
+
end
|
106
|
+
valid
|
107
|
+
end
|
99
108
|
|
100
109
|
# Read a css file. Return a string with the text of the file.
|
101
110
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_terminator
|
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
|
- Evelin Ponce
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- code_terminator-0.1.1.gem
|
75
75
|
- code_terminator-0.1.2.gem
|
76
76
|
- code_terminator-0.1.3.gem
|
77
|
+
- code_terminator-0.2.0.gem
|
77
78
|
- code_terminator.gemspec
|
78
79
|
- exe/code_terminator
|
79
80
|
- exercises/new.html
|