teuton 2.9.4 → 2.9.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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -8
  3. data/docs/changelog/changelog.2.md +9 -1
  4. data/docs/commands/README.md +33 -65
  5. data/docs/commands/{example_check.md → check-example.md} +2 -6
  6. data/docs/commands/{example_run.md → howto-run-tests.md} +16 -10
  7. data/docs/es/README.md +72 -0
  8. data/docs/es/aprender/01-cmd_new.md +27 -0
  9. data/docs/es/aprender/02-target.md +131 -0
  10. data/docs/es/aprender/README.md +36 -0
  11. data/docs/install/README.md +10 -6
  12. data/docs/install/s-node.md +3 -3
  13. data/docs/install/t-node.md +75 -6
  14. data/docs/learn/02-target.md +3 -2
  15. data/lib/teuton/case/config.rb +1 -1
  16. data/lib/teuton/case/dsl/expect.rb +1 -1
  17. data/lib/teuton/case/dsl/expect_sequence.rb +2 -2
  18. data/lib/teuton/case/dsl/run_script.rb +1 -1
  19. data/lib/teuton/case/dsl/unique.rb +1 -1
  20. data/lib/teuton/case/execute/execute_base.rb +2 -2
  21. data/lib/teuton/case/execute/execute_manager.rb +2 -2
  22. data/lib/teuton/case/execute/execute_ssh.rb +10 -10
  23. data/lib/teuton/case/execute/execute_telnet.rb +1 -1
  24. data/lib/teuton/case/host.rb +6 -6
  25. data/lib/teuton/case_manager/case_manager.rb +1 -0
  26. data/lib/teuton/case_manager/export_manager.rb +12 -4
  27. data/lib/teuton/case_manager/report.rb +1 -1
  28. data/lib/teuton/case_manager/show_report.rb +0 -1
  29. data/lib/teuton/check/dsl/all.rb +1 -1
  30. data/lib/teuton/check/show.rb +4 -4
  31. data/lib/teuton/deprecated/runner.rb +12 -12
  32. data/lib/teuton/readme/dsl/getset.rb +3 -3
  33. data/lib/teuton/readme/dsl/run.rb +3 -3
  34. data/lib/teuton/readme/readme.rb +1 -0
  35. data/lib/teuton/report/formatter/default/array.rb +1 -1
  36. data/lib/teuton/report/formatter/default/html.rb +1 -1
  37. data/lib/teuton/report/formatter/default/json.rb +3 -2
  38. data/lib/teuton/report/formatter/default/xml.rb +1 -1
  39. data/lib/teuton/report/formatter/default/yaml.rb +1 -1
  40. data/lib/teuton/report/formatter/moodle_csv_formatter.rb +1 -1
  41. data/lib/teuton/report/formatter/resume/array.rb +1 -1
  42. data/lib/teuton/report/formatter/resume/html.rb +1 -1
  43. data/lib/teuton/report/formatter/resume/json.rb +3 -2
  44. data/lib/teuton/report/formatter/resume/yaml.rb +1 -1
  45. data/lib/teuton/report/report.rb +2 -2
  46. data/lib/teuton/utils/configfile_reader.rb +2 -1
  47. data/lib/teuton/version.rb +1 -1
  48. metadata +20 -16
  49. data/docs/install/manual.md +0 -41
  50. data/docs/install/vagrant_docker.md +0 -56
  51. /data/docs/{diagram.md → devel/diagram.md} +0 -0
@@ -30,7 +30,7 @@ Option B:
30
30
 
31
31
  If you don't know how to install Ruby on your system, execute this script to run automatical installation for your OS.
32
32
 
33
- **T-node GNU/Linux installation**
33
+ **GNU/Linux installation**
34
34
 
35
35
  Run this command as `root` user:
36
36
 
@@ -38,7 +38,7 @@ Run this command as `root` user:
38
38
  wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/t-node_install.sh | bash
39
39
  ```
40
40
 
41
- **T-node Windows installation**
41
+ **Windows installation**
42
42
 
43
43
  Requirements:
44
44
  * Windows 7+ / Windows Server 2003+
@@ -50,7 +50,7 @@ Run this command on **PowerShell (PS)** as `Administrator` user:
50
50
  Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/install/windows/t-node_install.ps1'))
51
51
  ```
52
52
 
53
- **T-node Mac OS X installation**
53
+ **Mac OS X installation**
54
54
 
55
55
  Run this command as admin user (member of `admin` group):
56
56
 
@@ -58,14 +58,83 @@ Run this command as admin user (member of `admin` group):
58
58
  curl -sL https://raw.githubusercontent.com/teuton-software/teuton/master/install/mac/t-node_install.sh | bash
59
59
  ```
60
60
 
61
- # 4. Vagrant/Docker
61
+ # 4. Vagrant and Docker installation
62
62
 
63
63
  Choose this way if you plan to install Teuton into virtual machines or containers, and you are familiar with Vagrant and Docker technologies.
64
64
 
65
- [Installation using Vagrant or Docker](vagrant_docker.md)
65
+ ## 4.1 Install using Vagrant
66
+
67
+ * First, install `Vagrant` and `VirtualBox` on your host.
68
+ * Create directory for vagrant project. For example, `mkdir teuton-vagrant`.
69
+ * Move into that directory: `cd teuton-vagrant`.
70
+ * Choose and download [Vagrantfile](../../install/vagrant).
71
+ * Run `vagrant up` to create your Virtual Machine.
72
+
73
+ ## 4.2 Install using Docker
74
+
75
+ First:
76
+ * Install `docker` on your host.
77
+
78
+ Second, choose:
79
+ * Pulling docker image from remote or
80
+ * Rebuild local docker image.
81
+
82
+ ## 4.2 Pulling docker images from remote
83
+
84
+ Run this command to pull **dvarrui/teuton** image from Docker Hub and create "teuton" container:
85
+
86
+ `docker run --name teuton -v /home/teuton -i -t dvarrui/teuton /bin/bash`
87
+
88
+ ## 4.2 Rebuild local docker image
89
+
90
+ 1. Create Dockerfile like this:
91
+
92
+ ```
93
+ FROM debian:latest
94
+
95
+ MAINTAINER teuton 2.1
96
+
97
+ RUN apt-get update
98
+ RUN apt-get install -y apt-utils
99
+ RUN apt-get install -y vim tree
100
+ RUN apt-get install -y ruby
101
+ RUN gem install teuton
102
+ RUN mkdir /home/teuton
103
+
104
+ EXPOSE 80
105
+
106
+ WORKDIR /home/teuton
107
+ CMD ["/bin/bash"]
108
+ ```
109
+
110
+ 1. Build local docker image **dvarrui/teuton** with `docker build -t dvarrui/teuton .`
111
+ 1. Create **teuton** container with `docker run --name teuton -v /home/teuton -i -t dvarrui/teuton /bin/bash`.
112
+
113
+ > Notice `/home/teuton` folder is persistent volume.
66
114
 
67
115
  # 5. Source code
68
116
 
69
117
  If you want to install Teuton by your own, or there are not installation scripts for your OS, and you don't want to use Vagrant then... here you have information how to install all the required packages for Teuton.
70
118
 
71
- [Manual installation](manual.md)
119
+ Manual installation:
120
+ 1. Git installation
121
+ * Install Git.
122
+ * Run `git --version` to show current version
123
+ 1. Ruby installation
124
+ * Install ruby.
125
+ * Run `ruby -v` to show current version (2.1.3p242+)
126
+ 1. Rake installation
127
+ * Run `gem install rake`, then
128
+ * `rake --version` to show current version (10.4.2+).
129
+ 1. Download this project
130
+ * (a) `git clone https://github.com/dvarrui/teuton.git` or
131
+ * (b) Download and unzip [file](https://github.com/dvarrui/teuton-panel/archive/master.zip).
132
+ 1. Move into Teuton folder
133
+ * Run `cd teuton`
134
+ 1. Gems installation.
135
+ * `rake install:gems`, to install required gems.
136
+ 1. Only for developers
137
+ * Run `rake install:debian` or
138
+ * `rake install:opensuse`, install gem for developers.
139
+ 1. Final check
140
+ * `rake`
@@ -2,10 +2,11 @@
2
2
 
3
3
  # target
4
4
 
5
- A [target](../dsl/target.md) is a feature you want to check. Targets are defined into `group` sections and every evaluation has 3 parts:
5
+ A [target](../dsl/target.md) is a feature you want to check. Targets are defined into `group` sections.
6
6
 
7
7
  ## Target definition
8
8
 
9
+ Every evaluation has 3 parts:
9
10
  * [target](dsl/target.md): Description of the element to be tested.
10
11
  * [run](../dsl/run.md): Execute a command `id obiwan` on localhost.
11
12
  * [expect](../dsl/expect.md): Verify that the result contains expected value.
@@ -32,7 +33,7 @@ When the user exists, we expect this words: `uid=, (obiwan), gid=`.
32
33
  uid=1000(obiwan) gid=1000(obiwan) grupos=1000(obiwan)
33
34
  ```
34
35
 
35
- But when user does not exist, we expect different words: `id:, vader, no exist`.
36
+ But when user does not exist, we expect command fail.
36
37
 
37
38
  ```
38
39
  > id vader
@@ -55,7 +55,7 @@ class Case
55
55
  key2 = @ialias[words[0].to_sym]
56
56
  return "NODATA" unless key2
57
57
 
58
- get("#{key2}_#{words[1]}".to_sym, level)
58
+ get(:"#{key2}_#{words[1]}", level)
59
59
  end
60
60
 
61
61
  def search_array_alias(keys, level)
@@ -23,7 +23,7 @@ module DSL
23
23
  @action_counter += 1
24
24
  @action[:id] = @action_counter
25
25
  if @result.exitcode < 0
26
- # When exitcode is less than zero, it is because there has been
26
+ # When exitcode is less than zero, it is because there has been
27
27
  # an error in the remote connection (SSH or Telnet)
28
28
  @action[:check] = false
29
29
  @action[:result] = @action[:output]
@@ -38,8 +38,8 @@ class ExpectSequence
38
38
 
39
39
  def find_best_state
40
40
  @states.each do |state|
41
- state[:score] = (state[:steps].select { _1 }).size
42
- state[:fails] = (state[:steps].select { !_1 }).size
41
+ state[:score] = state[:steps].select { it }.size
42
+ state[:fails] = state[:steps].select { !it }.size
43
43
  state[:ok] = (state[:fails] == 0)
44
44
  end
45
45
  best = @states[0]
@@ -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
@@ -4,6 +4,6 @@ module DSL
4
4
  def unique(key, value)
5
5
  return if value.nil?
6
6
 
7
- @uniques << "#{key}=#{value}".to_sym
7
+ @uniques << :"#{key}=#{value}"
8
8
  end
9
9
  end
@@ -41,8 +41,8 @@ class ExecuteBase
41
41
 
42
42
  # TODO: text.gsub!('\r', '')
43
43
  if [:default, "UTF-8"].include? encoding
44
- text.encode!("UTF-8", invalid: :replace, :undef => :replace, :replace => '')
45
- return text.split("\n")
44
+ text.encode!("UTF-8", invalid: :replace, undef: :replace, replace: "")
45
+ return text.split("\n")
46
46
  end
47
47
 
48
48
  # Convert text from input ENCODING to UTF-8
@@ -31,8 +31,8 @@ class ExecuteManager
31
31
  end
32
32
 
33
33
  def run_on(host)
34
- protocol = config.get("#{host}_protocol".to_sym)
35
- ip = config.get("#{host}_ip".to_sym)
34
+ protocol = config.get(:"#{host}_protocol")
35
+ ip = config.get(:"#{host}_ip")
36
36
 
37
37
  if protocol.to_s.downcase == "local" || host.to_s == "localhost"
38
38
  # Protocol force => local
@@ -9,24 +9,24 @@ class ExecuteSSH < ExecuteBase
9
9
  def call(input_hostname)
10
10
  action[:conn_type] = :ssh
11
11
  hostname = input_hostname.to_s
12
- ip = config.get("#{hostname}_ip".to_sym).to_s
13
- username = config.get("#{hostname}_username".to_sym).to_s
14
- password = config.get("#{hostname}_password".to_sym).to_s
15
- port = config.get("#{hostname}_port".to_sym).to_i
12
+ ip = config.get(:"#{hostname}_ip").to_s
13
+ username = config.get(:"#{hostname}_username").to_s
14
+ password = config.get(:"#{hostname}_password").to_s
15
+ port = config.get(:"#{hostname}_port").to_i
16
16
  port = 22 if port.zero?
17
17
 
18
- unless config.get("#{hostname}_route".to_sym) == "NODATA"
18
+ unless config.get(:"#{hostname}_route") == "NODATA"
19
19
  # Reconfigure command with gateway. Example host1_route: IP.
20
20
  # hostname2 = hostname ¿not used?
21
21
  ip2 = ip
22
22
  username2 = username
23
23
  password2 = password
24
24
  command2 = action[:command]
25
- hostname = config.get("#{hostname}_route".to_sym)
26
- ip = config.get("#{hostname}_ip".to_sym).to_s
27
- username = config.get("#{hostname}_username".to_sym).to_s
28
- password = config.get("#{hostname}_password".to_sym).to_s
29
- ostype = config.get("#{hostname}_ostype".to_sym).to_s
25
+ hostname = config.get(:"#{hostname}_route")
26
+ ip = config.get(:"#{hostname}_ip").to_s
27
+ username = config.get(:"#{hostname}_username").to_s
28
+ password = config.get(:"#{hostname}_password").to_s
29
+ ostype = config.get(:"#{hostname}_ostype").to_s
30
30
 
31
31
  action[:command] = if ostype.downcase.start_with? "win"
32
32
  "echo y | plink #{username2}@#{ip2} -ssh -pw #{password2} \"#{command2}\""
@@ -12,7 +12,7 @@ class ExecuteTelnet < ExecuteBase
12
12
  port = config.get((hostname + "_port").to_sym)
13
13
  mode = true
14
14
  if port.to_i == 0
15
- port = "23"
15
+ port = "23"
16
16
  mode = false
17
17
  end
18
18
  text = ""
@@ -34,11 +34,11 @@ class Case
34
34
 
35
35
  def init(id)
36
36
  @id = id.to_sym
37
- @ip = @config.get("#{@id}_ip".to_sym).to_s
38
- @username = @config.get("#{@id}_username".to_sym).to_s
39
- @password = @config.get("#{@id}_password".to_sym).to_s
37
+ @ip = @config.get(:"#{@id}_ip").to_s
38
+ @username = @config.get(:"#{@id}_username").to_s
39
+ @password = @config.get(:"#{@id}_password").to_s
40
40
 
41
- @protocol = @config.get("#{@id}_protocol".to_sym).to_s.downcase
41
+ @protocol = @config.get(:"#{@id}_protocol").to_s.downcase
42
42
  if @protocol == "nodata"
43
43
  @protocol = if @ip == "localhost" || @ip.start_with?("127.0.0.")
44
44
  "local"
@@ -47,12 +47,12 @@ class Case
47
47
  end
48
48
  end
49
49
 
50
- @port = @config.get("#{@id}_port".to_sym).to_i
50
+ @port = @config.get(:"#{@id}_port").to_i
51
51
  if @port.zero?
52
52
  default = {"local" => 0, "ssh" => 22, "telnet" => 23}
53
53
  @port = default[@protocol]
54
54
  end
55
- @route = @config.get("#{@id}_route".to_sym)
55
+ @route = @config.get(:"#{@id}_route")
56
56
  end
57
57
 
58
58
  def init_default
@@ -20,6 +20,7 @@ require_relative "utils"
20
20
  class CaseManager
21
21
  include Utils
22
22
  include Verbose
23
+
23
24
  attr_reader :report, :cases
24
25
 
25
26
  def initialize
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rainbow"
4
+ require_relative "../utils/project"
4
5
 
5
6
  ##
6
7
  # Execute "export" order: Export every case report
@@ -57,13 +58,20 @@ class ExportManager
57
58
  ##
58
59
  # Preserve output files for current project execution
59
60
  def preserve_files
60
- app = Application.instance
61
+ srcdir = File.join(
62
+ Project.value[:output_basedir],
63
+ Project.value[:test_name]
64
+ )
65
+
61
66
  t = Time.now
62
- data = {year: t.year, month: t.month, day: t.day, hour: t.hour, min: t.min, sec: t.sec}
67
+ data = {
68
+ year: t.year, month: t.month, day: t.day,
69
+ hour: t.hour, min: t.min, sec: t.sec
70
+ }
63
71
  subdir = format("%<year>s%<month>02d%<day>02d-" \
64
72
  "%<hour>02d%<min>02d%<sec>02d", data)
65
- logdir = File.join(app.output_basedir, app.global[:tt_testname], subdir)
66
- srcdir = File.join(app.output_basedir, app.global[:tt_testname])
73
+ logdir = File.join(srcdir, subdir)
74
+
67
75
  puts "[INFO] Preserving files => #{logdir}"
68
76
  FileUtils.mkdir(logdir)
69
77
  Dir.glob(File.join(srcdir, "**.*")).each { |file| FileUtils.cp(file, logdir) }
@@ -26,7 +26,7 @@ class CaseManager
26
26
  @report.tail[:finish_time] = finish_time
27
27
  @report.tail[:duration] = finish_time - start_time
28
28
 
29
- duration = format("%3.3f", (finish_time - start_time))
29
+ duration = format("%3.3f", finish_time - start_time)
30
30
  verboseln Rainbow("\nFinished in #{duration} seconds").green
31
31
  verboseln Rainbow("-" * 36).green
32
32
  verboseln " "
@@ -1,6 +1,5 @@
1
1
  require "rainbow"
2
2
  require "terminal-table"
3
- # require_relative "../utils/application"
4
3
  require_relative "../utils/project"
5
4
 
6
5
  # | Verbosity level | Description |
@@ -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
 
@@ -61,7 +61,7 @@ class ShowCheck
61
61
  end
62
62
  if Project.value[:macros].size.positive?
63
63
  st.add_row ["Macros", Project.value[:macros].size]
64
- Project.value[:macros].each_key { st.add_row ["", _1] }
64
+ Project.value[:macros].each_key { st.add_row ["", it] }
65
65
  end
66
66
  st.add_row ["Groups", @stats[:groups]]
67
67
  st.add_row ["Targets", @stats[:targets]]
@@ -87,11 +87,11 @@ class ShowCheck
87
87
 
88
88
  if @stats[:sets].size.positive?
89
89
  st.add_row ["Sets", @stats[:sets].size]
90
- @stats[:sets].each { st.add_row ["", _1] }
90
+ @stats[:sets].each { st.add_row ["", it] }
91
91
  end
92
92
  if @stats[:uploads].size.positive?
93
93
  st.add_row ["Uploads", @stats[:uploads].size]
94
- @stats[:uploads].each { st.add_row ["", _1] }
94
+ @stats[:uploads].each { st.add_row ["", it] }
95
95
  end
96
96
  end
97
97
  Logger.info my_screen_table.to_s + "\n"
@@ -114,7 +114,7 @@ class ShowCheck
114
114
  script_vars << k.to_s + "_password"
115
115
  end
116
116
  end
117
- @stats[:gets].keys.each { script_vars << _1 }
117
+ @stats[:gets].keys.each { script_vars << it }
118
118
  script_vars
119
119
  end
120
120
  end
@@ -9,8 +9,8 @@ class Case
9
9
  # READ: @config
10
10
  # WRITE: @action, @result, @session
11
11
  def run_cmd_on(host)
12
- protocol = @config.get("#{host}_protocol".to_sym)
13
- ip = @config.get("#{host}_ip".to_sym)
12
+ protocol = @config.get(:"#{host}_protocol")
13
+ ip = @config.get(:"#{host}_ip")
14
14
 
15
15
  if protocol.to_s.downcase == "local" || host.to_s == "localhost"
16
16
  # Protocol force => local
@@ -59,24 +59,24 @@ class Case
59
59
  def run_cmd_remote_ssh(input_hostname)
60
60
  @action[:conn_type] = :ssh
61
61
  hostname = input_hostname.to_s
62
- ip = @config.get("#{hostname}_ip".to_sym).to_s
63
- username = @config.get("#{hostname}_username".to_sym).to_s
64
- password = @config.get("#{hostname}_password".to_sym).to_s
65
- port = @config.get("#{hostname}_port".to_sym).to_i
62
+ ip = @config.get(:"#{hostname}_ip").to_s
63
+ username = @config.get(:"#{hostname}_username").to_s
64
+ password = @config.get(:"#{hostname}_password").to_s
65
+ port = @config.get(:"#{hostname}_port").to_i
66
66
  port = 22 if port.zero?
67
67
 
68
- unless @config.get("#{hostname}_route".to_sym) == "NODATA"
68
+ unless @config.get(:"#{hostname}_route") == "NODATA"
69
69
  # Reconfigure command with gateway. Example host1_route: IP.
70
70
  # hostname2 = hostname ¿not used?
71
71
  ip2 = ip
72
72
  username2 = username
73
73
  password2 = password
74
74
  command2 = @action[:command]
75
- hostname = @config.get("#{hostname}_route".to_sym)
76
- ip = @config.get("#{hostname}_ip".to_sym).to_s
77
- username = @config.get("#{hostname}_username".to_sym).to_s
78
- password = @config.get("#{hostname}_password".to_sym).to_s
79
- ostype = @config.get("#{hostname}_ostype".to_sym).to_s
75
+ hostname = @config.get(:"#{hostname}_route")
76
+ ip = @config.get(:"#{hostname}_ip").to_s
77
+ username = @config.get(:"#{hostname}_username").to_s
78
+ password = @config.get(:"#{hostname}_password").to_s
79
+ ostype = @config.get(:"#{hostname}_ostype").to_s
80
80
 
81
81
  @action[:command] = if ostype.downcase.start_with? "win"
82
82
  "echo y | plink #{username2}@#{ip2} -ssh -pw #{password2} \"#{command2}\""
@@ -14,11 +14,11 @@ module ReadmeDSL
14
14
  def gett(value)
15
15
  a = get(value)
16
16
  if @cases_params.include? value
17
- "[#{value}](#required-params)"
17
+ "[" + value + "](#required-params)"
18
18
  elsif @setted_params[value]
19
- "[#{value}](#created-params)"
19
+ "[" + value + "](#created-params)"
20
20
  elsif @global_params.include? value
21
- "[#{a}](#global-params)"
21
+ "[" + a + "](#global-params)"
22
22
  end
23
23
  a
24
24
  end
@@ -2,21 +2,21 @@ module ReadmeDSL
2
2
  def goto(host = :localhost, args = {})
3
3
  unless host == :localhost
4
4
  b = {}
5
- a = "#{host}_ip".to_sym
5
+ a = :"#{host}_ip"
6
6
  if @config[:global][a].nil? && !@setted_params.include?(a)
7
7
  @cases_params << a
8
8
  end
9
9
  b[:ip] = @config[:global][a] if @config[:global][a]
10
10
  b[:ip] = @setted_params[a] if @setted_params[a]
11
11
 
12
- a = "#{host}_username".to_sym
12
+ a = :"#{host}_username"
13
13
  if @config[:global][a].nil? && !@setted_params.include?(a)
14
14
  @cases_params << a
15
15
  end
16
16
  b[:username] = @config[:global][a] if @config[:global][a]
17
17
  b[:username] = @setted_params[a] if @setted_params[a]
18
18
 
19
- a = "#{host}_password".to_sym
19
+ a = :"#{host}_password"
20
20
  if @config[:global][a].nil? && !@setted_params.include?(a)
21
21
  @cases_params << a
22
22
  end
@@ -10,6 +10,7 @@ require_relative "result"
10
10
  class Readme
11
11
  include DSL
12
12
  include ReadmeDSL
13
+
13
14
  attr_reader :result
14
15
  attr_reader :data
15
16
 
@@ -3,7 +3,7 @@ require_relative "../../../utils/project"
3
3
 
4
4
  class ArrayFormatter < BaseFormatter
5
5
  def initialize(report)
6
- super(report)
6
+ super
7
7
  @data = {}
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ require_relative "yaml"
3
3
 
4
4
  class HTMLFormatter < YAMLFormatter
5
5
  def initialize(report)
6
- super(report)
6
+ super
7
7
  @ext = "html"
8
8
  @data = {}
9
9
  basedir = File.join(File.dirname(__FILE__), "..", "..", "..")
@@ -1,9 +1,10 @@
1
- require "json/pure"
1
+ # require "json/pure"
2
+ require "json"
2
3
  require_relative "array"
3
4
 
4
5
  class JSONFormatter < ArrayFormatter
5
6
  def initialize(report)
6
- super(report)
7
+ super
7
8
  @ext = "json"
8
9
  end
9
10
 
@@ -3,7 +3,7 @@ require_relative "../../../version"
3
3
 
4
4
  class XMLFormatter < BaseFormatter
5
5
  def initialize(report)
6
- super(report)
6
+ super
7
7
  @ext = "xml"
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ require_relative "array"
3
3
 
4
4
  class YAMLFormatter < ArrayFormatter
5
5
  def initialize(report)
6
- super(report)
6
+ super
7
7
  @ext = "yaml"
8
8
  end
9
9
 
@@ -2,7 +2,7 @@ require_relative "resume/array"
2
2
 
3
3
  class MoodleCSVFormatter < ResumeArrayFormatter
4
4
  def initialize(report)
5
- super(report)
5
+ super
6
6
  @ext = "csv"
7
7
  @data = {}
8
8
  end
@@ -3,7 +3,7 @@ require_relative "../../../utils/project"
3
3
 
4
4
  class ResumeArrayFormatter < BaseFormatter
5
5
  def initialize(report)
6
- super(report)
6
+ super
7
7
  @data = {}
8
8
  end
9
9
 
@@ -4,7 +4,7 @@ require_relative "yaml"
4
4
 
5
5
  class ResumeHTMLFormatter < ResumeYAMLFormatter
6
6
  def initialize(report)
7
- super(report)
7
+ super
8
8
  @ext = "html"
9
9
  @data = {}
10
10
  basedir = File.join(File.dirname(__FILE__), "..", "..", "..")
@@ -1,9 +1,10 @@
1
- require "json/pure"
1
+ # require "json/pure"
2
+ require "json"
2
3
  require_relative "array"
3
4
 
4
5
  class ResumeJSONFormatter < ResumeArrayFormatter
5
6
  def initialize(report)
6
- super(report)
7
+ super
7
8
  @ext = "json"
8
9
  @data = {}
9
10
  end
@@ -2,7 +2,7 @@ require_relative "array"
2
2
 
3
3
  class ResumeYAMLFormatter < ResumeArrayFormatter
4
4
  def initialize(report)
5
- super(report)
5
+ super
6
6
  @ext = "yaml"
7
7
  @data = {}
8
8
  end
@@ -28,7 +28,7 @@ class Report
28
28
  report = Report.new
29
29
  attrs = %i[id filename output_dir head lines tail format]
30
30
  attrs.each do |attr|
31
- attr_set = "#{attr}=".to_sym
31
+ attr_set = :"#{attr}="
32
32
  report.send(attr_set, send(attr).clone)
33
33
  end
34
34
 
@@ -42,7 +42,7 @@ class Report
42
42
 
43
43
  def export_resume(options)
44
44
  format = options[:format]
45
- @format = "resume_#{format}".to_sym
45
+ @format = :"resume_#{format}"
46
46
  options[:format] = @format
47
47
  filepath = File.join(@output_dir, @filename)
48
48
  Formatter.call(self, options, filepath)
@@ -1,5 +1,6 @@
1
+ # require "json/pure"
2
+ require "json"
1
3
  require "yaml"
2
- require "json/pure"
3
4
 
4
5
  ##
5
6
  # Functions that read data from ConfigFile using YAML or JSON formats
@@ -1,5 +1,5 @@
1
1
  module Teuton
2
- VERSION = "2.9.4"
2
+ VERSION = "2.9.6"
3
3
  APPNAME = "teuton"
4
4
  GEMNAME = "teuton"
5
5
  DOCKERNAME = "dvarrui/#{GEMNAME}"