Skip to content

Instantly share code, notes, and snippets.

View jschoolcraft's full-sized avatar

Jeff Schoolcraft jschoolcraft

View GitHub Profile
# rails application template for generating customized rails apps
#
# == requires ==
#
# * rails 2.3+, rspec, cucumber, machinist
#
# == a newly generated app using this template comes with ==
#
# * working user registration/login via authlogic, cucumber features to verify that it works
# * rspec/cucumber for testing
/resource.rb:518:in `update_attributes'
/usr/lib/ruby/gems/1.8/gems/foca-integrity-0.1.9.1/lib/integrity/project_builder.rb:20:in `build'
/usr/lib/ruby/gems/1.8/gems/foca-integrity-0.1.9.1/lib/integrity/commit.rb:61:in `queue_build'
/usr/lib/ruby/gems/1.8/gems/foca-integrity-0.1.9.1/lib/integrity/project.rb:35:in `build'
/usr/lib/ruby/gems/1.8/gems/foca-integrity-0.1.9.1/lib/integrity/app.rb:117:in `POST /:project/builds'
/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.1.1/lib/sinatra/base.rb:696:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.1.1/lib/sinatra/base.rb:696:in `route'
/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.1.1/lib/sinatra/base.rb:429:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.1.1/lib/sinatra/base.rb:429:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.1.1/lib/sinatra/base.rb:426:in `catch'
In response to all the responses to:
http://twitter.com/rtomayko/status/1155906157
You should never do this in a source file included with your library,
app, or tests:
require 'rubygems'
The system I use to manage my $LOAD_PATH is not your library/app/tests
# Install logrotate on OS X:
# sudo port clean --all logrotate && sudo port install logrotate
# Add e.g. this to your crontab:
# /opt/local/sbin/logrotate -s /Users/deploy/.logrotate/sites.status /Users/deploy/.logrotate/sites.conf
# This file would be sites.conf.
# See http://overstimulate.com/articles/logrotate-rails-passenger for more info.
daily
missingok
rotate 30
it "redirects to the tags list" do
tag_name = "productivity"
my_mock_tag = mock_model(Tag, :name => tag_name, :destroy => true)
Tag.stub!(:find).with("37").and_return(my_mock_tag)
delete :destroy, :id => "37"
response.should redirect_to(tags_url)
flash[:notice].should == "Stopped monitoring #{tag_name}"
end
# rails application template for generating customized rails apps
#
# == requires ==
#
# * rails 2.3+, rspec, cucumber, culerity (langalex-culerity gem), machinist
#
# == a newly generated app using this template comes with ==
#
# * working user registration/login via authlogic, cucumber features to verify that it works
# * rspec/cucumber/culerity for testing
# App Template
# By Matt Polito
# Link to local copy of edge rails
rake('rails:freeze:gems')
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
# This assumes you have the metric_fu and kablame plugins installed.
# For kablame I like to modify it to include your stories or features dir as well as the specs.
# Set the artifacts dir for development
ENV['CC_BUILD_ARTIFACTS'] ||= File.expand_path("#{RAILS_ROOT}/metrics")
rspec_base = File.expand_path("#{RAILS_ROOT}/vendor/plugins/rspec/lib")
$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
require 'spec/rake/spectask'
require 'spec/rake/verify_rcov'
# From http://github.com/jaymcgavren
#
# Save this as rcov.rake in lib/tasks and use rcov:all =>
# to get accurate spec/feature coverage data
require 'cucumber/rake/task'
require 'spec/rake/spectask'
namespace :rcov do
Cucumber::Rake::Task.new(:cucumber) do |t|
[/opt/local/etc/macports] sudo port -v clean --all
Can't map the URL 'file://.' to a port description file ("Could not find Portfile in /opt/local/etc/macports").
Please verify that the directory and portfile syntax are correct.
To use the current port, you must be in a port's directory.
(you might also see this message if a pseudo-port such as
outdated or installed expands to no ports).
[/opt/local/etc/macports]