mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
ignore assets
fix runner so it works on mac get rid of some test warnings
This commit is contained in:
parent
fc56e51cc6
commit
94a578e4b2
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -20,6 +20,8 @@ dump.rdb
|
||||||
/cache
|
/cache
|
||||||
/coverage/*
|
/coverage/*
|
||||||
|
|
||||||
|
/public/assets/*
|
||||||
|
|
||||||
config/database.yml
|
config/database.yml
|
||||||
config/redis.yml
|
config/redis.yml
|
||||||
config/discourse.pill
|
config/discourse.pill
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Autospec::Runner
|
||||||
Signal.trap("SIGINT") {stop_spork; exit }
|
Signal.trap("SIGINT") {stop_spork; exit }
|
||||||
|
|
||||||
puts "Forced polling (slower) - inotify does not work on network filesystems, use local filesystem to avoid" if force_polling
|
puts "Forced polling (slower) - inotify does not work on network filesystems, use local filesystem to avoid" if force_polling
|
||||||
|
|
||||||
Thread.start do
|
Thread.start do
|
||||||
Listen.to('.', force_polling: force_polling, filter: /^app|^spec|^lib/, relative_paths: true) do |modified, added, removed|
|
Listen.to('.', force_polling: force_polling, filter: /^app|^spec|^lib/, relative_paths: true) do |modified, added, removed|
|
||||||
process_change([modified, added].flatten.compact)
|
process_change([modified, added].flatten.compact)
|
||||||
|
@ -68,7 +68,8 @@ class Autospec::Runner
|
||||||
@signal.signal
|
@signal.signal
|
||||||
end
|
end
|
||||||
|
|
||||||
Process.wait
|
Process.wait(@spork_pid)
|
||||||
|
puts "Spork has been terminated, exiting"
|
||||||
|
|
||||||
rescue => e
|
rescue => e
|
||||||
puts e
|
puts e
|
||||||
|
@ -84,7 +85,7 @@ class Autospec::Runner
|
||||||
sleep(0.001)
|
sleep(0.001)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
t.join
|
t.join rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def force_polling?
|
def force_polling?
|
||||||
|
@ -293,7 +294,7 @@ class Autospec::Runner
|
||||||
sleep 1
|
sleep 1
|
||||||
end
|
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)
|
write_pid_file(spork_pid_file, @spork_pid)
|
||||||
|
|
||||||
running = false
|
running = false
|
||||||
|
|
|
@ -10,13 +10,16 @@ Dir["#{Rails.root}/lib/oneboxer/*_onebox.rb"].each {|f|
|
||||||
module Oneboxer
|
module Oneboxer
|
||||||
extend Oneboxer::Base
|
extend Oneboxer::Base
|
||||||
|
|
||||||
Result = Struct.new(:doc, :changed) do
|
# keep reloaders happy
|
||||||
def to_html
|
unless defined? Oneboxer::Result
|
||||||
doc.to_html
|
Result = Struct.new(:doc, :changed) do
|
||||||
end
|
def to_html
|
||||||
|
doc.to_html
|
||||||
|
end
|
||||||
|
|
||||||
def changed?
|
def changed?
|
||||||
changed
|
changed
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,13 @@ require_dependency 'oneboxer/handlebars_onebox'
|
||||||
module Oneboxer
|
module Oneboxer
|
||||||
class RottentomatoesOnebox < HandlebarsOnebox
|
class RottentomatoesOnebox < HandlebarsOnebox
|
||||||
|
|
||||||
SYNOPSIS_MAX_TEXT = 370
|
# keep reloaders happy
|
||||||
ROTTEN_IMG = 'http://images.rottentomatoescdn.com/images/icons/rt.rotten.med.png'
|
unless defined? SYNOPSIS_MAX_TEXT
|
||||||
FRESH_IMG = 'http://images.rottentomatoescdn.com/images/icons/rt.fresh.med.png'
|
SYNOPSIS_MAX_TEXT = 370
|
||||||
POPCORN_IMG = 'http://images.rottentomatoescdn.com/images/icons/popcorn_27x31.png'
|
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\/.*$/
|
matcher /^http:\/\/(?:www\.)?rottentomatoes\.com(\/mobile)?\/m\/.*$/
|
||||||
favicon 'rottentomatoes.png'
|
favicon 'rottentomatoes.png'
|
||||||
|
|
|
@ -187,4 +187,4 @@ describe AdminDashboardData do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user