File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- code_manifest (1.4 .0 )
4+ code_manifest (1.5 .0 )
55
66GEM
77 remote: https://rubygems.org/
Original file line number Diff line number Diff line change @@ -16,7 +16,13 @@ def initialize(patterns)
1616 end
1717
1818 def files
19- @files ||= ( inclusion_files - exclusion_files ) . sort! . freeze
19+ @files ||= begin
20+ inclusion_files = Dir . glob ( inclusion_rules . map ( &:glob ) , GLOB_OPTIONS )
21+ inclusion_files . delete_if do |file |
22+ exclusion_rules . any? { |rule | rule . match? ( file ) }
23+ end
24+ files_with_relative_path ( inclusion_files ) . sort! . freeze
25+ end
2026 end
2127
2228 def digest
@@ -31,26 +37,18 @@ def matches(paths)
3137 inclusion_rules . any? { |rule | rule . match? ( path ) }
3238 end
3339 result_paths . reject! do |path |
34- exclusion_files . any? { |rule | rule . match? ( path ) }
40+ exclusion_rules . any? { |rule | rule . match? ( path ) }
3541 end
3642
3743 result_paths . sort!
3844 end
3945
4046 private
4147
42- def inclusion_files
43- @inclusion_files ||= files_with_relative_path ( Dir . glob ( inclusion_rules . map ( &:glob ) , GLOB_OPTIONS ) )
44- end
45-
4648 def inclusion_rules
4749 @inclusion_rules ||= rules . reject ( &:exclude )
4850 end
4951
50- def exclusion_files
51- @exclusion_files ||= files_with_relative_path ( Dir . glob ( exclusion_rules . map ( &:glob ) , GLOB_OPTIONS ) )
52- end
53-
5452 def exclusion_rules
5553 @exclusion_rules ||= rules . select ( &:exclude )
5654 end
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module CodeManifest
4- VERSION = '1.4 .0'
4+ VERSION = '1.5 .0'
55end
You can’t perform that action at this time.
0 commit comments