Skip to content

Instantly share code, notes, and snippets.

# Divine Panda
service "foo" do
action :nothing
end
template "/etc/foo/config.conf" do
source "config.conf.erb"
action :create
notifies :restart, resources(:service => "foo")
end
begin
r = resources(:template => '/etc/blah')
r.variables[:new_stuff] = 'foo'
rescue RuntimeError => e
template '/etc/blah' do
source 'blah.erb'
variables :one => 'two'
end
end
command is erl -boot start_sasl +K true -smp enable -pa ./etest ./ebin ./deps/mochiweb/ebin ./deps/thrift/ebin -sname local_console_4
2451 -noshell -priv_dir "/Users/cb/Projects/dynomite/etest/log/42451" -config test -s eunit test bootstrap configuration dmerkle dmtr
ee lib_misc mediator membership partitions rate storage_manager storage_server stream sync_manager vector_clock -run init stop
erl -boot start_sasl +K true -smp enable -pa ./etest ./ebin ./deps/mochiweb/ebin ./deps/thrift/ebin -sname local_console_42451 -noshe
ll -priv_dir "/Users/cb/Projects/dynomite/etest/log/42451" -config test -s eunit test bootstrap configuration dmerkle dmtree lib_misc
mediator membership partitions rate storage_manager storage_server stream sync_manager vector_clock -run init stop
There were no tests to run.
-> Test logs in /Users/cb/Projects/dynomite/etest/log/42451
=PROGRESS REPORT==== 22-Apr-2009::11:54:44 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.41.0>},
{name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
/Users/cb/Projects/dynomite/Rakefile:7: warning: already initialized constant VERSION
erlc +debug_info -I include -I deps/eunit/include -DTEST -o etest etest/t.erl etest/mock_genserver.erl etest/mock.erl
etest/mock_genserver.erl:76: Warning: variable 'From' is unused
etest/mock_genserver.erl:79: Warning: variable 'From' is unused
etest/mock_genserver.erl:82: Warning: variable 'From' is unused
etest/mock_genserver.erl:85: Warning: variable 'From' is unused
etest/mock_genserver.erl:88: Warning: variable 'From' is unused
etest/mock_genserver.erl:150: Warning: variable 'Request' is unused
etest/mock_genserver.erl:150: Warning: variable 'Rest' is unused
etest/mock_genserver.erl:169: Warning: variable 'Sym' is unused
// Compiles out to..
{
maintainer: "Adam Jacob",
maintainer_email: "[email protected]",
license: "Apache v2.0",
version: 1.0,
description: "Build and configure apache virtual hosts",
description_long: "...",
supports: {
"ubuntu": [ ">= 8.04", "<< 10.02" ]
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
class CookieJar < Hash
include Singleton
end
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
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"