asker-tool 2.1.3 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -17
  3. data/lib/asker.rb +40 -83
  4. data/lib/asker/application.rb +1 -1
  5. data/lib/asker/checker.rb +42 -25
  6. data/lib/asker/cli.rb +1 -1
  7. data/lib/asker/data/world.rb +2 -0
  8. data/lib/asker/{exporter/code_screen_exporter.rb → displayer/code_displayer.rb} +6 -6
  9. data/lib/asker/{exporter/concept_ai_screen_exporter.rb → displayer/concept_ai_displayer.rb} +27 -29
  10. data/lib/asker/displayer/concept_displayer.rb +27 -0
  11. data/lib/asker/displayer/stats_displayer.rb +13 -0
  12. data/lib/asker/exporter/code_gift_exporter.rb +10 -11
  13. data/lib/asker/exporter/concept_ai_gift_exporter.rb +9 -9
  14. data/lib/asker/exporter/concept_ai_yaml_exporter.rb +2 -4
  15. data/lib/asker/exporter/concept_doc_exporter.rb +9 -15
  16. data/lib/asker/exporter/output_file_exporter.rb +18 -0
  17. data/lib/asker/files/example-concept.haml +25 -8
  18. data/lib/asker/formatter/concept_string_formatter.rb +9 -8
  19. data/lib/asker/lang/lang.rb +3 -4
  20. data/lib/asker/lang/locales/du/templates.yaml +50 -0
  21. data/lib/asker/lang/locales/en/connectors.yaml +44 -0
  22. data/lib/asker/lang/locales/en/mistakes.yaml +37 -0
  23. data/lib/asker/lang/locales/en/templates.yaml +29 -0
  24. data/lib/asker/lang/locales/es/connectors.yaml +92 -0
  25. data/lib/asker/lang/locales/es/mistakes.yaml +82 -0
  26. data/lib/asker/lang/locales/es/templates.yaml +29 -0
  27. data/lib/asker/lang/locales/fr/connectors.yaml +92 -0
  28. data/lib/asker/lang/locales/fr/mistakes.yaml +82 -0
  29. data/lib/asker/lang/locales/fr/templates.yaml +29 -0
  30. data/lib/asker/lang/locales/javascript/connectors.yaml +11 -0
  31. data/lib/asker/lang/locales/javascript/mistakes.yaml +30 -0
  32. data/lib/asker/lang/locales/javascript/templates.yaml +3 -0
  33. data/lib/asker/lang/locales/math/connectors.yaml +2 -0
  34. data/lib/asker/lang/locales/math/mistakes.yaml +2 -0
  35. data/lib/asker/lang/locales/math/templates.yaml +1 -0
  36. data/lib/asker/lang/locales/python/connectors.yaml +11 -0
  37. data/lib/asker/lang/locales/python/mistakes.yaml +26 -0
  38. data/lib/asker/lang/locales/python/templates.yaml +3 -0
  39. data/lib/asker/lang/locales/ruby/connectors.yaml +11 -0
  40. data/lib/asker/lang/locales/ruby/mistakes.yaml +33 -0
  41. data/lib/asker/lang/locales/ruby/templates.yaml +3 -0
  42. data/lib/asker/lang/locales/sql/connectors.yaml +6 -0
  43. data/lib/asker/lang/locales/sql/mistakes.yaml +11 -0
  44. data/lib/asker/lang/locales/sql/templates.yaml +2 -0
  45. data/lib/asker/loader/input_loader.rb +22 -5
  46. data/lib/asker/loader/project_loader.rb +25 -24
  47. data/lib/asker/logger.rb +1 -2
  48. data/lib/asker/project.rb +5 -3
  49. data/lib/asker/skeleton.rb +25 -24
  50. metadata +47 -63
  51. data/docs/changelog/v2.1.md +0 -99
  52. data/docs/commands.md +0 -12
  53. data/docs/contributions.md +0 -18
  54. data/docs/history.md +0 -40
  55. data/docs/idea.md +0 -44
  56. data/docs/inputs/README.md +0 -39
  57. data/docs/inputs/code.md +0 -69
  58. data/docs/inputs/concepts.md +0 -142
  59. data/docs/inputs/jedi.md +0 -68
  60. data/docs/inputs/tables.md +0 -112
  61. data/docs/inputs/templates.md +0 -87
  62. data/docs/install/README.md +0 -38
  63. data/docs/install/manual.md +0 -26
  64. data/docs/install/scripts.md +0 -38
  65. data/docs/revise/asker-file.md +0 -41
  66. data/docs/revise/buenas-practicas/01-convocatoria.md +0 -30
  67. data/docs/revise/buenas-practicas/02-formulario.md +0 -35
  68. data/docs/revise/buenas-practicas/03-descripcion.md +0 -63
  69. data/docs/revise/buenas-practicas/04-resultados.md +0 -17
  70. data/docs/revise/buenas-practicas/05-reproducir.md +0 -10
  71. data/docs/revise/ejemplos/01/README.md +0 -27
  72. data/docs/revise/ejemplos/02/README.md +0 -31
  73. data/docs/revise/ejemplos/03/README.md +0 -31
  74. data/docs/revise/ejemplos/04/README.md +0 -37
  75. data/docs/revise/ejemplos/05/README.md +0 -25
  76. data/docs/revise/ejemplos/06/README.md +0 -43
  77. data/docs/revise/ejemplos/README.md +0 -11
  78. data/docs/revise/projects.md +0 -74
  79. data/lib/asker/exporter/concept_screen_exporter.rb +0 -25
  80. data/lib/asker/exporter/main.rb +0 -9
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.1.3
4
+ version: 2.1.5
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: 2020-02-25 00:00:00.000000000 Z
11
+ date: 2020-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.20'
83
+ - !ruby/object:Gem::Dependency
84
+ name: base64_compatible
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: minitest
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -117,66 +131,10 @@ extensions: []
117
131
  extra_rdoc_files:
118
132
  - README.md
119
133
  - LICENSE
120
- - docs/idea.md
121
- - docs/changelog/v2.1.md
122
- - docs/revise/buenas-practicas/05-reproducir.md
123
- - docs/revise/buenas-practicas/04-resultados.md
124
- - docs/revise/buenas-practicas/01-convocatoria.md
125
- - docs/revise/buenas-practicas/02-formulario.md
126
- - docs/revise/buenas-practicas/03-descripcion.md
127
- - docs/revise/ejemplos/01/README.md
128
- - docs/revise/ejemplos/04/README.md
129
- - docs/revise/ejemplos/06/README.md
130
- - docs/revise/ejemplos/02/README.md
131
- - docs/revise/ejemplos/05/README.md
132
- - docs/revise/ejemplos/03/README.md
133
- - docs/revise/ejemplos/README.md
134
- - docs/revise/asker-file.md
135
- - docs/revise/projects.md
136
- - docs/commands.md
137
- - docs/contributions.md
138
- - docs/install/scripts.md
139
- - docs/install/README.md
140
- - docs/install/manual.md
141
- - docs/inputs/concepts.md
142
- - docs/inputs/tables.md
143
- - docs/inputs/code.md
144
- - docs/inputs/jedi.md
145
- - docs/inputs/templates.md
146
- - docs/inputs/README.md
147
- - docs/history.md
148
134
  files:
149
135
  - LICENSE
150
136
  - README.md
151
137
  - bin/asker
152
- - docs/changelog/v2.1.md
153
- - docs/commands.md
154
- - docs/contributions.md
155
- - docs/history.md
156
- - docs/idea.md
157
- - docs/inputs/README.md
158
- - docs/inputs/code.md
159
- - docs/inputs/concepts.md
160
- - docs/inputs/jedi.md
161
- - docs/inputs/tables.md
162
- - docs/inputs/templates.md
163
- - docs/install/README.md
164
- - docs/install/manual.md
165
- - docs/install/scripts.md
166
- - docs/revise/asker-file.md
167
- - docs/revise/buenas-practicas/01-convocatoria.md
168
- - docs/revise/buenas-practicas/02-formulario.md
169
- - docs/revise/buenas-practicas/03-descripcion.md
170
- - docs/revise/buenas-practicas/04-resultados.md
171
- - docs/revise/buenas-practicas/05-reproducir.md
172
- - docs/revise/ejemplos/01/README.md
173
- - docs/revise/ejemplos/02/README.md
174
- - docs/revise/ejemplos/03/README.md
175
- - docs/revise/ejemplos/04/README.md
176
- - docs/revise/ejemplos/05/README.md
177
- - docs/revise/ejemplos/06/README.md
178
- - docs/revise/ejemplos/README.md
179
- - docs/revise/projects.md
180
138
  - lib/asker.rb
181
139
  - lib/asker/ai/ai.rb
182
140
  - lib/asker/ai/ai_calculate.rb
@@ -207,14 +165,15 @@ files:
207
165
  - lib/asker/data/table.rb
208
166
  - lib/asker/data/template.rb
209
167
  - lib/asker/data/world.rb
168
+ - lib/asker/displayer/code_displayer.rb
169
+ - lib/asker/displayer/concept_ai_displayer.rb
170
+ - lib/asker/displayer/concept_displayer.rb
171
+ - lib/asker/displayer/stats_displayer.rb
210
172
  - lib/asker/exporter/code_gift_exporter.rb
211
- - lib/asker/exporter/code_screen_exporter.rb
212
173
  - lib/asker/exporter/concept_ai_gift_exporter.rb
213
- - lib/asker/exporter/concept_ai_screen_exporter.rb
214
174
  - lib/asker/exporter/concept_ai_yaml_exporter.rb
215
175
  - lib/asker/exporter/concept_doc_exporter.rb
216
- - lib/asker/exporter/concept_screen_exporter.rb
217
- - lib/asker/exporter/main.rb
176
+ - lib/asker/exporter/output_file_exporter.rb
218
177
  - lib/asker/files/config.ini
219
178
  - lib/asker/files/example-code.haml
220
179
  - lib/asker/files/example-concept.haml
@@ -227,6 +186,31 @@ files:
227
186
  - lib/asker/formatter/rb2haml_formatter.rb
228
187
  - lib/asker/lang/lang.rb
229
188
  - lib/asker/lang/lang_factory.rb
189
+ - lib/asker/lang/locales/du/templates.yaml
190
+ - lib/asker/lang/locales/en/connectors.yaml
191
+ - lib/asker/lang/locales/en/mistakes.yaml
192
+ - lib/asker/lang/locales/en/templates.yaml
193
+ - lib/asker/lang/locales/es/connectors.yaml
194
+ - lib/asker/lang/locales/es/mistakes.yaml
195
+ - lib/asker/lang/locales/es/templates.yaml
196
+ - lib/asker/lang/locales/fr/connectors.yaml
197
+ - lib/asker/lang/locales/fr/mistakes.yaml
198
+ - lib/asker/lang/locales/fr/templates.yaml
199
+ - lib/asker/lang/locales/javascript/connectors.yaml
200
+ - lib/asker/lang/locales/javascript/mistakes.yaml
201
+ - lib/asker/lang/locales/javascript/templates.yaml
202
+ - lib/asker/lang/locales/math/connectors.yaml
203
+ - lib/asker/lang/locales/math/mistakes.yaml
204
+ - lib/asker/lang/locales/math/templates.yaml
205
+ - lib/asker/lang/locales/python/connectors.yaml
206
+ - lib/asker/lang/locales/python/mistakes.yaml
207
+ - lib/asker/lang/locales/python/templates.yaml
208
+ - lib/asker/lang/locales/ruby/connectors.yaml
209
+ - lib/asker/lang/locales/ruby/mistakes.yaml
210
+ - lib/asker/lang/locales/ruby/templates.yaml
211
+ - lib/asker/lang/locales/sql/connectors.yaml
212
+ - lib/asker/lang/locales/sql/mistakes.yaml
213
+ - lib/asker/lang/locales/sql/templates.yaml
230
214
  - lib/asker/lang/text_actions.rb
231
215
  - lib/asker/loader/code_loader.rb
232
216
  - lib/asker/loader/content_loader.rb
@@ -238,7 +222,7 @@ files:
238
222
  - lib/asker/logger.rb
239
223
  - lib/asker/project.rb
240
224
  - lib/asker/skeleton.rb
241
- homepage: https://github.com/dvarrui/asker/blob/devel
225
+ homepage: https://github.com/dvarrui/asker/tree/devel
242
226
  licenses:
243
227
  - GPL-3.0
244
228
  metadata: {}
@@ -1,99 +0,0 @@
1
-
2
- # version 2.1
3
-
4
- Things/ideas to do for 2.1 Asker version.
5
-
6
- ## GUI
7
-
8
- Create a graphic fron end to execute asker and edit input files.
9
-
10
- ## Videos
11
-
12
- * Documentation: Revise documentation
13
- * Perhaps, videos on youtube explaining all this: (1) Get documentation, (2) Installation, (3) Consult demo input, (4) Create our input file usign def, (5) Add tables to our input file.
14
-
15
- ## Languages
16
-
17
- * Language support: French, Dutch, Catalán and Esperanto.
18
-
19
- ---
20
-
21
- ## Better table keyword
22
-
23
- * Process tables definitions with more than 2 fields.
24
-
25
- ## info keyword
26
-
27
- * Add new keyword called info. Example:
28
- ```
29
- %map{ :lang => 'en', :context => 'rock, bands', :version => '1'}
30
- %info Generic text about music, rock, bands, concerts, etc.
31
- %info more...
32
- ```
33
- * When AI create new question may use (randomly) info text to be included into it. Example:
34
- ```
35
- Rock music style was created for ....
36
-
37
- Definition of [*]: Australian rock band formed by Scottish-born brothers Malcolm and Angus Young.
38
-
39
- Select right option:
40
- a. Led Zepellin
41
- b. Beatles
42
- c. ACDC
43
- d. None
44
- ```
45
-
46
- ## Code inputs
47
-
48
- Let's take a look at the [issues](https://github.com/dvarrui/asker/issues)
49
-
50
- Actually we are experimenting with new keywords: code, type, path, features.
51
-
52
- Example:
53
-
54
- ```
55
- %code
56
- %type ruby
57
- %path files/string1.rb
58
- %features
59
- %row Muestra en pantalla "Hola Mundo!"
60
- ```
61
-
62
- Where `type` could be: ruby, python or sql.
63
-
64
- > Also bash, math, crontab, fstab, etc.
65
-
66
- ## More output formats
67
-
68
- * Images
69
- * Questions with images, sounds or other files embebed.
70
- * Embeded images into question texts
71
- * Work on other export formats (Perhaps Moodle format)
72
-
73
- ## Etc
74
-
75
- * Texts
76
- * Concept name drop and fill...
77
- * Question types
78
- * crossword
79
- * type hangmann
80
- * Dictionary
81
- * Diccionario de sinónimos, antónimos
82
- * Learn about the words or better download dictonary from RAE?
83
-
84
- ## Quizzer
85
-
86
- * Export questions to YAML format then use them with app quizzer to create PDF exams.
87
- * For example:
88
- ```
89
- # Create output/funiture-questions.yaml
90
- asker en/home/furniture.haml
91
-
92
- # Create 3 PDF exams with 10 questions every one
93
- quizzer 3x10 output/furniture-questions.yaml
94
- ```
95
-
96
- ## Develop more Tests
97
-
98
- * minitest for every class into lib directory
99
- * Apply rubocop rules to all them.
data/docs/commands.md DELETED
@@ -1,12 +0,0 @@
1
-
2
- [<<back](../README.md)
3
-
4
- # Commands
5
-
6
- Running `asker` as CLI command with these available command functions:
7
- * `asker`: Show available functions.
8
- * `asker version`: Show current version.
9
- * `asker PATH/TO/INPUTFILE`: Create questions for selected input file.
10
- * `asker file PATH/TO/INPUTFILE`: It's the same as `asker PATH/TO/INPUTFILE`, because `file` keyword is optional.
11
- * `asker check PATH/TO/INPUTFILE`: Check HAML file syntax.
12
- * `asker init`: Create default config.ini file.
@@ -1,18 +0,0 @@
1
-
2
- [<< back](../README.md)
3
-
4
- # Contributions
5
-
6
- If you want to contribute:
7
- * Talk about this tool with your colleagues.
8
- * Use this tool.
9
- * Report bugs.
10
- * Report us, your ideas for new features.
11
- * Share with us your own input files.
12
- * And if you love `ruby`, you can develop with us or work on the issues.
13
-
14
- ---
15
- # Contact
16
-
17
- * **Email**: `teuton.software@protonmail.com`
18
- * **Twitter**: `@SoftwareTeuton`
data/docs/history.md DELETED
@@ -1,40 +0,0 @@
1
-
2
- [<< back](../README.md)
3
-
4
- # History
5
-
6
- > Some time ago, this project was called "Darts of teacher". We renamed it because "darts" was used. Now, it's called ASKER.
7
-
8
- ## The problem
9
-
10
- Working as a teacher, one of the most boring taks is check the same exercises
11
- again and again, for every student, and every year.
12
-
13
- The tests questions allow us to make activities that are automaticaly checked/resolved by software tools, as for example, Moodle cuestionairs.
14
- In this case, the teacher will have enough time to waste others tasks, as:
15
- * Analise results with detail.
16
- * Read information about others materials.
17
- * Test new aplications.
18
- * Develop new tools.
19
- * Etc.
20
-
21
- In resume, applying more new knowledge to improve his work,
22
- trying new ways of doing his job better, finding or redefining activities or lessons contents. Just finding a better way of teaching. And an easier way of learning for the students.
23
-
24
- ## Need a new tool
25
-
26
- I decide (about 2013) start writing this tool to help me
27
- with the process of making test questions from input definition files.
28
-
29
- With this tool, I only waste time making this input file.
30
- As a teacher I have this knowledge into my mind, so it will be easy.
31
- It's the resume, definitions or conceptual entities of the unit
32
- I'm teaching.
33
-
34
- I've been using this tools several years/courses, teaching computer
35
- science. I have a lot of work to improve it and new features to add.
36
- It's usefull (for me at least), and hope It'll be for you too.
37
-
38
- ;-)
39
-
40
- David Vargas
data/docs/idea.md DELETED
@@ -1,44 +0,0 @@
1
-
2
- [<< back](../README.md)
3
-
4
- # Basics
5
-
6
- > **Disclaimber**
7
- >
8
- > I work as a teacher, and I try to do the best I know. But I'm really a programmer. I studied Computer Science at *ULPGC*.
9
- >
10
- > The 90% of what I've learned, I must thank to *Open Source* community.
11
- The other 10%, It's luck and time wasted working.
12
-
13
- ## Open vs closed problems
14
-
15
- The big problem with test questions are that only are usefull to evaluate
16
- measurable features. So it is useless when we try measure abstract
17
- features or measure open problems. But I think, we can do it with another approach.
18
-
19
- I mean, if we get an open and abstract problem, their resolution will consist on several steps or measurable milestones. So we can transform an open problem, into a lot of closed mini-problems. And we have to focus on the measurable aspects.
20
-
21
- Besides, if I *"bomb"* the student with a huge amount of diferent test questions about one concept, probably I could be near of knowing and measuring, the student asimilation of that kownledge.
22
-
23
- ## Making Questions
24
-
25
- The task of creating test questions to solve the previous problem, becames another different problem to be solved. When I had to make manually this test questions, it took me a lot of time. And I need a lot.
26
-
27
- And usually when I was making the question number 42, I realise that I forgot the content of the 41 previous. I'm loosing time and it's slow.
28
-
29
- ## Work once
30
-
31
- Finally, I decide to write this tool that help me with the process of
32
- making test questions from input definition files.
33
-
34
- So I only waste time making an input file. But as a teacher I have this
35
- into my mind and it must be a simple job. Because the inpu file it's just a resumed concepts list about the unit I'm teaching.
36
-
37
- I've been using this tools several years/courses, teaching computer
38
- science. I have a lot of functions to be improved and features to be added.
39
- But for now, It's usefull (for me at least), and hope it will be for you too.
40
- ;-)
41
-
42
- _Thanks!_
43
-
44
- David Vargas
@@ -1,39 +0,0 @@
1
-
2
- [<< back](../../README.md)
3
-
4
- # Inputs
5
-
6
- ---
7
-
8
- ## Text plain editor
9
-
10
- How to build our asker input files?
11
-
12
- Open a plain text editor and start writting definitions.
13
- * [Learn about concepts](concepts.md)
14
- * [Learn about tables](tables.md)
15
- * [Learn about templates](templates.md)
16
- * [Learn about code](code.md)
17
-
18
- ---
19
-
20
- ## Web editor (On development)
21
-
22
- Asker has a web editor to help building our asker input files.
23
- By now only read, do not write. Sorry! Still is on development.
24
-
25
- Looks like this:
26
-
27
- ![](../images/web-editor.png)
28
-
29
- To launch web editor:
30
- 1. `asker editor`
31
- 1. Open web browser and goto URL `localhost:4567`.
32
-
33
- ---
34
-
35
- ## More examples
36
-
37
- Download our git repository with a lot of examples:
38
- * `asker donwnload` or
39
- * `git clone https://github.com/dvarrui/asker-inputs.git`
data/docs/inputs/code.md DELETED
@@ -1,69 +0,0 @@
1
-
2
- [<< back](README.md)
3
-
4
- # Learn code
5
-
6
- Now, we are going to learn experimental keywords:
7
- * code
8
-
9
- ---
10
-
11
- # Concept limits
12
-
13
- We have learn about using: map, concept, names, tags, def, table and template keywords. All them are usefull to define concepts.
14
-
15
- Commonly we use natural lenguages (en, es, fr, de, etc) to talk about them and Asker DSL is a simpler and structured language version. All languages are similar (verbs, subjects, adjective, etc.), but have their own rules.
16
- A poem, for example is writting using those rules.
17
-
18
- Exists others kind of human creations, that use other definition languages.
19
- For example, programming languages, file configurations, drawing language, math language, etc,
20
-
21
- So we had to create new DSL keyword called `code`.
22
-
23
- Let's see.
24
-
25
- ---
26
- # Code
27
-
28
- ## Example
29
-
30
- Example, using `code`keyword to define a python program from `files/string.py`file:
31
-
32
- ```
33
- %map{ :version => '1', :lang => 'en', :context=>'python, programming, language' }
34
-
35
- %code
36
- %type python
37
- %path files/string.py
38
- ```
39
-
40
- | Param | Description |
41
- | ----- | ------------------------- |
42
- | code | Define a new code concept |
43
- | type | Content type |
44
- | path | Path to content file |
45
-
46
- > Experimental type values: python, ruby, javascript, sql
47
-
48
- ## Full map
49
-
50
- Example, using `code`keyword to define several python programs from `files/` folder:
51
-
52
- ```
53
- %map{ :version => '1', :lang => 'en', :context=>'python, programming, language' }
54
-
55
- %code
56
- %type python
57
- %path files/string.py
58
-
59
- %code
60
- %type python
61
- %path files/array.py
62
-
63
- %code
64
- %type python
65
- %path files/iterator.py
66
- ```
67
-
68
- Example:
69
- * [python](../examples/code)