realestate-com-au / stackup

a simple CLI and Ruby API for AWS CloudFormation
MIT License
97 stars 34 forks source link

Separate into "core" and "cli" gems? #12

Closed mdub closed 8 years ago

mdub commented 8 years ago

Some users might find the stackup CLI handy; others may just want to use the Stackup::Stack abstraction, without the overhead of the gems that support the CLI (clamp, diffy, multi_json).

Should we split this into separate gems? I was thinking:

@kunday? @lukeck?

lukeck commented 8 years ago

Sounds like a good idea but I think diffing templates should be part of the core API.

mdub commented 8 years ago

@lukeck Oh, really? The thing is, the way we "diff templates" is actually just to diff the JSON or YAML representations of the templates ... in other words, it's quite tightly bound to the "presentation" layer in the "stackup" CLI.

As a compromise, how about we extract the diff-ing so that it can be used programmatically, even if it is in the "cli" gem rather than the "core" gem?

lukeck commented 8 years ago

So why not just push that presentation layer down into the core too? It would be convenient to be able to have the JSON and YAML representations available when not using the CLI too.

mdub commented 8 years ago

@lukeck well, it undermines the purpose of the split; we'd have to pull the diffy gem into core.

Actually, I'm going off this whole split idea. All of the "extra" gems (clamp, console_logger, diffy, multi_json) and pretty small, and none bring additional dependencies, so we wouldn't win much.