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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8884a08c4530464b522fc225aa56283b00f414589e093a22eee0b00c99458db8
4
- data.tar.gz: 0b779a527ec45199b7c3042d96daaf9e0f6adb555909e7d6ab3d503cb41a4305
3
+ metadata.gz: f963ea5194e8b871206ecc61c9695f6a65e0d7974b04ee3c7bbe67aefe235ef9
4
+ data.tar.gz: 925e26bd2ef1adaa8d7727f9101643f29072a33db77621bde655879eb28c8a76
5
5
  SHA512:
6
- metadata.gz: 24f3b215ac28e1ee64a2506c843fe13a2572704d8c4c859d09f189f30458d86380cd5ad86c491877edd8d2b0b7ca4f65513f4dae843c4afc6b975f63efc5a504
7
- data.tar.gz: 9f3f7d7d52c21c541e819156e478278d71d917448e7ec6120c5005575e5964f220f0c16465c4089b364685b0e1ac079685da01128cee3100920c54500610cecf
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
- asker docs/examples/bands/acdc.haml
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: XML, HAML.
49
- * Output formats: GIFT, Moodle XML, YAML.
50
- * Question types: true/false, multiple choice, short answer, matching and ordering.
51
- * Embeded files: mp3, ogg, wav, jpg, jpeg, png, mp4, ogv and plain text 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
- if index.zero?
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] = "Start with %map{"
119
+ @outputs[index][:msg] = "Remove spaces before %map{"
109
120
  end
110
- elsif index.positive? && line.include?("%map{")
121
+ else
111
122
  @outputs[index][:state] = :err
112
123
  @outputs[index][:type] = :map
113
- @outputs[index][:msg] = "Write %map on line 0"
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
@@ -1,5 +1,5 @@
1
1
  [global]
2
- version = ">= 2.5.0"
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 = yes
21
+ gift = no
22
22
  doc = yes
23
- yaml = yes
23
+ yaml = no
24
24
  moodle = yes
25
25
 
26
26
  [languages]
data/lib/asker/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Asker
2
- VERSION = "2.9.4"
2
+ VERSION = "2.10.0"
3
3
  NAME = "asker"
4
4
  GEM = "asker-tool"
5
5
  CONFIGFILE = "asker.ini"
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.9.4
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: 2024-02-21 00:00:00.000000000 Z
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.33
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: []