ignore assets

fix runner so it works on mac
get rid of some test warnings
This commit is contained in:
Sam Saffron 2013-04-30 12:43:21 +10:00
parent fc56e51cc6
commit 94a578e4b2
5 changed files with 24 additions and 15 deletions

2
.gitignore vendored
View File

@ -20,6 +20,8 @@ dump.rdb
/cache
/coverage/*
/public/assets/*
config/database.yml
config/redis.yml
config/discourse.pill

View File

@ -68,7 +68,8 @@ class Autospec::Runner
@signal.signal
end
Process.wait
Process.wait(@spork_pid)
puts "Spork has been terminated, exiting"
rescue => e
puts e
@ -84,7 +85,7 @@ class Autospec::Runner
sleep(0.001)
end
end
t.join
t.join rescue nil
end
def force_polling?
@ -293,7 +294,7 @@ class Autospec::Runner
sleep 1
end
@spork_pid = Process.spawn("RAILS_ENV=test bundle exec spork")
@spork_pid = Process.spawn({'RAILS_ENV' => 'test'}, "bundle exec spork")
write_pid_file(spork_pid_file, @spork_pid)
running = false

View File

@ -10,13 +10,16 @@ Dir["#{Rails.root}/lib/oneboxer/*_onebox.rb"].each {|f|
module Oneboxer
extend Oneboxer::Base
Result = Struct.new(:doc, :changed) do
def to_html
doc.to_html
end
# keep reloaders happy
unless defined? Oneboxer::Result
Result = Struct.new(:doc, :changed) do
def to_html
doc.to_html
end
def changed?
changed
def changed?
changed
end
end
end

View File

@ -3,10 +3,13 @@ require_dependency 'oneboxer/handlebars_onebox'
module Oneboxer
class RottentomatoesOnebox < HandlebarsOnebox
SYNOPSIS_MAX_TEXT = 370
ROTTEN_IMG = 'http://images.rottentomatoescdn.com/images/icons/rt.rotten.med.png'
FRESH_IMG = 'http://images.rottentomatoescdn.com/images/icons/rt.fresh.med.png'
POPCORN_IMG = 'http://images.rottentomatoescdn.com/images/icons/popcorn_27x31.png'
# keep reloaders happy
unless defined? SYNOPSIS_MAX_TEXT
SYNOPSIS_MAX_TEXT = 370
ROTTEN_IMG = 'http://images.rottentomatoescdn.com/images/icons/rt.rotten.med.png'
FRESH_IMG = 'http://images.rottentomatoescdn.com/images/icons/rt.fresh.med.png'
POPCORN_IMG = 'http://images.rottentomatoescdn.com/images/icons/popcorn_27x31.png'
end
matcher /^http:\/\/(?:www\.)?rottentomatoes\.com(\/mobile)?\/m\/.*$/
favicon 'rottentomatoes.png'