src/Guardfile in rgentpl-1.0.4 vs src/Guardfile in rgentpl-1.0.5
- old
+ new
@@ -15,43 +15,51 @@
# Bundler
guard :bundler do
watch('Gemfile')
end
-# Cane
+# Yard (documentation)
+guard :yard,
+ stdout: 'log/yard.log' do
+
+ watch(%r{lib/.+\.rb})
+ watch(%r{vendor/.+\.rb})
+end
+
+# Cane (code metrics)
guard :cane do
watch(%r{^(.+)\.rb$})
end
-# Flog
-guard :flog do
- watch(%r{^lib/.+\.rb$})
+# Rubycritic (code metrics)
+guard 'rubycritic' do
+ watch(%r{^lib/(.+)\.rb$})
end
-# Rubocop
-guard :rubocop,
- all_on_start: false,
- cli: ['--format', 'clang', '--rails'],
- notification: true do
- watch(%r{.+\.rb$})
- watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
-end
+group :red_green_refactor, halt_on_fail: true do
+ # RSpec
+ guard :rspec,
+ cmd: 'rspec -f html -o ./tmp/spec_results.html --fail-fast',
+ launchy: false,
+ all_on_start: false,
+ failed_mode: :focus,
+ notification: true do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
-# Yard
-guard 'yard' do
- watch(%r{lib/.+\.rb})
- watch(%r{vendor/.+\.rb})
-end
+ # Turnip features and steps
+ watch(%r{^spec/acceptance/(.+)\.feature$})
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
+ end
-# Rspec
-guard :rspec,
- cmd: 'rspec --color --format doc --fail-fast --drb',
- all_on_start: false,
- notification: true do
- watch(%r{^spec/.+_spec\.rb$})
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
- watch('spec/spec_helper.rb') { "spec" }
+ # Rubocop (code style checker)
+ guard :rubocop,
+ all_on_start: false,
+ hide_stdout: false,
+ cli: ['--out tmp/rubocop_results.html', '--format html', '--rails'],
+ notification: true do
- # Turnip features and steps
- watch(%r{^spec/acceptance/(.+)\.feature$})
- watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
+ watch(%r{.+\.rb$})
+ watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
+ end
end