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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ada32712348a52ee54daa65447ee137330e7417
4
- data.tar.gz: 3b4939b3f0a07276aca33b41a61dcc1657cba285
3
+ metadata.gz: bde19563301c60189376380665f04a38fd87fe83
4
+ data.tar.gz: 8b5d4e37e97ba154c45feab17adcdcdba29bf4b8
5
5
  SHA512:
6
- metadata.gz: be80f134b69a3306d784f8fb83296fb975ea9a32c0df8a9b79be69fd4398044cef8676a2dbb061e35df268d2592188b52c7a8d0f5d45d6a4de979409e42f175a
7
- data.tar.gz: efb38b3eb8384dfe03433c3279b73702ae0d24368ab1e57bacca538e958f0f5153b44e64a023ada162c2cf1a6f7b80063ea2aea795be565e6a6eaacb2952f911
6
+ metadata.gz: 269fd07e1346f1d072be04c679f6f00642a6b1f22f673a4def323afa88a119d22b4000614dd5bcdd1354233db8baca72ceeadeae3615e1414d96658bc508fc12
7
+ data.tar.gz: 1e033da1feebc12bfdf1b048cff9d1fc5f77a93e305474610c4c9cfb3f550abe5a909acf872500b5a25ebcffbaddea72fc13107b647dfaad3bed8710e94493b7
@@ -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
@@ -10,6 +10,7 @@ module CC
10
10
  map :config, to: EngineConfig
11
11
  map :exclude_fingerprints, to: Sequence
12
12
  map :exclude_paths, to: GlobList
13
+ map :issue_override, to: IssueOverride
13
14
 
14
15
  def channel
15
16
  self["channel"] || DEFAULT_CHANNEL
@@ -0,0 +1,9 @@
1
+ module CC
2
+ module Yaml
3
+ module Nodes
4
+ class IssueOverride < Mapping
5
+ map :severity, to: Severity
6
+ end
7
+ end
8
+ end
9
+ end
@@ -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
@@ -1,5 +1,5 @@
1
1
  module CC
2
2
  module Yaml
3
- VERSION = "0.12.0".freeze
3
+ VERSION = "0.13.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.12.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-02-23 00:00:00.000000000 Z
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.6.8
96
+ rubygems_version: 2.4.5
95
97
  signing_key:
96
98
  specification_version: 4
97
99
  summary: Code Climate YAML