codeclimate-yaml 0.12.0 → 0.13.0
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.rb +2 -0
- data/lib/cc/yaml/nodes/engine.rb +1 -0
- data/lib/cc/yaml/nodes/issue_override.rb +9 -0
- data/lib/cc/yaml/nodes/severity.rb +26 -0
- data/lib/cc/yaml/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bde19563301c60189376380665f04a38fd87fe83
|
4
|
+
data.tar.gz: 8b5d4e37e97ba154c45feab17adcdcdba29bf4b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 269fd07e1346f1d072be04c679f6f00642a6b1f22f673a4def323afa88a119d22b4000614dd5bcdd1354233db8baca72ceeadeae3615e1414d96658bc508fc12
|
7
|
+
data.tar.gz: 1e033da1feebc12bfdf1b048cff9d1fc5f77a93e305474610c4c9cfb3f550abe5a909acf872500b5a25ebcffbaddea72fc13107b647dfaad3bed8710e94493b7
|
data/lib/cc/yaml/nodes.rb
CHANGED
@@ -11,6 +11,7 @@ module CC
|
|
11
11
|
autoload :FetchList, "cc/yaml/nodes/fetch_list"
|
12
12
|
autoload :Glob, "cc/yaml/nodes/glob"
|
13
13
|
autoload :GlobList, "cc/yaml/nodes/glob_list"
|
14
|
+
autoload :IssueOverride, "cc/yaml/nodes/issue_override"
|
14
15
|
autoload :LanguageList, "cc/yaml/nodes/language_list"
|
15
16
|
autoload :Mapping, "cc/yaml/nodes/mapping"
|
16
17
|
autoload :NestedConfig, "cc/yaml/nodes/nested_config"
|
@@ -20,6 +21,7 @@ module CC
|
|
20
21
|
autoload :Root, "cc/yaml/nodes/root"
|
21
22
|
autoload :Scalar, "cc/yaml/nodes/scalar"
|
22
23
|
autoload :Sequence, "cc/yaml/nodes/sequence"
|
24
|
+
autoload :Severity, "cc/yaml/nodes/severity"
|
23
25
|
|
24
26
|
def self.[](key)
|
25
27
|
return key if key.respond_to? :new
|
data/lib/cc/yaml/nodes/engine.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
module CC
|
2
|
+
module Yaml
|
3
|
+
module Nodes
|
4
|
+
class Severity < Scalar
|
5
|
+
SEVERITIES = [
|
6
|
+
"info".freeze,
|
7
|
+
"minor".freeze,
|
8
|
+
"major".freeze,
|
9
|
+
"critical".freeze,
|
10
|
+
"blocker".freeze
|
11
|
+
].freeze
|
12
|
+
|
13
|
+
def value=(value)
|
14
|
+
unless value.nil?
|
15
|
+
normalized_value = value.to_s.strip.downcase
|
16
|
+
if SEVERITIES.include? normalized_value
|
17
|
+
@value = normalized_value
|
18
|
+
else
|
19
|
+
error("Unexpected severity %s", value.inspect)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/cc/yaml/version.rb
CHANGED
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.
|
4
|
+
version: 0.13.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: 2017-
|
11
|
+
date: 2017-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: secure_string
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/cc/yaml/nodes/fetch_list.rb
|
56
56
|
- lib/cc/yaml/nodes/glob.rb
|
57
57
|
- lib/cc/yaml/nodes/glob_list.rb
|
58
|
+
- lib/cc/yaml/nodes/issue_override.rb
|
58
59
|
- lib/cc/yaml/nodes/language_list.rb
|
59
60
|
- lib/cc/yaml/nodes/mapping.rb
|
60
61
|
- lib/cc/yaml/nodes/nested_config.rb
|
@@ -65,6 +66,7 @@ files:
|
|
65
66
|
- lib/cc/yaml/nodes/root.rb
|
66
67
|
- lib/cc/yaml/nodes/scalar.rb
|
67
68
|
- lib/cc/yaml/nodes/sequence.rb
|
69
|
+
- lib/cc/yaml/nodes/severity.rb
|
68
70
|
- lib/cc/yaml/parser.rb
|
69
71
|
- lib/cc/yaml/parser/psych.rb
|
70
72
|
- lib/cc/yaml/serializer.rb
|
@@ -91,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
93
|
version: '0'
|
92
94
|
requirements: []
|
93
95
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.4.5
|
95
97
|
signing_key:
|
96
98
|
specification_version: 4
|
97
99
|
summary: Code Climate YAML
|