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.



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

def initialize
  super()
  @type = :server
end

Instance Attribute Details

#daemonizeObject

Returns the value of attribute daemonize.



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

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

#json_cache_pathObject

Returns the value of attribute json_cache_path.



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

def json_cache_path
  @json_cache_path
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.



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

def pidfile
  @pidfile
end

#userObject

Returns the value of attribute user.



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

def user
  @user
end

Instance Method Details

#check_validityObject



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

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