mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:57:29 +08:00
Upgrade the Listen gem
This commit is contained in:
parent
ef093b1610
commit
22214f5e5c
2
Gemfile
2
Gemfile
|
@ -122,7 +122,7 @@ end
|
|||
group :test, :development do
|
||||
gem 'rspec'
|
||||
gem 'mock_redis'
|
||||
gem 'listen', '0.7.3', require: false
|
||||
gem 'listen', require: false
|
||||
gem 'certified', require: false
|
||||
# later appears to break Fabricate(:topic, category: category)
|
||||
gem 'fabrication', '2.9.8', require: false
|
||||
|
|
|
@ -137,7 +137,10 @@ GEM
|
|||
jwt (1.5.6)
|
||||
kgio (2.10.0)
|
||||
libv8 (5.3.332.38.5)
|
||||
listen (0.7.3)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
ruby_dep (~> 1.2)
|
||||
logster (1.2.7)
|
||||
loofah (2.0.3)
|
||||
nokogiri (>= 1.5.9)
|
||||
|
@ -312,6 +315,7 @@ GEM
|
|||
ruby-readability (0.7.0)
|
||||
guess_html_encoding (>= 0.0.4)
|
||||
nokogiri (>= 1.6.0)
|
||||
ruby_dep (1.5.0)
|
||||
sanitize (4.4.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.4.4)
|
||||
|
@ -409,7 +413,7 @@ DEPENDENCIES
|
|||
htmlentities
|
||||
http_accept_language (~> 2.0.5)
|
||||
image_optim
|
||||
listen (= 0.7.3)
|
||||
listen
|
||||
logster
|
||||
lru_redux
|
||||
mail
|
||||
|
|
|
@ -179,12 +179,14 @@ class Autospec::Manager
|
|||
puts "@@@@@@@@@ Listen to #{path}/#{watch} #{options}" if @debug
|
||||
Thread.new do
|
||||
begin
|
||||
Listen.to("#{path}/#{watch}", options) do |modified, added, _|
|
||||
listener = Listen.to("#{path}/#{watch}", options) do |modified, added, _|
|
||||
paths = [modified, added].flatten
|
||||
paths.compact!
|
||||
paths.map!{|long| long[(path.length+1)..-1]}
|
||||
process_change(paths)
|
||||
end
|
||||
listener.start
|
||||
sleep
|
||||
rescue => e
|
||||
puts "FAILED to listen on changes to #{path}/#{watch}"
|
||||
puts e
|
||||
|
|
|
@ -31,7 +31,7 @@ module Stylesheet
|
|||
@paths.each do |watch|
|
||||
Thread.new do
|
||||
begin
|
||||
Listen.to("#{root}/#{watch}") do |modified, added, _|
|
||||
listener = Listen.to("#{root}/#{watch}", ignore: /xxxx/) do |modified, added, _|
|
||||
paths = [modified, added].flatten
|
||||
paths.compact!
|
||||
paths.map!{|long| long[(root.length+1)..-1]}
|
||||
|
@ -40,6 +40,8 @@ module Stylesheet
|
|||
rescue => e
|
||||
STDERR.puts "Failed to listen for CSS changes at: #{watch}\n#{e}"
|
||||
end
|
||||
listener.start
|
||||
sleep
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user