reek 6.0.5 → 6.0.6

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
  SHA256:
3
- metadata.gz: 23929fdfa24a401c782d5390e43941b9a3829ed51083e2f1b7d6bcfe1280cd4e
4
- data.tar.gz: 24ce8ccc73f1db8f7f2571d80d14ae95ba52060efd37f2d76af39a8bdaf0f177
3
+ metadata.gz: f6445aae6ec59ea428c09872ffcf768e6b1df34f7c3860d2537ace1465c3f588
4
+ data.tar.gz: 81768ea8825add3341a059deba602ce5fd9d58093c4b53b37ede59c2256124b2
5
5
  SHA512:
6
- metadata.gz: 147a1013216674c7ead0cea2299ccaa37ccd89d2f409f11f65cf64706f747b96bbe06364059391a8f252c05fba3c2a9f7b4f314f424e92af5673ecc8eae20b74
7
- data.tar.gz: 2255554dbf2f7c1b3bb11daa8da1b7956c2ce1bb4a9c02da420f0db24fd285c8857dbbdf4b04616029ff1b0ed30bdd857012435d8557e6e1a7237d9c38887710
6
+ metadata.gz: b27f1243970e103ea742582ae4f0ae517613b0a7465ff953818a069f1c5354626aa1dc2d72d42ad97d47ee930c294ddde5f6987e337f6314fd4f7c8598f75557
7
+ data.tar.gz: 2a036cd4900a2cc47aaef1fb3aec83c4793c4da44bdcffc6fe12134094fdfe5ede6dfe4509f251051d6703f52a37da0b7bf8e7b17cd6a3c2af616727d87a402f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ## 6.0.6 (2021-08-12)
4
+
5
+ * (mvz) Remove explicit dependency on psych. This fixes an issue where
6
+ installing Reek would unintentionally pull in psych 4.0
7
+
3
8
  ## 6.0.5 (2021-08-01)
4
9
 
5
10
  * (dependabot) Loosen dependency on psych
@@ -39,13 +39,13 @@ module Reek
39
39
 
40
40
  @original_comment.scan(CONFIGURATION_REGEX) do |detector_name, separator, options|
41
41
  escalate_legacy_separator separator
42
- CodeCommentValidator.new(detector_name: detector_name,
43
- original_comment: original_comment,
44
- line: line,
45
- source: source,
46
- options: options).validate
47
- @config.merge! detector_name => YAML.safe_load(options || DISABLE_DETECTOR_CONFIGURATION,
48
- permitted_classes: [Regexp])
42
+ validator = CodeCommentValidator.new(detector_name: detector_name,
43
+ original_comment: original_comment,
44
+ line: line,
45
+ source: source,
46
+ options: options)
47
+ validator.validate
48
+ @config.merge! detector_name => validator.parsed_options
49
49
  end
50
50
  end
51
51
 
@@ -115,6 +115,21 @@ module Reek
115
115
  escalate_unknown_configuration_key
116
116
  end
117
117
 
118
+ def parsed_options
119
+ @parsed_options ||=
120
+ if Psych::VERSION < '3.1.0'
121
+ YAML.safe_load(options || CodeComment::DISABLE_DETECTOR_CONFIGURATION, [Regexp])
122
+ else
123
+ YAML.safe_load(options || CodeComment::DISABLE_DETECTOR_CONFIGURATION,
124
+ permitted_classes: [Regexp])
125
+ end
126
+ rescue Psych::SyntaxError
127
+ raise Errors::GarbageDetectorConfigurationInCommentError.new(detector_name: detector_name,
128
+ original_comment: original_comment,
129
+ source: source,
130
+ line: line)
131
+ end
132
+
118
133
  private
119
134
 
120
135
  attr_reader :detector_name,
@@ -124,16 +139,6 @@ module Reek
124
139
  :separator,
125
140
  :options
126
141
 
127
- def parsed_options
128
- @parsed_options ||= YAML.safe_load(options || CodeComment::DISABLE_DETECTOR_CONFIGURATION,
129
- permitted_classes: [Regexp])
130
- rescue Psych::SyntaxError
131
- raise Errors::GarbageDetectorConfigurationInCommentError.new(detector_name: detector_name,
132
- original_comment: original_comment,
133
- source: source,
134
- line: line)
135
- end
136
-
137
142
  def escalate_unknown_configuration_key
138
143
  return if given_keys_legit?
139
144
 
data/lib/reek/version.rb CHANGED
@@ -3,11 +3,11 @@
3
3
  # @public
4
4
  module Reek
5
5
  #
6
- # This module holds the Reek version informations
6
+ # This module holds the Reek version information
7
7
  #
8
8
  # @public
9
9
  module Version
10
10
  # @public
11
- STRING = '6.0.5'
11
+ STRING = '6.0.6'
12
12
  end
13
13
  end
data/reek.gemspec CHANGED
@@ -32,6 +32,5 @@ Gem::Specification.new do |s|
32
32
 
33
33
  s.add_runtime_dependency 'kwalify', '~> 0.7.0'
34
34
  s.add_runtime_dependency 'parser', '~> 3.0.0'
35
- s.add_runtime_dependency 'psych', '>= 3.1', '< 5.0'
36
35
  s.add_runtime_dependency 'rainbow', '>= 2.0', '< 4.0'
37
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reek
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.5
4
+ version: 6.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Rutherford
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-08-01 00:00:00.000000000 Z
14
+ date: 2021-08-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: kwalify
@@ -41,26 +41,6 @@ dependencies:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
43
  version: 3.0.0
44
- - !ruby/object:Gem::Dependency
45
- name: psych
46
- requirement: !ruby/object:Gem::Requirement
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: '3.1'
51
- - - "<"
52
- - !ruby/object:Gem::Version
53
- version: '5.0'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '3.1'
61
- - - "<"
62
- - !ruby/object:Gem::Version
63
- version: '5.0'
64
44
  - !ruby/object:Gem::Dependency
65
45
  name: rainbow
66
46
  requirement: !ruby/object:Gem::Requirement