codeclimate-yaml 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/yaml/nodes/engine.rb +1 -0
- data/lib/cc/yaml/nodes/engine_config.rb +9 -0
- data/lib/cc/yaml/nodes/mapping.rb +12 -0
- data/lib/cc/yaml/nodes.rb +1 -0
- data/lib/cc/yaml/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8744a4c6ac64def6988bfdcd0b4ffb820e3d54ee
|
4
|
+
data.tar.gz: 1e6901cf5ed4cdd3cf28fcfb7e7f25728145ad2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c1ea958544066b658210a893375fef2137cec9f2ec62a5b236b59e8336cd3c65679d68b216fbc4a696412c87d2ce7258e3a1ddc1775b23387339142ce3337ba
|
7
|
+
data.tar.gz: d8b3704063ac92cdbf72437d354ac3c5c99ddb9fdfa213f4972fd05bd5e7a14eef461b528caedde8f81fb4fd0bfb1eea9482ebe3c6045a5bae2a3b0c2d7fa3bf
|
data/lib/cc/yaml/nodes/engine.rb
CHANGED
@@ -39,6 +39,18 @@ module CC::Yaml
|
|
39
39
|
mapping[aliases.fetch(key.to_s, key.to_s)]
|
40
40
|
end
|
41
41
|
|
42
|
+
def self.prefix_scalar(key = nil, *types)
|
43
|
+
@prefix_scalar ||= superclass.respond_to?(:prefix_scalar) ? superclass.prefix_scalar : nil
|
44
|
+
if key
|
45
|
+
@prefix_scalar = key.to_s
|
46
|
+
define_method(:visit_scalar) do |visitor, type, value, _implicit = true|
|
47
|
+
return super(visitor, type, value, _implicit = true) if types.any? && !types.include?(type)
|
48
|
+
visit_key_value(visitor, key, value)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
@prefix_scalar
|
52
|
+
end
|
53
|
+
|
42
54
|
attr_reader :mapping
|
43
55
|
alias_method :__getobj__, :mapping
|
44
56
|
|
data/lib/cc/yaml/nodes.rb
CHANGED
@@ -4,6 +4,7 @@ module CC
|
|
4
4
|
autoload :Check, "cc/yaml/nodes/check"
|
5
5
|
autoload :Checks, "cc/yaml/nodes/checks"
|
6
6
|
autoload :Engine, "cc/yaml/nodes/engine"
|
7
|
+
autoload :EngineConfig, "cc/yaml/nodes/engine_config"
|
7
8
|
autoload :EngineList, "cc/yaml/nodes/engine_list"
|
8
9
|
autoload :Glob, "cc/yaml/nodes/glob"
|
9
10
|
autoload :GlobList, "cc/yaml/nodes/glob_list"
|
data/lib/cc/yaml/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate-yaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code Climate
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- lib/cc/yaml/nodes/check.rb
|
50
50
|
- lib/cc/yaml/nodes/checks.rb
|
51
51
|
- lib/cc/yaml/nodes/engine.rb
|
52
|
+
- lib/cc/yaml/nodes/engine_config.rb
|
52
53
|
- lib/cc/yaml/nodes/engine_list.rb
|
53
54
|
- lib/cc/yaml/nodes/glob.rb
|
54
55
|
- lib/cc/yaml/nodes/glob_list.rb
|