From 1836023a2b1d5baf8ee5d016fa3d1534bb6564de Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Fri, 3 Jul 2015 01:13:59 +0200 Subject: [PATCH] fix spring ... was not reloading lib folder --- Gemfile | 1 + Gemfile.lock | 4 ++++ config/spring.rb | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/Gemfile b/Gemfile index ae25eaf..6ae04c3 100644 --- a/Gemfile +++ b/Gemfile @@ -48,6 +48,7 @@ group :development, :test do # preloading environment gem "spring" gem "spring-commands-rspec" + gem "spring-watcher-listen" # GUID generation gem "uuid", "~> 2.3.8" diff --git a/Gemfile.lock b/Gemfile.lock index 4940f9d..47c2fb5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -201,6 +201,9 @@ GEM spring (1.3.6) spring-commands-rspec (1.0.4) spring (>= 0.9.1) + spring-watcher-listen (2.0.0) + listen (>= 2.7, < 4.0) + spring (~> 1.2) sprockets (3.2.0) rack (~> 1.0) sprockets-rails (2.3.2) @@ -238,6 +241,7 @@ DEPENDENCIES simplecov-rcov (= 0.2.3) spring spring-commands-rspec + spring-watcher-listen sqlite3 (~> 1.3.10) uuid (~> 2.3.8) yard diff --git a/config/spring.rb b/config/spring.rb index 5684f46..d8a7f92 100644 --- a/config/spring.rb +++ b/config/spring.rb @@ -1 +1,6 @@ Spring.application_root = "./test/dummy" + +root_path = Pathname.new(File.expand_path(".")) +Spring.watcher = Spring::Watcher::Listen.new(root_path, 0.2) + +Spring.watch("./lib/")