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

Make forgetting setup_aruba a hard failure #510

Merged
merged 3 commits into from
Nov 12, 2017
Merged

Make forgetting setup_aruba a hard failure #510

merged 3 commits into from
Nov 12, 2017

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Nov 10, 2017

Summary

Make forgetting setup_aruba a hard failure

Details

Forgetting to run setup_aruba resulted in a warning announcing that it would be a hard failure in 1.0.0. Kind of like 'deprecated', but with a twist. This PR makes the hard failure happen.

Motivation and Context

Part of getting ready for 1.0.0.

How Has This Been Tested?

Scenarios that relied on the old behavior have been removed. The hard failure is not tested explicitly.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Update documentation

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@@ -90,7 +90,7 @@ Feature: Getting started with RSpec and aruba

Running `setup_aruba` removes `tmp/aruba`, creates a new one `tmp/aruba`
and make it the working directory. Running it within a `before(:all)`-hook,
run some `aruba`-method and then run `setup_arub` again within a
run some `aruba`-method and then run `setup_aruba` again within a
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we change this text to drop the hyphens, so that

`aruba`-method

becomes

`aruba` method

@@ -127,7 +127,7 @@ def expand_path(file_name, dir_string = nil)
fail ArgumentError, message unless file_name.is_a?(String) && !file_name.empty?

# rubocop:disable Metrics/LineLength
aruba.logger.warn %(`aruba`'s working directory does not exist. Maybe you forgot to run `setup_aruba` before using it's API. This warning will be an error from 1.0.0) unless Aruba.platform.directory? File.join(aruba.config.root_directory, aruba.config.working_directory)
fail %(Aruba's working directory does not exist. Maybe you forgot to run `setup_aruba` before using it's API.) unless Aruba.platform.directory? File.join(aruba.config.root_directory, aruba.config.working_directory)
Copy link
Contributor

Choose a reason for hiding this comment

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

Grammar note: it's => its

@olleolleolle
Copy link
Contributor

This is a huge help!

@mvz
Copy link
Contributor Author

mvz commented Nov 10, 2017

I'm going to see about moving the setup check to earlier in the process, so it doesn't depend on expand_path being called.

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.

Thanks for adding this verification.

@mvz
Copy link
Contributor Author

mvz commented Nov 10, 2017

I'm going to see about moving the setup check to earlier in the process, so it doesn't depend on expand_path being called.

I might do that later, it breaks a lot right now.

@mvz mvz merged commit 78cca61 into master Nov 12, 2017
@mvz mvz deleted the require-setup branch November 12, 2017 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants