teuton 2.10.7 → 2.11.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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +69 -14
  3. data/docs/commands/README.md +18 -81
  4. data/docs/commands/check.md +66 -0
  5. data/docs/commands/config.md +120 -0
  6. data/docs/commands/help.md +37 -0
  7. data/docs/commands/new.md +34 -0
  8. data/docs/commands/readme.md +52 -0
  9. data/docs/commands/{run-tests.md → run.md} +1 -1
  10. data/docs/config_file.md +125 -0
  11. data/docs/devel/README.md +12 -0
  12. data/docs/dsl/expect.md +2 -2
  13. data/docs/dsl/run.md +30 -67
  14. data/docs/install/s-node.md +9 -7
  15. data/docs/install/t-node.md +18 -19
  16. data/docs/learn/11-export.md +1 -1
  17. data/docs/learn/13-feedback.md +1 -1
  18. data/docs/learn/14-moodle_id.md +4 -4
  19. data/docs/learn/15-readme.md +14 -8
  20. data/docs/learn/16-include.md +21 -16
  21. data/docs/learn/17-alias.md +2 -2
  22. data/docs/learn/18-log.md +5 -3
  23. data/docs/learn/19-read_vars.md +7 -3
  24. data/docs/learn/20-macros.md +6 -4
  25. data/docs/learn/21-exit_codes.md +3 -3
  26. data/docs/learn/22-result.md +7 -3
  27. data/docs/learn/23-test-code.md +17 -7
  28. data/docs/learn/24-test-sql.md +19 -18
  29. data/docs/learn/25-expect-result.md +1 -0
  30. data/docs/learn/26-expect_sequence.md +12 -7
  31. data/docs/learn/27-run_script.md +11 -5
  32. data/docs/tutorial/es/nginx/README.md +546 -0
  33. data/lib/teuton/case/case.rb +0 -2
  34. data/lib/teuton/case/dsl/expect.rb +2 -2
  35. data/lib/teuton/case/dsl/log.rb +1 -1
  36. data/lib/teuton/case/dsl/run.rb +2 -3
  37. data/lib/teuton/case/dsl/upload.rb +1 -1
  38. data/lib/teuton/case/execute/execute_base.rb +3 -6
  39. data/lib/teuton/case/execute/execute_local.rb +5 -2
  40. data/lib/teuton/case/execute/execute_ssh.rb +0 -1
  41. data/lib/teuton/case/execute/execute_telnet.rb +0 -2
  42. data/lib/teuton/case/play.rb +2 -2
  43. data/lib/teuton/case/result/result.rb +1 -3
  44. data/lib/teuton/case_manager/case_manager.rb +14 -17
  45. data/lib/teuton/case_manager/dsl.rb +4 -4
  46. data/lib/teuton/case_manager/export_manager.rb +22 -17
  47. data/lib/teuton/case_manager/{check_cases.rb → ext/check_cases.rb} +7 -6
  48. data/lib/teuton/case_manager/ext/hall_of_fame.rb +28 -0
  49. data/lib/teuton/case_manager/{report.rb → ext/report.rb} +6 -8
  50. data/lib/teuton/case_manager/send_manager.rb +1 -0
  51. data/lib/teuton/case_manager/{show_report.rb → show_resume_report.rb} +12 -26
  52. data/lib/teuton/case_manager/stats_manager.rb +26 -0
  53. data/lib/teuton/check/checker.rb +16 -8
  54. data/lib/teuton/check/main.rb +2 -2
  55. data/lib/teuton/check/show.rb +3 -3
  56. data/lib/teuton/cli.rb +3 -2
  57. data/lib/teuton/readme/dsl/getset.rb +6 -4
  58. data/lib/teuton/readme/main.rb +2 -2
  59. data/lib/teuton/readme/readme.rb +2 -2
  60. data/lib/teuton/report/formatter/default/array.rb +1 -3
  61. data/lib/teuton/report/formatter/default/markdown.rb +1 -1
  62. data/lib/teuton/report/formatter/default/txt.rb +1 -1
  63. data/lib/teuton/report/formatter/default/xml.rb +93 -29
  64. data/lib/teuton/report/formatter/formatter.rb +2 -1
  65. data/lib/teuton/report/formatter/resume/array.rb +1 -3
  66. data/lib/teuton/report/formatter/resume/txt.rb +6 -2
  67. data/lib/teuton/report/formatter/resume/xml.rb +92 -0
  68. data/lib/teuton/report/report.rb +1 -1
  69. data/lib/teuton/utils/config_file_reader.rb +141 -0
  70. data/lib/teuton/utils/name_file_finder.rb +12 -15
  71. data/lib/teuton/utils/project.rb +19 -21
  72. data/lib/teuton/utils/settings.rb +3 -1
  73. data/lib/teuton/version.rb +1 -1
  74. data/lib/teuton.rb +11 -10
  75. metadata +38 -36
  76. data/docs/commands/check-example.md +0 -56
  77. data/docs/es/aprender/01-cmd_new.md +0 -27
  78. data/docs/es/aprender/02-target.md +0 -131
  79. data/docs/es/aprender/README.md +0 -36
  80. data/docs/ideas/todo.md +0 -44
  81. data/docs/install/README.md +0 -38
  82. data/lib/teuton/case_manager/hall_of_fame.rb +0 -29
  83. data/lib/teuton/files/README.md +0 -9
  84. data/lib/teuton/utils/configfile_reader.rb +0 -135
  85. /data/docs/{ideas → devel}/contributions.md +0 -0
  86. /data/docs/{ideas → es}/Challenge-Server-Project.md +0 -0
  87. /data/docs/{ideas → es}/servidor-de-retos.md +0 -0
  88. /data/docs/{install/modes_of_use.md → modes_of_use.md} +0 -0
  89. /data/lib/teuton/{case_manager → deprecated}/utils.rb +0 -0
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teuton
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.7
4
+ version: 2.11.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: 2025-11-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: json_pure
@@ -122,11 +121,18 @@ executables:
122
121
  - teuton
123
122
  extensions: []
124
123
  extra_rdoc_files:
125
- - README.md
126
124
  - LICENSE
125
+ - README.md
127
126
  - docs/commands/README.md
128
- - docs/commands/check-example.md
129
- - docs/commands/run-tests.md
127
+ - docs/commands/check.md
128
+ - docs/commands/config.md
129
+ - docs/commands/help.md
130
+ - docs/commands/new.md
131
+ - docs/commands/readme.md
132
+ - docs/commands/run.md
133
+ - docs/config_file.md
134
+ - docs/devel/README.md
135
+ - docs/devel/contributions.md
130
136
  - docs/devel/diagram.md
131
137
  - docs/dsl/README.md
132
138
  - docs/dsl/expect.md
@@ -140,18 +146,11 @@ extra_rdoc_files:
140
146
  - docs/dsl/set.md
141
147
  - docs/dsl/show.md
142
148
  - docs/dsl/target.md
149
+ - docs/es/Challenge-Server-Project.md
143
150
  - docs/es/README.md
144
- - docs/es/aprender/01-cmd_new.md
145
- - docs/es/aprender/02-target.md
146
- - docs/es/aprender/README.md
147
151
  - docs/es/exit_code.md
148
152
  - docs/es/guess_os.md
149
- - docs/ideas/Challenge-Server-Project.md
150
- - docs/ideas/contributions.md
151
- - docs/ideas/servidor-de-retos.md
152
- - docs/ideas/todo.md
153
- - docs/install/README.md
154
- - docs/install/modes_of_use.md
153
+ - docs/es/servidor-de-retos.md
155
154
  - docs/install/s-node.md
156
155
  - docs/install/t-node.md
157
156
  - docs/learn/01-cmd_new.md
@@ -183,14 +182,23 @@ extra_rdoc_files:
183
182
  - docs/learn/27-run_script.md
184
183
  - docs/learn/28-upload.md
185
184
  - docs/learn/README.md
185
+ - docs/modes_of_use.md
186
+ - docs/tutorial/es/nginx/README.md
186
187
  - docs/videos.md
187
188
  files:
188
189
  - LICENSE
189
190
  - README.md
190
191
  - bin/teuton
191
192
  - docs/commands/README.md
192
- - docs/commands/check-example.md
193
- - docs/commands/run-tests.md
193
+ - docs/commands/check.md
194
+ - docs/commands/config.md
195
+ - docs/commands/help.md
196
+ - docs/commands/new.md
197
+ - docs/commands/readme.md
198
+ - docs/commands/run.md
199
+ - docs/config_file.md
200
+ - docs/devel/README.md
201
+ - docs/devel/contributions.md
194
202
  - docs/devel/diagram.md
195
203
  - docs/dsl/README.md
196
204
  - docs/dsl/expect.md
@@ -204,18 +212,11 @@ files:
204
212
  - docs/dsl/set.md
205
213
  - docs/dsl/show.md
206
214
  - docs/dsl/target.md
215
+ - docs/es/Challenge-Server-Project.md
207
216
  - docs/es/README.md
208
- - docs/es/aprender/01-cmd_new.md
209
- - docs/es/aprender/02-target.md
210
- - docs/es/aprender/README.md
211
217
  - docs/es/exit_code.md
212
218
  - docs/es/guess_os.md
213
- - docs/ideas/Challenge-Server-Project.md
214
- - docs/ideas/contributions.md
215
- - docs/ideas/servidor-de-retos.md
216
- - docs/ideas/todo.md
217
- - docs/install/README.md
218
- - docs/install/modes_of_use.md
219
+ - docs/es/servidor-de-retos.md
219
220
  - docs/install/s-node.md
220
221
  - docs/install/t-node.md
221
222
  - docs/learn/01-cmd_new.md
@@ -247,6 +248,8 @@ files:
247
248
  - docs/learn/27-run_script.md
248
249
  - docs/learn/28-upload.md
249
250
  - docs/learn/README.md
251
+ - docs/modes_of_use.md
252
+ - docs/tutorial/es/nginx/README.md
250
253
  - docs/videos.md
251
254
  - lib/teuton.rb
252
255
  - lib/teuton/case/builtin/main.rb
@@ -285,14 +288,14 @@ files:
285
288
  - lib/teuton/case/result/ext_filter.rb
286
289
  - lib/teuton/case/result/result.rb
287
290
  - lib/teuton/case_manager/case_manager.rb
288
- - lib/teuton/case_manager/check_cases.rb
289
291
  - lib/teuton/case_manager/dsl.rb
290
292
  - lib/teuton/case_manager/export_manager.rb
291
- - lib/teuton/case_manager/hall_of_fame.rb
292
- - lib/teuton/case_manager/report.rb
293
+ - lib/teuton/case_manager/ext/check_cases.rb
294
+ - lib/teuton/case_manager/ext/hall_of_fame.rb
295
+ - lib/teuton/case_manager/ext/report.rb
293
296
  - lib/teuton/case_manager/send_manager.rb
294
- - lib/teuton/case_manager/show_report.rb
295
- - lib/teuton/case_manager/utils.rb
297
+ - lib/teuton/case_manager/show_resume_report.rb
298
+ - lib/teuton/case_manager/stats_manager.rb
296
299
  - lib/teuton/check/checker.rb
297
300
  - lib/teuton/check/dsl/all.rb
298
301
  - lib/teuton/check/dsl/builtin.rb
@@ -303,7 +306,7 @@ files:
303
306
  - lib/teuton/check/main.rb
304
307
  - lib/teuton/check/show.rb
305
308
  - lib/teuton/cli.rb
306
- - lib/teuton/files/README.md
309
+ - lib/teuton/deprecated/utils.rb
307
310
  - lib/teuton/files/config.yaml
308
311
  - lib/teuton/files/start.rb
309
312
  - lib/teuton/files/template/case.html
@@ -333,10 +336,11 @@ files:
333
336
  - lib/teuton/report/formatter/resume/json.rb
334
337
  - lib/teuton/report/formatter/resume/markdown.rb
335
338
  - lib/teuton/report/formatter/resume/txt.rb
339
+ - lib/teuton/report/formatter/resume/xml.rb
336
340
  - lib/teuton/report/formatter/resume/yaml.rb
337
341
  - lib/teuton/report/report.rb
338
342
  - lib/teuton/skeleton.rb
339
- - lib/teuton/utils/configfile_reader.rb
343
+ - lib/teuton/utils/config_file_reader.rb
340
344
  - lib/teuton/utils/logger.rb
341
345
  - lib/teuton/utils/name_file_finder.rb
342
346
  - lib/teuton/utils/project.rb
@@ -347,7 +351,6 @@ homepage: https://github.com/teuton-software/teuton
347
351
  licenses:
348
352
  - GPL-3.0
349
353
  metadata: {}
350
- post_install_message:
351
354
  rdoc_options: []
352
355
  require_paths:
353
356
  - lib
@@ -362,8 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
362
365
  - !ruby/object:Gem::Version
363
366
  version: '0'
364
367
  requirements: []
365
- rubygems_version: 3.4.19
366
- signing_key:
368
+ rubygems_version: 3.7.2
367
369
  specification_version: 4
368
370
  summary: Teuton (Infrastructure test)
369
371
  test_files: []
@@ -1,56 +0,0 @@
1
- [<< back](README.md)
2
-
3
- # Check Teuton Test
4
-
5
- | Param | Description | Default value |
6
- | ---------------- | ---------------------- | ------------- |
7
- | --no-panelconfig | Show check information | Enabled |
8
- | --panelconfig | Only show config file recomended content | Disabled |
9
- | --cpath | Specify path to config file | TEST-FOLDER/config.yaml |
10
- | --cname | Specify name to config file | config.yaml |
11
-
12
- Usage: `teuton check PATH-TO-TEST-FOLDER`
13
-
14
- Example:
15
-
16
- ```
17
- $ teuton check examples/02-target
18
-
19
- +----------------------------+
20
- | GROUP: Learn about targets |
21
- +----------------------------+
22
- (001) target Create user david
23
- weight 1.0
24
- run 'id david' on localhost
25
- expect david (String)
26
-
27
- +--------------+-------+
28
- | DSL Stats | Count |
29
- +--------------+-------+
30
- | Groups | 1 |
31
- | Targets | 1 |
32
- | Runs | 1 |
33
- | * localhost | 1 |
34
- | Uniques | 0 |
35
- | Logs | 0 |
36
- | | |
37
- | Gets | 0 |
38
- | Sets | 0 |
39
- +--------------+-------+
40
- +----------------------+
41
- | Revising CONFIG file |
42
- +----------------------+
43
- [WARN] Configfile not found
44
- /home/david/proy/repos/teuton.d/teuton/examples/02-target/config.yaml
45
- [INFO] Recomended content:
46
- ---
47
- :global:
48
- :cases:
49
- - :tt_members: VALUE
50
- ```
51
-
52
- The check process notifies that
53
- * This test hasn't config file
54
- * and recommends content for our config file. But it isn't necessary for this example.
55
- * exit_code 0 = Syntax ok.
56
- * exit code 1 = Syntax ERROR.
@@ -1,27 +0,0 @@
1
-
2
- [<< back](README.md)
3
-
4
- # Nuevo test
5
-
6
- Crear el esquelero para un nuevo proyecto: `teuton create foo`
7
-
8
- ```
9
- > teuton new foo
10
-
11
- [INFO] Creating foo project skeleton
12
- * Create dir => foo
13
- * Create file => foo/config.yaml
14
- * Create file => foo/start.rb
15
- ```
16
-
17
- > NOTA: Lo ficheros se pueden crear manualmente.
18
-
19
- Este comando crea los siguientes ficheros:
20
-
21
- | Fichero/Directorio | Descripción |
22
- | ------------------ | ---------------- |
23
- | foo | Direcotrio base |
24
- | foo/start.rb | Script principal |
25
- | foo/config.yaml | Fichero de configuración |
26
-
27
- Ahora es el momento de personalizar nuestros objetivos (targets).
@@ -1,131 +0,0 @@
1
- [<< back](README.md)
2
-
3
- # target
4
-
5
- Un [target](../../dsl/target.md) es el objetivo que queremos evaluar. Los objetivos se definen dentro de una sección `group`.
6
-
7
- ## Target definition
8
-
9
- Cada proceso de evaluación consta de 3 partes:
10
-
11
- * [target](../../dsl/target.md): Descripción del elemento que va a ser evaluado.
12
- * [run](../../dsl/run.md): Ejecutar el comando `id obiwan` en la máquina local.
13
- * [expect](../../dsl/expect.md): Verificar que el resultado del comando devuelve el valor esperado.
14
-
15
- ```ruby
16
- group "Aprender sobre los targets" do
17
-
18
- target "Existe el usuario <obiwan>"
19
- run "id obiwan"
20
- expect ["uid=", "(obiwan)", "gid="]
21
-
22
- target "No existe el usuario <vader>"
23
- run "id vader"
24
- expect_fail
25
- end
26
- ```
27
-
28
- > En este ejemplo estamo usando un SO GNU/Linux en la máquina local porque queremos ejecutar el comando `id obiwan`.
29
-
30
- Cuando el usuario existe, esperamos encontrar estas palabras en la salida del comando: `uid=, (obiwan), gid=`.
31
-
32
- ```
33
- > id obiwan
34
- uid=1000(obiwan) gid=1000(obiwan) grupos=1000(obiwan)
35
- ```
36
-
37
- Pero cuando el usuario no existe, se esperan una salida de error.
38
-
39
- ```
40
- > id vader
41
- id: «vader»: no such user
42
-
43
- > echo $?
44
- 1
45
-
46
- ```
47
-
48
- ## Section de ejecución
49
-
50
- Cuando se ejecuta el test, se procesa la sección `play`, la cual contiene las siguientes instrucciones:
51
-
52
- * [show](../../dsl/show.md): mostrar por pantalla información del proceso.
53
- * [export](../../dsl/export.md): generar informes de salida.
54
-
55
- ```ruby
56
- play do
57
- show
58
- export
59
- end
60
- ```
61
-
62
- ## Ejemplo
63
-
64
- Usa este comando para ejecutar el test:
65
-
66
- ```console
67
- > teuton run examples/02-target
68
-
69
- CASE RESULTS
70
- +------+-----------+-------+-------+
71
- | CASE | MEMBERS | GRADE | STATE |
72
- | 01 | anonymous | 100.0 | ✔ |
73
- +------+-----------+-------+-------+
74
- ```
75
-
76
- Los informes de salida se crean en la carpeta `var/02-target/`:
77
-
78
- ```console
79
- var
80
- └── 02-target
81
- ├── case-01.txt
82
- ├── moodle.csv
83
- └── resume.txt
84
- ```
85
-
86
- Veamos el contenido:
87
-
88
- ```
89
- > cat var/02-target/case-01.txt
90
-
91
- CONFIGURATION
92
- +-------------+-----------+
93
- | tt_members | anonymous |
94
- | tt_sequence | false |
95
- | tt_skip | false |
96
- | tt_testname | 02-target |
97
- +-------------+-----------+
98
-
99
- GROUPS
100
- - Learn about targets
101
- 01 (0.0/1.0)
102
- Description : Create user obiwan
103
- Command : id obiwan
104
- Output : id: «obiwan»: no existe ese usuario
105
- Duration : 0.002 (local)
106
- Alterations : find(uid=) & find((obiwan)) & find(gid=) & count
107
- Expected : Greater than 0
108
- Result : 0
109
- 02 (1.0/1.0)
110
- Description : Delete user vader
111
- Command : id vader
112
- Output : id: «vader»: no existe ese usuario
113
- Duration : 0.002 (local)
114
- Alterations : Read exit code
115
- Expected : Greater than 0
116
- Result : 1
117
-
118
- RESULTS
119
- +--------------+---------------------------+
120
- | case_id | 01 |
121
- | start_time | 2023-06-16 08:42:13 +0100 |
122
- | finish_time | 2023-06-16 08:42:13 +0100 |
123
- | duration | 0.004527443 |
124
- | unique_fault | 0 |
125
- | max_weight | 2.0 |
126
- | good_weight | 1.0 |
127
- | fail_weight | 1.0 |
128
- | fail_counter | 1 |
129
- | grade | 50 |
130
- +--------------+---------------------------+
131
- ```
@@ -1,36 +0,0 @@
1
- [<< back](../README.md)
2
-
3
- # Aprender
4
-
5
- Aprender a escribir tus propios test:
6
-
7
- 1. [Crear un NUEVO test](01-cmd_new.md)
8
- 1. [Evaluating TARGET](02-target.md)
9
- 1. [Checking REMOTE HOSTS](03-remote_hosts.md)
10
- 1. [Reading CONFIG file](04-config.md)
11
- 1. [Using several files](05-use.md)
12
- 1. [CHECK test syntax](06-cmd_check.md)
13
- 1. [Target WEIGHT](07-target_weight.md)
14
- 1. [UNIQUE values](08-unique_values.md)
15
- 1. [SEND report copies to remote hosts](09-send.md)
16
- 1. [DEBUG results](10-debug.md)
17
- 1. [Export other FORMATS](11-export.md)
18
- 1. [PRESERVE old reports](12-preserve.md)
19
- 1. [Hide FEEDBACK from reports](13-feedback.md)
20
- 1. [MOODLE](14-moodle_id.md)
21
- 1. [Build README from test](15-readme.md)
22
- 1. [INCLUDE more configuration files](16-include.md)
23
- 1. [ALIAS](17-alias.md)
24
- 1. [LOG messages](18-log.md)
25
- 1. [Don't get params, just read vars](19-read_vars.md)
26
- 1. [MACROS](20-macros.md)
27
- 1. [Checking exit codes](21-exit_codes.md)
28
- 1. [RESULT object](22-result.md)
29
- 1. [Test code](23-test-code.md)
30
- 1. [Test SQL and database](24-test-sql.md)
31
- 1. [expect vs result](25-expect-result.md) TODO
32
- 1. [EXPECT_SEQUENCE](26-expect_sequence.md)
33
- 1. [RUN_SCRIPT](27-run_script.md)
34
- 1. [UPLOAD](28-upload.md)
35
-
36
- Mores examples at [teuton-tests](https://github.com/dvarrui/teuton-tests) GitHub repository.
data/docs/ideas/todo.md DELETED
@@ -1,44 +0,0 @@
1
-
2
- # TODO list
3
-
4
- ## Add
5
-
6
- * Option roadmap_ok_only. When expect returns false... test stop. The rest of targets are forced to fails.
7
- * `expect_equal "camaleon"`, same as `expect result.equal "camaleon"`.
8
- * **FEATURE** Define a loop of executions of our activity. For example:
9
- every 5 minutes, run the activity, and repeat this 10 times.
10
- `start :times=>10, :every=>5 do`
11
- * Script to set **static IP**
12
- * Change export to show **command output** into reports.
13
- * **TEST**: actualizar las pruebas con vagrant para la versión actual. Mejora de la calidad del código.
14
- * **DOCS** PROMOCIONAR. Documentar y hacer videos. Tener foros de la comunidad o presencia en reddit o stackoverflow.... o algo parecido???
15
- * Create 2 evaluation modes:
16
- 1. Evaluate targets (current mode): `start eval: :targets`
17
- 1. Evaluate task: `start eval: :groups` and perhaps add group weight?
18
- 1. config file with `tt_eval: groups`
19
-
20
- Improve RESUME report or create stat-report, with stat information:
21
- * the worst target/task/case,
22
- * the best target/task/case,
23
- * the slowest target/task/case,
24
- * the fastest target/task/case, etc.
25
- * Related targets: group of targets that always have the same state in every case.
26
-
27
- ## Ideas
28
-
29
- Esta es una lista de ideas para que no se me olvide... lo podemos ir ajustando 😊
30
-
31
- 1. TEST-EN-CADENA (smart-shell): es un proyecto en curso que trabajará en colaboración ceon teuton. Detecta las acciones del usuario dentro de la shell y automáticamente lanza el test para validar el cumplimiento de los objetivos. Si se supera un % se pasa al siguiente test.
32
- 2. SERVIDOR TEUTON: Teuton web para recibir peticiones de los clientes... ?! Enganchar con teuton-server y teuton-client. NO. quizás mejor enfoque. Tener un servidor dedicado con una página Web para lanzar test desde el propio servidor.
33
- 3. Editor de ficheros de configuración.... una especie de asistente de ayuda.. no le veo mucho sentido tener un editor específico pero si al ejecutar un reto si hay valores con NODATA... entonces que pregunte al usuario y complete la
34
- configuración sobre la marcha???
35
- 4. Editor de tests ?! .... lo veo complejo... a menos que se empiece por una versión simplificada.. El DSL es tan sencillo que no le veo sentido a un editor de retos. Pero si podemos aprovechar y crear una" librería " de los módulos más frecuentes?!... una ayuda para facilitar la creación de test... esto se puede emparejar con el editor de test...
36
- 5. `send :email_to => :members_emails`... esto requiere que cada caso tenga un email y que además el profesor tenga configurado el acceso a su cuenta de correo... para poder enviar copias de los informes....
37
- 6. When students demand help they could recibe some advises. More ideas: bonus, lives, etc.
38
- 7. save partial grades. Before play challenge read previous moodle.cvs. Then play challenge and when creates new moodle.csv... we could preseve old cases(grades) 100% for example.
39
-
40
- # Propuestas de sdelquin
41
-
42
- - Docker en vez de vagrant?? → https://www.cloudbees.com/blog/ssh-into-a-docker-container-how-to-execute-your-commands
43
- - Tablas "bonitas" en terminal → https://github.com/piotrmurach/tty-markdown#17-table
44
- - Documentación en https://readthedocs.org/ ??
@@ -1,38 +0,0 @@
1
- [<< back](../../README.md)
2
-
3
- # Installation
4
-
5
- **Teuton installation**
6
-
7
- We call a device with Teuton installed as t-node. [T-NODE](t-node.md) host monitors one or severals S-NODE hosts.
8
- 1. Install Ruby on your system.
9
- 2. `gem install teuton`
10
-
11
- > If you are using ed25519 for the SSH server, then you may need:
12
- > * `gem install ed25519 -v 1.2`
13
- > * `gem install bcrypt_pbkdf -v 1.0`
14
- > This gems requires install `ruby-devel` OS package.
15
-
16
- **SSH server installation**
17
-
18
- We call e device with SSH/Telnet service as s-node. [S-NODE](s-node.md) hosts are monitorized by T-NODE host.
19
- 1. Install SSH service.
20
-
21
- Read [modes of use](modes_of_use.md) to know more about differents T-NODE/S-NODE schemes.
22
-
23
- ## Tested OS list
24
-
25
- | Type | O.S. | Version | Arch | T-node | S-node |
26
- | --------- | --------- | -------------- | ------ | ------ | ------ |
27
- | GNU/Linux | CentOS | 7 | x86-64 | | |
28
- | | Debian | 9.7.0 | x86-64 | Ok | |
29
- | | Fedora | Workstation 29 | x84-64 | Ok | |
30
- | | LinuxMint | 18.3 | x86-64 | Ok | |
31
- | | openSUSE | Leap 15 | x86-64 | Ok | Ok |
32
- | | openSUSE | Tumbleweed | x86-64 | Ok | Ok |
33
- | | Ubuntu | 18.04 | x86-64 | Ok | Ok |
34
- | Microsoft | Windows | 7 Enterprise | x86 | Ok | |
35
- | | Windows | 10 Pro | x86-64 | Ok | Ok |
36
- | | Windows | Server 2012 R2 | x86-64 | | |
37
- | Apple | Mac OS X | Capitán (10.11.6) | x86-64 | Ok | Ok |
38
- | | Mac OS X | Sierra (10.12) | x86-64 | Ok | |
@@ -1,29 +0,0 @@
1
- require_relative "../utils/project"
2
-
3
- class CaseManager
4
- class HallOfFame
5
- def initialize(cases)
6
- @cases = cases
7
- end
8
-
9
- def call
10
- celebrities = {}
11
-
12
- @cases.each do |acase|
13
- next if acase.skip
14
-
15
- grade = acase.grade
16
- label = if celebrities[grade]
17
- celebrities[grade] + "*"
18
- else
19
- "*"
20
- end
21
- celebrities[grade] = label
22
- end
23
-
24
- Project.value[:options][:case_number] = @cases.size
25
- ordered_list = celebrities.sort_by { |key, _value| key }
26
- Project.value[:hall_of_fame] = ordered_list.reverse
27
- end
28
- end
29
- end
@@ -1,9 +0,0 @@
1
-
2
- # README.md file
3
-
4
- Build your README.md file automaticaly from challenges internal data.
5
-
6
- Use:
7
- ```
8
- teuton readme PROJECT_DIR > PROJECT_DIR/README.md
9
- ```
@@ -1,135 +0,0 @@
1
- # require "json/pure"
2
- require "json"
3
- require "yaml"
4
-
5
- ##
6
- # Functions that read data from ConfigFile using YAML or JSON formats
7
- module ConfigFileReader
8
- ##
9
- # Read config file
10
- # @param filepath (String) Path to config file
11
- # @return Hash with config data
12
- def self.read(filepath)
13
- unless File.exist?(filepath)
14
- data = {}
15
- data[:global] = {}
16
- data[:alias] = {}
17
- data[:cases] = [{tt_members: "anonymous"}]
18
- return data
19
- end
20
- return read_yaml(filepath) if File.extname(filepath) == ".yaml"
21
-
22
- return read_json(filepath) if File.extname(filepath) == ".json"
23
-
24
- raise "[ERROR] ConfigFileReader: #{filepath}"
25
- end
26
-
27
- ##
28
- # Read YAML config file
29
- # @param filepath (String) Path to YAML config file
30
- # @return Hash with config data
31
- def self.read_yaml(filepath)
32
- begin
33
- data = YAML.load(File.open(filepath))
34
- # data = YAML.safe_load(
35
- # File.open(filepath),
36
- # permitted_classes: [Array, Date, Hash, Symbol]
37
- # )
38
- rescue => e
39
- warn "\n" + ("=" * 80)
40
- warn "[ERROR] ConfigFileReader#read <#{filepath}>"
41
- warn " I suggest to revise file format!"
42
- warn " #{e.message}\n" + ("=" * 80)
43
- exit 1
44
- end
45
- data = convert_string_keys_to_symbol(data)
46
- data[:global] = data[:global] || {}
47
- data[:alias] = data[:alias] || {}
48
- data[:cases] = data[:cases] || []
49
- read_included_files!(filepath, data)
50
- data
51
- end
52
-
53
- ##
54
- # Read JSON config file
55
- # @param filepath (String) Path to JSON config file
56
- # @return Hash with config data
57
- def self.read_json(filepath)
58
- data = JSON.parse(File.read(filepath), symbolize_names: true)
59
- data = convert_string_keys_to_symbol(data)
60
- data[:global] = data[:global] || {}
61
- data[:alias] = data[:alias] || {}
62
- data[:cases] = data[:cases] || []
63
- read_included_files!(filepath, data)
64
- data
65
- end
66
-
67
- ##
68
- # Read all configuration files from "filepath" folder.
69
- # @param filepath (String) Folder with config files
70
- # @param data (Hash) Input configuration
71
- private_class_method def self.read_included_files!(filepath, data)
72
- return if data[:global][:tt_include].nil?
73
-
74
- include_dir = data[:global][:tt_include]
75
- basedir = if include_dir == File.absolute_path(include_dir)
76
- include_dir
77
- else
78
- File.join(File.dirname(filepath), data[:global][:tt_include])
79
- end
80
- exts = {
81
- yaml: ['.yaml', '.YAML', '.yml', '.YML'],
82
- json: ['.json', '.JSON']
83
- }
84
- files = Dir.glob(File.join(basedir, "**/*"))
85
- files.each { |filename|
86
- begin
87
- ext = File.extname(filename)
88
- if exts[:yaml].include? ext
89
- begin
90
- data[:cases] << YAML.load(File.open(filename))
91
- rescue
92
- msg = "[ERROR] Loading configuration file(#{filename})"
93
- warn msg
94
- end
95
- elsif exts[:json].include? ext
96
- begin
97
- data[:cases] = JSON.parse(File.read(filename), symbolize_names: true)
98
- rescue
99
- msg = "[ERROR] Loading configuration file(#{filename})"
100
- warn msg
101
- end
102
- elsif File.file? filename
103
- msg = "[ERROR] Loading configuration files: " \
104
- " No yaml/json valid extension " \
105
- " (#{file})"
106
- warn msg
107
- end
108
- rescue => e
109
- puts "\n" + ("=" * 80)
110
- puts "[ERROR] ConfigFileReader#read <#{file}>"
111
- puts " I suggest to revise file format!"
112
- puts " #{e.message}\n" + ("=" * 80)
113
- end
114
- }
115
- end
116
-
117
- private_class_method def self.convert_string_keys_to_symbol(input)
118
- return input if input.class != Hash
119
-
120
- output = {}
121
- input.each_pair do |key, value|
122
- key2 = key
123
- key2 = key.to_sym if key.class
124
- value2 = value
125
- if value.instance_of? Hash
126
- value2 = convert_string_keys_to_symbol(value)
127
- elsif value.instance_of? Array
128
- value2 = []
129
- value.each { |i| value2 << convert_string_keys_to_symbol(i) }
130
- end
131
- output[key2] = value2
132
- end
133
- output
134
- end
135
- end
File without changes
File without changes
File without changes