Commit e7dc6bc

mo khan <mo@mokhan.ca>
2015-05-02 03:29:15
update guard config to work with foodcritic and rspec.
1 parent 8fc4b04
Gemfile
@@ -12,6 +12,6 @@ group :test do
   gem 'hipchat'
 
   gem 'guard'
-  gem 'guard-foodcritic'
   gem 'guard-rspec'
+  gem 'guard-shell'
 end
Gemfile.lock
@@ -116,13 +116,13 @@ GEM
       shellany (~> 0.0)
       thor (>= 0.18.1)
     guard-compat (1.2.1)
-    guard-foodcritic (1.0.3)
-      foodcritic (>= 1.3, < 5.0)
-      guard (>= 1.0, < 3.0)
     guard-rspec (4.5.0)
       guard (~> 2.1)
       guard-compat (~> 1.1)
       rspec (>= 2.99.0, < 4.0)
+    guard-shell (0.7.1)
+      guard (>= 2.0.0)
+      guard-compat (~> 1.0)
     hashie (2.1.2)
     highline (1.7.2)
     hipchat (1.5.1)
@@ -303,8 +303,8 @@ DEPENDENCIES
   chefspec
   foodcritic
   guard
-  guard-foodcritic
   guard-rspec
+  guard-shell
   hipchat
   kitchen-docker
   kitchen-lxc
Guardfile
@@ -1,12 +1,11 @@
-guard :rspec, cli: '--color', all_on_start: false do
+guard :rspec, cmd: "bin/rspec" do
   watch(%r{^spec/.+_spec\.rb$})
-  watch(%r{recipes/(.+)\.rb$})     { |m| "spec/#{m[1]}_spec.rb" }
+  watch(%r{recipes/(.+)\.rb$})  { |m| "spec/#{m[1]}_spec.rb" }
   watch('spec/spec_helper.rb')  { 'spec' }
 end
 
-guard :foodcritic, cookbook_paths: '.', all_on_start: false do
-  watch(%r{attributes/.+\.rb$})
-  watch(%r{providers/.+\.rb$})
-  watch(%r{recipes/.+\.rb$})
-  watch(%r{resources/.+\.rb$})
+guard :shell do
+  watch(%r{recipes/(.+)\.rb$}) do |m| 
+    system("bin/foodcritic .")
+  end
 end