sevenwire/forgery — pull request #51 by adzap (2012-05-15 08:30:29+00:00)
Title: Simplify the design and consolidate

I don't really expect you to pull in my changes. But I wanted to raise awareness of what I have been doing and see if you are interested in some of it.

I think the approach of Forgery is right way to go vs. Faker. Allowing custom data and formats is key to this kind of tool. However I found many examples of unnecessary complexity and opportunities to reorganise the code. I think it results in cleaner, easier to understand design, with less code.

The extensions are my biggest peeve. I think it obfuscates the code terribly and is mostly unneeded from my naive perspective. I would like to see if they can be removed in favour of using custom methods in the Forgery class, which I am now calling a Forgery Tool class.

I have taken some license and made at least one possibly backwards incompatible change. Specifically, not wrapping the string result of the random array calls from the dictionaries and formats. I think it should be largely or completely unneeded, if helper methods on the class are used. Not very OO, but much cleaner and easier to understand, IMO.

Let me know what you think.