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

Extract reflect_fields method to the repository #1914

Merged
merged 1 commit into from
Jul 25, 2018
Merged

Conversation

jcoyne
Copy link
Member

@jcoyne jcoyne commented Jun 27, 2018

This allows the repository to implement reflect_fields and allows us to
remove a conditional.

repository = repository_class.new(self)
repository.send_and_receive('admin/luke', params: { fl: '*', 'json.nl' => 'map' })['fields']
end
repository = repository_class.new(self)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you safely remove the condition around this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests seem to pass. I can think of no reason why we can't require repository implementations to implement this interface.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like @cbeer last touched this code, here: d75ff85

Thoughts on that, Chris?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a problem; I don't remember what the luke response looks like, but if we think something similar will work cross-repository, I don't see a problem with it.

Copy link
Member

@mjgiarlo mjgiarlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, overall. Have a question about removing a condition check.

end
end
end

def luke_fields
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename this method?

@coveralls
Copy link

coveralls commented Jul 10, 2018

Coverage Status

Coverage increased (+0.05%) to 94.737% when pulling 038e382 on reflect_fields into a9cc987 on master.

This allows the repository to implement reflect_fields and allows us to
remove a conditional.
@jkeck jkeck merged commit 490932e into master Jul 25, 2018
@jkeck jkeck deleted the reflect_fields branch July 25, 2018 14:29
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

5 participants