Tested with Ruby 2.1.4.
Install the Octokit gem.
gem install octokit -v 3.7.0
Tested with Ruby 2.1.4.
Install the Octokit gem.
gem install octokit -v 3.7.0
Tested with Ruby 2.1.4.
Install the Octokit gem.
gem install octokit -v 3.7.0
Tested with Ruby 2.1.4.
Install the Octokit gem.
gem install octokit -v 3.7.0
Tested with Ruby 2.1.4.
Install the Octokit gem.
gem install octokit -v 3.7.0
| require 'chef/log' | |
| require 'pry' | |
| module ChefSoftware | |
| class CookbookVersionsHandler < Chef::Handler | |
| def report | |
| Chef::Log.info('Pausing in handler to run pry; type "exit" to leave pry') | |
| binding.pry | |
| end |
Create a new instance of a Mixlib::ShellOut object, which is configured to run the date command.
2.1.4 (main):0 > cmd = Mixlib::ShellOut.new("date")
=> <Mixlib::ShellOut#70206383528180: command: 'date' process_status: nil stdout: '' stderr: '' child_pid: nil environment: {} timeout: 600 user: group: working_dir: >
Send the #run_command method to the cmd object. We'll get process status, stdout, etc.
2.1.4 (main):0 > cmd.run_command
Scenario: You've started up a brand new Chef Server using version 12, and you have installed Chef 12 on your local system. You log into the Management Console to create a user and organization (or do this with the command-line chef-server-ctl commands), and you're ready to rock with this knife.rb:
node_name 'jtimberman'
client_key 'jtimberman.pem'
validation_client_name 'tester-validator'
validation_key 'tester-validator.pem'
chef_server_url 'https://ip-172-31-0-111.us-west-2.compute.internal/organizations/tester'| save-last-command() { | |
| last_command=$(fc -nl 0) | |
| command_name="$1" | |
| read -r -d '' new_fun <<EOF | |
| ${command_name}() { | |
| $last_command | |
| } | |
| EOF | |
| eval "$new_fun" | |
| } |
| # Chef 11.18.0.rc.1 | |
| % /opt/chefdk/bin/chef-client -o home -z -l error | |
| Starting Chef Client, version 11.18.0.rc.1 | |
| resolving cookbooks for run list: ["home"] | |
| Synchronizing Cookbooks: | |
| - home | |
| Compiling Cookbooks... | |
| [2014-12-03T08:52:10-07:00] ERROR: Your HOME is: /Users/jtimberman | |
| # Chef 12.0.0.rc.0 |
| # Gist for archival purposes, via the wayback machine, | |
| # https://web.archive.org/web/20131222092914/http://brainspl.at/nginx.conf.txt | |
| # - brainspl.at seems to be offline :( | |
| # | |
| # View other versions at https://web.archive.org/web/*/http://brainspl.at/nginx.conf.txt | |
| # | |
| # user and group to run as | |
| user ez ez; | |
| # number of nginx workers |