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

Added Homebrew.install_gem! #3957

Merged
merged 1 commit into from Mar 22, 2018
Merged

Conversation

amancevice
Copy link
Contributor

Useful when gem does not install with executable.

The current Homebrew.install_gem_setup_path! method raises an error when installing a gem that doesn't come with its own executable (e.g. aws-sdk-s3).

I moved the code that installs the gem into Homebrew.install_gem!, And call this method from Homebrew.install_gem_setup_path! to maintain original functionality.

I had to add a make a slight change to add a guard clause so brew style would approve of the changes, but the method is functionally equivalent.

NOTE I didn't add/change tests because these changes should not affect any existing behavior.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Useful when gem does not install with executable
@MikeMcQuaid MikeMcQuaid merged commit 49927ed into Homebrew:master Mar 22, 2018
@MikeMcQuaid
Copy link
Member

Thanks so much for your first contribution (and for beating me to it)! Without people like you submitting PRs we couldn't run this project. You rock, @amancevice!

@eedwards-sk
Copy link
Contributor

@amancevice Nice!!

Funny because I ran into this too, but I originally just modified the method itself to support a nil exe name, which skipped the 'exe check'. I like your approach, though, to re-use the core behavior but adding an extra check with the 'exe version'.

@amancevice
Copy link
Contributor Author

Thanks, @eedwards-sk -- I opened a sister PR to install the gem before the sandboxing of brew install: #3949

Your feedback is welcomed!

@amancevice amancevice deleted the install-gem branch March 23, 2018 20:02
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants