teuton 2.9.2 → 2.9.3

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: 06e0c0a5f8d4ac08060478f7cb9eb10b3026873f8161eb78c39e8af72906df82
4
- data.tar.gz: b8d7b1b3bed7e487c4cfc202661f723d4cf4191166addb3e904f5b457911fbf2
3
+ metadata.gz: 3b4752e08b15fd862f420e1d48adbd9993d85d195d1b4c4e3a038fd49496c266
4
+ data.tar.gz: 35b22222f598310ccb28f208a56a4ae6923585815b41cceea7ed1d3546c6b914
5
5
  SHA512:
6
- metadata.gz: 8abad1b079988ca544d1a96bbf8883c904b53854de1819bab42d93be1f6cd8c1f755b5967dccbb4b5b01ddd9e02877e715be5a327e8af401bca03e015b85e850
7
- data.tar.gz: 5f50a3a06135fcfd57749da9075965a84cb33645cb6aed458ee94b44b8c688b54df750e7a2c8f658189b1dfbcd1d8bb778ead8c46542090f5a7eb23e7da2e61d
6
+ metadata.gz: 94c0548eea0557f8974d2f11640aa292cb6beaa446ea11f5b8c8927f0fafd846bf03bdb7d9114c82447e149534bc350521ba3998c441996c95aecc1a07341551
7
+ data.tar.gz: e6086e5451d2846bde79419d8cc3cf0c6d8dd332c966e2fee3c19f54c66569cc5f3c62e8aeb108a9c6f2e6cfe63e4190d70491b5aeb99d7dbc75cfe3f07991bc
@@ -107,3 +107,13 @@ DSL send:
107
107
  ## [2.9.1] 20231117
108
108
 
109
109
  - [FIX] Config option `tt_include` doubled readed data on Windows platforms.
110
+
111
+ ## [2.9.2] 20231201
112
+
113
+ - [FIX] Change error message when running a non-existent challenge
114
+ ```
115
+ ❯ teuton run example/foo
116
+ [ERROR] Cannot find main file!
117
+ /home/username/example/foo/start.rb
118
+ or /home/username/example/foo.rb
119
+ ```
@@ -38,4 +38,4 @@ There are diferents Teuton [Modes of use](Modes of use). For every mode there ar
38
38
 
39
39
  * Install SSH server on your host.
40
40
 
41
- > How to [install SSH on Windows](windows-ssh)
41
+ > How to [install SSH on Windows](s-node.md)
@@ -13,7 +13,7 @@ Run `teuton version` to check the installed version.
13
13
 
14
14
  **Update**
15
15
 
16
- `gem teuton update`.
16
+ `gem update teuton`.
17
17
 
18
18
  **Uninstall**
19
19
 
@@ -21,7 +21,7 @@ class Case
21
21
  attr_accessor :conn_status # Updated by ExecuteManager
22
22
 
23
23
  attr_reader :id
24
- attr_reader :config # Readed by ExecuteManager
24
+ attr_reader :config # Readed by ExecuteManager
25
25
  attr_reader :uniques
26
26
  attr_reader :skip
27
27
  @@id = "01" # First case ID value
@@ -5,7 +5,7 @@ module DSL
5
5
  def run_script(script, args = {})
6
6
  items = script.split(" ")
7
7
  if items.size == 1
8
- shell = args[:shell] || ((get(:shell) != "NODATA") ? get(:shell) : nil)
8
+ shell = args[:shell] || (get(:shell) != "NODATA" ? get(:shell) : nil)
9
9
  script = "#{shell} #{script}" if shell
10
10
  script = "#{script} #{args[:args]} " if args[:args]
11
11
  end
@@ -17,7 +17,7 @@ class ExecuteTelnet < ExecuteBase
17
17
  h = Net::Telnet.new(
18
18
  "Host" => ip,
19
19
  "Timeout" => 30,
20
- "Prompt" => /login|teuton|[$%#>]/
20
+ "Prompt" => /login|teuton|[$%#>]|PC1>/
21
21
  )
22
22
  # "Prompt" => Regexp.new(username[1, 40]))
23
23
  # "Prompt" => /[$%#>] \z/n)
@@ -31,18 +31,18 @@ class ExecuteTelnet < ExecuteBase
31
31
  rescue Net::OpenTimeout
32
32
  sessions[hostname] = :nosession
33
33
  conn_status[hostname] = :open_timeout
34
- verbose Rainbow(Application.instance.letter[:error]).red.bright
34
+ # verbose Rainbow(Application.instance.letter[:error]).red.bright
35
35
  log(" ExceptionType=<Net::OpenTimeout> doing <telnet #{ip}>", :error)
36
36
  log(" └── Revise host IP!", :warn)
37
37
  rescue Net::ReadTimeout
38
38
  sessions[hostname] = :nosession
39
39
  conn_status[hostname] = :read_timeout
40
- verbose Rainbow(Application.instance.letter[:error]).red.bright
40
+ # verbose Rainbow(Application.instance.letter[:error]).red.bright
41
41
  log(" ExceptionType=<Net::ReadTimeout> doing <telnet #{ip}>", :error)
42
42
  rescue => e
43
43
  sessions[hostname] = :nosession
44
44
  conn_status[hostname] = :error
45
- verbose Rainbow(Application.instance.letter[:error]).red.bright
45
+ # verbose Rainbow(Application.instance.letter[:error]).red.bright
46
46
  log(" ExceptionType=<#{e.class}> doing telnet on <#{username}@#{ip}>" \
47
47
  " exec: #{action[:command]}", :error)
48
48
  log(" └── username=<#{username}>, password=<#{password}>," \
@@ -6,7 +6,7 @@ require_relative "run"
6
6
  module CheckDSL
7
7
  def log(text = "", type = :info)
8
8
  @stats[:logs] += 1
9
- prefix = (type == :info) ? "" : "#{type.to_s.upcase}: "
9
+ prefix = type == :info ? "" : "#{type.to_s.upcase}: "
10
10
  Logger.info " log #{prefix}" + text.to_s
11
11
  end
12
12
 
@@ -85,9 +85,19 @@ module ConfigFileReader
85
85
  begin
86
86
  ext = File.extname(filename)
87
87
  if exts[:yaml].include? ext
88
- data[:cases] << YAML.load(File.open(filename))
88
+ begin
89
+ data[:cases] << YAML.load(File.open(filename))
90
+ rescue
91
+ msg = "[ERROR] Loading configuration file(#{filename})"
92
+ warn msg
93
+ end
89
94
  elsif exts[:json].include? ext
90
- data[:cases] = JSON.parse(File.read(filename), symbolize_names: true)
95
+ begin
96
+ data[:cases] = JSON.parse(File.read(filename), symbolize_names: true)
97
+ rescue
98
+ msg = "[ERROR] Loading configuration file(#{filename})"
99
+ warn msg
100
+ end
91
101
  elsif File.file? filename
92
102
  msg = "[ERROR] Loading configuration files: " \
93
103
  " No yaml/json valid extension " \
@@ -1,5 +1,3 @@
1
- # Development in progress...
2
-
3
1
  require_relative "name_file_finder"
4
2
 
5
3
  class Project
@@ -21,7 +19,7 @@ class Project
21
19
  @project[:ialias] = {} # Hash of Internal alias
22
20
  @project[:macros] = {} # Hash of macros
23
21
  @project[:groups] = [] # Array of groups
24
- @project[:uses] = [] # TODO: Array of files used
22
+ @project[:uses] = [] # TODO: Array of used files
25
23
  @project[:hall_of_fame] = []
26
24
  end
27
25
 
@@ -1,5 +1,5 @@
1
1
  module Teuton
2
- VERSION = "2.9.2"
2
+ VERSION = "2.9.3"
3
3
  APPNAME = "teuton"
4
4
  GEMNAME = "teuton"
5
5
  DOCKERNAME = "dvarrui/#{GEMNAME}"
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.9.2
4
+ version: 2.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-12-01 00:00:00.000000000 Z
10
+ date: 2025-04-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rainbow
@@ -44,14 +43,14 @@ dependencies:
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
- version: '7.0'
46
+ version: '7.2'
48
47
  type: :runtime
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
- version: '7.0'
53
+ version: '7.2'
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: net-telnet
57
56
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +71,28 @@ dependencies:
72
71
  requirements:
73
72
  - - "~>"
74
73
  - !ruby/object:Gem::Version
75
- version: '2.6'
74
+ version: '2.8'
76
75
  type: :runtime
77
76
  prerelease: false
78
77
  version_requirements: !ruby/object:Gem::Requirement
79
78
  requirements:
80
79
  - - "~>"
81
80
  - !ruby/object:Gem::Version
82
- version: '2.6'
81
+ version: '2.8'
83
82
  - !ruby/object:Gem::Dependency
84
83
  name: thor
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
86
  - - "~>"
88
87
  - !ruby/object:Gem::Version
89
- version: '1.2'
88
+ version: '1.3'
90
89
  type: :runtime
91
90
  prerelease: false
92
91
  version_requirements: !ruby/object:Gem::Requirement
93
92
  requirements:
94
93
  - - "~>"
95
94
  - !ruby/object:Gem::Version
96
- version: '1.2'
95
+ version: '1.3'
97
96
  - !ruby/object:Gem::Dependency
98
97
  name: terminal-table
99
98
  requirement: !ruby/object:Gem::Requirement
@@ -351,7 +350,6 @@ homepage: https://github.com/teuton-software/teuton
351
350
  licenses:
352
351
  - GPL-3.0
353
352
  metadata: {}
354
- post_install_message:
355
353
  rdoc_options: []
356
354
  require_paths:
357
355
  - lib
@@ -366,8 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
366
364
  - !ruby/object:Gem::Version
367
365
  version: '0'
368
366
  requirements: []
369
- rubygems_version: 3.2.33
370
- signing_key:
367
+ rubygems_version: 3.6.2
371
368
  specification_version: 4
372
369
  summary: Teuton (Infrastructure test)
373
370
  test_files: []