Skip to content

Use "uri" instead of "path" to reference feature files. #1179

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

brasmusson
Copy link
Contributor

Summary

Use "uri" instead of "path" to reference feature files, especially in public methods of classes in the api packages.

Details

"uri" is used in the Gherkin library to refer to feature files, and has also the advantage of that uri:s use the same separator, "/", on all platforms, whereas path:s use different separators, "/" on Unix/Linux and MacOS, but "" in Windows.

Technically we are abusing the uri concept by also using "uri"s defined relative the "current directory", an correct uri always define the scheme (file, http(s) etc), and are in case of the file scheme the absolute path on the host in question.

Motivation and Context

Consistency with the Gherkin library, enabling using the same output regardless of the platform.

For several releases Cucumber-JVM has regardless of platform used "/" when referencing to feature files, but internally the method name getPath() has been used to access this reference (which is a contradiction on Windows).

Types of changes

  • Bug fix (non-breaking change which fixes an issue) - no release external API is changed.
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Using "uri" is used in the Gherkin library, and has also the advantage
of that uri:s use the same separator, "/", on all platforms, whereas
path:s use different separators, "/" on Unix/Linux and MacOS, but "\"
in Windows.
@brasmusson brasmusson merged commit e01977a into master Jul 14, 2017
brasmusson added a commit that referenced this pull request Jul 14, 2017
@brasmusson brasmusson deleted the uri-instead-of-path branch July 14, 2017 17:34
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant