TheProlog / prolog-use_cases

Use-case layer for Meldd/Prolog application.
0 stars 0 forks source link

DRY up Proposed Contribution Response classes #59

Open jdickey opened 8 years ago

jdickey commented 8 years ago

As of Commit 1fda588, we have use cases for the Author of an Article to either Accept or Reject a Proposed Contribution. Quoting that commit's commit message:

Proposed Contribution Accept/Reject are almost identical.

Only differences:

  • Class of entity created;
  • Value of :response in Hash returned by :result_params;
  • Implementation of #updated_body.

There's a clean, (at least nearly) stateless, way to DRY up these two use-case classes, but we haven't been able to see it; at least not yet. On the other hand, we now have the three use cases formerly collectively known as "Respond to a Single Proposed Contribution" (namely, Authorise Contribution Response, Accept Single Proposed Contribution, and Reject Single Proposed Contribution). We've fiddled while calendar Rome burned for far more than "long enough"; we'll open an issue for The Glorious Future reminding us that this code isn't as DRY as we'd like, and then ship the mess.

PRs absolutely welcomed.