covered 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5a8d712b09a62ea00fd09526b773256fc6378296e41e3abec2eb1792d962ded
4
- data.tar.gz: b4e22948ec8e3e6e78cfe67e5ce07cb37953a3069668e93ba2dbd4d6c70da01e
3
+ metadata.gz: cff6650fc286675cf539c997a67b002a7375b5d471556415746c33694f31ac55
4
+ data.tar.gz: 36aeabb31c74c4a268610e71f5c0bfd0c8ac811e51148c4b6497527268eb77a6
5
5
  SHA512:
6
- metadata.gz: 61d0cb25ff4ea9bf1d69ef41e96d6ef45705e9fea093716110bb6926065a35886f2541c888a76ae073444f4a1550a8ccfb22d804ffe7e740440184b221a44029
7
- data.tar.gz: 76c8b82e307d08afa7c3595ff5eba232dbcff7058e7c2275a8650af9d56957e193b080bcc62ce0a1e5a70f5a2242d25d4791bebfb9a8058fa54b97623d6fa5c4
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
- def accept? path
121
- !@pattern.match?(path)
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
 
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Covered
22
- VERSION = "0.10.2"
22
+ VERSION = "0.10.3"
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: covered
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams