code_manifest 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/code_manifest/manifest.rb +8 -10
- data/lib/code_manifest/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57ebc00567f59f24c5be818a88ecb8d117175474290653d734a311d7718802de
|
4
|
+
data.tar.gz: b7a582abfe21b8f1eaf5beed11fe1244c43307d9e034c9a68da64ab4e9ff53b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6793af62e46f89a33aed509ef44c9bccfd4e280ec483a1a39ec405d2145112ae8ff5531c7bd4e197f45e6b1973901182327eda7ea54f922930c172b63d21a083
|
7
|
+
data.tar.gz: 88387c161220a1142bbd69a8d6811fe8de84d8bdb8a7381db027c76f193e5461f34bdc5fda4b9b802e5d0fc3b7202329d015c942703236e5c0d386b14b2bb2eb
|
@@ -16,7 +16,13 @@ module CodeManifest
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def files
|
19
|
-
@files ||=
|
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
|
20
26
|
end
|
21
27
|
|
22
28
|
def digest
|
@@ -31,7 +37,7 @@ module CodeManifest
|
|
31
37
|
inclusion_rules.any? { |rule| rule.match?(path) }
|
32
38
|
end
|
33
39
|
result_paths.reject! do |path|
|
34
|
-
|
40
|
+
exclusion_rules.any? { |rule| rule.match?(path) }
|
35
41
|
end
|
36
42
|
|
37
43
|
result_paths.sort!
|
@@ -39,18 +45,10 @@ module CodeManifest
|
|
39
45
|
|
40
46
|
private
|
41
47
|
|
42
|
-
def inclusion_files
|
43
|
-
@inclusion_files ||= files_with_relative_path(Dir.glob(inclusion_rules.map(&:glob), GLOB_OPTIONS))
|
44
|
-
end
|
45
|
-
|
46
48
|
def inclusion_rules
|
47
49
|
@inclusion_rules ||= rules.reject(&:exclude)
|
48
50
|
end
|
49
51
|
|
50
|
-
def exclusion_files
|
51
|
-
@exclusion_files ||= files_with_relative_path(Dir.glob(exclusion_rules.map(&:glob), GLOB_OPTIONS))
|
52
|
-
end
|
53
|
-
|
54
52
|
def exclusion_rules
|
55
53
|
@exclusion_rules ||= rules.select(&:exclude)
|
56
54
|
end
|