teuton 2.1.11 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -12
- data/bin/check_teuton +0 -2
- data/docs/changelog/ideas.md +132 -0
- data/docs/changelog/v2.1.md +14 -122
- data/docs/changelog/v2.2.md +52 -28
- data/docs/changelog/version2.1.md +4 -0
- data/docs/commands/README.md +58 -15
- data/docs/commands/example_check.md +0 -4
- data/docs/commands/example_run.md +0 -4
- data/docs/dsl/README.md +1 -1
- data/docs/dsl/definition/result.md +1 -0
- data/docs/dsl/definition/run_remote.md +12 -6
- data/docs/dsl/definition/target.md +9 -10
- data/docs/install/README.md +13 -18
- data/docs/install/vagrant_docker.md +1 -1
- data/docs/learn/README.md +11 -8
- data/docs/learn/example-01-target.md +25 -25
- data/docs/learn/example-02-config.md +38 -49
- data/docs/learn/example-03-remote-hosts.md +22 -22
- data/docs/learn/{example-11-first-test.md → example-04-new-test.md} +23 -24
- data/docs/learn/{example-04-use.md → example-05-use.md} +6 -6
- data/docs/learn/{example-05-debug.md → example-06-debug.md} +8 -8
- data/docs/learn/{example-06-log.md → example-07-log.md} +7 -7
- data/docs/learn/{example-07-readme.md → example-08-readme.md} +10 -10
- data/docs/learn/{example-08-preserve.md → example-09-preserve.md} +6 -6
- data/docs/videos.md +19 -0
- data/lib/teuton/application.rb +22 -3
- data/lib/teuton/case_manager/case/dsl/goto.rb +2 -2
- data/lib/teuton/case_manager/case/dsl/macro.rb +1 -0
- data/lib/teuton/case_manager/case/dsl/send.rb +2 -1
- data/lib/teuton/case_manager/case/play.rb +2 -0
- data/lib/teuton/case_manager/case/result/ext_compare.rb +16 -0
- data/lib/teuton/case_manager/case/result/result.rb +1 -1
- data/lib/teuton/case_manager/case/runner.rb +31 -4
- data/lib/teuton/case_manager/case_manager.rb +1 -1
- data/lib/teuton/case_manager/export_manager.rb +21 -11
- data/lib/teuton/case_manager/utils.rb +1 -1
- data/lib/teuton/{project/laboratory → check}/builtin.rb +0 -0
- data/lib/teuton/{project/laboratory → check}/dsl.rb +40 -28
- data/lib/teuton/{project/laboratory → check}/laboratory.rb +3 -8
- data/lib/teuton/{project/laboratory → check}/show.rb +53 -59
- data/lib/teuton/cli.rb +85 -14
- data/lib/teuton/{project/readme → readme}/dsl.rb +0 -0
- data/lib/teuton/{project/readme → readme}/lang.rb +1 -1
- data/lib/teuton/{project/readme → readme}/readme.rb +22 -18
- data/lib/teuton/report/formatter/array_formatter.rb +13 -1
- data/lib/teuton/report/formatter/base_formatter.rb +18 -5
- data/lib/teuton/{project/skeleton.rb → skeleton.rb} +7 -19
- data/lib/teuton/utils/configfile_reader.rb +121 -0
- data/lib/teuton/{project → utils}/name_file_finder.rb +46 -26
- data/lib/teuton/version.rb +8 -0
- data/lib/teuton.rb +30 -32
- metadata +107 -65
- data/lib/teuton/cli/check.rb +0 -38
- data/lib/teuton/cli/main.rb +0 -6
- data/lib/teuton/cli/play.rb +0 -38
- data/lib/teuton/cli/readme.rb +0 -26
- data/lib/teuton/cli/version.rb +0 -12
- data/lib/teuton/files/gitignore +0 -2
- data/lib/teuton/project/configfile_reader.rb +0 -49
- data/lib/teuton/project/project.rb +0 -80
@@ -3,8 +3,9 @@
|
|
3
3
|
require 'rainbow'
|
4
4
|
require_relative '../application'
|
5
5
|
|
6
|
-
|
7
|
-
#
|
6
|
+
##
|
7
|
+
# NameFileFinder module
|
8
|
+
# Methods: find_filenames_for, verbose, verboseln
|
8
9
|
module NameFileFinder
|
9
10
|
##
|
10
11
|
# Find project filenames from input project relative path
|
@@ -28,6 +29,8 @@ module NameFileFinder
|
|
28
29
|
##
|
29
30
|
# Find project filenames from input folder path
|
30
31
|
# @param folder_path (String)
|
32
|
+
# rubocop:disable Metrics/AbcSize
|
33
|
+
# rubocop:disable Metrics/MethodLength
|
31
34
|
def self.find_filenames_from_directory(folder_path)
|
32
35
|
# COMPLEX MODE: We use start.rb as main RB file
|
33
36
|
script_path = File.join(folder_path, 'start.rb')
|
@@ -45,15 +48,20 @@ module NameFileFinder
|
|
45
48
|
|
46
49
|
find_configfilename_from_directory(folder_path)
|
47
50
|
end
|
51
|
+
# rubocop:enable Metrics/AbcSize
|
52
|
+
# rubocop:enable Metrics/MethodLength
|
48
53
|
|
49
54
|
##
|
50
55
|
# Find project config filename from input folder path
|
51
56
|
# @param folder_path (String)
|
57
|
+
# rubocop:disable Metrics/AbcSize
|
58
|
+
# rubocop:disable Metrics/MethodLength
|
59
|
+
# rubocop:disable Style/IfUnlessModifier
|
52
60
|
def self.find_configfilename_from_directory(folder_path)
|
53
61
|
# COMPLEX MODE: We use config.yaml by default
|
54
62
|
app = Application.instance
|
55
|
-
|
56
63
|
config_path = ''
|
64
|
+
|
57
65
|
if app.options['cpath'].nil?
|
58
66
|
config_name = 'config'
|
59
67
|
# Config name file is introduced by cname arg option from teuton command
|
@@ -68,7 +76,12 @@ module NameFileFinder
|
|
68
76
|
end
|
69
77
|
app.config_path = config_path
|
70
78
|
end
|
79
|
+
# rubocop:enable Metrics/AbcSize
|
80
|
+
# rubocop:enable Metrics/MethodLength
|
81
|
+
# rubocop:enable Style/IfUnlessModifier
|
71
82
|
|
83
|
+
# rubocop:disable Metrics/AbcSize
|
84
|
+
# rubocop:disable Metrics/MethodLength
|
72
85
|
def self.find_filenames_from_rb(script_path)
|
73
86
|
# SIMPLE MODE: We use script_path as main RB file
|
74
87
|
# This must be fullpath to DSL script file
|
@@ -86,7 +99,12 @@ module NameFileFinder
|
|
86
99
|
|
87
100
|
find_configfilenames_from_rb(script_path)
|
88
101
|
end
|
102
|
+
# rubocop:enable Metrics/AbcSize
|
103
|
+
# rubocop:enable Metrics/MethodLength
|
89
104
|
|
105
|
+
# rubocop:disable Metrics/MethodLength
|
106
|
+
# rubocop:disable Metrics/AbcSize
|
107
|
+
# rubocop:disable Style/IfUnlessModifier
|
90
108
|
def self.find_configfilenames_from_rb(script_path)
|
91
109
|
# SIMPLE MODE: We use script_path as main RB file
|
92
110
|
# This must be fullpath to DSL script file
|
@@ -108,32 +126,33 @@ module NameFileFinder
|
|
108
126
|
end
|
109
127
|
app.config_path = config_path
|
110
128
|
end
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
129
|
+
# rubocop:enable Metrics/MethodLength
|
130
|
+
# rubocop:enable Metrics/AbcSize
|
131
|
+
# rubocop:enable Style/IfUnlessModifier
|
132
|
+
|
133
|
+
# def self.puts_input_info_on_screen
|
134
|
+
# app = Application.instance
|
135
|
+
#
|
136
|
+
# verbose Rainbow('[INFO] ScriptPath => ').blue
|
137
|
+
# verboseln Rainbow(trim(app.script_path)).blue.bright
|
138
|
+
# verbose Rainbow('[INFO] ConfigPath => ').blue
|
139
|
+
# verboseln Rainbow(trim(app.config_path)).blue.bright
|
140
|
+
# verbose Rainbow('[INFO] Pwd => ').blue
|
141
|
+
# verboseln Rainbow(app.running_basedir).blue.bright
|
142
|
+
# verbose Rainbow('[INFO] TestName => ').blue
|
143
|
+
# verboseln Rainbow(trim(app.test_name)).blue.bright
|
144
|
+
# end
|
124
145
|
|
125
146
|
##
|
126
147
|
# Trim string text when is too long
|
127
|
-
#
|
128
|
-
#
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
output = input.
|
133
|
-
|
134
|
-
|
135
|
-
output.to_s
|
136
|
-
end
|
148
|
+
# def self.trim(input)
|
149
|
+
# return input unless input.to_s.start_with? Dir.pwd.to_s
|
150
|
+
#
|
151
|
+
# output = input.to_s
|
152
|
+
# offset = (Dir.pwd).length + 1
|
153
|
+
# output = "#{input[offset, input.size]}"
|
154
|
+
# output.to_s
|
155
|
+
# end
|
137
156
|
|
138
157
|
def self.verboseln(text)
|
139
158
|
verbose(text + "\n")
|
@@ -142,6 +161,7 @@ module NameFileFinder
|
|
142
161
|
def self.verbose(text)
|
143
162
|
return unless Application.instance.verbose
|
144
163
|
return if Application.instance.options['quiet']
|
164
|
+
|
145
165
|
print text
|
146
166
|
end
|
147
167
|
end
|
data/lib/teuton.rb
CHANGED
@@ -1,47 +1,45 @@
|
|
1
|
+
|
1
2
|
require_relative 'teuton/application'
|
2
|
-
require_relative 'teuton/
|
3
|
-
require_relative 'teuton/project/skeleton'
|
3
|
+
require_relative 'teuton/skeleton'
|
4
4
|
|
5
|
-
##
|
6
|
-
# Main Teuton functions
|
7
5
|
module Teuton
|
8
|
-
##
|
9
|
-
# Create new Teuton project
|
10
6
|
def self.create(path_to_new_dir)
|
11
7
|
Skeleton.create(path_to_new_dir)
|
12
8
|
end
|
13
9
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
# @param options [Hash] Options like
|
18
|
-
# * :export [String]
|
19
|
-
# * :cname [String]
|
20
|
-
# * :cpath [String]
|
21
|
-
# * :case [String]
|
22
|
-
# * :quiet [Boolean]
|
23
|
-
def self.play(path_to_rb_file, options = {})
|
24
|
-
Project.play(path_to_rb_file, options)
|
10
|
+
def self.run(projectpath, options = {})
|
11
|
+
Application.instance.add_input_params(projectpath, options)
|
12
|
+
require_dsl_and_script('teuton/case_manager/dsl') # Define DSL keywords
|
25
13
|
end
|
26
14
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
15
|
+
def self.readme(projectpath, options = {})
|
16
|
+
# Create Readme file for a test
|
17
|
+
Application.instance.add_input_params(projectpath, options)
|
18
|
+
require_dsl_and_script('teuton/readme/readme') # Define DSL keywords
|
19
|
+
|
20
|
+
app = Application.instance
|
21
|
+
readme = Readme.new(app.script_path, app.config_path)
|
22
|
+
readme.show
|
32
23
|
end
|
33
24
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
25
|
+
def self.check(projectpath, options = {})
|
26
|
+
Application.instance.add_input_params(projectpath, options)
|
27
|
+
require_dsl_and_script('teuton/check/laboratory') # Define DSL keywords
|
28
|
+
|
29
|
+
app = Application.instance
|
30
|
+
lab = Laboratory.new(app.script_path, app.config_path)
|
31
|
+
lab.show unless options[:panelconfig]
|
32
|
+
lab.show_panelconfig if options[:panelconfig]
|
39
33
|
end
|
40
34
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
35
|
+
private_class_method def self.require_dsl_and_script(dslpath)
|
36
|
+
app = Application.instance
|
37
|
+
require_relative dslpath
|
38
|
+
begin
|
39
|
+
require_relative app.script_path
|
40
|
+
rescue SyntaxError => e
|
41
|
+
puts e.to_s
|
42
|
+
puts Rainbow.new("[ FAIL ] SyntaxError into file #{app.script_path}").red
|
43
|
+
end
|
46
44
|
end
|
47
45
|
end
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teuton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Vargas Ruiz
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: colorize
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.8.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.8.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rainbow
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: net-sftp
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +58,14 @@ dependencies:
|
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '5.
|
61
|
+
version: '5.0'
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '5.
|
68
|
+
version: '5.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: net-telnet
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,19 +81,33 @@ dependencies:
|
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0.1'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: os
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
89
|
+
version: '1.1'
|
76
90
|
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
96
|
+
version: '1.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: json_pure
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.2'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.2'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: thor
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +164,20 @@ dependencies:
|
|
136
164
|
- - "~>"
|
137
165
|
- !ruby/object:Gem::Version
|
138
166
|
version: '0.74'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: yard
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0.9'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0.9'
|
139
181
|
description: |2
|
140
182
|
Intrastructure test, useful for:
|
141
183
|
(1) Sysadmin teachers to evaluate students remote machines.
|
@@ -153,44 +195,47 @@ extensions: []
|
|
153
195
|
extra_rdoc_files:
|
154
196
|
- README.md
|
155
197
|
- LICENSE
|
156
|
-
- docs/learn/example-03-remote-hosts.md
|
157
|
-
- docs/learn/example-07-readme.md
|
158
|
-
- docs/learn/example-05-debug.md
|
159
|
-
- docs/learn/example-02-config.md
|
160
|
-
- docs/learn/example-11-first-test.md
|
161
|
-
- docs/learn/videos.md
|
162
|
-
- docs/learn/example-06-log.md
|
163
|
-
- docs/learn/example-08-preserve.md
|
164
|
-
- docs/learn/example-04-use.md
|
165
|
-
- docs/learn/example-01-target.md
|
166
|
-
- docs/learn/README.md
|
167
|
-
- docs/changelog/v2.1.md
|
168
|
-
- docs/changelog/v2.2.md
|
169
|
-
- docs/changelog/contributions.md
|
170
|
-
- docs/changelog/servidor-de-retos.md
|
171
|
-
- docs/changelog/v2.0.md
|
172
|
-
- docs/commands/example_run.md
|
173
198
|
- docs/commands/README.md
|
174
199
|
- docs/commands/example_check.md
|
200
|
+
- docs/commands/example_run.md
|
201
|
+
- docs/learn/README.md
|
202
|
+
- docs/learn/example-01-target.md
|
203
|
+
- docs/learn/example-02-config.md
|
204
|
+
- docs/learn/example-03-remote-hosts.md
|
205
|
+
- docs/learn/example-04-new-test.md
|
206
|
+
- docs/learn/example-05-use.md
|
207
|
+
- docs/learn/example-06-debug.md
|
208
|
+
- docs/learn/example-07-log.md
|
209
|
+
- docs/learn/example-08-readme.md
|
210
|
+
- docs/learn/example-09-preserve.md
|
211
|
+
- docs/learn/videos.md
|
212
|
+
- docs/dsl/README.md
|
213
|
+
- docs/dsl/setting/get.md
|
214
|
+
- docs/dsl/setting/set.md
|
175
215
|
- docs/dsl/definition/result.md
|
176
|
-
- docs/dsl/definition/target.md
|
177
|
-
- docs/dsl/definition/group.md
|
178
216
|
- docs/dsl/definition/expect.md
|
179
|
-
- docs/dsl/definition/
|
217
|
+
- docs/dsl/definition/group.md
|
180
218
|
- docs/dsl/definition/run_remote.md
|
219
|
+
- docs/dsl/definition/run_local.md
|
220
|
+
- docs/dsl/definition/target.md
|
181
221
|
- docs/dsl/execution/export.md
|
182
222
|
- docs/dsl/execution/play.md
|
183
223
|
- docs/dsl/execution/send.md
|
184
224
|
- docs/dsl/execution/show.md
|
185
|
-
- docs/dsl/setting/set.md
|
186
|
-
- docs/dsl/setting/get.md
|
187
|
-
- docs/dsl/README.md
|
188
225
|
- docs/Challenge-Server-Project.md
|
189
|
-
- docs/
|
190
|
-
- docs/install/vagrant_docker.md
|
191
|
-
- docs/install/scripts.md
|
226
|
+
- docs/videos.md
|
192
227
|
- docs/install/README.md
|
193
228
|
- docs/install/manual.md
|
229
|
+
- docs/install/modes_of_use.md
|
230
|
+
- docs/install/scripts.md
|
231
|
+
- docs/install/vagrant_docker.md
|
232
|
+
- docs/changelog/v2.2.md
|
233
|
+
- docs/changelog/v2.0.md
|
234
|
+
- docs/changelog/servidor-de-retos.md
|
235
|
+
- docs/changelog/contributions.md
|
236
|
+
- docs/changelog/v2.1.md
|
237
|
+
- docs/changelog/ideas.md
|
238
|
+
- docs/changelog/version2.1.md
|
194
239
|
files:
|
195
240
|
- LICENSE
|
196
241
|
- README.md
|
@@ -198,10 +243,12 @@ files:
|
|
198
243
|
- bin/teuton
|
199
244
|
- docs/Challenge-Server-Project.md
|
200
245
|
- docs/changelog/contributions.md
|
246
|
+
- docs/changelog/ideas.md
|
201
247
|
- docs/changelog/servidor-de-retos.md
|
202
248
|
- docs/changelog/v2.0.md
|
203
249
|
- docs/changelog/v2.1.md
|
204
250
|
- docs/changelog/v2.2.md
|
251
|
+
- docs/changelog/version2.1.md
|
205
252
|
- docs/commands/README.md
|
206
253
|
- docs/commands/example_check.md
|
207
254
|
- docs/commands/example_run.md
|
@@ -227,13 +274,14 @@ files:
|
|
227
274
|
- docs/learn/example-01-target.md
|
228
275
|
- docs/learn/example-02-config.md
|
229
276
|
- docs/learn/example-03-remote-hosts.md
|
230
|
-
- docs/learn/example-04-
|
231
|
-
- docs/learn/example-05-
|
232
|
-
- docs/learn/example-06-
|
233
|
-
- docs/learn/example-07-
|
234
|
-
- docs/learn/example-08-
|
235
|
-
- docs/learn/example-
|
277
|
+
- docs/learn/example-04-new-test.md
|
278
|
+
- docs/learn/example-05-use.md
|
279
|
+
- docs/learn/example-06-debug.md
|
280
|
+
- docs/learn/example-07-log.md
|
281
|
+
- docs/learn/example-08-readme.md
|
282
|
+
- docs/learn/example-09-preserve.md
|
236
283
|
- docs/learn/videos.md
|
284
|
+
- docs/videos.md
|
237
285
|
- lib/teuton.rb
|
238
286
|
- lib/teuton/application.rb
|
239
287
|
- lib/teuton/case_manager/case/builtin/main.rb
|
@@ -270,29 +318,19 @@ files:
|
|
270
318
|
- lib/teuton/case_manager/report.rb
|
271
319
|
- lib/teuton/case_manager/show.rb
|
272
320
|
- lib/teuton/case_manager/utils.rb
|
321
|
+
- lib/teuton/check/builtin.rb
|
322
|
+
- lib/teuton/check/dsl.rb
|
323
|
+
- lib/teuton/check/laboratory.rb
|
324
|
+
- lib/teuton/check/show.rb
|
273
325
|
- lib/teuton/cli.rb
|
274
|
-
- lib/teuton/cli/check.rb
|
275
|
-
- lib/teuton/cli/main.rb
|
276
|
-
- lib/teuton/cli/play.rb
|
277
|
-
- lib/teuton/cli/readme.rb
|
278
|
-
- lib/teuton/cli/version.rb
|
279
326
|
- lib/teuton/files/README.md
|
280
327
|
- lib/teuton/files/config.yaml
|
281
|
-
- lib/teuton/files/gitignore
|
282
328
|
- lib/teuton/files/start.rb
|
283
329
|
- lib/teuton/files/template/case.html
|
284
330
|
- lib/teuton/files/template/resume.html
|
285
|
-
- lib/teuton/
|
286
|
-
- lib/teuton/
|
287
|
-
- lib/teuton/
|
288
|
-
- lib/teuton/project/laboratory/laboratory.rb
|
289
|
-
- lib/teuton/project/laboratory/show.rb
|
290
|
-
- lib/teuton/project/name_file_finder.rb
|
291
|
-
- lib/teuton/project/project.rb
|
292
|
-
- lib/teuton/project/readme/dsl.rb
|
293
|
-
- lib/teuton/project/readme/lang.rb
|
294
|
-
- lib/teuton/project/readme/readme.rb
|
295
|
-
- lib/teuton/project/skeleton.rb
|
331
|
+
- lib/teuton/readme/dsl.rb
|
332
|
+
- lib/teuton/readme/lang.rb
|
333
|
+
- lib/teuton/readme/readme.rb
|
296
334
|
- lib/teuton/report/close.rb
|
297
335
|
- lib/teuton/report/formatter/array_formatter.rb
|
298
336
|
- lib/teuton/report/formatter/base_formatter.rb
|
@@ -313,12 +351,16 @@ files:
|
|
313
351
|
- lib/teuton/report/formatter/yaml_formatter.rb
|
314
352
|
- lib/teuton/report/report.rb
|
315
353
|
- lib/teuton/report/show.rb
|
354
|
+
- lib/teuton/skeleton.rb
|
355
|
+
- lib/teuton/utils/configfile_reader.rb
|
356
|
+
- lib/teuton/utils/name_file_finder.rb
|
316
357
|
- lib/teuton/utils/verbose.rb
|
317
|
-
|
358
|
+
- lib/teuton/version.rb
|
359
|
+
homepage: https://github.com/teuton-software/teuton
|
318
360
|
licenses:
|
319
361
|
- GPL-3.0
|
320
362
|
metadata: {}
|
321
|
-
post_install_message:
|
363
|
+
post_install_message:
|
322
364
|
rdoc_options: []
|
323
365
|
require_paths:
|
324
366
|
- lib
|
@@ -326,15 +368,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
326
368
|
requirements:
|
327
369
|
- - ">="
|
328
370
|
- !ruby/object:Gem::Version
|
329
|
-
version: 2.5.
|
371
|
+
version: 2.5.9
|
330
372
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
331
373
|
requirements:
|
332
374
|
- - ">="
|
333
375
|
- !ruby/object:Gem::Version
|
334
376
|
version: '0'
|
335
377
|
requirements: []
|
336
|
-
rubygems_version: 3.1.
|
337
|
-
signing_key:
|
378
|
+
rubygems_version: 3.1.6
|
379
|
+
signing_key:
|
338
380
|
specification_version: 4
|
339
381
|
summary: Teuton (Teuton Software)
|
340
382
|
test_files: []
|
data/lib/teuton/cli/check.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# CLI#test
|
4
|
-
class CLI < Thor
|
5
|
-
map ['t', '-t', '--test', 'test'] => 'check'
|
6
|
-
option :c, type: :boolean
|
7
|
-
option :cname, type: :string
|
8
|
-
option :cpath, type: :string
|
9
|
-
desc 'check [OPTIONS] DIRECTORY',
|
10
|
-
'Test or check challenge contents'
|
11
|
-
long_desc <<-LONGDESC
|
12
|
-
|
13
|
-
(1) teuton test path/to/dir/foo
|
14
|
-
, Test content of start.rb and config.yaml files.
|
15
|
-
|
16
|
-
(2) teuton test path/to/dir/foo -c
|
17
|
-
, Only test CONFIG information from config.yaml.
|
18
|
-
|
19
|
-
(3) teuton test path/to/dir/foo --cname=demo
|
20
|
-
, Test content of start.rb and demo.yaml files.
|
21
|
-
|
22
|
-
(4) teuton test path/to/file/foo.rb
|
23
|
-
, Test content of foo.rb and foo.yaml files.
|
24
|
-
|
25
|
-
(5) teuton test path/to/file/foo.rb -c
|
26
|
-
, Only test CONFIG information from foo.yaml.
|
27
|
-
|
28
|
-
(6) teuton test path/to/file/foo.rb --cname=demo
|
29
|
-
, Test content of foo.rb and demo.yaml files.
|
30
|
-
|
31
|
-
LONGDESC
|
32
|
-
##
|
33
|
-
# Verify or test Teuton test units syntax
|
34
|
-
# @param path_to_rb_file [String] Route to main rb Teuton file
|
35
|
-
def check(path_to_rb_file)
|
36
|
-
Project.check(path_to_rb_file, options)
|
37
|
-
end
|
38
|
-
end
|
data/lib/teuton/cli/main.rb
DELETED
data/lib/teuton/cli/play.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# CLI#play
|
4
|
-
class CLI < Thor
|
5
|
-
map ['p', '-p', 'play', '--play', '--run', 'run'] => 'play'
|
6
|
-
option :export, type: :string
|
7
|
-
option :cname, type: :string
|
8
|
-
option :cpath, type: :string
|
9
|
-
option :case, type: :string
|
10
|
-
option :color, type: :boolean
|
11
|
-
option :quiet, type: :boolean
|
12
|
-
desc '[run] [OPTIONS] DIRECTORY',
|
13
|
-
'Run challenge from directory'
|
14
|
-
long_desc <<-LONGDESC
|
15
|
-
This function execute challenge from specified directory.
|
16
|
-
By default, show progress on the screen.
|
17
|
-
|
18
|
-
Let's see others options:
|
19
|
-
|
20
|
-
(1) teuton foo, run challenge from foo/start.rb with foo/config.yaml config file.
|
21
|
-
|
22
|
-
(2) teuton play foo, same as (1).
|
23
|
-
|
24
|
-
(3) teuton play --export=json foo, run challenge and export using json format.
|
25
|
-
Others output formats availables are: txt, colored_text, json, yaml.
|
26
|
-
|
27
|
-
(4) teuton play --cname=demo foo, run challenge from foo/start.rb with foo/demo.yaml config file.
|
28
|
-
|
29
|
-
(5) teuton foo/demo.rb, Run challenge from foo/demo.rb with foo/demo.yaml config file.
|
30
|
-
|
31
|
-
LONGDESC
|
32
|
-
##
|
33
|
-
# Execute Teuton test unit
|
34
|
-
# @param filepath [String] Route to main: rb file or folder
|
35
|
-
def play(filepath)
|
36
|
-
Project.play(filepath, options)
|
37
|
-
end
|
38
|
-
end
|
data/lib/teuton/cli/readme.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# CLI#readme
|
4
|
-
class CLI < Thor
|
5
|
-
map ['--readme'] => 'readme'
|
6
|
-
option :lang, type: :string
|
7
|
-
desc 'readme DIRECTORY',
|
8
|
-
'Create README.md file from challenge contents'
|
9
|
-
long_desc <<-LONGDESC
|
10
|
-
|
11
|
-
(1) teuton readme foo
|
12
|
-
, Create README.md from foo/start.rb.
|
13
|
-
|
14
|
-
(2) teuton readme foo/demo.rb
|
15
|
-
, Create README.md from foo/demo.rb.
|
16
|
-
|
17
|
-
By default lang=es, but It's available lang=en too.
|
18
|
-
|
19
|
-
LONGDESC
|
20
|
-
##
|
21
|
-
# Create README from teuton test
|
22
|
-
# @param path_to_rb_file [String] Route to main rb Teuton file
|
23
|
-
def readme(path_to_rb_file)
|
24
|
-
Project.readme(path_to_rb_file, options)
|
25
|
-
end
|
26
|
-
end
|
data/lib/teuton/cli/version.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Class method Teuton#version
|
4
|
-
class CLI < Thor
|
5
|
-
map ['v', '-v', '--version'] => 'version'
|
6
|
-
desc 'version', 'Show the program version'
|
7
|
-
##
|
8
|
-
# Display version
|
9
|
-
def version
|
10
|
-
puts "#{Application::NAME} (version #{Application::VERSION})"
|
11
|
-
end
|
12
|
-
end
|
data/lib/teuton/files/gitignore
DELETED