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

DSL: add accessibility_access stanza #7854

Merged
merged 3 commits into from
Dec 9, 2014

Conversation

rolandwalker
Copy link
Contributor

This stanza replaces the never-documented postflight methods enable_accessibility_access / disable_accessibility_access (remove_accessibility_access), and will also replace caveats / assistive_devices which is still present in the code for the moment.

The issue with the postflight approach is that the postflight blocks are opaque. We can't do anything very smart with the contents. In this case, that meant that Cask authors would need to build up and tear down accessibility permissions in each Cask:

postflight do
  enable_accessibility_access
end
uninstall_preflight
  disable_accessibility_access
end

This PR replaces the procedural logic above with a declaration:

accessibility_access true

Also:

  • adds user feedback when accessibility is being changed
  • fix trailing newlines on runtime-extracted bundle IDs
  • de-document obsolete form assistive_devices
  • create staged_test.rb for testing staged Casks
  • test an actual staged Cask rather than mocking

Needed future work:

  • accessibility_access should accept a bundle ID value for those cases where it cannot be deduced. Currently only the first app stanza is followed. accessibility_access can't be granted in Casks without an app stanza.
  • the user should be able to turn off this feature.

@federicobond I might have introduced the newlines into bundle identifiers in #6329

@rolandwalker rolandwalker added the core Issue with Homebrew itself rather than with a specific cask. label Dec 6, 2014
* create `staged_test.rb` for testing staged Casks
* test an actual staged Cask rather than mocking
can't hurt
* accepts a Boolean value
* replaces the never-documented `postflight` methods `enable_accessibility_access` /
 `disable_accessibility_access` (`remove_accessibility_access`)
* declarative: unlike the `postflight` approach, does not have to be
  invoked in two places
* de-document obsolete form `caveats` / `assistive_devices`
* bump Travis seed to avoid false test failures
rolandwalker added a commit that referenced this pull request Dec 9, 2014
DSL: add `accessibility_access` stanza
@rolandwalker rolandwalker merged commit 5036750 into Homebrew:master Dec 9, 2014
@rolandwalker rolandwalker deleted the accessibility_stanza branch December 9, 2014 00:24
@miccal miccal removed the core Issue with Homebrew itself rather than with a specific cask. label Dec 23, 2016
@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.

2 participants