Class: VagrantPlugins::CommandLogs::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-logs/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



10
11
12
13
14
15
# File 'lib/vagrant-logs/config.rb', line 10

def initialize
  @log_files = UNSET_VALUE
  @lines = UNSET_VALUE
  @repositories_to_check = UNSET_VALUE
  @clients_to_check = UNSET_VALUE
end

Instance Attribute Details

#clients_to_checkObject

Returns the value of attribute clients_to_check.



7
8
9
# File 'lib/vagrant-logs/config.rb', line 7

def clients_to_check
  @clients_to_check
end

#linesObject

Returns the value of attribute lines.



5
6
7
# File 'lib/vagrant-logs/config.rb', line 5

def lines
  @lines
end

#log_filesObject

Returns the value of attribute log_files.



4
5
6
# File 'lib/vagrant-logs/config.rb', line 4

def log_files
  @log_files
end

#repositories_to_checkObject

Returns the value of attribute repositories_to_check.



6
7
8
# File 'lib/vagrant-logs/config.rb', line 6

def repositories_to_check
  @repositories_to_check
end

Instance Method Details

#finalize!Object



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/vagrant-logs/config.rb', line 17

def finalize!
  if @log_files == UNSET_VALUE
    @log_files = %w(/var/log/syslog /var/log/nginx/*log /var/log/php/*log .vagrant.d/data/landrush/log)
  end

  @lines = 50 if @lines == UNSET_VALUE

  config = Bib::Vagrant::Config.new
  @repositories_to_check = [config.get['cookbook_path']] || [] if @repositories_to_check == UNSET_VALUE

  @clients_to_check = ['vagrant', 'VBoxManage'] if @clients_to_check == UNSET_VALUE
end