codeclimate-yaml 0.11.0 → 0.12.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: 29a46bf62a931500987dafd5c51a21d9eba10603
4
- data.tar.gz: c61525b5d28bf72ed0cbed48fcb1b1d48c28c455
3
+ metadata.gz: 6ada32712348a52ee54daa65447ee137330e7417
4
+ data.tar.gz: 3b4939b3f0a07276aca33b41a61dcc1657cba285
5
5
  SHA512:
6
- metadata.gz: 38059823e0f185f7a12d2dad8365da557796d32cc2e2516832f1cf04c0e395872ed5a4b705c1583ca937dcee61aef759892be276e56f36fff9e6012ae8d6ccae
7
- data.tar.gz: 8de327310de9c3c5034ca925f7f069fa3b37b535716f59702fb881799ec105fd912cb00b29f155bd04310648878baf28b1727577555b3e970c993e8dd5b4cb42
6
+ metadata.gz: be80f134b69a3306d784f8fb83296fb975ea9a32c0df8a9b79be69fd4398044cef8676a2dbb061e35df268d2592188b52c7a8d0f5d45d6a4de979409e42f175a
7
+ data.tar.gz: efb38b3eb8384dfe03433c3279b73702ae0d24368ab1e57bacca538e958f0f5153b44e64a023ada162c2cf1a6f7b80063ea2aea795be565e6a6eaacb2952f911
@@ -7,7 +7,8 @@ module CC
7
7
  end
8
8
 
9
9
  def value
10
- @value.sub(%r{\*\*([^\/]*)?$}, "**/*\\1") # normalize glob format: app/** => app/**/* and **.rb => **/*.rb
10
+ # normalize glob format: app/** => app/**/* and **.rb => **/*.rb
11
+ @value && @value.sub(%r{\*\*([^\/]*)?$}, "**/*\\1")
11
12
  end
12
13
  end
13
14
  end
@@ -3,6 +3,10 @@ module CC
3
3
  module Nodes
4
4
  class GlobList < Sequence
5
5
  type Glob
6
+
7
+ def allow_child?(child)
8
+ !child.value.nil?
9
+ end
6
10
  end
7
11
  end
8
12
  end
@@ -38,7 +38,16 @@ module CC::Yaml
38
38
  visitor.node_wrapper_class(value).new(self)
39
39
  end
40
40
  visitor.accept(child, value)
41
- @children << child
41
+
42
+ if allow_child?(child)
43
+ @children << child
44
+ else
45
+ warning("Discarding invalid value for %s: %s", self.class, child.value.inspect)
46
+ end
47
+ end
48
+
49
+ def allow_child?(*)
50
+ true
42
51
  end
43
52
 
44
53
  def nested_warnings(*prefix)
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Yaml
3
- VERSION = "0.11.0".freeze
3
+ VERSION = "0.12.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.11.0
4
+ version: 0.12.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: 2016-11-11 00:00:00.000000000 Z
11
+ date: 2017-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: secure_string
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.4.5
94
+ rubygems_version: 2.6.8
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Code Climate YAML