teuton 2.3.5 → 2.3.6

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: 0a36bf6988e2ba265f20e42f586c03272e151403c9f6d721d239cb0eb47f5aed
4
- data.tar.gz: bbc005ffac1751e856d6ba0f4b07c1f6e7685e8028204f602636c3e9a17eb306
3
+ metadata.gz: a57c245ece6497c75d1132e50cfaa722be5fae7df918ffa8b0af4e109f600cee
4
+ data.tar.gz: 8159ac8b86278ada1e0fac691d91b37d146cb5c336ec2f4babe729d8150063ae
5
5
  SHA512:
6
- metadata.gz: 9b252bdd093780d5fec237d70f20545303c97d86bc9afa70957a5b1863b772cd69b1018b1e33f685ceb7e8537fc48197d14d64e445ecca071061a18a59d43e01
7
- data.tar.gz: 3bfb33b02b0ce7d8507cc479250f2f3fc40173d7eeeb9d8377ff50c84e781c25fa4d842a06fa1b35981ca65cab990eccefb3955506ecce77e72106c29ac3946e
6
+ metadata.gz: 28594d840fe733c4fbc0d28b6d81610ccea3011c5d8713ac279b85280ece74b74f37670125edab21eae0a1f93c740a882784757c81c792a2327336f03c995233
7
+ data.tar.gz: 7f19810c16c1d3ad78b41de32a2b3a6f85dbff280972b9f6193d5b4ab86f470662357c7a29d2f5ae310246b7b6c3dfec3da95f2aab927c6f10e775bed8e0cb77
data/README.md CHANGED
@@ -27,7 +27,7 @@ Teuton allow us:
27
27
  * [Videos, blogs, news](docs/videos.md)
28
28
  * [Learning](docs/learn/README.md)
29
29
  * [Commands](docs/commands/README.md)
30
- * [Teuton language](docs/dsl/README.md)
30
+ * [Language reference](docs/dsl/README.md)
31
31
 
32
32
  # Features
33
33
 
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  * `send` instruction must be execute after `export`. Reports must be generated before send them, of course.
22
22
  * `host1`, it' the label that identified remote host. This information must be configured into config file.
23
- * `send :copy_to => :host1`, copy every case resport file into temp directory on remote host `host1`.
23
+ * `send copy_to: :host1`, copy every case resport file into temp directory on remote host `host1`.
24
24
 
25
25
  ## Example
26
26
 
@@ -38,8 +38,8 @@ Example 2: send report file to remote "./Desktop" folder.
38
38
 
39
39
  | Action | Description |
40
40
  | ------ | ----------- |
41
- | `send :copy_to => :host1, :remote_dir => "/home/david"` | Reports will be saved into "/home/david" directory in remote machine `host1`. |
42
- | `send :copy_to => :host1, :prefix => "samba_"` | Case report will be save into temp directory on every host `host1`, named as `samba_case-XX.txt`. |
41
+ | `send copy_to: :host1, remote_dir: "/home/david"` | Reports will be saved into "/home/david" directory in remote machine `host1`. |
42
+ | `send copy_to: :host1, prefix: "samba_"` | Case report will be save into temp directory on every host `host1`, named as `samba_case-XX.txt`. |
43
43
 
44
44
  > Teuton version 2.0.x
45
45
  > * By default, `send` only works when remote OS type is UNIX base, like GNU/Linux, MACOS, BSD, etc.
@@ -49,14 +49,14 @@ Example 2: send report file to remote "./Desktop" folder.
49
49
 
50
50
  If you export several files using differents output formats, you will use several `export` orders. Then when invoke `send` order, this will send the last exported file.
51
51
 
52
- In this example we export json and txt files, but only send txt to remote hosts:
52
+ In this example we export html and txt files, but only send txt to remote hosts:
53
53
 
54
54
  ```ruby
55
55
  start do
56
- export :format => :json
57
- export :format => :txt
56
+ export format: :json
57
+ export format: :txt
58
58
 
59
- send :copy_to => :host1
59
+ send copy_to: :host1
60
60
  end
61
61
  ```
62
62
 
@@ -64,10 +64,10 @@ If you want to send every exported output file, then do like this:
64
64
 
65
65
  ```ruby
66
66
  start do
67
- export :format => :json
68
- send :copy_to => :host1
67
+ export format: :html
68
+ send copy_to: :host1
69
69
 
70
- export :format => :txt
71
- send :copy_to => :host1
70
+ export format: :txt
71
+ send copy_to: :host1
72
72
  end
73
73
  ```
@@ -21,7 +21,8 @@ module DSL
21
21
  port = get((host + '_port').to_sym).to_i
22
22
  port = 22 if port.zero?
23
23
 
24
- filename = @report.filename + '.' + @report.format.to_s
24
+ filename = "#{@report.filename}.#{@report.format.to_s}"
25
+ filename = "#{@report.filename}.txt" if @report.format == :colored_text
25
26
  localfilepath = File.join(@report.output_dir, filename)
26
27
  filename = args[:prefix].to_s + filename if args[:prefix]
27
28
 
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
 
3
2
  # Close Show methods for Report class.
4
3
  class Report
@@ -9,8 +8,6 @@ class Report
9
8
  # * good_weight,d
10
9
  # * fail_weight
11
10
  # * fail_counter
12
- # rubocop:disable Metrics/AbcSize
13
- # rubocop:disable Metrics/MethodLength
14
11
  def close
15
12
  app = Application.instance
16
13
  max = 0.0
@@ -40,6 +37,4 @@ class Report
40
37
  @tail[:grade] = (100.0 * i).round
41
38
  @tail[:grade] = 0 if @tail[:unique_fault].positive?
42
39
  end
43
- # rubocop:enable Metrics/AbcSize
44
- # rubocop:enable Metrics/MethodLength
45
40
  end
@@ -1,10 +1,8 @@
1
- # frozen_string_literal: true
2
1
 
3
2
  require 'terminal-table'
4
3
  require 'rainbow'
5
4
  require_relative 'array_formatter'
6
5
 
7
- # TXTFormatter class
8
6
  class TXTFormatter < ArrayFormatter
9
7
  def initialize(report, color=false)
10
8
  @color = color
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Teuton
3
- VERSION = '2.3.5'
3
+ VERSION = '2.3.6'
4
4
  APPNAME = 'teuton'
5
5
  GEMNAME = 'teuton'
6
6
  DOCKERNAME = "dvarrui/#{GEMNAME}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teuton
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.5
4
+ version: 2.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz