Class: RRRSpec::Server::ServerConfiguration

Inherits:
Configuration
  • Object
show all
Defined in:
lib/rrrspec/server/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeServerConfiguration

Returns a new instance of ServerConfiguration.



12
13
14
15
# File 'lib/rrrspec/server/configuration.rb', line 12

def initialize
  super()
  @type = :server
end

Instance Attribute Details

#daemonizeObject

Returns the value of attribute daemonize.



8
9
10
# File 'lib/rrrspec/server/configuration.rb', line 8

def daemonize
  @daemonize
end

#execute_log_text_pathObject

Returns the value of attribute execute_log_text_path.



7
8
9
# File 'lib/rrrspec/server/configuration.rb', line 7

def execute_log_text_path
  @execute_log_text_path
end

#monitorObject

Returns the value of attribute monitor.



10
11
12
# File 'lib/rrrspec/server/configuration.rb', line 10

def monitor
  @monitor
end

#persistence_dbObject

Returns the value of attribute persistence_db.



6
7
8
# File 'lib/rrrspec/server/configuration.rb', line 6

def persistence_db
  @persistence_db
end

#pidfileObject

Returns the value of attribute pidfile.



8
9
10
# File 'lib/rrrspec/server/configuration.rb', line 8

def pidfile
  @pidfile
end

#stderr_pathObject

Returns the value of attribute stderr_path.



9
10
11
# File 'lib/rrrspec/server/configuration.rb', line 9

def stderr_path
  @stderr_path
end

#stdout_pathObject

Returns the value of attribute stdout_path.



9
10
11
# File 'lib/rrrspec/server/configuration.rb', line 9

def stdout_path
  @stdout_path
end

#userObject

Returns the value of attribute user.



8
9
10
# File 'lib/rrrspec/server/configuration.rb', line 8

def user
  @user
end

Instance Method Details

#check_validityObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/rrrspec/server/configuration.rb', line 17

def check_validity
  validity = super

  unless execute_log_text_path
    $stderr.puts('The path to save the log text should be set')
    validity = false
  end

  unless persistence_db
    $stderr.puts('The database options are not set')
    validity = false
  end

  validity
end