module Jasmine module CLI DEFAULTS = { 'spec_files' => [ '**/*[sS]pec.js' ], 'helpers' => [ 'helpers/**/*.js' ], 'spec_dir' => 'spec/javascripts', 'src_dir' => nil, 'stylesheets' => [], 'src_files' => [] } RUNNER = 'ext/jasmine-webkit-specrunner/jasmine-webkit-specrunner' DEFAULTS_FILE = '.jasmine-headless-webkit' GLOBAL_DEFAULTS_FILE = File.expand_path("~/#{DEFAULTS_FILE}") def process_jasmine_config(overrides = {}) DEFAULTS.merge(overrides) end def read_defaults_files! [ GLOBAL_DEFAULTS_FILE, DEFAULTS_FILE ].each do |file| if File.file?(file) File.readlines(file).collect { |line| line.strip.split(' ', 2) }.each(&@process_options) end end end def use_spec?(file) @spec_filter.empty? || @spec_filter.include?(file) end def jasmine_html_template(files) <<-HTML Jasmine Test Runner #{files.join("\n")} HTML end private def read_config_file(file) end end end