-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor mockup generate to load external gem generators #17
Conversation
This change makes it possible to load additional generators by subclassing HtmlMockup::Generators::Base
Since we have never supported these versions, we can allow_failures there.
Quite some additional commits besides commit 8fe2b91, mainly because I had to find out (and experience) how travis ci works. We now have some basic testing in place, while not directly necessary we could increase our coverage over time. Perhaps we should squash those commits? |
While previously we relied on the inherited function, I removed this since it wasn't possible to read out the arguments and description of the class, making decorating it for the help text very hard.
Some extra elaboration, in ended up using a register function. Which has to be called after the class is declared, as can be seen e939bc3#diff-41b457dc0c1d9d7dfa9580bba5723da6R23 This is required because when using inherited the class hasn't been parsed, and thus has no arguments or description we can read from thor. While we could use custom properties defining these, I don't believe this outweights the one line to register the class. I've tried working with an asynchronous loop, in which the I've added a generator to generate generators, at this point they cannot be loaded yet, but I guess we could use the Mockupfile for, we only have to create the context earlier in the CLI. See also #18. |
…d as there is no project yet
Refactor CLI and CLI/generators
This change makes it possible to load additional generators by subclassing HtmlMockup::Generators::Base