asker-tool 2.9.2 → 2.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf109d783e6f90f7a4d5fdf9096a5be939e63e294d41532d84506b77b83ef3a9
4
- data.tar.gz: 6e08aec493068877d96f9e1f264638ea798bff3a26d6c665802b22b79ff1ce07
3
+ metadata.gz: 712f5ef9ce3683bd737c09a109538f58f88c1b39dd5fed4ac158325466729978
4
+ data.tar.gz: cab2e91c8cd046384af546ff43032e2cb4cfb91fa432067b65466c4944e1daba
5
5
  SHA512:
6
- metadata.gz: '09b3aeb201e0fefc3b66a2e50dc4d7b92cdabe4a641db412b556cf85b55d97a36d5f416fe06eeb8d5df72d7a72368f12a7571d062b0181ee14851cd05f96079e'
7
- data.tar.gz: e6278f54603305c6fae82d814eb646c9ed4c403196413869b40b38da582abe50704b41a80dfbda1218ee2a27780e1dc70c8eb967ad36c884b9e723e8893c5de4
6
+ metadata.gz: c0d011842fc510437fb7a484eb4c4580aff74b15864063cfbde57ecf495c79dd2bec0fb277dbebf1556d2519617cb0e8169a31929ea6346a5be46db01cac6850
7
+ data.tar.gz: f3cee25561d9d81808459b0bff0b91eee376c69d2ee2db637cdffb0c70927f94a66e56bca5addbf2b1f31a109d2013a6451bd4b1efbfad6f991b424733c462a4
@@ -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}-uncomment"
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}-comment"
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}-codeok"
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}-codeok"
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}-syntaxerror"
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}-syntaxerror"
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}-variable"
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}-variable"
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}-uncomment"
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}-comment"
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}-codeok"
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}-codeok"
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}-syntaxerror"
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}-syntaxerror"
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}-variable"
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}-variable"
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}-uncomment"
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}-comment"
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}-codeok"
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}-codeok"
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}-syntaxerror"
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}-syntaxerror"
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}-variable"
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}-variable"
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)
@@ -62,33 +62,5 @@ category =
62
62
  ; Accept Comma separated strings.
63
63
  exclude =
64
64
 
65
- ; ### stage_b ###
66
- ; b1: b1match4x4, b1match3x1misspelled, b1match3x1
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
@@ -1,5 +1,5 @@
1
1
  class Asker
2
- VERSION = "2.9.2"
2
+ VERSION = "2.9.3"
3
3
  NAME = "asker"
4
4
  GEM = "asker-tool"
5
5
  CONFIGFILE = "asker.ini"
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.2
4
+ version: 2.9.3
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: 2023-10-02 00:00:00.000000000 Z
11
+ date: 2023-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml