Module: QED

Defined in:
lib/qed/document.rb,
lib/qed.rb,
lib/qed/demo.rb,
lib/qed/step.rb,
lib/qed/utils.rb,
lib/qed/scope.rb,
lib/qed/parser.rb,
lib/qed/cli/qed.rb,
lib/qed/qparser.rb,
lib/qed/session.rb,
lib/qed/settings.rb,
lib/qed/applique.rb,
lib/qed/configure.rb,
lib/qed/cli/qedoc.rb,
lib/qed/evaluator.rb,
lib/qed/reporter/tapy.rb,
lib/qed/reporter/html.rb,
lib/qed/document/markup.rb,
lib/qed/reporter/linear.rb,
lib/qed/reporter/abstract.rb,
lib/qed/reporter/verbatim.rb,
lib/qed/reporter/dotprogress.rb,
lib/qed/helpers/file_fixtures.rb

Overview

require 'nokogiri'

Defined Under Namespace

Modules: FileFixtures, Reporter, Utils Classes: Applique, Demo, Document, Evaluator, Parser, QuickParser, Scope, Session, Settings, Step, Template

Constant Summary

VERSION =

TODO: Only b/c of Ruby 1.8.x bug.

['version']
ROOT_PATTERN =

Glob pattern used to search for project's root directory.

'{.ruby*,.git/,.hg/,_darcs/}'
CONFIG_PATTERN =

Glob pattern for standard config file.

'{etc/qed.rb,config/qed.rb,Qedfile,.qed}'
HOME =

Home directory.

File.expand_path('~')

Class Method Summary (collapse)

Class Method Details

+ (Object) cli(*argv)



4
5
6
# File 'lib/qed/cli/qed.rb', line 4

def self.cli(*argv)
  Session.cli(*argv)
end

+ (Object) configure(name = nil, &block)



4
5
6
7
8
# File 'lib/qed/configure.rb', line 4

def self.configure(name=nil, &block)
  name = (name || 'default').to_s
  profiles[name] = block if block
  profiles[name]
end

+ (Object) const_missing(name)

Access to project metadata as constants.



12
13
14
15
# File 'lib/qed.rb', line 12

def self.const_missing(name)
  key = name.to_s.downcase
  [key] || super(name)
end

+ (Object) metadata

Access to project metadata.



4
5
6
7
8
9
# File 'lib/qed.rb', line 4

def self.
  @metadata ||= (
    require 'yaml'
    YAML.load(File.new(File.dirname(__FILE__) + '/qed.yml')) rescue {}
  )
end

+ (Object) profile(name = nil, &block)

Alias for configure.



11
12
13
# File 'lib/qed/configure.rb', line 11

def self.profile(name=nil, &block)
  configure(name, &block)
end

+ (Object) profiles



16
17
18
# File 'lib/qed/configure.rb', line 16

def self.profiles
  @profiles ||= {}
end

+ (Object) run!(name = nil, &block)



6
7
8
9
10
11
# File 'lib/qed/session.rb', line 6

def self.run!(name=nil, &block)
  configure(name, &block) if block
  session  = Session.new(:profile=>name)
  success  = session.run
  exit -1 unless success
end