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
class Monkey < Application | |
provides :html, :json | |
def index | |
@monkey_list = Monkey.list | |
display @node_list | |
end | |
def show |
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
http://www.credit.com/ | |
GET / HTTP/1.1 | |
Host: www.credit.com | |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.2) Gecko/2008090512 Firefox/3.0.2 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
Accept-Language: en-us,en;q=0.5 | |
Accept-Encoding: gzip,deflate | |
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 | |
Keep-Alive: 300 |
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
class Foolio < Chef::Recipe | |
def self.hit_me | |
package "foo" do | |
action :remove | |
end | |
end | |
end | |
Foolio.hit_me |
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
racing(1):/Library/Ruby/Gems/1.8/gems/merb-core-0.9.9/lib/merb-core.rb:237 Merb.load_paths[type].first | |
Tracing(6):/Library/Ruby/Gems/1.8/gems/merb-core-0.9.9/lib/merb-core/logger.rb:139 return unless @buffer.size > 0 | |
Tracing(1):/Library/Ruby/Gems/1.8/gems/extlib-0.9.7/lib/extlib/dictionary.rb:215 @hash[ k ] | |
Tracing(6):/Library/Ruby/Gems/1.8/gems/merb-core-0.9.9/lib/merb-core/logger.rb:140 @mutex.synchronize do | |
Tracing(1):/Library/Ruby/Gems/1.8/gems/extlib-0.9.7/lib/extlib/string.rb:75 File.join(self, o.to_s) | |
Tracing(6):/Library/Ruby/Gems/1.8/gems/merb-core-0.9.9/lib/merb-core/logger.rb:141 @log.write(@buffer.slice!(0..-1).to_s) | |
Tracing(1):/Library/Ruby/Gems/1.8/gems/merb-core-0.9.9/lib/merb-core/bootloader.rb:880 if Merb::Config[:rackup] | |
~ Worker Thread Crashed with Exception: | |
uninitialized constant Merb::Dispatcher - (NameError) | |
/Library/Ruby/Gems/1.8/gems/merb-core-0.9.9/lib/merb-core/dispatch/worker.rb:16:in `process_queue' |
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
res = nil | |
tf = nil | |
http.request(req) do |response| | |
if raw | |
tf = Tempfile.new("chef-rest") | |
# Stolen from http://www.ruby-forum.com/topic/166423 | |
# Kudos to _why! | |
size, total = 0, response.header['Content-Length'].to_i | |
response.read_body do |chunk| | |
tf.write(chunk) |
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
def foo(*bar, &baz) | |
puts foo.inspect | |
baz.call | |
end | |
foo(:one, :two, :three) { puts 'monkey!' } | |
# >STDOUT> [ :one, :two, :three ] | |
# >STDOUT> monkey! |
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
# | |
# Cookbook Name:: chef | |
# Attribute File:: client.rb | |
# | |
require 'open_uri' | |
log_level :info | |
log_location STDOUT | |
file_store_path "/var/chef/file_store" |
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
service "apache2" do | |
name value_for_platform( | |
[ "CentOS", "RedHat", "Fedora", "SuSE" ] => { "default" => "httpd" }, | |
[ "Debian", "Ubuntu" ] => { "default" => "apache2" } | |
) | |
supports :restart => true | |
action :enable | |
end |
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 Client Config File | |
# | |
# Will be overwritten | |
# | |
log_level :info | |
log_location STDOUT | |
file_store_path "/var/chef/file_store" | |
file_cache_path "/var/chef/cache" |
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
# | |
# master configuration | |
# | |
global_defs { | |
notification_email { | |
[email protected] | |
} | |
notification_email_from [email protected] |
OlderNewer