asker-tool 2.9.4 → 2.10.0
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/README.md +15 -8
- data/lib/asker/check_input/check_haml_data.rb +18 -5
- data/lib/asker/files/asker.ini +3 -3
- data/lib/asker/version.rb +1 -1
- metadata +4 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f963ea5194e8b871206ecc61c9695f6a65e0d7974b04ee3c7bbe67aefe235ef9
|
|
4
|
+
data.tar.gz: 925e26bd2ef1adaa8d7727f9101643f29072a33db77621bde655879eb28c8a76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74c549306de1ab81fdc5623dd2a2a2b48ab7a12a31e8541488cf0413de05c096f3593eb37bad2bfcf1f423fcdc63389476fca1ba8b0727d4527f3e187187d06b
|
|
7
|
+
data.tar.gz: c208b039c4895b3eb2f436e8f229fe56dcdb5b1fc269a8863c622f90d72d71bc9f17cba17303d089555bf3dd087fb8ca45f67203cf50e5b72c6cdbbe5ae2cf97
|
data/README.md
CHANGED
|
@@ -29,7 +29,7 @@ gem install asker-tool
|
|
|
29
29
|
Let's see an example creating questions from ACDC input example file:
|
|
30
30
|
|
|
31
31
|
```console
|
|
32
|
-
|
|
32
|
+
$ asker docs/examples/bands/acdc.haml
|
|
33
33
|
|
|
34
34
|
+--------------------+-----------+---------+---------+---+---+----+---+---+----+
|
|
35
35
|
| Concept | Questions | Entries | xFactor | d | b | f | i | s | t |
|
|
@@ -45,21 +45,19 @@ Let's see an example creating questions from ACDC input example file:
|
|
|
45
45
|
|
|
46
46
|
* [Free Software License](LICENSE).
|
|
47
47
|
* Multiplatform.
|
|
48
|
-
* Input files formats:
|
|
49
|
-
* Output formats:
|
|
50
|
-
* Question types:
|
|
51
|
-
* Embeded files:
|
|
48
|
+
* Input files formats: _HAML, XML_.
|
|
49
|
+
* Output formats: _Moodle XML, GIFT, YAML_.
|
|
50
|
+
* Question types: _true/false, multiple choice, short answer, matching and ordering_.
|
|
51
|
+
* Embeded type files: _mp3, ogg, wav, jpg, jpeg, png, mp4, ogv and plain text files_.
|
|
52
52
|
|
|
53
53
|
# Documentation
|
|
54
54
|
|
|
55
|
+
* [About the tool](docs/about.md)
|
|
55
56
|
* [Installation](docs/install/README.md)
|
|
56
57
|
* [Videos](docs/videos.md)
|
|
57
58
|
* [Get started](docs/inputs/README.md)
|
|
58
59
|
* [Usage](docs/usage.md)
|
|
59
60
|
* [Reference](docs/reference.md)
|
|
60
|
-
* [Contributions](docs/contributions.md)
|
|
61
|
-
* [Problem to solve](docs/idea.md)
|
|
62
|
-
* [History](docs/history.md)
|
|
63
61
|
|
|
64
62
|
# Contact
|
|
65
63
|
|
|
@@ -67,6 +65,15 @@ Let's see an example creating questions from ACDC input example file:
|
|
|
67
65
|
|
|
68
66
|
# Contributing
|
|
69
67
|
|
|
68
|
+
If you want to contribute:
|
|
69
|
+
* Talk about this tool with your colleagues.
|
|
70
|
+
* Use this tool as much as posible.
|
|
71
|
+
* Report bugs.
|
|
72
|
+
* Share with us, your ideas for new features. "4 eyes see more than 2".
|
|
73
|
+
* Share with us your own input files and "create a better world".
|
|
74
|
+
|
|
75
|
+
But if you love `git`, `md files` or `ruby`, you can develop with us or work on the issues.
|
|
76
|
+
|
|
70
77
|
1. Make sure you have Ruby installed
|
|
71
78
|
1. Fork it
|
|
72
79
|
1. Create your feature branch (`git checkout -b my-new-feature`)
|
|
@@ -60,6 +60,7 @@ class CheckHamlData
|
|
|
60
60
|
@ok = true
|
|
61
61
|
@inputs.each_with_index do |line, index|
|
|
62
62
|
check_empty_lines(line, index)
|
|
63
|
+
check_comment_lines(line, index)
|
|
63
64
|
check_map(line, index)
|
|
64
65
|
check_concept(line, index)
|
|
65
66
|
check_names(line, index)
|
|
@@ -98,19 +99,29 @@ class CheckHamlData
|
|
|
98
99
|
@outputs[index][:state] = :ok
|
|
99
100
|
end
|
|
100
101
|
|
|
102
|
+
def check_comment_lines(line, index)
|
|
103
|
+
return unless line.strip.start_with?("//")
|
|
104
|
+
|
|
105
|
+
@outputs[index][:type] = :comment
|
|
106
|
+
@outputs[index][:level] = -1
|
|
107
|
+
@outputs[index][:state] = :ok
|
|
108
|
+
end
|
|
109
|
+
|
|
101
110
|
def check_map(line, index)
|
|
102
|
-
|
|
111
|
+
return unless line.include? "%map"
|
|
112
|
+
|
|
113
|
+
if find_parent(index) == :noparent
|
|
103
114
|
@outputs[index][:type] = :map
|
|
104
115
|
if line.start_with?("%map{")
|
|
105
116
|
@outputs[index][:state] = :ok
|
|
106
117
|
else
|
|
107
118
|
@outputs[index][:state] = :err
|
|
108
|
-
@outputs[index][:msg] = "
|
|
119
|
+
@outputs[index][:msg] = "Remove spaces before %map{"
|
|
109
120
|
end
|
|
110
|
-
|
|
121
|
+
else
|
|
111
122
|
@outputs[index][:state] = :err
|
|
112
123
|
@outputs[index][:type] = :map
|
|
113
|
-
@outputs[index][:msg] = "
|
|
124
|
+
@outputs[index][:msg] = "Start content with %map{"
|
|
114
125
|
end
|
|
115
126
|
end
|
|
116
127
|
|
|
@@ -125,7 +136,6 @@ class CheckHamlData
|
|
|
125
136
|
@outputs[index][:state] = :err
|
|
126
137
|
@outputs[index][:msg] = "Parent(map) not found!"
|
|
127
138
|
elsif !line.match(/^\s\s%concept\s*$/)
|
|
128
|
-
binding.break
|
|
129
139
|
@outputs[index][:state] = :err
|
|
130
140
|
@outputs[index][:msg] = "Write 2 spaces before %concept, and no text after"
|
|
131
141
|
end
|
|
@@ -180,6 +190,9 @@ class CheckHamlData
|
|
|
180
190
|
elsif !line.match(/^\s\s\s\s%def[\s{]/)
|
|
181
191
|
@outputs[index][:state] = :err
|
|
182
192
|
@outputs[index][:msg] = "Write 4 spaces before %def"
|
|
193
|
+
elsif line.match(/^\s\s\s\s%def\s+\{/)
|
|
194
|
+
@outputs[index][:state] = :err
|
|
195
|
+
@outputs[index][:msg] = "Don't write spaces between %def and {"
|
|
183
196
|
else
|
|
184
197
|
items = line.strip.split
|
|
185
198
|
if items.size < 2
|
data/lib/asker/files/asker.ini
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[global]
|
|
2
|
-
version = ">= 2.
|
|
2
|
+
version = ">= 2.6.0"
|
|
3
3
|
; Connect Google and download find images URLs
|
|
4
4
|
; Accept yes|no
|
|
5
5
|
internet = yes
|
|
@@ -18,9 +18,9 @@ folder = output
|
|
|
18
18
|
|
|
19
19
|
; List of output files
|
|
20
20
|
; Accept yes|no
|
|
21
|
-
gift =
|
|
21
|
+
gift = no
|
|
22
22
|
doc = yes
|
|
23
|
-
yaml =
|
|
23
|
+
yaml = no
|
|
24
24
|
moodle = yes
|
|
25
25
|
|
|
26
26
|
[languages]
|
data/lib/asker/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: asker-tool
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Vargas Ruiz
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2026-01-11 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: haml
|
|
@@ -101,8 +100,8 @@ executables:
|
|
|
101
100
|
- asker
|
|
102
101
|
extensions: []
|
|
103
102
|
extra_rdoc_files:
|
|
104
|
-
- README.md
|
|
105
103
|
- LICENSE
|
|
104
|
+
- README.md
|
|
106
105
|
files:
|
|
107
106
|
- LICENSE
|
|
108
107
|
- README.md
|
|
@@ -231,7 +230,6 @@ homepage: https://github.com/teuton-software/asker
|
|
|
231
230
|
licenses:
|
|
232
231
|
- GPL-3.0
|
|
233
232
|
metadata: {}
|
|
234
|
-
post_install_message:
|
|
235
233
|
rdoc_options: []
|
|
236
234
|
require_paths:
|
|
237
235
|
- lib
|
|
@@ -246,8 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
246
244
|
- !ruby/object:Gem::Version
|
|
247
245
|
version: '0'
|
|
248
246
|
requirements: []
|
|
249
|
-
rubygems_version: 3.2
|
|
250
|
-
signing_key:
|
|
247
|
+
rubygems_version: 3.7.2
|
|
251
248
|
specification_version: 4
|
|
252
249
|
summary: Asker generates questions from input definitions file.
|
|
253
250
|
test_files: []
|