codeclimate-yaml 0.1.1 → 0.2.0

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
  SHA1:
3
- metadata.gz: 12f27478aa41fb741a3c11e4db37d1672c721f62
4
- data.tar.gz: 3a4b5e11ee9cebcb38b4c7c53e8b450293d05f6a
3
+ metadata.gz: ff32300e09112e977940a9e135f83bb7490b1137
4
+ data.tar.gz: d766a6b27cdffff7a5bf7ba0be954eb446b2795e
5
5
  SHA512:
6
- metadata.gz: a143d84ca0aa95337f2943a4417844dc402bcfb03907629b1c7d5b7e4532e6caa767224db0d1944ad46aecaa19b3451973530c1880bf347b26e5a0303cd8a10c
7
- data.tar.gz: b969c0f7065afdfd0c45e2a10a2ac46a810fc6b42a8c5051c6977a385d34fcef16421744e41ce8340529dfd442871242b7859d7e6a5c20c8dc9633e2f9789d17
6
+ metadata.gz: 31c452ff7de48e747c2b50363f3936fdcd5dddb8fbb4119ca4866f21160f3cada355e90c18f40fa8cf58e0b570c3fa52278089aa02597d5952c4ef7dd20cfcea
7
+ data.tar.gz: 3f67e3f6f9d4d3f907f304f418a262d8c01b700aa6164fef43f8b45c28631178686ae996ed1b667dc9a543c33e330724e0f1be0138f443933bd5a909596829dc
@@ -2,8 +2,8 @@ module CC
2
2
  module Yaml
3
3
  module Nodes
4
4
  class Glob < Scalar
5
- def match?(path)
6
- File.fnmatch(to_s, path)
5
+ def value
6
+ @value.sub(%r{\*\*([^\/]*)?$}, "**/*\\1") # normalize glob format: app/** => app/**/* and **.rb => **/*.rb
7
7
  end
8
8
  end
9
9
  end
@@ -3,10 +3,6 @@ module CC
3
3
  module Nodes
4
4
  class GlobList < Sequence
5
5
  type Glob
6
-
7
- def match_any?(path)
8
- any? { |g| g.match?(path) }
9
- end
10
6
  end
11
7
  end
12
8
  end
@@ -3,10 +3,6 @@ module CC
3
3
  module Nodes
4
4
  class Ratings < Mapping
5
5
  map :paths, to: GlobList
6
-
7
- def rate?(path)
8
- paths.present? && paths.match_any?(path)
9
- end
10
6
  end
11
7
  end
12
8
  end
@@ -21,14 +21,6 @@ module CC
21
21
  def inspect
22
22
  "#<#{self.class.name}:#{super}>"
23
23
  end
24
-
25
- def exclude?(path)
26
- exclude_paths.present? && exclude_paths.match_any?(path)
27
- end
28
-
29
- def rate?(path)
30
- ratings.present? && ratings.rate?(path)
31
- end
32
24
  end
33
25
  end
34
26
  end
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Yaml
3
- VERSION = "0.1.1".freeze
3
+ VERSION = "0.2.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate-yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code Climate
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-23 00:00:00.000000000 Z
11
+ date: 2015-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: secure_string