asker-tool 2.9.2 → 2.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/asker/ai/code/javascript_code_ai.rb +8 -8
- data/lib/asker/ai/code/python_code_ai.rb +8 -8
- data/lib/asker/ai/code/ruby_code_ai.rb +8 -8
- data/lib/asker/files/asker.ini +2 -30
- data/lib/asker/version.rb +1 -1
- 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: 8884a08c4530464b522fc225aa56283b00f414589e093a22eee0b00c99458db8
|
4
|
+
data.tar.gz: 0b779a527ec45199b7c3042d96daaf9e0f6adb555909e7d6ab3d503cb41a4305
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24f3b215ac28e1ee64a2506c843fe13a2572704d8c4c859d09f189f30458d86380cd5ad86c491877edd8d2b0b7ca4f65513f4dae843c4afc6b975f63efc5a504
|
7
|
+
data.tar.gz: 9f3f7d7d52c21c541e819156e478278d71d917448e7ec6120c5005575e5964f220f0c16465c4089b364685b0e1ac079685da01128cee3100920c54500610cecf
|
data/README.md
CHANGED
@@ -23,7 +23,7 @@ gem install asker-tool
|
|
23
23
|
|
24
24
|
| Step | Action | Tool | Description |
|
25
25
|
| ---: | --------------------- | ---- | ----------- |
|
26
|
-
| 1 | Define your concepts | Text plain editor | Create input file with your contents (_conceptual map_). Here are some [examples](
|
26
|
+
| 1 | Define your concepts | Text plain editor | Create input file with your contents (_conceptual map_). Here are some [examples](https://github.com/teuton-software/asker/tree/master/docs/examples). And more examples at this [repository](https://github.com/dvarrui/asker-inputs).
|
27
27
|
| 2 | Generate questions | `asker PATH/TO/INPUT` | **Run `asker`** to process input file. Output files are saved into the `output` folder |
|
28
28
|
|
29
29
|
Let's see an example creating questions from ACDC input example file:
|
@@ -17,7 +17,7 @@ class JavascriptCodeAI < BaseCodeAI
|
|
17
17
|
lines[index].sub!("//", "").strip!
|
18
18
|
|
19
19
|
q = Question.new(:short)
|
20
|
-
q.name = "#{name}-#{num}-
|
20
|
+
q.name = "#{name}-#{num}-code1uncomment"
|
21
21
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
22
22
|
q.shorts << (index + 1)
|
23
23
|
q.feedback = "Comment symbol removed"
|
@@ -27,7 +27,7 @@ class JavascriptCodeAI < BaseCodeAI
|
|
27
27
|
lines[index] = "// " + lines[index]
|
28
28
|
|
29
29
|
q = Question.new(:short)
|
30
|
-
q.name = "#{name}-#{num}-
|
30
|
+
q.name = "#{name}-#{num}-code1comment"
|
31
31
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
32
32
|
q.shorts << (index + 1)
|
33
33
|
q.feedback = "Comment symbol added"
|
@@ -54,14 +54,14 @@ class JavascriptCodeAI < BaseCodeAI
|
|
54
54
|
lines.insert(index, " " * (rand(4).to_i + 1))
|
55
55
|
if @lines.size < 4 || rand(2) == 0
|
56
56
|
q = Question.new(:short)
|
57
|
-
q.name = "#{name}-#{num}-
|
57
|
+
q.name = "#{name}-#{num}-code1ok"
|
58
58
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
59
59
|
q.shorts << "0"
|
60
60
|
q.feedback = "Code is OK"
|
61
61
|
questions << q
|
62
62
|
else
|
63
63
|
q = Question.new(:choice)
|
64
|
-
q.name = "#{name}-#{num}-
|
64
|
+
q.name = "#{name}-#{num}-code1ok"
|
65
65
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
66
66
|
others = (1..@lines.size).to_a.shuffle!
|
67
67
|
q.good = "0"
|
@@ -91,13 +91,13 @@ class JavascriptCodeAI < BaseCodeAI
|
|
91
91
|
lines[index].sub!(key.to_s, value)
|
92
92
|
if @lines.size < 4 || rand(2) == 0
|
93
93
|
q = Question.new(:short)
|
94
|
-
q.name = "#{name}-#{num}-
|
94
|
+
q.name = "#{name}-#{num}-code1syntaxerror"
|
95
95
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
96
96
|
q.shorts << (index + 1)
|
97
97
|
q.feedback = "Syntax error: '#{value}' must be '#{key}'"
|
98
98
|
else
|
99
99
|
q = Question.new(:choice)
|
100
|
-
q.name = "#{name}-#{num}-
|
100
|
+
q.name = "#{name}-#{num}-code1syntaxerror"
|
101
101
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
102
102
|
others = (1..@lines.size).to_a.shuffle!
|
103
103
|
others.delete(index + 1)
|
@@ -139,13 +139,13 @@ class JavascriptCodeAI < BaseCodeAI
|
|
139
139
|
|
140
140
|
if rand(2) == 0
|
141
141
|
q = Question.new(:short)
|
142
|
-
q.name = "#{name}-#{num}-
|
142
|
+
q.name = "#{name}-#{num}-code1variable"
|
143
143
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
144
144
|
q.shorts << (index + 1)
|
145
145
|
q.feedback = "Variable error! Swapped lines #{index + 1} with #{k + 1}"
|
146
146
|
else
|
147
147
|
q = Question.new(:choice)
|
148
|
-
q.name = "#{name}-#{num}-
|
148
|
+
q.name = "#{name}-#{num}-code1variable"
|
149
149
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
150
150
|
others = (1..@lines.size).to_a.shuffle!
|
151
151
|
others.delete(index + 1)
|
@@ -17,7 +17,7 @@ class PythonCodeAI < BaseCodeAI
|
|
17
17
|
lines[index].sub!("#", "").strip!
|
18
18
|
|
19
19
|
q = Question.new(:short)
|
20
|
-
q.name = "#{name}-#{num}-
|
20
|
+
q.name = "#{name}-#{num}-code1uncomment"
|
21
21
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
22
22
|
q.shorts << (index + 1)
|
23
23
|
q.feedback = "Comment symbol removed"
|
@@ -27,7 +27,7 @@ class PythonCodeAI < BaseCodeAI
|
|
27
27
|
lines[index] = "# " + lines[index]
|
28
28
|
|
29
29
|
q = Question.new(:short)
|
30
|
-
q.name = "#{name}-#{num}-
|
30
|
+
q.name = "#{name}-#{num}-code1comment"
|
31
31
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
32
32
|
q.shorts << (index + 1)
|
33
33
|
q.feedback = "Comment symbol added"
|
@@ -54,14 +54,14 @@ class PythonCodeAI < BaseCodeAI
|
|
54
54
|
lines.insert(index, " " * (rand(4).to_i + 1))
|
55
55
|
if @lines.size < 4 || rand(2) == 0
|
56
56
|
q = Question.new(:short)
|
57
|
-
q.name = "#{name}-#{num}-
|
57
|
+
q.name = "#{name}-#{num}-code1ok"
|
58
58
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
59
59
|
q.shorts << "0"
|
60
60
|
q.feedback = "Code is OK"
|
61
61
|
questions << q
|
62
62
|
else
|
63
63
|
q = Question.new(:choice)
|
64
|
-
q.name = "#{name}-#{num}-
|
64
|
+
q.name = "#{name}-#{num}-code1ok"
|
65
65
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
66
66
|
others = (1..@lines.size).to_a.shuffle!
|
67
67
|
q.good = "0"
|
@@ -91,13 +91,13 @@ class PythonCodeAI < BaseCodeAI
|
|
91
91
|
lines[index].sub!(key.to_s, value)
|
92
92
|
if @lines.size < 4 || rand(2) == 0
|
93
93
|
q = Question.new(:short)
|
94
|
-
q.name = "#{name}-#{num}-
|
94
|
+
q.name = "#{name}-#{num}-code1syntaxerror"
|
95
95
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
96
96
|
q.shorts << (index + 1)
|
97
97
|
q.feedback = "Syntax error: '#{value}' must be '#{key}'"
|
98
98
|
else
|
99
99
|
q = Question.new(:choice)
|
100
|
-
q.name = "#{name}-#{num}-
|
100
|
+
q.name = "#{name}-#{num}-code1syntaxerror"
|
101
101
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
102
102
|
others = (1..@lines.size).to_a.shuffle!
|
103
103
|
others.delete(index + 1)
|
@@ -139,13 +139,13 @@ class PythonCodeAI < BaseCodeAI
|
|
139
139
|
|
140
140
|
if rand(2) == 0
|
141
141
|
q = Question.new(:short)
|
142
|
-
q.name = "#{name}-#{num}-
|
142
|
+
q.name = "#{name}-#{num}-code1variable"
|
143
143
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
144
144
|
q.shorts << (index + 1)
|
145
145
|
q.feedback = "Variable error! Swapped lines #{index + 1} with #{k + 1}"
|
146
146
|
else
|
147
147
|
q = Question.new(:choice)
|
148
|
-
q.name = "#{name}-#{num}-
|
148
|
+
q.name = "#{name}-#{num}-code1variable"
|
149
149
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
150
150
|
others = (1..@lines.size).to_a.shuffle!
|
151
151
|
others.delete(index + 1)
|
@@ -21,7 +21,7 @@ class RubyCodeAI < BaseCodeAI
|
|
21
21
|
lines[index].sub!("#", "").strip!
|
22
22
|
|
23
23
|
q = Question.new(:short)
|
24
|
-
q.name = "#{name}-#{num}-
|
24
|
+
q.name = "#{name}-#{num}-code1uncomment"
|
25
25
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
26
26
|
q.shorts << (index + 1)
|
27
27
|
q.feedback = "Comment symbol removed"
|
@@ -31,7 +31,7 @@ class RubyCodeAI < BaseCodeAI
|
|
31
31
|
lines[index] = "# " + lines[index]
|
32
32
|
|
33
33
|
q = Question.new(:short)
|
34
|
-
q.name = "#{name}-#{num}-
|
34
|
+
q.name = "#{name}-#{num}-code1comment"
|
35
35
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
36
36
|
q.shorts << (index + 1)
|
37
37
|
q.feedback = "Comment symbol added"
|
@@ -60,14 +60,14 @@ class RubyCodeAI < BaseCodeAI
|
|
60
60
|
lines.insert(index, " " * (rand(4).to_i + 1))
|
61
61
|
if @lines.size < 4 || rand(2) == 0
|
62
62
|
q = Question.new(:short)
|
63
|
-
q.name = "#{name}-#{num}-
|
63
|
+
q.name = "#{name}-#{num}-code1ok"
|
64
64
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
65
65
|
q.shorts << "0"
|
66
66
|
q.feedback = "Code is OK"
|
67
67
|
questions << q
|
68
68
|
else
|
69
69
|
q = Question.new(:choice)
|
70
|
-
q.name = "#{name}-#{num}-
|
70
|
+
q.name = "#{name}-#{num}-code1ok"
|
71
71
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
72
72
|
others = (1..@lines.size).to_a.shuffle!
|
73
73
|
q.good = "0"
|
@@ -99,13 +99,13 @@ class RubyCodeAI < BaseCodeAI
|
|
99
99
|
lines[index].sub!(key.to_s, value)
|
100
100
|
if @lines.size < 4 || rand(2) == 0
|
101
101
|
q = Question.new(:short)
|
102
|
-
q.name = "#{name}-#{num}-
|
102
|
+
q.name = "#{name}-#{num}-code1syntaxerror"
|
103
103
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
104
104
|
q.shorts << (index + 1)
|
105
105
|
q.feedback = "Syntax error: '#{value}' must be '#{key}'"
|
106
106
|
else
|
107
107
|
q = Question.new(:choice)
|
108
|
-
q.name = "#{name}-#{num}-
|
108
|
+
q.name = "#{name}-#{num}-code1syntaxerror"
|
109
109
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
110
110
|
others = (1..@lines.size).to_a.shuffle!
|
111
111
|
others.delete(index + 1)
|
@@ -149,13 +149,13 @@ class RubyCodeAI < BaseCodeAI
|
|
149
149
|
|
150
150
|
if rand(2) == 0
|
151
151
|
q = Question.new(:short)
|
152
|
-
q.name = "#{name}-#{num}-
|
152
|
+
q.name = "#{name}-#{num}-code1variable"
|
153
153
|
q.text = @lang.text_for(:code1, lines_to_html(lines))
|
154
154
|
q.shorts << (index + 1)
|
155
155
|
q.feedback = "Variable error! Swapped lines #{index + 1} with #{k + 1}"
|
156
156
|
else
|
157
157
|
q = Question.new(:choice)
|
158
|
-
q.name = "#{name}-#{num}-
|
158
|
+
q.name = "#{name}-#{num}-code1variable"
|
159
159
|
q.text = @lang.text_for(:code2, lines_to_html(lines))
|
160
160
|
others = (1..@lines.size).to_a.shuffle!
|
161
161
|
others.delete(index + 1)
|
data/lib/asker/files/asker.ini
CHANGED
@@ -62,33 +62,5 @@ category =
|
|
62
62
|
; Accept Comma separated strings.
|
63
63
|
exclude =
|
64
64
|
|
65
|
-
;
|
66
|
-
;
|
67
|
-
; ### stage_d ###
|
68
|
-
; d1: d1choose, d1none, d1none-misspelled
|
69
|
-
; d2: d2def-mispelled, d2name-mispelled, d2true, d2false-misspelled
|
70
|
-
; d3: d3hidden
|
71
|
-
; d4: d4filtered
|
72
|
-
; ### stage_f
|
73
|
-
; f1: f1true, f1short, f1name-misspelled, f1true-misspelled, f1false
|
74
|
-
; f2: f2outsider
|
75
|
-
; f3: f3filtered
|
76
|
-
; ### stage_i
|
77
|
-
; i1
|
78
|
-
; i2
|
79
|
-
; i3
|
80
|
-
; i4
|
81
|
-
; ### stage_s
|
82
|
-
; s1
|
83
|
-
; ### stage_t
|
84
|
-
; t1table
|
85
|
-
; t2table
|
86
|
-
; t3table
|
87
|
-
; t4table
|
88
|
-
; t5table
|
89
|
-
; t6table
|
90
|
-
; t7table
|
91
|
-
; t8table
|
92
|
-
; t9table
|
93
|
-
; ### code
|
94
|
-
; code1
|
65
|
+
; Question ID list:
|
66
|
+
; https://github.com/teuton-software/asker/blob/master/docs/questions.md
|
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.9.
|
4
|
+
version: 2.9.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:
|
11
|
+
date: 2024-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|