diff options
| author | Ash McKenzie <amckenzie@gitlab.com> | 2018-07-26 17:45:25 +1000 |
|---|---|---|
| committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-07-30 10:39:17 +1000 |
| commit | 724d7c2ff5f6a5c75c6bab8137a97a0dac6f05ed (patch) | |
| tree | 8d3eef5af6370d3a522c179d791848cc2423baa0 | |
| parent | 93b3b92d70d2165795378933d9367c76322b9748 (diff) | |
| download | gitlab-shell-724d7c2ff5f6a5c75c6bab8137a97a0dac6f05ed.tar.gz | |
Update Guardfile
* Fix lib matcher so it actually runs specs
* Strip out only what we need/use
| -rw-r--r-- | Guardfile | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -1,23 +1,7 @@ -# A sample Guardfile # More info at https://github.com/guard/guard#readme -guard 'rspec' do +guard :rspec, cmd: 'bundle exec rspec' do watch(%r{^spec/.+_spec\.rb$}) - watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } + watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } watch('spec/spec_helper.rb') { "spec" } - - # Rails example - watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } - watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } - watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } - watch(%r{^spec/support/(.+)\.rb$}) { "spec" } - watch('config/routes.rb') { "spec/routing" } - watch('app/controllers/application_controller.rb') { "spec/controllers" } - - # Capybara features specs - watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" } - - # 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 |
