covered 0.10.2 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/covered/files.rb +9 -2
- data/lib/covered/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: cff6650fc286675cf539c997a67b002a7375b5d471556415746c33694f31ac55
|
4
|
+
data.tar.gz: 36aeabb31c74c4a268610e71f5c0bfd0c8ac811e51148c4b6497527268eb77a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f35c3702309e5673b6f5763686186c02ecf40a080403ddafc82e791ac55babad0bffe677b72a89b9051b5d29d1220950ec282a66f6354fde65f50980b1c5f8f
|
7
|
+
data.tar.gz: a5a5b7e6baf404aac6a0158555656a0759ed2f03aa15730f830ef47a9cc92d73bb63ae4a69bf5c93c64d783b004fbad5d72b4ae40490da7de791de8b87af4cd1
|
data/lib/covered/files.rb
CHANGED
@@ -117,8 +117,15 @@ module Covered
|
|
117
117
|
|
118
118
|
attr :pattern
|
119
119
|
|
120
|
-
|
121
|
-
|
120
|
+
if Regexp.instance_methods.include? :match?
|
121
|
+
# This is better as it doesn't allocate a MatchData instance which is essentially useless.
|
122
|
+
def accept? path
|
123
|
+
!@pattern.match?(path)
|
124
|
+
end
|
125
|
+
else
|
126
|
+
def accept? path
|
127
|
+
!(@pattern =~ path)
|
128
|
+
end
|
122
129
|
end
|
123
130
|
end
|
124
131
|
|
data/lib/covered/version.rb
CHANGED