Skip to content

Instantly share code, notes, and snippets.

git submodule add git://github.com/dreamr/dream_gens.git vender/plugins/dream_gens
gem install dream_gens
can you make it
def rest_actions
@rest_actions = DreamResourceGenerator.rest_actions unless @rest_actions.empty?
@rest_actions
end
That also means the:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:$PATH"
export PS1='\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: '
export EDITOR='mate -w'
export AUTOFEATURE=false
export RSPEC=true
export CUCUMBER_COLORS=passed=white
export CUCUMBER_COLORS=passed=white,bold:passed_param=white,bold,underline
export CUCUMBER_COLORS=pending_param=magenta:failed_param=magenta:passed_param=magenta:skipped_param=magenta
Autotest.add_hook :initialize do |at|
%w{rerun.txt}.each do |exception|
at.add_exception(exception)
end
end
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip"
%>
default: <%= std_opts %>
wip: --tags @wip:3 --wip features
GEMS=`gem list --no-versions`
for x in $GEMS ; do sudo gem uninstall $x -i ~/.gem/ruby/1.8/; done
require 'spec'
Autotest.add_discovery do
"rspec"
end
ActiveRecord::Base.class_eval do
def self.validates_inlcusion_of(*attr_names)
configuration = { :minumum => 1 }
configuration.update(attr_names.extract_options!)
validates_each(attr_names, configuration) do |record, attr_name, value|
unless value.nil?
record.errors.add(attr_name, "must contain at least #{configuration[:minimum]}") if value.size < configuration[:minimum].to_i
end
end
ActionController::Routing::Routes.draw do |map|
map.with_options :controller => 'static' do |static|
static.home '/', :action => 'home'
static.home '/home', :action => 'home'
static.dogma '/practices', :action => 'practices'
static.projects '/projects', :action => 'projects'
static.access_denied '/access-denied', :action => 'denied'
end