-
Notifications
You must be signed in to change notification settings - Fork 40
Refactor GistTag #65
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
Refactor GistTag #65
Conversation
lib/jekyll-gist/gist_tag.rb
Outdated
@@ -47,6 +47,7 @@ def determine_arguments(input) | |||
end | |||
|
|||
# rubocop:disable Style/PreferredHashMethods | |||
# Remove the check for `:has_key?` when the plugin drops support for `< Liquid 4.0` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As https://pages.github.com/versions/ supports it, I'm fine with requiring Liquid 4.0.
That's up to someone from GitHub to decide.
/cc @parkr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, requiring Liquid 4 is fine by me, but give a major bump to this gem if you do that. For now, backwards compatibility is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@mattr-, @parkr I'd like to move the following regex to a jekyll-gist/lib/jekyll-gist/gist_tag.rb Line 49 in c74391b
|
I wouldn't bother moving it to a constant at all. Very little gain for that change when it's already in a method that describes what's going on. Moving the regexp to a constant makes it more important in the class than it is. That's not the class' main concern, so best to leave it hidden inside that method, IMO. |
For a PR that was only supposed to be about rubocop offenses, this is starting to get off track. Let's cap it off here and then do further work in other PRs if necessary. |
@mattr- It had stopped being about RuboCop offenses much before I renamed the PR title. But I agree, its time to defer any more changes. |
@jekyllbot: merge +dev |
GistTag#context_contains_key?
uses both:has_key?
andkey?
. So its effectively a stalemate.GistTag.client
is apublic_class_method
. It should be placed above theprivate
access modifierjekyll-gist/lib/jekyll-gist/gist_tag.rb
Line 97 in 1ca4a4d