File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1- ** v1.4.7** Bump up to processing-3.3.7
1+ ** v1.4.7** Bump up to processing-3.3.7, make watch fail early if too many ruby files to watch
22
33** v1.4.6** Bump up to JRubyComplete-9.1.16.0
44
Original file line number Diff line number Diff line change @@ -13,14 +13,17 @@ class Watcher
1313 WATCH_MESSAGE ||= <<-EOS . freeze
1414 Warning:
1515 To protect you from running watch mode in a top level
16- directory with lots of nested ruby or GLSL files we
16+ directory with lots of nested ruby files we
1717 limit the number of files to watch to %d.
1818 If you really want to watch %d files you should
1919 increase MAX_WATCH in ~/.jruby_art/config.yml
2020
2121 EOS
2222 SLEEP_TIME = 0.2
2323 def initialize
24+ count = Dir [ "**.*rb" ] . length
25+ max_watch = RP_CONFIG . fetch ( 'MAX_WATCH' , 30 ) . to_i
26+ return warn format ( WATCH_MESSAGE , max_watch , count ) if count > max_watch
2427 reload_files_to_watch
2528 @time = Time . now
2629 start_watching
@@ -71,11 +74,6 @@ def start_runner
7174
7275 def reload_files_to_watch
7376 @files = Dir . glob ( File . join ( SKETCH_ROOT , '**/*.{rb,glsl}' ) )
74- count = @files . length
75- max_watch = RP_CONFIG . fetch ( 'MAX_WATCH' , 32 )
76- return unless count > max_watch . to_i
77- warn format ( WATCH_MESSAGE , max_watch , count )
78- abort
7977 end
8078 end
8179end
You can’t perform that action at this time.
0 commit comments