2013-09-03 17:40:54 +02:00
|
|
|
#-- copyright
|
2020-01-15 11:31:26 +01:00
|
|
|
# OpenProject is an open source project management software.
|
2024-07-30 13:42:36 +02:00
|
|
|
# Copyright (C) the OpenProject GmbH
|
2013-09-03 17:40:54 +02:00
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License version 3.
|
|
|
|
|
#
|
2013-09-16 17:59:31 +02:00
|
|
|
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
|
|
|
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
|
|
|
# Copyright (C) 2010-2013 the ChiliProject Team
|
|
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
#
|
2021-09-02 21:49:06 +02:00
|
|
|
# See COPYRIGHT and LICENSE files for more details.
|
2013-09-03 17:40:54 +02:00
|
|
|
#++
|
|
|
|
|
|
2012-11-30 15:27:44 +01:00
|
|
|
guard :rspec do # , :cli => "--drb" do
|
|
|
|
|
watch(%r{^spec/.+_spec\.rb$})
|
|
|
|
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
2015-06-30 12:05:07 +02:00
|
|
|
watch('spec/spec_helper.rb') { 'spec' }
|
2012-11-30 15:27:44 +01:00
|
|
|
|
|
|
|
|
# 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" }
|
2021-02-11 16:02:18 +01:00
|
|
|
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) do |m|
|
|
|
|
|
["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"]
|
|
|
|
|
end
|
2015-06-30 12:05:07 +02:00
|
|
|
watch(%r{^spec/support/(.+)\.rb$}) { 'spec' }
|
|
|
|
|
watch('config/routes.rb') { 'spec/routing' }
|
|
|
|
|
watch('app/controllers/application_controller.rb') { 'spec/controllers' }
|
2012-11-30 15:27:44 +01:00
|
|
|
|
|
|
|
|
# Capybara request specs
|
|
|
|
|
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
|
|
|
|
|
|
|
|
|
# Turnip features and steps
|
|
|
|
|
watch(%r{^spec/acceptance/(.+)\.feature$})
|
2021-02-11 16:02:18 +01:00
|
|
|
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
2012-11-30 15:27:44 +01:00
|
|
|
end
|