From eba0c5bd33db83c11111262176f490991e707435 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Sun, 12 Aug 2012 13:29:35 +0800 Subject: [PATCH] add app to controller, model, helper and view FILE regexp --- lib/rails_best_practices/core/check.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/rails_best_practices/core/check.rb b/lib/rails_best_practices/core/check.rb index 367182f7..cc56637d 100644 --- a/lib/rails_best_practices/core/check.rb +++ b/lib/rails_best_practices/core/check.rb @@ -4,15 +4,15 @@ module Core # A Check class that takes charge of checking the sexp. class Check ALL_FILES = /.*/ - CONTROLLER_FILES = /(controllers|cells)\/.*\.rb$/ + CONTROLLER_FILES = /app\/(controllers|cells)\/.*\.rb$/ MIGRATION_FILES = /db\/migrate\/.*\.rb$/ - MODEL_FILES = /models\/.*\.rb$/ - MAILER_FILES = /models\/.*mailer\.rb$|mailers\/.*mailer\.rb/ - VIEW_FILES = /(views|cells)\/.*\.(erb|haml|slim|builder|rxml)$/ - PARTIAL_VIEW_FILES = /(views|cells)\/.*\/_.*\.(erb|haml|slim|builder|rxml)$/ + MODEL_FILES = /app\/models\/.*\.rb$/ + MAILER_FILES = /app\/models\/.*mailer\.rb$|app\/mailers\/.*\.rb/ + VIEW_FILES = /app\/(views|cells)\/.*\.(erb|haml|slim|builder|rxml)$/ + PARTIAL_VIEW_FILES = /app\/(views|cells)\/.*\/_.*\.(erb|haml|slim|builder|rxml)$/ ROUTE_FILES = /config\/routes.*\.rb/ SCHEMA_FILE = /db\/schema\.rb/ - HELPER_FILES = /helpers\/.*\.rb$/ + HELPER_FILES = /app\/helpers\/.*\.rb$/ DEPLOY_FILES = /config\/deploy.*\.rb/ CONFIG_FILES = /config\/(application|environment|environments\/.*)\.rb/