Skip to content

Commit 5d7cc42

Browse files
committed
Exclude some files on some repos for common repos
1 parent 58859a4 commit 5d7cc42

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Rakefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,23 @@ namespace :common_plaintext_files do
416416
file.basename.to_s =~ /ISSUE_TEMPLATE/
417417
end
418418

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+
419426
def common_plaintext_files_with_comments(project_name)
420427
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+
421434
file_names = Pathname.glob(plaintext_root.join('{.[!.],*}*', '{*,.*}')).select do |f|
422-
f.file?
435+
f.file? && !excluded_files.include?(f.to_s)
423436
end
424437

425438
file_names.map do |file|

0 commit comments

Comments
 (0)