Class: RRRSpec::Client::ClientConfiguration
- Inherits:
-
RRRSpec::Configuration
- Object
- RRRSpec::Configuration
- RRRSpec::Client::ClientConfiguration
- Defined in:
- lib/rrrspec/client/configuration.rb
Instance Attribute Summary collapse
-
#least_timeout_sec ⇒ Object
Returns the value of attribute least_timeout_sec.
-
#max_trials ⇒ Object
Returns the value of attribute max_trials.
-
#max_workers ⇒ Object
Returns the value of attribute max_workers.
-
#packaging_dir ⇒ Object
Returns the value of attribute packaging_dir.
-
#rrrspec_web_base ⇒ Object
Returns the value of attribute rrrspec_web_base.
-
#rsync_options ⇒ Object
Returns the value of attribute rsync_options.
-
#rsync_remote_path ⇒ Object
Returns the value of attribute rsync_remote_path.
-
#setup_command ⇒ Object
Returns the value of attribute setup_command.
-
#slave_command ⇒ Object
Returns the value of attribute slave_command.
- #spec_files ⇒ Object
-
#taskset_class ⇒ Object
Returns the value of attribute taskset_class.
-
#unknown_spec_timeout_sec ⇒ Object
Returns the value of attribute unknown_spec_timeout_sec.
-
#worker_type ⇒ Object
Returns the value of attribute worker_type.
Attributes inherited from RRRSpec::Configuration
Instance Method Summary collapse
- #check_validity ⇒ Object
-
#initialize ⇒ ClientConfiguration
constructor
A new instance of ClientConfiguration.
Methods inherited from RRRSpec::Configuration
Constructor Details
#initialize ⇒ ClientConfiguration
Returns a new instance of ClientConfiguration.
21 22 23 24 25 26 |
# File 'lib/rrrspec/client/configuration.rb', line 21 def initialize super() @type = :client @unknown_spec_timeout_sec = 5 * 60 @least_timeout_sec = 30 end |
Instance Attribute Details
#least_timeout_sec ⇒ Object
Returns the value of attribute least_timeout_sec.
11 12 13 |
# File 'lib/rrrspec/client/configuration.rb', line 11 def least_timeout_sec @least_timeout_sec end |
#max_trials ⇒ Object
Returns the value of attribute max_trials.
9 10 11 |
# File 'lib/rrrspec/client/configuration.rb', line 9 def max_trials @max_trials end |
#max_workers ⇒ Object
Returns the value of attribute max_workers.
9 10 11 |
# File 'lib/rrrspec/client/configuration.rb', line 9 def max_workers @max_workers end |
#packaging_dir ⇒ Object
Returns the value of attribute packaging_dir.
4 5 6 |
# File 'lib/rrrspec/client/configuration.rb', line 4 def packaging_dir @packaging_dir end |
#rrrspec_web_base ⇒ Object
Returns the value of attribute rrrspec_web_base.
10 11 12 |
# File 'lib/rrrspec/client/configuration.rb', line 10 def rrrspec_web_base @rrrspec_web_base end |
#rsync_options ⇒ Object
Returns the value of attribute rsync_options.
5 6 7 |
# File 'lib/rrrspec/client/configuration.rb', line 5 def @rsync_options end |
#rsync_remote_path ⇒ Object
Returns the value of attribute rsync_remote_path.
5 6 7 |
# File 'lib/rrrspec/client/configuration.rb', line 5 def rsync_remote_path @rsync_remote_path end |
#setup_command ⇒ Object
Returns the value of attribute setup_command.
7 8 9 |
# File 'lib/rrrspec/client/configuration.rb', line 7 def setup_command @setup_command end |
#slave_command ⇒ Object
Returns the value of attribute slave_command.
7 8 9 |
# File 'lib/rrrspec/client/configuration.rb', line 7 def slave_command @slave_command end |
#spec_files ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rrrspec/client/configuration.rb', line 13 def spec_files case @spec_files when Proc then @spec_files.call when String then [@spec_files] else @spec_files end end |
#taskset_class ⇒ Object
Returns the value of attribute taskset_class.
8 9 10 |
# File 'lib/rrrspec/client/configuration.rb', line 8 def taskset_class @taskset_class end |
#unknown_spec_timeout_sec ⇒ Object
Returns the value of attribute unknown_spec_timeout_sec.
11 12 13 |
# File 'lib/rrrspec/client/configuration.rb', line 11 def unknown_spec_timeout_sec @unknown_spec_timeout_sec end |
#worker_type ⇒ Object
Returns the value of attribute worker_type.
8 9 10 |
# File 'lib/rrrspec/client/configuration.rb', line 8 def worker_type @worker_type end |
Instance Method Details
#check_validity ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/rrrspec/client/configuration.rb', line 28 def check_validity validity = super unless Dir.exists?(packaging_dir) $stderr.puts("The packaging_dir does not exists: '#{packaging_dir}'") validity = false end unless spec_files.is_a?(Array) $stderr.puts("The spec_files should be an Array: '#{spec_files}'") validity = false else spec_files.each do |filepath| unless File.exists?(File.join(packaging_dir, filepath)) $stderr.puts("One of the spec_files does not exists '#{filepath}'") validity = false end end end unless max_workers.is_a?(Integer) $stderr.puts("The max_workers should be an Integer: '#{max_workers}'") validity = false else unless max_workers >= 1 $stderr.puts("The max_workers should not be less than 1: #{max_workers}") validity = false end end unless max_trials.is_a?(Integer) $stderr.puts("The max_trials should be an Integer: '#{max_trials}'") validity = false end unless taskset_class.is_a?(String) $stderr.puts("The taskset_class should be a String: '#{taskset_class}'") validity = false end unless unknown_spec_timeout_sec.is_a?(Integer) $stderr.puts("The unknown_spec_timeout_sec should be an Integer: '#{unknown_spec_timeout_sec}'") validity = false end unless least_timeout_sec.is_a?(Integer) $stderr.puts("The least_timeout_sec should be an Integer: '#{least_timeout_sec}'") validity = false end validity end |