lib/tryouts.rb in tryouts-0.6.3 vs lib/tryouts.rb in tryouts-0.7.0

- old
+ new

@@ -30,22 +30,19 @@ class Exception < RuntimeError; end # = BadDreams # Raised when there is a problem loading or parsing a Tryouts::Drill::Dream object class BadDreams < Exception; end - VERSION = "0.6.3" + VERSION = "0.7.0" require 'tryouts/mixins' require 'tryouts/tryout' require 'tryouts/drill' + require 'tryouts/stats' require 'tryouts/orderedhash' HASH_TYPE = (RUBY_VERSION =~ /1.9/) ? ::Hash : Tryouts::OrderedHash - - TRYOUT_MSG = "\n %s " - DRILL_MSG = ' %-50s ' - DRILL_ERR = ' %s: ' # An Array of +_tryouts.rb+ file paths that have been loaded. @@loaded_files = [] # An Hash of Tryouts instances stored under the name of the Tryouts subclass. @@instances = HASH_TYPE.new @@ -140,11 +137,11 @@ @library = name.to_sym @dtype = :api $LOAD_PATH.unshift path unless path.nil? begin require @library.to_s - rescue SyntaxError, LoadError, Exception, + rescue SyntaxError, LoadError, Exception, TypeError, RuntimeError, NoMethodError, NameError => ex @errors << ex Tryouts.failed = true end end @@ -189,11 +186,11 @@ end # Process the rest of the DSL begin to.from_block block if block - rescue SyntaxError, LoadError, Exception, + rescue SyntaxError, LoadError, Exception, TypeError, RuntimeError, NoMethodError, NameError => ex @errors << ex Tryouts.failed = true end to @@ -250,10 +247,10 @@ if @@instances.has_key? to.group to = @@instances[to.group] to.instance_eval file_content, fpath end to.paths << fpath - rescue SyntaxError, LoadError, Exception, + rescue SyntaxError, LoadError, Exception, TypeError, RuntimeError, NoMethodError, NameError => ex to.errors << ex Tryouts.failed = true end @@instances[to.group] = to