Created
January 4, 2012 21:33
-
-
Save stevendanna/1562257 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chef:recipe > puts (:this => "that") | |
SyntaxError: (irb#1):38: syntax error, unexpected tASSOC, expecting ')' | |
puts (:this => "that") | |
^ | |
(irb#1):38: syntax error, unexpected ')', expecting $end | |
chef:recipe > puts(:this => "that") | |
{:this=>"that"} | |
=> nil | |
chef:recipe > puts ({:this => "that"}) | |
{:this=>"that"} | |
=> nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chef:recipe > extend Chef::Mixin::ParamsValidate | |
=> #<Chef::Recipe:0x007fa00b167080 @cookbook_name=nil, @recipe_name=nil, @run_context=#<Chef::RunContext:0x007fa00b167968 @node=<Chef::Node:0x3fd0058b5708 @name="sdanna">, @cookbook_collection={}, @resource_collection=#<Chef::ResourceCollection:0x007fa00b167940 @resources=[<template[/Users/sdanna/.pgpass] @name: "/Users/sdanna/.pgpass" @noop: nil @before: nil @params: {} @provider: nil @allowed_actions: [:nothing, :create, :delete, :touch, :create_if_missing] @action: "create" @updated: false @updated_by_last_action: false @supports: {} @ignore_failure: false @retries: 0 @retry_delay: 2 @immediate_notifications: [] @delayed_notifications: [] @source_line: "(irb#1):8:in `irb_binding'" @resource_name: :template @path: "/Users/sdanna/.pgpass" @backup: 5 @source: "pgpass.erb" @cookbook: nil @local: false @variables: {:username=>"ids_dev", :password=>"integrity"} @cookbook_name: nil @recipe_name: nil @enclosing_provider: nil @owner: "sdanna" @group: "staff" @mode: "0600">], @resources_by_name={"template[/Users/sdanna/.pgpass]"=>0}, @insert_after_idx=nil>, @definitions={}>, @params={}, @node=<Chef::Node:0x3fd0058b5708 @name="sdanna">, @desc=nil, @explain=nil, @help_descriptions=[#<struct Shef::Extensions::Help cmd="help", desc="prints this help message", explanation="## SUMMARY ##\n When called with no argument, +help+ prints a table of all shef commands. When\n called with an argument COMMAND, +help+ prints a detailed explanation of the\n command if available, or the description if no explanation is available.\n">, #<struct Shef::Extensions::Help cmd="version", desc="prints information about chef", explanation=nil>, #<struct Shef::Extensions::Help cmd="recipe", desc="switch to recipe mode", explanation=nil>, #<struct Shef::Extensions::Help cmd="attributes", desc="switch to attributes mode", explanation=nil>, #<struct Shef::Extensions::Help cmd="run_chef", desc="run chef using the current recipe", explanation=nil>, #<struct Shef::Extensions::Help cmd="chef_run", desc="returns an object to control a paused chef run", explanation=nil>, #<struct Shef::Extensions::Help cmd="chef_run.resume", desc="resume the chef run", explanation=nil>, #<struct Shef::Extensions::Help cmd="chef_run.step", desc="run only the next resource", explanation=nil>, #<struct Shef::Extensions::Help cmd="chef_run.skip_back", desc="move back in the run list", explanation=nil>, #<struct Shef::Extensions::Help cmd="chef_run.skip_forward", desc="move forward in the run list", explanation=nil>, #<struct Shef::Extensions::Help cmd="reset", desc="resets the current recipe", explanation=nil>, #<struct Shef::Extensions::Help cmd="become_node", desc="assume the identity of another node.", explanation=nil>, #<struct Shef::Extensions::Help cmd="echo", desc="turns printout of return values on or off", explanation=nil>, #<struct Shef::Extensions::Help cmd="echo?", desc="says if echo is on or off", explanation=nil>, #<struct Shef::Extensions::Help cmd="tracing", desc="turns on or off tracing of execution. *verbose*", explanation=nil>, #<struct Shef::Extensions::Help cmd="tracing?", desc="says if tracing is on or off", explanation=nil>, #<struct Shef::Extensions::Help cmd="ls", desc="simple ls style command", explanation=nil>, #<struct Shef::Extensions::Help cmd="resources", desc="list all the resources on the current recipe", explanation=nil>], @subcommand_help={}> | |
chef:recipe > def try_this(args=nil) | |
chef:recipe ?> set_or_return(:foo, args, :kind_of => [ Hash ] ) | |
chef:recipe ?> end | |
=> nil | |
chef:recipe > try_this :bar => "this" | |
=> {:bar=>"this"} | |
chef:recipe > try_this (:bar => "this") | |
SyntaxError: (irb#1):34: syntax error, unexpected tASSOC, expecting ')' | |
try_this (:bar => "this") | |
^ | |
(irb#1):34: syntax error, unexpected ')', expecting $end | |
chef:recipe > try_this(:bar => "this") | |
=> {:bar=>"this"} | |
chef:recipe > try_this ({:bar => "this"}) | |
=> {:bar=>"this"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment