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

rubocop: features/step_definitions.rb #4956

Merged
merged 2 commits into from
Jun 3, 2016

Conversation

ayastreb
Copy link
Contributor

Fixes in features/step_definitions.rb
#4885

@@ -14,24 +14,24 @@

#

Given %r{^I have a blank site in "(.*)"$} do |path|
if !File.exist?(path)
Given(/^I have a blank site in "(.*)"$/) do |path|
Copy link
Contributor

Choose a reason for hiding this comment

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

This should still fail, we use %r!! over // or %r{}.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, actually it failed with %r!!, I guess because we have following in .rubocop.yml

Style/RegexpLiteral:
  EnforcedStyle: slashes

Should I change it to percent_r ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll digress to @parkr but we've been moving to %r!! all over the place.

Copy link
Member

Choose a reason for hiding this comment

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

Only when there is a literal / in the regex

Copy link
Member

Choose a reason for hiding this comment

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

Which is to say, /test/ is fine, but /test\// is ugly so in that case we use %r!test/! instead.

@envygeeks
Copy link
Contributor

Thanks! Just a few comments.

@pathawks
Copy link
Member

LGTM :shipit:

@parkr
Copy link
Member

parkr commented Jun 3, 2016

Thank you so much!

@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 5e30823 into jekyll:master Jun 3, 2016
jekyllbot added a commit that referenced this pull request Jun 3, 2016
@ayastreb ayastreb deleted the step_definitions branch June 3, 2016 07:16
@jekyll jekyll locked and limited conversation to collaborators Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants