Skip to content

Commit da75829

Browse files
committed
Fix for use for spring 4
spring 4 changed, files, directories to be hashes instead of Sets ( rails/spring@7f4ddf9 )
1 parent 5c8aa81 commit da75829

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/spring/watcher/listen.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def subjects_changed
4343
end
4444

4545
def watching?(file)
46-
files.include?(file) || file.start_with?(*directories)
46+
files.include?(file) || file.start_with?(*directories.keys)
4747
end
4848

4949
def changed(modified, added, removed)
@@ -56,8 +56,8 @@ def changed(modified, added, removed)
5656

5757
def base_directories
5858
([root] +
59-
files.reject { |f| f.start_with? "#{root}/" }.map { |f| File.expand_path("#{f}/..") } +
60-
directories.reject { |d| d.start_with? "#{root}/" }
59+
files.keys.reject { |f| f.start_with? "#{root}/" }.map { |f| File.expand_path("#{f}/..") } +
60+
directories.keys.reject { |d| d.start_with? "#{root}/" }
6161
).uniq.map { |path| Pathname.new(path) }
6262
end
6363
end

spring-watcher-listen.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
1818
spec.add_development_dependency "rake"
1919
spec.add_development_dependency "activesupport"
2020

21-
spec.add_dependency "spring", ">= 1.2", "< 4.0"
21+
spec.add_dependency "spring", ">= 4", "< 5"
2222
spec.add_dependency "listen", ">= 2.7", '< 4.0'
2323
end

0 commit comments

Comments
 (0)