Guardfile in message-driver-0.6.1 vs Guardfile in message-driver-0.7.0
- old
+ new
@@ -6,45 +6,62 @@
guard 'bundler' do
watch('Gemfile')
watch(/^.+\.gemspec/)
end
-common_rspec_opts = { all_after_pass: true }
-unit_spec_opts = common_rspec_opts.merge(spec_paths: ['spec/units'], cmd: 'bundle exec rspec -f doc', run_all: { cmd: 'bundle exec rspec' })
+common_rspec_opts = {
+ all_after_pass: false,
+ cmd: 'bundle exec rspec -f doc',
+ run_all: { cmd: 'bundle exec rspec' }
+}
+unit_spec_opts = common_rspec_opts.merge(
+ spec_paths: ['spec/units'],
+ results_file: File.join(File.dirname(__FILE__), "tmp/rspec_units_#{BrokerConfig.current_adapter}_guard_result")
+)
integration_spec_opts = common_rspec_opts.merge(
spec_paths: ["spec/integration/#{BrokerConfig.current_adapter}"],
- cmd: 'bundle exec rspec -f doc -t all_adapters',
- run_all: { cmd: 'bundle exec rspec -t all_adapters' }
+ results_file: File.join(File.dirname(__FILE__), "tmp/rspec_integration_#{BrokerConfig.current_adapter}_guard_result"),
+ cmd_additional_args: '-t all_adapters'
)
-group 'specs' do
- guard 'rspec', unit_spec_opts do
- watch(%r{^spec/units/.+_spec\.rb$})
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/units/#{m[1]}_spec.rb" }
- watch(%r{^spec/support/(.+)\.rb$}) { 'spec' }
- watch('spec/spec_helper.rb') { 'spec' }
+group :tests_and_checks, halt_on_failure: true do
+ group 'specs' do
+ guard 'rspec', unit_spec_opts do
+ watch(%r{^spec/units/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/units/#{m[1]}_spec.rb" }
+ watch(%r{^spec/support/(.+)\.rb$}) { 'spec/units' }
+ watch('spec/spec_helper.rb') { 'spec/units' }
+ end
end
-end
-group 'integration' do
- guard 'rspec', integration_spec_opts do
- watch(%r{^spec/integration/.+_spec\.rb$})
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/integration/#{m[1]}_spec.rb" }
- watch(%r{^spec/support/(.+)\.rb$}) { 'spec' }
- watch('spec/spec_helper.rb') { 'spec' }
+ group 'integration' do
+ guard 'rspec', integration_spec_opts do
+ watch(%r{^spec/integration/.+_spec\.rb$})
+ watch(%r{^lib/message_driver/adapters/(.+)\.rb$}) { |m| "spec/integration/#{BrokerConfig.current_adapter}/#{m[1]}_spec.rb" }
+ watch(%r{^spec/support/(.+)\.rb$}) { integration_spec_opts[:spec_paths] }
+ watch('spec/spec_helper.rb') { integration_spec_opts[:spec_paths] }
+ end
end
-end
-group 'features' do
- cucumber_cli = "--no-profile --color --format progress --strict --tag @all_adapters,@#{BrokerConfig.current_adapter} --tag ~@wip"
- cucumber_run_all_cli = "#{cucumber_cli} --tag ~@slow"
- guard 'cucumber', change_format: 'pretty', all_on_start: false, cli: cucumber_cli, run_all: { cli: cucumber_run_all_cli } do
- watch(%r{^features/.+\.feature$})
- watch(%r{^features/support/.+$}) { 'features' }
- watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
+ group 'features' do
+ guard('cucumber',
+ all_on_start: false,
+ cmd: "bundle exec cucumber --no-profile --color --strict --tag @all_adapters,@#{BrokerConfig.current_adapter} --tag ~@wip",
+ cmd_additional_args: '--format pretty --tag ~@slow',
+ run_all: {
+ cmd_additional_args: '--format progress --tag ~@slow'
+ }
+ ) do
+ watch(%r{^features/.+\.feature$})
+ watch(%r{^features/support/.+$}) { 'features' }
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
+ end
end
-end
-guard :rubocop do
- watch(/.+\.rb/)
- watch(%r{(?:.+/)?\.rubocop(?:_.+)*\.yml$}) { |m| File.dirname(m[0]) }
+ guard :rubocop, cli: '-D -E' do
+ watch(/.+\.rb$/)
+ watch('Gemfile')
+ watch('Guardfile')
+ watch(/.+\.gemspec$/)
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
+ end
end