Skip to content

Instantly share code, notes, and snippets.

@yknd
yknd / Guardfile
Created June 15, 2012 00:44
sample sort
guard 'rspec', :version => 2, :cli => "-c -fs" do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
watch(%r{^views/(.+)\.(slim|scss)$})
end
@yknd
yknd / .gitignore
Created March 12, 2012 01:55
sample guard
.sass-cache/
@yknd
yknd / .autotest
Created February 2, 2012 14:53
sample sinatra application with haml, sass and rspec.
Autotest.add_hook(:initialize) {|at|
at.add_exception %r{^\.git}
at.add_exception %r{^./tmp}
at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
Dir['spec/**/*_spec.rb']
}
nil
}
@yknd
yknd / Gemfile
Created February 1, 2012 02:59
sample sinatra mongodb
source :rubygems
gem 'sinatra', require: 'sinatra/base'
gem 'sinatra-reloader', require: 'sinatra/reloader'
gem 'mongoid'
gem 'bson_ext'
gem 'thin'