Skip to content

Instantly share code, notes, and snippets.

diff --git a/merb-core/lib/merb-core/core_ext/kernel.rb b/merb-core/lib/merb-cor
index f5afea0..0a655e1 100644
--- a/merb-core/lib/merb-core/core_ext/kernel.rb
+++ b/merb-core/lib/merb-core/core_ext/kernel.rb
@@ -142,8 +142,13 @@ module Kernel
return unless dep.require_as
Gem.activate(dep)
rescue Gem::LoadError => e
- e.set_backtrace dep.original_caller
- Merb.fatal! "The gem #{name}, #{ver.inspect} was not found", e
[[email protected]]% sudo ./chef-client ~/src/sandbox/opscode/opscode-chef/chef/bin
[Mon, 27 Jul 2009 17:05:34 -0700] INFO: Starting Chef Run
[Mon, 27 Jul 2009 17:05:35 -0700] INFO: Registering API Client latte.local
[Mon, 27 Jul 2009 17:05:39 -0700] INFO: Chef Run complete in 5.116972 seconds
run_list "role[base]", "mysql::server", "fail2ban"
%w{
package1
package2
package3
package4
}.each do |name|
package name do
action :install
end
end
irb(main):003:0> a = { :one => { :foo => "bar", :baz => "snag" } }
=> {:one=>{:baz=>"snag", :foo=>"bar"}}
irb(main):004:0> b = { :one => { :baz => "snarf", :smurf => "aroonie" } }
=> {:one=>{:baz=>"snarf", :smurf=>"aroonie"}}
irb(main):005:0> Chef::Mixin::DeepMerge.merge(a, b)
=> {"one"=>{"baz"=>"snarf", "foo"=>"bar", "smurf"=>"aroonie"}}
r = Chef::REST.new('https://chef-server')
r.register('api_user', 'password')
r.authenticate('api_user', 'password')
r.delete_rest('nodes/your_node')
unless hasoffers[:config][:db][:master].has_key?(:host)
hasoffers[:config][:db][:master][:host] = "192.168.2.128"
end
unless hasoffers[:config][:db][:master].has_key?(:port)
hasoffers[:config][:db][:master][:port] = "3306"
end
unless hasoffers[:config][:db][:slave].has_key?(:host)
hasoffers[:config][:db][:slave][:host] = "192.168.2.129"
pw, pr, pe, ps = IO.pipe, IO.pipe, IO.pipe, IO.pipe
verbose = $VERBOSE
begin
$VERBOSE = nil
ps.last.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
cid = fork {
pw.last.close
STDIN.reopen pw.first
class CookieJar < Hash
include Singleton
end
Feature: List roles via the REST API
In order to know what roles exists programatically
As a Developer
I want to list all the roles
Scenario: List roles when none have been created # ./features/roles/list_roles_api.feature:6
Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:51
And there are no roles # features/steps/fixture_steps.rb:73
When I authenticate as 'bobo' # features/steps/request_steps.rb:19
And I 'GET' the path '/roles' # features/steps/request_steps.rb:1