lib/bib/vagrant/config.rb in bib-vagrant-0.0.1 vs lib/bib/vagrant/config.rb in bib-vagrant-0.0.2

- old
+ new

@@ -42,13 +42,16 @@ raise "Missing #{required_key}!" unless current_config_keys.include?(required_key) end errors = [] log_level = ['debug', 'info', 'warn', 'error', 'fatal'] + bool = [TrueClass, FalseClass] - errors << "nfs: must be a boolean" unless [TrueClass, FalseClass].include?(config['nfs'].class) - errors << "gui: must be a boolean" unless [TrueClass, FalseClass].include?(config['gui'].class) - errors << "cookbook_path: does not exist" unless File.directory?(config['cookbook_path']) + cookbook_path = File.expand_path(config['cookbook_path']) + + errors << "nfs: must be a boolean" unless bool.include?(config['nfs'].class) + errors << "gui: must be a boolean" unless bool.include?(config['gui'].class) + errors << "cookbook_path: does not exist" unless File.directory?(cookbook_path) errors << "chef_log_level: must be one of #{log_level.join}" unless log_level.include?(config['chef_log_level']) if !config['additional_json'].empty? errors << "additional_json: must be empty or valid json" unless is_valid_json?(config['additional_json']) end