teuton 2.3.4 → 2.3.5

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: 3bc9ff84fbd532b614173964e8de446a11e8126f324f4565a3d2e095ea7fd83d
4
- data.tar.gz: dd2b0093dc4a36b1892678ae2ed05fe4611a978c506ca01215bd9e12b7a346fb
3
+ metadata.gz: 0a36bf6988e2ba265f20e42f586c03272e151403c9f6d721d239cb0eb47f5aed
4
+ data.tar.gz: bbc005ffac1751e856d6ba0f4b07c1f6e7685e8028204f602636c3e9a17eb306
5
5
  SHA512:
6
- metadata.gz: 6147fad14f2aa47b31fc66bc17fdb78db0f9387a9dfea6dee0fb20f89ed2c48b729943bd7bae06155db8234d897b78987c184e936708d4fcdda185d11fcf8ce9
7
- data.tar.gz: '0949e0ed282c7faa26c590539c2dad96e9adfe1724709478004b4ae742ed2d2822f5768ef709a8df6ba7cf89823dd0177fd23cb805f0517595017bdd614bcc8a'
6
+ metadata.gz: 9b252bdd093780d5fec237d70f20545303c97d86bc9afa70957a5b1863b772cd69b1018b1e33f685ceb7e8537fc48197d14d64e445ecca071061a18a59d43e01
7
+ data.tar.gz: 3bfb33b02b0ce7d8507cc479250f2f3fc40173d7eeeb9d8377ff50c84e781c25fa4d842a06fa1b35981ca65cab990eccefb3955506ecce77e72106c29ac3946e
@@ -18,7 +18,8 @@ module DSL
18
18
  ip = get((host + '_ip').to_sym)
19
19
  username = get((host + '_username').to_sym).to_s
20
20
  password = get((host + '_password').to_sym).to_s
21
- port = get((host + '_port').to_sym) || 22
21
+ port = get((host + '_port').to_sym).to_i
22
+ port = 22 if port.zero?
22
23
 
23
24
  filename = @report.filename + '.' + @report.format.to_s
24
25
  localfilepath = File.join(@report.output_dir, filename)
@@ -1,8 +1,7 @@
1
- # frozen_string_literal: true
2
1
 
3
2
  require_relative '../application'
3
+ require 'fileutils'
4
4
 
5
- # Define general use methods
6
5
  module Utils
7
6
  # Create the directory if it dosn't exist.
8
7
  def ensure_dir(dirname)
@@ -13,7 +12,6 @@ module Utils
13
12
  true
14
13
  end
15
14
 
16
- # rubocop:disable Metrics/MethodLength
17
15
  def encode_and_split(encoding, text)
18
16
  # Convert text to UTF-8 deleting unknown chars
19
17
  text ||= '' # Ensure text is not nil
@@ -31,7 +29,6 @@ module Utils
31
29
 
32
30
  text.split("\n")
33
31
  end
34
- # rubocop:enable Metrics/MethodLength
35
32
 
36
33
  def my_execute(cmd, encoding = 'UTF-8')
37
34
  return { exitstatus: 0, content: '' } if Application.instance.debug
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
 
3
2
  require_relative '../application'
4
3
  require_relative '../utils/configfile_reader'
@@ -44,8 +43,6 @@ class Readme
44
43
  reset
45
44
  end
46
45
 
47
- ##
48
- # Show README on screen
49
46
  def show
50
47
  process_content
51
48
  show_head
@@ -55,8 +52,6 @@ class Readme
55
52
 
56
53
  private
57
54
 
58
- ##
59
- # Reset attributes
60
55
  def reset
61
56
  app = Application.instance
62
57
  @config = ConfigFileReader.read(app.config_path)
@@ -86,8 +81,6 @@ class Readme
86
81
  @action = { readme: [] }
87
82
  end
88
83
 
89
- ##
90
- # Show README head
91
84
  def show_head
92
85
  app = Application.instance
93
86
  puts '```'
@@ -117,12 +110,10 @@ class Readme
117
110
  @cases_params.sort!
118
111
  puts Lang::get(:params)
119
112
  @cases_params.uniq.each { |i| puts format('* %s', i) }
120
- puts "\n> NOTE: Save every ':param: value' into config file."
113
+ puts "\n> NOTE: Save every 'param: value' into config file."
121
114
  end
122
115
  end
123
116
 
124
- ##
125
- # Show README content
126
117
  def show_content
127
118
  @data[:groups].each do |group|
128
119
  next if group[:actions].empty?
@@ -148,8 +139,6 @@ class Readme
148
139
  end
149
140
  end
150
141
 
151
- ##
152
- # Show README tail
153
142
  def show_tail
154
143
  return if @global_params.empty?
155
144
 
@@ -170,3 +159,4 @@ class Readme
170
159
  @setted_params.each_pair { |k,v| puts "|#{k}|#{v}|" }
171
160
  end
172
161
  end
162
+
@@ -1,13 +1,10 @@
1
- # frozen_string_literal: true
2
1
 
3
2
  require 'fileutils'
4
3
  require 'rainbow'
5
4
 
6
- # Skeleton module
7
5
  module Skeleton
8
6
  ##
9
7
  # Create teuton project skeleton
10
- # @param project_dir (String)
11
8
  def self.create(project_dir)
12
9
  project_name = File.basename(project_dir)
13
10
  puts "\n[INFO] Creating #{Rainbow(project_name).bright} project skeleton"
@@ -33,9 +30,6 @@ module Skeleton
33
30
  end
34
31
  end
35
32
 
36
- ##
37
- # Create dir
38
- # @param dirpath (String)
39
33
  private_class_method def self.create_dir(dirpath)
40
34
  if Dir.exist? dirpath
41
35
  puts "* Exists dir! => #{Rainbow(dirpath).yellow}"
@@ -67,5 +61,4 @@ module Skeleton
67
61
  end
68
62
  end
69
63
  end
70
- # rubocop:enable Metrics/MethodLength
71
64
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Teuton
3
- VERSION = '2.3.4'
3
+ VERSION = '2.3.5'
4
4
  APPNAME = 'teuton'
5
5
  GEMNAME = 'teuton'
6
6
  DOCKERNAME = "dvarrui/#{GEMNAME}"
data/lib/teuton.rb CHANGED
@@ -1,9 +1,9 @@
1
1
 
2
2
  require_relative 'teuton/application'
3
- require_relative 'teuton/skeleton'
4
3
 
5
4
  module Teuton
6
5
  def self.create(path_to_new_dir)
6
+ require_relative 'teuton/skeleton'
7
7
  Skeleton.create(path_to_new_dir)
8
8
  end
9
9
 
@@ -13,7 +13,7 @@ module Teuton
13
13
  end
14
14
 
15
15
  def self.readme(projectpath, options = {})
16
- # Create Readme file for a test
16
+ # Create Readme file for a teuton test
17
17
  Application.instance.add_input_params(projectpath, options)
18
18
  require_dsl_and_script('teuton/readme/readme') # Define DSL keywords
19
19
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teuton
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.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: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -378,5 +378,5 @@ requirements: []
378
378
  rubygems_version: 3.1.6
379
379
  signing_key:
380
380
  specification_version: 4
381
- summary: Teuton (Teuton Software)
381
+ summary: Teuton (Infrastructure test)
382
382
  test_files: []