Sha256: cb9b939b9a840e1696bfce57e7ff26468fa7e6b130587c394f629f147fe27e47
Contents?: true
Size: 1.78 KB
Versions: 1
Compression:
Stored size: 1.78 KB
Contents
require "praegustator/version" require 'praegustator/cli' require 'praegustator/executor' require 'praegustator/test_suite' require 'praegustator/dsl' require 'praegustator/wrappers/chef' require 'praegustator/node' require 'praegustator/setup' require 'yaml' require 'colorize' module Praegustator @config = { 'log_level' => 'info', 'search_driver' => 'chef', 'chef' => { 'knife_location' => ENV['KNIFE_PATH'] || "~/.chef/knife.rb" }, 'spec' => { 'backend' => 'serverspec', 'recipes_dir' => 'spec/', 'checks_dir' => 'spec/shared', }, 'ssh' => { 'user' => 'root', 'pasword' => nil, 'keys' => [] } } def self.configure_with(path_to_yaml_file) begin config = YAML::load(IO.read(path_to_yaml_file)) rescue Psych::SyntaxError p "error while parsing yaml configuration file. using defaults."; return rescue Errno::ENOENT p "yaml configuration file couldn't be found. using defaults."; return end configure(config) if config end def self.config @config end private def self.configure(opts = {}) valid_keys = @config.keys opts.each {|k,v| @config[k] = v if valid_keys.include? k} end end module RSpec module Core class Runner def self.run_patched(args, err=$stderr, out=$stdout) trap_interrupt options = ConfigurationOptions.new(args) options.parse_options if options.options[:drb] require 'rspec/core/drb_command_line' begin DRbCommandLine.new(options).run(err, out) rescue DRb::DRbConnError CommandLine.new(options).run(err, out) end else CommandLine.new(options).run(err, out) end ensure #RSpec.reset end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
praegustator-0.2.0 | lib/praegustator.rb |