cookbook 'phantomjs2', '~> 1.1.0'
phantomjs2 (2) Versions 1.1.0 Follow0
Installs/Configures phantomjs
cookbook 'phantomjs2', '~> 1.1.0', :supermarket
knife supermarket install phantomjs2
knife supermarket download phantomjs2
PhantomJS2 Cookbook
Installs phantomjs on both Linux and Windows. Windows path is set (unless link attribute is false) but requires you
to reboot the server in order to have it available. So symlink path #{node['phantomjs']['path']}/phantomjs
is created and immediately available after Windows install.
Requirements
- Chef 12+
Platforms
- CentOS, RedHat, Fedora
- Debian, Ubuntu
- Windows
Usage
Recipe
Add the cookbook to your run_list
in a node or role:
"run_list": [ "recipe[phantomjs2::default]" ]
or include it in a recipe:
# other_cookbook/metadata.rb # ... depends 'phantomjs2'
# other_cookbook/recipes/default.rb # ... include_recipe 'phantomjs2::default'
Attributes
-
node['phantomjs2']['path']
- Location for the download. Default Linux:/usr/local/src
Windows:#{ENV['ProgramData']}/phantomjs
. -
node['phantomjs2']['version']
- The version to install. Default2.1.1
. -
node['phantomjs2']['checksum']
- The checksum of the download. Defaultnil
. -
node['phantomjs2']['base_url']
- The base URL to download from. Defaulthttps://bitbucket.org/ariya/phantomjs/downloads
. -
node['phantomjs2']['packages']
- The supporting packages. Default varies based on platform.
Resource
Actions
- Install - Download and install phantomjs
Attributes
-
path
- Location for the download. Defaults to the name of the resource block. -
version
- The version to install. Defaultnode['phantomjs2']['version']
. -
checksum
- The checksum of the download. Defaltnode['phantomjs2']['checksum']
. -
packages
- The supporting packages. Defaultnode['phantomjs2']['packages']
. -
base_url
- The base URL to download from. Defaultnode['phantomjs2']['base_url']
. -
basename
- The name of the file to download (this is automatically calculated from the phantomjs version and kernel type). Defaultphantomjs-#{version}-linux-#{node['kernel']['machine']}
. -
link
- Link executable to path. Note that Windows path is set (unless link is false) but requires you to reboot the server in order to have it available. Defaulttrue
. -
user
- The user name. Defaultroot
. -
group
- The group name. Defaultroot
.
ChefSpec Matchers
This cookbook includes custom ChefSpec matchers you can use to test
your own cookbooks.
Example Matcher Usage
expect(chef_run).to install_phantomjs2('/src').with( version: '1.9.8' )
Cookbook Matchers
- install_phantomjs2(resource_name)
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
v1.1.0
- Support Windows installs
- Bump phantomjs version to 2.1.1
v1.0.0
- Fork of Seth Vargo's phantomjs with resource added and support for package installs removed
Collaborator Number Metric
1.1.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.1.0 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.1.0 failed this metric
FC066: Ensure chef_version is set in metadata: phantomjs2/metadata.rb:1
FC070: Ensure supports metadata defines valid platforms: phantomjs2/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.1.0 passed this metric
Testing File Metric
1.1.0 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.1.0 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.1.0 failed this metric
1.1.0 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.1.0 failed this metric
FC066: Ensure chef_version is set in metadata: phantomjs2/metadata.rb:1
FC070: Ensure supports metadata defines valid platforms: phantomjs2/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.1.0 passed this metric
Testing File Metric
1.1.0 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.1.0 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.1.0 failed this metric
FC070: Ensure supports metadata defines valid platforms: phantomjs2/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
1.1.0 passed this metric
Testing File Metric
1.1.0 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.1.0 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.1.0 failed this metric
1.1.0 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