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

move duplicate code to a single private method #6593

Merged
merged 3 commits into from Jan 29, 2018

Conversation

Projects
None yet
7 participants
@ashmaroli
Member

ashmaroli commented Dec 4, 2017

Just keeping things DRY..

@ashmaroli ashmaroli added the internal label Dec 4, 2017

@Crunch09

👍 for DRYing things up but i don't really like render_this as a name. What do you think of maybe regenerate_file instead?

@ashmaroli

This comment has been minimized.

Member

ashmaroli commented Dec 5, 2017

What do you think of maybe regenerate_file instead?

I don't like that since the primary calling is to render.. How about render_regenerated..?

@Crunch09

This comment has been minimized.

Member

Crunch09 commented Dec 5, 2017

@ashmaroli 👍

private
def render_regenerated(document, payload)
if regenerator.regenerate?(document)

This comment has been minimized.

@parkr

parkr Jan 14, 2018

Member

Let's use a guard clause here:

return unless regenerator.regenerate?(document)

document.output = ...
@DirtyF

DirtyF approved these changes Jan 29, 2018

@oe

oe approved these changes Jan 29, 2018

Concerns were addressed

@oe

This comment has been minimized.

Member

oe commented Jan 29, 2018

@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 8b72fa3 into jekyll:master Jan 29, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ashmaroli ashmaroli deleted the ashmaroli:DRY-render branch Jan 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment