radius-spec 0.6.0 → 0.7.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
  SHA256:
3
- metadata.gz: a6155ce5b3b86485b3a2011fbf15cd2ad268e0f74639986260057d1fcfccdff8
4
- data.tar.gz: 0556fe666ef3b4522f32e5f1edaa004ef344bc7a7f47283cc7b49656d3c04950
3
+ metadata.gz: 16d76ff7cb5e21c33abfc4c3aa27330b08a770f8a2fd48f58d23de2aacf98b2c
4
+ data.tar.gz: 53ff6d4b55e268f649de67e4c595a14a570a56ecfa567d45dd0348f2610b5cdc
5
5
  SHA512:
6
- metadata.gz: fdc10a35535a2b7b39e2ae261fa98d45fbc87c6579366861935c04cc5d15d317182b00c0daaf1414ef457f3e26952fde8cf7b728db924c9befea0c9fd8238d1a
7
- data.tar.gz: 176adf989c35360f4e137da3757aeda641414fe29ee50800c69c3d2091342451375e03ed8db3987a3cee5f6d7841ec58da71e8bee4d67854f5a4e043527f7477
6
+ metadata.gz: abc5b8ad94e8f206621f0f505fabfc39e8d9d870ebe516a82499ebe435aa5581e16c3a7b2f23f371c78eaa5ae5f14cf55cbd99ae296cc3a2649d0843eb2accf9
7
+ data.tar.gz: 31e9b983fea8c4248cf4424d172f1be48d50bc4b4b82ba1aabc93705c96abd9ea3a806cc919178c5dd2fe387325f4bdabc4238bda97864ffa62736af7b2c71b7
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_mode:
3
3
  - Exclude
4
4
  - IgnoredPatterns
5
5
 
6
- inherit_from: common_rubocop.yml
6
+ inherit_from: common_rubocop_rails.yml
7
7
 
8
8
  # Configuration parameters: CountComments, ExcludedMethods.
9
9
  Metrics/BlockLength:
data/.travis.yml CHANGED
@@ -5,6 +5,7 @@ before_script:
5
5
  - "bin/ci-code-review"
6
6
  script: bin/ci
7
7
  rvm:
8
+ - 2.7
8
9
  - 2.6
9
10
  - 2.5
10
11
  - ruby-head
data/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## 0.7.0 (July 23, 2021)
2
+
3
+ [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.6.0...0.7.0)
4
+
5
+ ### Enhancements
6
+
7
+ - Upgrade to Rubocop 0.73.x (Aaron Hill, Aaron Kromer, Ben Reynold, Chris
8
+ Hoffman, James Nebeker #24)
9
+ - Upgrade to Rubocop Rails 2.2.x (Aaron Hill, Aaron Kromer, Ben Reynold, Chris
10
+ Hoffman, James Nebeker #24)
11
+ - Adjust common Rubocop configuration (Aaron Hill, Aaron Kromer, Ben Reynold,
12
+ Chris Hoffman, James Nebeker #24)
13
+ - Target Ruby 2.7 by default
14
+ - Enable `Lint/HeredocMethodCallPosition` by default
15
+ - Use `StandardError` for the suggested parent classes of errors
16
+ - Bump metric check maximums to provide a little more wiggle room
17
+ - Disable `Naming/RescuedExceptionsVariableName` by default
18
+ - Adjust common Rubocop Rails configuration (Aaron Hill, Aaron Kromer, Ben
19
+ Reynold, Chris Hoffman, James Nebeker #24)
20
+ - Disable `Rails/IgnoredSkipActionFilterOption` by default
21
+
22
+ ### Bug Fixes
23
+
24
+ None
25
+
26
+
1
27
  ## 0.6.0 (August 6, 2020)
2
28
 
3
29
  [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.5.0...v0.6.0)
data/common_rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.5.0
2
+ TargetRubyVersion: 2.7.0
3
3
  Exclude:
4
4
  # Exclude generated binstubs
5
5
  - 'bin/bundle'
@@ -79,7 +79,10 @@ Layout/BlockAlignment:
79
79
  # Configuration parameters: EnforcedStyle, IndentationWidth.
80
80
  # SupportedStyles: consistent, consistent_relative_to_receiver,
81
81
  # special_for_inner_method_call, special_for_inner_method_call_in_parentheses
82
- Layout/FirstParameterIndentation:
82
+ #
83
+ # TODO: At some point this is split into both Layout/FirstArgumentIndentation
84
+ # and Layout/FirstParameterIndentation
85
+ Layout/IndentFirstArgument:
83
86
  Enabled: false
84
87
 
85
88
  # This project only uses newer Ruby versions which all support the "squiggly"
@@ -124,6 +127,31 @@ Lint/AmbiguousBlockAssociation:
124
127
  Exclude:
125
128
  - 'spec/**/*_spec.rb'
126
129
 
130
+ # We prefer to enforce a consistent usage for readability
131
+ #
132
+ # <<~SQL.strip
133
+ # bar
134
+ # SQL
135
+ #
136
+ # display(<<~SQL.strip)
137
+ # bar
138
+ # SQL
139
+ #
140
+ # Alternatively, refactoring the heredoc into a local also improves
141
+ # readability:
142
+ #
143
+ # custom_sql = <<~SQL
144
+ # bar
145
+ # SQL
146
+ # display(custom_sql.strip)
147
+ Lint/HeredocMethodCallPosition:
148
+ Enabled: true
149
+
150
+ # We prefer people suggesting people subclass `StandardError` for their custom
151
+ # exceptions as this is a relatively common Ruby idiom.
152
+ Lint/InheritException:
153
+ EnforcedStyle: standard_error
154
+
127
155
  # Often with benchmarking we don't explicitly "use" a variable or return value.
128
156
  # We simply need to perform the operation which generates said value for the
129
157
  # benchmark.
@@ -133,6 +161,15 @@ Lint/Void:
133
161
  Exclude:
134
162
  - 'benchmarks/**/*'
135
163
 
164
+ Metrics/AbcSize:
165
+ # TODO: When we are able to upgrade to Rubocop 1.5.0 we want to enable the
166
+ # following `CountRepeatedAttributes` option. We often find the
167
+ # multi-references to the same object to be necessary for reability and that
168
+ # for our team it does not increase complexity.
169
+ #
170
+ # CountRepeatedAttributes: false
171
+ Max: 17
172
+
136
173
  # Configuration parameters: CountComments, ExcludedMethods, Max.
137
174
  # ExcludedMethods: refine
138
175
  Metrics/BlockLength:
@@ -146,7 +183,6 @@ Metrics/BlockLength:
146
183
  - 'chdir'
147
184
  - 'refine'
148
185
  - 'Capybara.register_driver'
149
- - 'Gem::Specification.new'
150
186
  - 'RSpec.configure'
151
187
  - 'VCR.configure'
152
188
 
@@ -185,6 +221,12 @@ Metrics/LineLength:
185
221
  Exclude:
186
222
  - '**/*.gemspec'
187
223
 
224
+ # TODO: Remove this when we get to 0.89.0 as the new default max is 8
225
+ #
226
+ # Configuration parameters: IgnoredMethods, Max
227
+ Metrics/PerceivedComplexity:
228
+ Max: 8
229
+
188
230
  # This is overly pedantic (only allowing `other` as the parameter name). Ruby
189
231
  # core doesn't follow this consistently either. Looking at several classes
190
232
  # throughout Ruby core we do often see `other`, but also often `obj` or
@@ -235,6 +277,13 @@ Naming/MemoizedInstanceVariableName:
235
277
  acceptable.
236
278
  EnforcedStyleForLeadingUnderscores: optional
237
279
 
280
+ # We don't really care about this check. Sometimes using something simple such
281
+ # as `err` is just fine. Other times it may improve readability to have a more
282
+ # descriptive name. We feel this is a personal judgement call and not something
283
+ # that needs to be enforced.
284
+ Naming/RescuedExceptionsVariableName:
285
+ Enabled: false
286
+
238
287
  # `alias` behavior changes on scope. In general we expect the behavior to be
239
288
  # that which is defined by `alias_method`.
240
289
  #
@@ -284,7 +333,10 @@ Style/AsciiComments:
284
333
  # - Prefer `{...}` over `do...end` for functional blocks.
285
334
  #
286
335
  # When the return value of the method receiving the block is important prefer
287
- # `{..}` over `do..end`.
336
+ # `{...}` over `do...end`.
337
+ #
338
+ # Some people enjoy the compact readability of `{...}` for one-liners so we
339
+ # allow that style as well.
288
340
  #
289
341
  # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
290
342
  # SupportedStyles: line_count_based, semantic, braces_for_chaining
@@ -297,6 +349,7 @@ Style/BlockDelimiters:
297
349
 
298
350
  When the return value of the method receiving the block is important prefer
299
351
  `{..}` over `do..end`.
352
+ AllowBracesOnProceduralOneLiners: true
300
353
  Enabled: true
301
354
  EnforcedStyle: semantic
302
355
  ProceduralMethods:
@@ -1,3 +1,5 @@
1
+ require: rubocop-rails
2
+
1
3
  inherit_mode:
2
4
  merge:
3
5
  - Exclude
@@ -5,10 +7,6 @@ inherit_mode:
5
7
 
6
8
  inherit_from: common_rubocop.yml
7
9
 
8
- # Enable additional Rails cops
9
- Rails:
10
- Enabled: true
11
-
12
10
  AllCops:
13
11
  Exclude:
14
12
  - 'bin/puma'
@@ -145,6 +143,13 @@ Rails/FindEach:
145
143
  Rails/HasAndBelongsToMany:
146
144
  Enabled: false
147
145
 
146
+ # We find the combo `:only` and `:if` readable. While the `:except` and `:if`
147
+ # combo is easier to read as a combined proc. As a team we are fine with
148
+ # handling this in PR reviews, until such time which Rubocop provides an option
149
+ # for us to configure this.
150
+ Rails/IgnoredSkipActionFilterOption:
151
+ Enabled: false
152
+
148
153
  # The ActiveSupport monkey patches for `present?` are nearly all defined as:
149
154
  #
150
155
  # !blank?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Radius
4
4
  module Spec
5
- VERSION = "0.6.0"
5
+ VERSION = "0.7.0"
6
6
  end
7
7
  end
data/radius-spec.gemspec CHANGED
@@ -31,8 +31,9 @@ Gem::Specification.new do |spec|
31
31
  spec.required_ruby_version = ">= 2.5"
32
32
 
33
33
  spec.add_runtime_dependency "rspec", "~> 3.7"
34
- spec.add_runtime_dependency "rubocop", "~> 0.62.0"
34
+ spec.add_runtime_dependency "rubocop", "~> 0.73.0"
35
+ spec.add_runtime_dependency "rubocop-rails", "~> 2.2.1"
35
36
 
36
- spec.add_development_dependency "bundler", "~> 1.16"
37
- spec.add_development_dependency "rake", "~> 12.0"
37
+ spec.add_development_dependency "bundler", ">= 2.2.10"
38
+ spec.add_development_dependency "rake", ">= 12.0", "< 14.0"
38
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radius-spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Radius Networks
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-08-06 00:00:00.000000000 Z
12
+ date: 2021-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -31,42 +31,62 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.62.0
34
+ version: 0.73.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.62.0
41
+ version: 0.73.0
42
42
  - !ruby/object:Gem::Dependency
43
- name: bundler
43
+ name: rubocop-rails
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '1.16'
49
- type: :development
48
+ version: 2.2.1
49
+ type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '1.16'
55
+ version: 2.2.1
56
+ - !ruby/object:Gem::Dependency
57
+ name: bundler
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.2.10
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 2.2.10
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: rake
58
72
  requirement: !ruby/object:Gem::Requirement
59
73
  requirements:
60
- - - "~>"
74
+ - - ">="
61
75
  - !ruby/object:Gem::Version
62
76
  version: '12.0'
77
+ - - "<"
78
+ - !ruby/object:Gem::Version
79
+ version: '14.0'
63
80
  type: :development
64
81
  prerelease: false
65
82
  version_requirements: !ruby/object:Gem::Requirement
66
83
  requirements:
67
- - - "~>"
84
+ - - ">="
68
85
  - !ruby/object:Gem::Version
69
86
  version: '12.0'
87
+ - - "<"
88
+ - !ruby/object:Gem::Version
89
+ version: '14.0'
70
90
  description: Standard RSpec setup and a collection of plug-ins to help improve specs.
71
91
  email:
72
92
  - support@radiusnetworks.com
@@ -127,8 +147,8 @@ licenses:
127
147
  - Apache-2.0
128
148
  metadata:
129
149
  bug_tracker_uri: https://github.com/RadiusNetworks/radius-spec/issues
130
- changelog_uri: https://github.com/RadiusNetworks/radius-spec/blob/v0.6.0/CHANGELOG.md
131
- source_code_uri: https://github.com/RadiusNetworks/radius-spec/tree/v0.6.0
150
+ changelog_uri: https://github.com/RadiusNetworks/radius-spec/blob/v0.7.0/CHANGELOG.md
151
+ source_code_uri: https://github.com/RadiusNetworks/radius-spec/tree/v0.7.0
132
152
  post_install_message:
133
153
  rdoc_options: []
134
154
  require_paths:
@@ -144,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
164
  - !ruby/object:Gem::Version
145
165
  version: '0'
146
166
  requirements: []
147
- rubygems_version: 3.0.3
167
+ rubygems_version: 3.1.6
148
168
  signing_key:
149
169
  specification_version: 4
150
170
  summary: Radius Networks RSpec setup and plug-ins