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

Deprecate file creation when using append_to_file #781

Merged
merged 2 commits into from Jan 31, 2021

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Jan 24, 2021

Summary

Deprecate file creation when using #append_to_file

Details

This change makes #append_to_file check if the file exists. If it does not, a deprecation message is shown and the file is created. In Aruba 2.0, the deprecated behavior will be removed.

Motivation and Context

The #append_to_file method creates the file if it does not exist. In such cases, #create_file should be used instead.

See #726.

How Has This Been Tested?

The relevant cucumber scenario has been amended to check for the presence of the deprecation message.

Types of changes

  • Deprecation
  • Documentation update

Checklist:

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

@mvz mvz force-pushed the issue-726-deprecate-file-creation-when-appending branch from bc43ca4 to db3c021 Compare January 24, 2021 18:24
Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

A sensible approach.

Linting warns of a too-long module. Oh well.

@@ -26,7 +26,7 @@ Feature: Append content to file
When I run `cucumber`
Then the features should all pass

Scenario: Append to a non-existing file
Scenario: Append to a non-existing file (deprecated)
Copy link
Contributor

Choose a reason for hiding this comment

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

Question (not a sticking point)

Is this the format we'll be doing in features for deprecated stuff? We can copy to other repos if desired.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's clear this way, but maybe there are other options.

@mvz mvz force-pushed the issue-726-deprecate-file-creation-when-appending branch from db3c021 to 9298b84 Compare January 31, 2021 12:19
@mvz mvz merged commit 7e81690 into master Jan 31, 2021
@mvz mvz deleted the issue-726-deprecate-file-creation-when-appending branch January 31, 2021 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants