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

Add options to the cli #117

Merged
merged 1 commit into from Dec 20, 2012
Merged

Add options to the cli #117

merged 1 commit into from Dec 20, 2012

Conversation

passcod
Copy link
Contributor

@passcod passcod commented Dec 18, 2012

Non-breaking change from #114 – this one has tests, too.

Inspired by the discussion on #30 and #38.


Options can be passed on the command-line and/or using the HOMEBREW_CASK_OPTS environment variable (which has lowest priority). There is a single --appdir=PATH option right now, but this commit enables future awesomeness!

Other minor changes:

  • brew cask help now returns the same thing as brew cask instead of saying there was “no such command as help”.
  • The heredoc block for the usage message now uses Homebrew's #undent instead of the customed-rolled #gsub version. Cleaner and more flexible.
  • Cask.set_appdir has been renamed to Cask.appdir=. This is more Rubyish, and of little consequence (the only place it was previously used was in the tests).

Options can be passed on the command-line and/or using
the HOMEBREW_CASK_OPTS environment variable (which has
lowest priority). There is a single --appdir=PATH option
right now, but this commit enables future awesomeness!

Other minor changes:

* `brew cask help` now returns the same thing as `brew cask`
  instead of saying there was “no such command as help”.

* The HEREDOC block now uses Homebrew's #undent instead of the
  customed-rolled #gsub version. Cleaner and more flexible.

* `Cask.set_appdir` has been renamed to `Cask.appdir=`. This
  is more Rubyish, and of little consequence (the only place
  it was previously used was in the tests).
@phinze
Copy link
Contributor

phinze commented Dec 18, 2012

nice! i pulled in checksums last night - i'll push that today and then
merge this in.

On Tue, Dec 18, 2012 at 5:41 AM, Félix Saparelli
notifications@github.comwrote:

*Non-breaking change from #114https://github.com/phinze/homebrew-cask/issues/114– this one has tests, too.

*

Options can be passed on the command-line and/or using the
HOMEBREW_CASK_OPTS environment variable (which has lowest priority).
There is a single --appdir=PATH option right now, but this commit enables
future awesomeness!

Other minor changes:

brew cask help now returns the same thing as brew cask instead of
saying there was “no such command as help”.

The heredoc block for the usage message now uses Homebrew's #undent
instead of the customed-rolled #gsub version. Cleaner and more flexible.

Cask.set_appdir has been renamed to Cask.appdir=. This is more
Rubyish, and of little consequence (the only place it was previously used
was in the tests).


You can merge this Pull Request by running:

git pull https://github.com/passcod/homebrew-cask options-support

Or view, comment on, or merge it at:

#117
Commit Summary

  • Add options to the cli

File Changes

  • M lib/cask.rb (4)
  • M lib/cask/cli.rb (18)
  • A test/cli/options_test.rb (26)
  • M test/support/fake_appdir.rb (2)

Patch Links

@passcod passcod mentioned this pull request Dec 18, 2012
@passcod
Copy link
Contributor Author

passcod commented Dec 19, 2012

@phinze I'll code up and PR the specs part whenever the smaller things will be done. I mean, don't bother yourself trying to make sense of how I did it and how to do things and how to test it all… I have it all in my head so it's probably better I do it (and fix / rework the messy parts by the same occasion. ;-)

I think that's the largest change there is, so let's do our best to pull in everything else for the moment! 🍰

phinze added a commit that referenced this pull request Dec 20, 2012
@phinze phinze merged commit fca6c49 into Homebrew:master Dec 20, 2012
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 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

2 participants