Skip to content

Instantly share code, notes, and snippets.

# cruise - CruiseControl.rb continuous integration server
#
description "CC.rb continuous integration server"
start on runlevel [2345]
stop on runlevel [!2345]
expect daemon
respawn
When /^(?:|I )fill in "([^\"]*)" with the (?:the )?(.+)\'s "([^\"]+)"(?: within "([^\"]*)")?$/ do |field, model, attrib, selector|
with_scope(selector) do
factory_name = model.gsub(' ', '_').to_sym
object = eval("@#{factory_name}")
fill_in(field, :with => object.send(attrib))
end
end
Given /^an? (.+) exists with (?:an? )?(.+) (?:of )?\"([^\"]*)\"$/ do |model, field, value|
factory_name = model.gsub(' ', '_').to_sym
eval("@#{factory_name} = Factory.create(factory_name, field => value)")
end
btaitelb@grew (master)% bundle exec cucumber --backtrace
Using the default profile...
F------FF-----F
Failing Scenarios:
cucumber features/test_post.feature:4 # Scenario: Post Test Success
cucumber features/test_post.feature:13 # Scenario: Post Test Failure
2 scenarios (2 failed)
11 steps (11 skipped)
# for .zshrc git branch
autoload -U colors && colors
parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
setPrompt() {
PS1="%{$fg[cyan]%}%n%{$fg[magenta]%}@%{$fg[red]%}%m%{$fg[cyan]%}$(parse_git_branch)%{$fg[magenta]%}%#%{$reset_color%} "
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\h:\W$(__git_ps1 "[\[\e[0;32m\]%s\[\e[0m\]\[\e[0;33m\]$(parse_git_dirty)\[\e[0m\]]")$ '
When /^I do something$/ do
# something
end
When /^I do something complex$/ do
When "I do something" # call the other step
# something else
end
> rails g scaffold User name:string description:string
# factories.rb
Factory.sequence :name do |i|
"Test User #{i}"
end
Factory.define :user do |u|
u.name { Factory.next :name }
u.description 'This is my description'
diff -ruN nginx-0.8.4_orig/auto/make nginx-0.8.4_syslog/auto/make
--- nginx-0.8.4_orig/auto/make 2009-05-12 20:15:43.000000000 +0700
+++ nginx-0.8.4_syslog/auto/make 2009-07-08 16:32:06.000000000 +0700
@@ -15,6 +15,10 @@
ngx_objs_dir=$NGX_OBJS$ngx_regex_dirsep
ngx_use_pch=`echo $NGX_USE_PCH | sed -e "s/\//$ngx_regex_dirsep/g"`
+#SYSLOG
+if [[ "${USE_SYSLOG}" == "YES" ]]; then
+ CFLAGS="$CFLAGS -DUSE_SYSLOG"
We couldn’t find that file to show.