This file contains hidden or 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
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 |
This file contains hidden or 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
[[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 |
This file contains hidden or 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
run_list "role[base]", "mysql::server", "fail2ban" |
This file contains hidden or 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
%w{ | |
package1 | |
package2 | |
package3 | |
package4 | |
}.each do |name| | |
package name do | |
action :install | |
end | |
end |
This file contains hidden or 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
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"}} |
This file contains hidden or 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
r = Chef::REST.new('https://chef-server') | |
r.register('api_user', 'password') | |
r.authenticate('api_user', 'password') | |
r.delete_rest('nodes/your_node') |
This file contains hidden or 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
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" |
This file contains hidden or 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
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 |
This file contains hidden or 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 CookieJar < Hash | |
include Singleton | |
end |
This file contains hidden or 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
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 |