wagn/wagn — pull request #166 by ethn (2014-03-27 22:49:41+00:00)
Title: Set loading

This looks like a bigger PR than it is.

The key change is that sets and set patterns are no longer loaded using class_eval, which made for difficult-to-read error messages and (perhaps more importantly) made all these files invisible to ruby's coverage tracking.

With this new code, we now generate a tmp file and require it.

A nice side effect is that we now do it with explicit nesting, which means you can be much more concise in your constant references where appropriate, eg this change in skin.rb:

-include Card::Set::Type::Pointer
+include Pointer

note that there is also some controller work in progress here; I haven't moved all the old admin controller functionality out yet. But all specs are passing (sigh)

Speaking of which, we now have numbers to work with in that domain:

All Files (82.14%)
Card (91.84%)
Set Patterns (92.13%)
Sets (72.48%)
Formats (88.89%)
Chunks (97.6%)
Ungrouped (66.22%)

after every spec or cucumber run you can see these numbers (and a lot more) at [gem root]/coverage/index.html