Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Dean Wampler
V0.3.1 Released [ reply ]  
2008-01-29 15:32
== Version 0.3.1

V0.3.1 adds numerous performance improvements, especially in the RSpec suite, and some minor API additions.

Bug fixes:
N.A.

Enhancements:
14447 Unify internal handling of reporting errors to the user
17514 Provide an Aquarium library-wide logger with configuration parameters and instance overrides
17515 Add an optional warning if an aspect doesn't match any join points
17516 Remove unnecessary examples that use :types_and_descendents to shorten time to run the RSpec suite
17565 JoinPoint.new should convert a type name, symbol, or regex to the type and only allow one type

These first two enhancements are related. There is a now an Aquarium::Utils::DefaultLogger
module with static accessors for getting and setting the "system-wide" logger.

When instance-level overrides are necessary, the Aquarium::Utils::OptionsUtils provides
"universal" options (but currently used only by Aspect and Pointcut) for specifying a logger
(with the new :logger parameter), or alternatively, specifying just the output stream
(:logger_stream) and/or the severity (:severity, one of the standard library's
Logger::Severity-defined constants). If either of the latter two options is specified, a
separate logger instance is created, rather than changing parameters for the global logger.

OptionsUtils also supports a :noop parameter, which classes interpret to mean do none (or
perhaps only some) of the processing. Useful for debugging.

#17515 adds a helpful warning to the system (or aspect-instance's) logger if an aspect
matches no join points. This warning will be suppressed if (i) the severity level for the
logger is above WARN or (ii) the aspect was created with the option
:ignore_no_matching_join_points => true.

#17516 fixes halved the long execution times for the whole RSpec suite by refactoring some examples
that used type finders with the :types_and_descendents option unnecessarily. It is a very intensive
computation! Note that I stubbed out these calls using an aspect with around advise, a useful
"development-time" aspect. See Aquarium::TypeUtilsStub (in spec_example_types.rb) and how it's used
in pointcut_spec.rb. Using this technique and other optimizations, the time to run the suite was
reduced from ~5 minutes to about 1 minute.

#17565 fixes a "hole" in JoinPoint, where it doesn't confirm that a specified type string, symbol
or regex matches a class that exists and only one class. Now it does and it stores the type, rather
than the original "specification" for it.