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

Use ruby's File::Separator rather than '/' as a default for directory_separator #1924

Merged
merged 2 commits into from
Jan 27, 2020

Conversation

swiknaba
Copy link
Contributor

@swiknaba swiknaba commented Jan 27, 2020

Issue#

No-Story

Description:

Replace '/' with File:: Separator from Ruby kernel as a default directory_separator for File.dir and File.file_name to be more OS-agnostic out of the box.
AFAIK, this constant should exist at least since Ruby 2.1.

Test:

from the guide:

Please add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, we need a test! We use Minitest in this project.

for my feeling, this is just a small refactoring, thus I did not explicitly add a test.

Running test locally:

# tests
1458 tests, 81210 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

# rubocop
427 files inspected, no offenses detected

@swiknaba swiknaba requested a review from koic January 27, 2020 14:07
Copy link
Member

@koic koic left a comment

Choose a reason for hiding this comment

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

This change seems to make sense 👍

@vbrazo vbrazo merged commit b1a327c into faker-ruby:master Jan 27, 2020
@vbrazo vbrazo added the Chores label Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants