File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -416,10 +416,23 @@ namespace :common_plaintext_files do
416
416
file . basename . to_s =~ /ISSUE_TEMPLATE/
417
417
end
418
418
419
+ COMMON_PLAINTEXT_EXCLUSIONS =
420
+ {
421
+ 'rspec' =>
422
+ %w[ BUILD_DETAIL.md.erb CONTRIBUTING.md.erb DEVELOPMENT.md.erb ISSUE_TEMPLATE.md.erb REPORT_TEMPLATE.md ] ,
423
+ 'rspec-rails' => %w[ ISSUE_TEMPLATE.md.erb REPORT_TEMPLATE.md ]
424
+ }
425
+
419
426
def common_plaintext_files_with_comments ( project_name )
420
427
plaintext_root = BaseRspecPath . join ( 'common_plaintext_files' )
428
+
429
+ excluded_files =
430
+ COMMON_PLAINTEXT_EXCLUSIONS . fetch ( project_name , [ ] ) . map do |filename |
431
+ File . expand_path ( filename , plaintext_root ) . to_s
432
+ end
433
+
421
434
file_names = Pathname . glob ( plaintext_root . join ( '{.[!.],*}*' , '{*,.*}' ) ) . select do |f |
422
- f . file?
435
+ f . file? && ! excluded_files . include? ( f . to_s )
423
436
end
424
437
425
438
file_names . map do |file |
You can’t perform that action at this time.
0 commit comments