asker-tool 2.5.3 → 2.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asker/check_input/check_haml_data.rb +16 -14
- data/lib/asker/check_input/check_table.rb +2 -8
- data/lib/asker/version.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2f9eaec9a8bb085529b1b131f6e7184b769796f452096c7e9813da191425a70
|
4
|
+
data.tar.gz: 25d938ce101b69c2171de314270207d17d1783008968fb0be7c21f228070c44f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f62278acb1f78b567aae35e41256d36ff76503fd3c46939f2f0f83a414b3b817ddb515d79ee9cb557352555683cc1918af02001ada4d2f44343a0be9850cc7d6
|
7
|
+
data.tar.gz: d27246c82c93285ff411ff73fd3d265e7503efce6c9037f2462147103c24e15db728553363f565043dc5443b78d3d3e73ac114f27d0ef66245ff72e333d85ee1
|
@@ -1,8 +1,8 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
1
|
|
3
|
-
require 'rainbow'
|
4
|
-
require
|
5
|
-
|
2
|
+
# require 'rainbow'
|
3
|
+
require "debug"
|
4
|
+
require "colorize"
|
5
|
+
require_relative "check_table"
|
6
6
|
|
7
7
|
class CheckHamlData
|
8
8
|
include CheckTable
|
@@ -117,9 +117,10 @@ class CheckHamlData
|
|
117
117
|
if find_parent(index) != :map
|
118
118
|
@outputs[index][:state] = :err
|
119
119
|
@outputs[index][:msg] = 'Parent(map) not found!'
|
120
|
-
elsif line
|
120
|
+
elsif !line.match(/^\s\s%concept\s*$/)
|
121
|
+
binding.break
|
121
122
|
@outputs[index][:state] = :err
|
122
|
-
@outputs[index][:msg] = 'Write 2 spaces before %concept'
|
123
|
+
@outputs[index][:msg] = 'Write 2 spaces before %concept, and no text after'
|
123
124
|
end
|
124
125
|
end
|
125
126
|
|
@@ -134,6 +135,7 @@ class CheckHamlData
|
|
134
135
|
@outputs[index][:state] = :err
|
135
136
|
@outputs[index][:msg] = 'Parent(concept) not found!'
|
136
137
|
elsif !line.start_with? ' %names'
|
138
|
+
elsif !line.match(/^\s\s\s\s%names\s/)
|
137
139
|
@outputs[index][:state] = :err
|
138
140
|
@outputs[index][:msg] = 'Write 4 spaces before %names'
|
139
141
|
end
|
@@ -149,7 +151,7 @@ class CheckHamlData
|
|
149
151
|
if find_parent(index) != :concept
|
150
152
|
@outputs[index][:state] = :err
|
151
153
|
@outputs[index][:msg] = 'Parent(concept) not found!'
|
152
|
-
elsif !line.
|
154
|
+
elsif !line.match(/^\s\s\s\s%tags\s/)
|
153
155
|
@outputs[index][:state] = :err
|
154
156
|
@outputs[index][:msg] = 'Write 4 spaces before %tags'
|
155
157
|
end
|
@@ -165,7 +167,7 @@ class CheckHamlData
|
|
165
167
|
if find_parent(index) != :concept
|
166
168
|
@outputs[index][:state] = :err
|
167
169
|
@outputs[index][:msg] = 'Parent(concept) not found!'
|
168
|
-
elsif !line.
|
170
|
+
elsif !line.match(/^\s\s\s\s%def\s/)
|
169
171
|
@outputs[index][:state] = :err
|
170
172
|
@outputs[index][:msg] = 'Write 4 spaces before %def'
|
171
173
|
end
|
@@ -181,9 +183,9 @@ class CheckHamlData
|
|
181
183
|
if find_parent(index) != :map
|
182
184
|
@outputs[index][:state] = :err
|
183
185
|
@outputs[index][:msg] = 'Parent(map) not found!'
|
184
|
-
elsif line
|
186
|
+
elsif !line.match(/^\s\s%code\s*$/)
|
185
187
|
@outputs[index][:state] = :err
|
186
|
-
@outputs[index][:msg] = 'Write 2 spaces before %code'
|
188
|
+
@outputs[index][:msg] = 'Write 2 spaces before %code, and no text after'
|
187
189
|
end
|
188
190
|
end
|
189
191
|
|
@@ -197,7 +199,7 @@ class CheckHamlData
|
|
197
199
|
if find_parent(index) != :code
|
198
200
|
@outputs[index][:state] = :err
|
199
201
|
@outputs[index][:msg] = 'Parent(code) not found!'
|
200
|
-
elsif !line.
|
202
|
+
elsif !line.match(/^\s\s\s\s%type\s/)
|
201
203
|
@outputs[index][:state] = :err
|
202
204
|
@outputs[index][:msg] = 'Write 4 spaces before %type'
|
203
205
|
end
|
@@ -213,7 +215,7 @@ class CheckHamlData
|
|
213
215
|
if find_parent(index) != :code
|
214
216
|
@outputs[index][:state] = :err
|
215
217
|
@outputs[index][:msg] = 'Parent(code) not found!'
|
216
|
-
elsif !line.
|
218
|
+
elsif !line.match(/^\s\s\s\s%path\s/)
|
217
219
|
@outputs[index][:state] = :err
|
218
220
|
@outputs[index][:msg] = 'Write 4 spaces before %type'
|
219
221
|
end
|
@@ -229,9 +231,9 @@ class CheckHamlData
|
|
229
231
|
if find_parent(index) != :code
|
230
232
|
@outputs[index][:state] = :err
|
231
233
|
@outputs[index][:msg] = 'Parent(code) not found!'
|
232
|
-
elsif !line.
|
234
|
+
elsif !line.match(/^\s\s\s\s%features\s*$/)
|
233
235
|
@outputs[index][:state] = :err
|
234
|
-
@outputs[index][:msg] = 'Write 4 spaces before %features'
|
236
|
+
@outputs[index][:msg] = 'Write 4 spaces before %features, and no text after'
|
235
237
|
end
|
236
238
|
end
|
237
239
|
|
@@ -11,7 +11,7 @@ module CheckTable
|
|
11
11
|
if find_parent(index) != :concept
|
12
12
|
@outputs[index][:state] = :err
|
13
13
|
@outputs[index][:msg] = 'Parent(concept) not found!'
|
14
|
-
elsif !line.
|
14
|
+
elsif !line.match(/^\s\s\s\s%table\s*/)
|
15
15
|
@outputs[index][:state] = :err
|
16
16
|
@outputs[index][:msg] = 'Write 4 spaces before %table'
|
17
17
|
end
|
@@ -25,12 +25,6 @@ module CheckTable
|
|
25
25
|
@outputs[index][:state] = :err
|
26
26
|
@outputs[index][:msg] = "fields must be next to : (Without spaces)"
|
27
27
|
end
|
28
|
-
|
29
|
-
# TODO
|
30
|
-
#else not /\s+%table{\s?fields:\s?'[A-Za-z,áéíóú]*'\s?}/.match(line)
|
31
|
-
# @outputs[index][:state] = :err
|
32
|
-
# @outputs[index][:msg] = 'Table#fields malformed!'
|
33
|
-
#end
|
34
28
|
end
|
35
29
|
|
36
30
|
def check_row(line, index)
|
@@ -109,7 +103,7 @@ module CheckTable
|
|
109
103
|
if find_parent(index) != :table
|
110
104
|
@outputs[index][:state] = :err
|
111
105
|
@outputs[index][:msg] = 'Parent(concept) not found!'
|
112
|
-
elsif !line.
|
106
|
+
elsif !line.match(/^\s\s\s\s\s\s%template\s*/)
|
113
107
|
@outputs[index][:state] = :err
|
114
108
|
@outputs[index][:msg] = 'Write 6 spaces before %template'
|
115
109
|
end
|
data/lib/asker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asker-tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Vargas Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|