Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

expect (4) Versions 2.1.1

Installs/Configures expect package

Policyfile
Berkshelf
Knife
cookbook 'expect', '~> 2.1.1', :supermarket
cookbook 'expect', '~> 2.1.1'
knife supermarket install expect
knife supermarket download expect
README
Dependencies
Changelog
Quality 33%

Expect Cookbook

Chef cookbook
Build Status

Description

This cookbook will install Expect package.

Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications. And by adding Tk, you can also wrap interactive applications in X11 GUIs.
Expect can make easy all sorts of tasks that are prohibitively difficult with anything else. You will find that Expect is an absolutely invaluable tool - using it, you will be able to automate tasks that you've never even thought of before - and you'll be able to do this automation quickly and easily.

Expect requires Tcl (tool command language). This cookbook will provide Tcl package if necessary (currently only Windows platform requires it).

Platforms

  • Ubuntu
  • CentOS
  • RedHat
  • Fedora
  • Mac OS X
  • Windows

Chef

  • Chef 12 or later

Attributes

expect::default

Key Type Description Platform Default
default['expect']['include_homebrew'] Boolean Include homebrew recipe for installing brew on Mac OS Mac OS true
default['expect']['cygwin']['from_system'] Boolean Use the Cygwin from system Windows false
default['expect']['cygwin']['home'] String Installation path for the Cygwin Windows 'C:\\cygwin'
default['expect']['cygwin']['site'] String Server where the Cygwin should search for the packages Windows 'http://cygwin.mirrors.pair.com'

Recipes

expect::default

Installs Expect package on node and if the node platform is Windows then the recipe also installs Cygwin component.

Usage - expect::default

Just include expect in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[expect]"
  ]
}

Resources

This cookbook provides a script provider called expect_script which will execute expect script using Tcl according to current OS.

Property Type Description Default Required
cwd String The current working directory true false
code String A quoted string of code to be executed false true
environment Hash A Hash of environment variables in the form of ({"ENV_VARIABLE" => "VALUE"}) 'C:\\cygwin' false
user [String, Integer] The user name or user ID that should be changed before running a command nil false
group [String, Integer] The group name or group ID that must be changed before running a command nil false

Usage expect_script

expect_script 'Example expect script with system command' do
  code <<-EOH
    spawn ftp
    set timeout 30
    expect {
      -regexp "ftp.*" {
        exp_send "bye\r"
        exp_continue
      }
      eof
    }
  EOH
end
expect_script 'Example expect script with bash script' do
  cwd '/'
  environment 'PATH' => "#{ENV['PATH']}:/tmp/test"
  code <<-EOH
    spawn test.sh
    set timeout 30
    expect {
      -regexp "Would you like to delete your all files (yes/no)?.*" {
        exp_send "no\r"
        exp_continue
      }
      eof
    }
  EOH
  user 'root'
  group 'root'
end

Contributing

License and Authors

Authors: Radoslaw Jaros

Dependent cookbooks

windows >= 1.44.1
homebrew >= 2.1.0
cygwin ~> 0.7.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

CHANGELOG for Expect cookbook

This file is used to list changes made in each version of the Expect cookbook.

2.1.1

  • Update Gemfile and fix style of custom resource properties

2.1.0

2.0.0

  • Add expect_script resource
  • Change expect package provider for Windows platform (Cygwin)

1.0.0

  • Add default recipe with installation of the Expect package for platforms: Ubuntu, Mac OS X, Windows
  • Add .travis, .rubocop and kitchen test with serverspec (provider Vagrant)

Collaborator Number Metric
            

2.1.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

2.1.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
            

2.1.1 passed this metric

No Binaries Metric
            

2.1.1 passed this metric

Testing File Metric
            

2.1.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
            

2.1.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