Skip to content
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

Delegate to MarriageAbroadDataQuery from MarriageAbroadCalculator #2316

Conversation

chrisroos
Copy link
Contributor

This has been superseded by PR #2346.

This was initially opened as WIP PR #2298.

My main motivation in this branch is to have a single object that encapsulates all the logic required by the marriage-abroad flow and views. I've updated the flow and views so that we always access methods on MarriageAbroadDataQuery via their wrapper methods on MarriageAbroadCalculator.

In PR #2298 I'd started to rename some of the methods in an attempt to better reflect their purpose. This was proving quite difficult so I'm now using the original MarrageAbroadDataQuery method names in most cases.

I think this is going to make it easier to make changes as I move
methods move from the `MarriageAbroadDataQuery` to the
`MarriageAbroadCalculator`.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
…ountry?

I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

Interestingly we have another, different, concept of Commonwealth
countries in `RegistrationsDataQuery`. I've made a separate note to
investigate that.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.

For reference, the `#ss_unknown_no_embassies?` method was introduced in
6a9a7b8.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
I want the `MarriageAbroadCalculator` to encapsulate all the logic
required by the flow and views. Delegating to the
`MarriageAbroadDataQuery` for this method is a step toward that goal.

I'm sure the name of this method can be improved but I'm not 100% sure
what it means at the moment, so the renaming will have to wait.
The _what_you_need_to_do partial doesn't use `data_query`.
All access of the `MarriageAbroadDataQuery` is now done via the
`MarriageAbroadCalculator` so we no longer need to instantiate this
`data_query` in the flow.
All regression tests are passing so I'm happy to update the checksum
data.

Updated using:

    $ rails r script/generate-checksums-for-smart-answer.rb \
    marriage-abroad
@floehopper floehopper self-assigned this Mar 1, 2016
@floehopper
Copy link
Contributor

Given that I originally reviewed #2298, I haven't reviewed this in as much detail - in fact I wasn't sure whether you wanted it to be reviewed. However, as far as I can see this looks good to me.

@floehopper floehopper added the LGTM label Mar 1, 2016
@chrisroos
Copy link
Contributor Author

Apologies for leaving this open for so long. I'm getting back to it now with the aim of getting it rebased and merged to master.

@chrisroos
Copy link
Contributor Author

Given that I originally reviewed #2298, I haven't reviewed this in as much detail - in fact I wasn't sure whether you wanted it to be reviewed. However, as far as I can see this looks good to me.

@floehopper: Thanks for reviewing this PR, and apologies for not being clearer that I wanted it reviewed again.

@chrisroos
Copy link
Contributor Author

I'm going to close this PR and then open a new PR now that I've rebased this branch on master.

@chrisroos chrisroos closed this Mar 9, 2016
@chrisroos chrisroos deleted the delegate-to-marriage-abroad-data-query-from-marriage-abroad-calculator branch March 9, 2016 00:23
@chrisroos
Copy link
Contributor Author

This has been superseded by PR #2346.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants