cookbook 'safari', '~> 1.0.1'
safari (5) Versions 1.0.1 Follow0
Configures Safari browser
cookbook 'safari', '~> 1.0.1', :supermarket
knife supermarket install safari
knife supermarket download safari
Safari Cookbook
This cookbook provides a safari_version
library method to retrieve Safari version installed, and a
safari_extension
resource to install Safari extensions.
Requirements
- User must be logged into GUI before calling safari_extension (see macosx_gui_login cookbook)
- Chef 11.14 or higher (sensitive attribute introduced)
Platforms
- Mac OS X Mavericks (10.9) or higher
Usage
Include the safari as a dependency to make library method and extension resource available.
safari_version
The safari_version retrieves CFBundleShortVersionString by default:
version = safari_version # => 8.0.4
You can return other version types by passing the name (e.g. BuildVersion, CFBundleVersion, ProjectName or
SourceVersion)
bundle_version = safari_version('CFBundleVersion') # => 10600.4.10.7
Tip: use allow_any_instance_of to stub safari_version method when testing with rspec:
allow_any_instance_of(Chef::Recipe).to receive(:safari_version).and_return('8.0.4')
safari_extension
Installs Safari extensions. User must be logged into GUI before calling safari_extension (see
macosx_gui_login cookbook).
Attribute
-
safariextz
(required) - Path to Safari extension to install. Defaults to the name of the resource block.
Example
Install a Safari extension:
safari_extension 'a safari extension' do safariextz '/path/to/a.safariextz' action :install end
ChefSpec Matchers
This cookbook includes a custom ChefSpec matcher you can use to test your
own cookbooks.
Example Matcher Usage
expect(chef_run).to install_safari_extension('a safari extension').with( safariextz: '/path/to/a.safariextz')
Cookbook Matcher
- install_safari_extension(safariextz)
Getting Help
- Ask specific questions on Stack Overflow.
- Report bugs and discuss potential features in Github issues.
Contributing
Please refer to CONTRIBUTING.
License
MIT - see the accompanying LICENSE file for details.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Changelog
1.0.1
- Update metadata description, source_url and issues_url
1.0.0
- Production ready
0.2.1
- Remove Chef 12 source_url and issues_url from metadata
0.2.0
- Add extensions resource
0.1.0
- Initial release
Collaborator Number Metric
1.0.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.1 failed this metric
FC066: Ensure chef_version is set in metadata: safari/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.0.1 passed this metric
Testing File Metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.1 failed this metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.1 failed this metric
FC066: Ensure chef_version is set in metadata: safari/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.0.1 passed this metric
Testing File Metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.1 failed this metric
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
1.0.1 passed this metric
Testing File Metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.1 failed this metric
1.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number