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
Update Ruby versions on Travis CI #30
Conversation
Hmm, quite a long list of failures on Ruby 2.6. I'll try to have a look. |
Hi @aried3r! Thanks for opening this PR. I haven't been very active on the project for a while but I can help get it working for Ruby 2.6. If you have any question or if you want to have a pairing session I'm available (French timezone though ^^). Cheers ! |
Ok, so some of the failures are indeed because of changes in Ruby 2.6. Ruby 2.6 includes version 1.1 of the The errors related to missing |
@aried3r The condition on Regarding the missing The only interrogation I have is if we should condition this method's definition with My pro argument is that it would prevent this method from being defined in earlier versions and thus prevent unwanted effects in users specs. My con argument is that no other method was conditioned by the current Ruby version before so I'm not sure it'd make sense to do it in this specific occasion. What's your opinion on that matter? |
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.
Some files could not be reviewed due to errors:
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout .rubocop.yml: Style/FileName has the wrong namespace - should be Naming .rubocop.yml: Style/PredicateName has the wrong namespace - should be Naming .rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Naming .rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead. (obsolete configuration found in .rubocop.yml, please update it) obsolete parameter MaxLineLength (for Style/IfUnlessModifier) found in .rubocop.yml `Style/IfUnlessModifier: MaxLineLength` has been removed. Use `Metrics/LineLength: Max` instead
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.
Some files could not be reviewed due to errors:
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout .rubocop.yml: Style/FileName has the wrong namespace - should be Naming .rubocop.yml: Style/PredicateName has the wrong namespace - should be Naming .rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Naming .rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead. (obsolete configuration found in .rubocop.yml, please update it) obsolete parameter MaxLineLength (for Style/IfUnlessModifier) found in .rubocop.yml `Style/IfUnlessModifier: MaxLineLength` has been removed. Use `Metrics/LineLength: Max` instead
Hey! Seems like I pushed some changes but never followed up here. So I added the necessary methods and also made them dependent on the Ruby version installed. WDYT? |
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.
@aried3r Thank you! I added some comments on the PR 😊
spec/memfs/dir_spec.rb
Outdated
if Gem::Requirement.new('>= 2.6').satisfied_by?(Gem::Version.new(RUBY_VERSION)) | ||
describe '.children' do | ||
it 'returns an array containing all of the filenames except for "." and ".."'\ | ||
'in this directory.' do |
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.
Don't worry about line length for specs descriptions. I exluded the spec files from rubocop to avoid having this weird cuts 😄
spec/memfs/dir_spec.rb
Outdated
end | ||
else | ||
describe '.children' do | ||
it 'raises and error' do |
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.
I think you meant an error
😊
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.
Good catch, thanks!
spec/memfs/dir_spec.rb
Outdated
if Gem::Requirement.new('>= 2.6').satisfied_by?(Gem::Version.new(RUBY_VERSION)) | ||
describe '.children' do | ||
it 'returns an array containing all of the filenames except for "." and ".."'\ | ||
'in this directory.' do |
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.
Don't worry about line length for specs descriptions. I excluded the spec files from rubocop to avoid having this weird cuts 😄
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.
Some files could not be reviewed due to errors:
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout .rubocop.yml: Style/FileName has the wrong namespace - should be Naming .rubocop.yml: Style/PredicateName has the wrong namespace - should be Naming .rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Naming .rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead. (obsolete configuration found in .rubocop.yml, please update it) obsolete parameter MaxLineLength (for Style/IfUnlessModifier) found in .rubocop.yml `Style/IfUnlessModifier: MaxLineLength` has been removed. Use `Metrics/LineLength: Max` instead
I knew I shouldn't have removed EOL Rubies and added Ruby 2.7 in one commit 😅 Now it gets interesting. In Ruby 2.7 https://docs.ruby-lang.org/en/2.7.0/File.html#method-c-extname |
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.
Some files could not be reviewed due to errors:
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout .rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout .rubocop.yml: Style/FileName has the wrong namespace - should be Naming .rubocop.yml: Style/PredicateName has the wrong namespace - should be Naming .rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Naming .rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead. (obsolete configuration found in .rubocop.yml, please update it) obsolete parameter MaxLineLength (for Style/IfUnlessModifier) found in .rubocop.yml `Style/IfUnlessModifier: MaxLineLength` has been removed. Use `Metrics/LineLength: Max` instead
I added the Ruby 2.7 behavior of |
@aried3r Thanks for your work on this! ❤️ |
Let's see if this just works :)