radius-spec 0.11.0 → 0.12.1

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: 8866a2f90557e85b2974af975e2461737ee1393031ffa7ab5aeacfcd9b2b2c46
4
- data.tar.gz: 5f04fb6044c683d90c7cd331423c069fd97b6bd1e2de54a6251051a52b86c23c
3
+ metadata.gz: 546fb33c439cbca96fc9807190531ce04602dcc57d47092210453bce377f5caf
4
+ data.tar.gz: 10b9a8e011aeefa54947f20c4ad09802cfe1139611fcc749f3b097a83df4f75c
5
5
  SHA512:
6
- metadata.gz: ee3d463a37fee11380d6700ed966068fdf20ac19d1636a9e577959c633bdde2d04657dca074b6e6c53a24f536d637f254340c7c775853a20214691698218f0fd
7
- data.tar.gz: 014b79fb72b9ef1ecb07e8d6ec01e660755eef2dc484d807e525a62d975e624392ab92f990f2ee80acbaa6b8b3bcd6020a8b27613e0d7a6c67bca94bf6a1476f
6
+ metadata.gz: 8e86cdfe23e2f82994484e43d8c9c11b751931c869f04e5d3df86085ebdab97cca75804c9d5befc62eca73c53faa570f411aa55d2eb582fb441c581261e5d31f
7
+ data.tar.gz: 9c959caac8ffcd3a630586671c1cfafdc3d11347e36b0aee4210dc5e2fdfff61f76022a9d449acc2ecdcc2e3ebd4bd79f1ed32b568791fe23e954a11465a0099
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "11:00"
8
+ open-pull-requests-limit: 10
9
+ # allow:
10
+ # - dependency-type: direct
data/.rubocop.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  inherit_mode:
2
2
  merge:
3
3
  - Exclude
4
- - IgnoredPatterns
4
+ - AllowedPatterns
5
5
 
6
6
  inherit_from: common_rubocop_rails.yml
7
7
 
8
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
8
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
9
9
  # URISchemes: http, https
10
10
  Layout/LineLength:
11
11
  Exclude:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ## Development
2
+
3
+ [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.12.0...main)
4
+
5
+ ### Enhancements
6
+
7
+ - TODO
8
+
9
+ ### Bug Fixes
10
+
11
+ - TODO
12
+
13
+ ## 0.12.0 (August 3, 2022)
14
+
15
+ [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.11.0...v0.12.0)
16
+
17
+ ### Enhancements
18
+
19
+ - Upgrade `rubocop` (1.0 Edition 🎉 ) by @jnebeker in https://github.com/RadiusNetworks/radius-spec/pull/33
20
+ - Rubocop rails upgrades by @benreyn in https://github.com/RadiusNetworks/radius-spec/pull/36
21
+ - Upgrade rubocop to Latest by @alexstone in https://github.com/RadiusNetworks/radius-spec/pull/37
22
+ - Upgrade rubocop and rubcop-rails dependecies by @benreyn in https://github.com/RadiusNetworks/radius-spec/pull/39
23
+ - Include model factories in helpers specs by default by @benreyn in https://github.com/RadiusNetworks/radius-spec/pull/40
24
+ - Adds Dependabot to Radius-Spec by @alexstone in https://github.com/RadiusNetworks/radius-spec/pull/42
25
+ - Update vcr requirement from ~> 4.0 to ~> 6.0 by @dependabot in https://github.com/RadiusNetworks/radius-spec/pull/44
26
+ - Update rubocop-rails requirement from ~> 2.13.0 to >= 2.13, < 2.15 by @dependabot in https://github.com/RadiusNetworks/radius-spec/pull/46
27
+ - Update rubocop requirement from ~> 1.25.0 to >= 1.25, < 1.29 by @dependabot in https://github.com/RadiusNetworks/radius-spec/pull/48
28
+ - Update rubocop-rails requirement from >= 2.13, < 2.15 to >= 2.13, < 2.16 by @dependabot in https://github.com/RadiusNetworks/radius-spec/pull/50
29
+ - Update rubocop requirement from >= 1.25, < 1.29 to >= 1.25, < 1.31 by @dependabot in https://github.com/RadiusNetworks/radius-spec/pull/49
30
+
31
+ ### Bug Fixes
32
+
33
+ None
1
34
  ## 0.11.0 (January 21, 2022)
2
35
 
3
36
  [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.10.0...0.11.0)
data/Gemfile CHANGED
@@ -23,6 +23,6 @@ group :documentation do
23
23
  end
24
24
 
25
25
  group :plugins do
26
- gem "vcr", "~> 4.0", require: false
26
+ gem "vcr", "~> 6.0", require: false
27
27
  gem "webmock", "~> 3.3", require: false
28
28
  end
data/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/701295df43d53e25eafe/maintainability)](https://codeclimate.com/github/RadiusNetworks/radius-spec/maintainability)
4
4
  [![Gem Version](https://badge.fury.io/rb/radius-spec.svg)](https://badge.fury.io/rb/radius-spec)
5
5
 
6
+ [Cop Docs](https://docs.rubocop.org/rubocop/1.42/cops_bundler.html)
7
+
6
8
  Basic RSpec setup and plug-ins for use with Radius Networks Ruby / Rails
7
9
  projects.
8
10
 
@@ -94,7 +96,7 @@ end
94
96
  Projects can inherit from the [base Rubocop config](.rubocop.yml). This can be
95
97
  accomplished by using either the remote raw URL or dependency gem formats. With
96
98
  either method we also strongly suggest setting the `inherit_mode` to `merge`
97
- for both `Exclude` and `IgnoredPatterns`. This way you can append additional
99
+ for both `Exclude` and `AllowedPatterns`. This way you can append additional
98
100
  exceptions without overwriting the defaults.
99
101
 
100
102
  #### Inherit from Gem (Recommended Method)
@@ -103,7 +105,7 @@ exceptions without overwriting the defaults.
103
105
  inherit_mode:
104
106
  merge:
105
107
  - Exclude
106
- - IgnoredPatterns
108
+ - AllowedPatterns
107
109
 
108
110
  inherit_gem:
109
111
  radius-spec:
@@ -118,7 +120,7 @@ inherit_gem:
118
120
  inherit_mode:
119
121
  merge:
120
122
  - Exclude
121
- - IgnoredPatterns
123
+ - AllowedPatterns
122
124
 
123
125
  # Available for projects which cannot include this gem (i.e. Ruby < 2.5)
124
126
  inherit_from:
@@ -154,7 +156,7 @@ inherit_from: .rubocop_todo.yml
154
156
  inherit_mode:
155
157
  merge:
156
158
  - Exclude
157
- - IgnoredPatterns
159
+ - AllowedPatterns
158
160
 
159
161
  Style/For:
160
162
  inherit_mode:
@@ -67,4 +67,4 @@ def display_benchmark_header
67
67
  puts "### Test Cases"
68
68
  end
69
69
 
70
- GC_DISABLED = as_boolean(ENV['GC_DISABLED'], default: false)
70
+ GC_DISABLED = as_boolean(ENV.fetch('GC_DISABLED', nil), default: false)
@@ -18,7 +18,7 @@ end
18
18
 
19
19
  # Bad per Rubocop
20
20
  def hash_transform_key_map_to_h(hash)
21
- hash.map { |k, v| [k + 100, v] }.to_h
21
+ hash.map { |k, v| [k + 100, v] }.to_h # rubocop:disable Style/MapToHash
22
22
  end
23
23
 
24
24
  # Bad per Rubocop
@@ -78,7 +78,7 @@ end
78
78
 
79
79
  # Bad per Rubocop
80
80
  def hash_transform_value_map_to_h(hash)
81
- hash.map { |k, v| [k, v + 100] }.to_h
81
+ hash.map { |k, v| [k, v + 100] }.to_h # rubocop:disable Style/MapToHash
82
82
  end
83
83
 
84
84
  # Bad per Rubocop
data/common_rubocop.yml CHANGED
@@ -130,16 +130,16 @@ Layout/FirstArgumentIndentation:
130
130
  # this for a node pattern matcher in the future.
131
131
  #
132
132
  # Configuration parameters: AllowHeredoc, AllowURI, URISchemes,
133
- # IgnoreCopDirectives, IgnoredPatterns.
133
+ # IgnoreCopDirectives, AllowedPatterns.
134
134
  # URISchemes: http, https
135
135
  Layout/LineLength:
136
136
  IgnoreCopDirectives: true
137
- IgnoredPatterns:
137
+ AllowedPatterns:
138
138
  # Leading comments
139
139
  - '\A\s*#'
140
140
  # Attempt at trailing comments
141
141
  - '\A.{1,78}\s#\s.*\z'
142
- Max: 100
142
+ Max: 120
143
143
  Exclude:
144
144
  - '**/*.gemspec'
145
145
 
@@ -243,7 +243,7 @@ Metrics/BlockLength:
243
243
  - 'spec/spec_helper.rb'
244
244
  - 'spec/**/*_spec.rb'
245
245
  - 'spec/support/model_factories.rb'
246
- IgnoredMethods:
246
+ AllowedMethods:
247
247
  - 'chdir'
248
248
  - 'describe'
249
249
  - 'refine'
@@ -286,7 +286,7 @@ Naming/BinaryOperatorParameterName:
286
286
 
287
287
  # We don't need this configured just yet, because we dont have any applications on
288
288
  # Ruby 3.1, but pre-emptively, we want to configure this to prefer the explicit style.
289
- #
289
+ #
290
290
  # bad
291
291
  # def foo(&)
292
292
  # bar(&)
@@ -442,7 +442,7 @@ Style/BlockDelimiters:
442
442
  - subject
443
443
  - tap
444
444
  - watch
445
- IgnoredMethods:
445
+ AllowedMethods:
446
446
  - lambda
447
447
  - proc
448
448
  - it
@@ -537,6 +537,11 @@ Style/EmptyMethod:
537
537
  Style/FrozenStringLiteralComment:
538
538
  EnforcedStyle: always_true
539
539
 
540
+ # If we're using consecutive conditionals we probably know what we're doing. The good thing is this
541
+ # cop will still flag consecutive conditionals that are identical.
542
+ Style/GuardClause:
543
+ AllowConsecutiveConditionals: true
544
+
540
545
  # Prefer symbol keys using the 1.9 hash syntax. However, when keys are mixed
541
546
  # use a consistent mapping style; which generally means using hash rockets:
542
547
  #
@@ -3,7 +3,7 @@ require: rubocop-rails
3
3
  inherit_mode:
4
4
  merge:
5
5
  - Exclude
6
- - IgnoredPatterns
6
+ - AllowedPatterns
7
7
 
8
8
  inherit_from: common_rubocop.yml
9
9
 
@@ -26,10 +26,10 @@ Style/Documentation:
26
26
  # Rails foreign keys and indexes can get long. We want to ignore our annotation
27
27
  # comments which are for these entries.
28
28
  #
29
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
29
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
30
30
  # URISchemes: http, https
31
31
  Layout/LineLength:
32
- IgnoredPatterns:
32
+ AllowedPatterns:
33
33
  - '\A# fk_rails_'
34
34
  - '\A# index_'
35
35
 
@@ -194,6 +194,10 @@ Rails/IndexBy:
194
194
  Rails/IndexWith:
195
195
  Enabled: false
196
196
 
197
+ # This would be extremely hard to implement with our app
198
+ Rails/I18nLocaleTexts:
199
+ Enabled: false
200
+
197
201
  # This cop enforces the use of ids over pluck(:id) and pluck(primary_key).
198
202
  # https://rails.rubystyle.guide/#ids
199
203
  Rails/PluckId:
@@ -7,7 +7,7 @@ require 'rspec/rails'
7
7
 
8
8
  RSpec.configure do |config|
9
9
  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
10
- config.fixture_path = ::Rails.root.join("spec", "fixtures").to_path
10
+ config.fixture_path = Rails.root.join("spec/fixtures").to_path
11
11
 
12
12
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
13
13
  # examples within a transaction, remove the following line or assign false
@@ -10,7 +10,7 @@ VCR.configure do |config|
10
10
  config.ignore_localhost = true
11
11
 
12
12
  record_mode = case
13
- when ENV['CI']
13
+ when ENV.fetch('CI', false)
14
14
  # Never let CI record
15
15
  :none
16
16
  when RSpec.configuration.files_to_run.one?
@@ -42,14 +42,17 @@ VCR.configure do |config|
42
42
  RADIUS_OAUTH_PROVIDER_APP_SECRET
43
43
  RADIUS_OAUTH_PROVIDER_URL
44
44
  ].each do |secret|
45
- config.filter_sensitive_data("<#{secret}>") { ENV[secret] }
45
+ # WARNING: It may seem tempting, but don't try to extract ENV[secret] to a local variable
46
+ # here. `filter_sensitive_data` calls its block instead of exec-ing it, so a local variable
47
+ # set outside the blocks won't be accessible inside them.
48
+ config.filter_sensitive_data("<#{secret}>") { ENV.fetch(secret, nil) }
46
49
 
47
50
  config.filter_sensitive_data("<#{secret}_FORM>") {
48
- URI.encode_www_form_component(ENV[secret]) if ENV[secret]
51
+ URI.encode_www_form_component(ENV.fetch(secret, nil)) if ENV[secret]
49
52
  }
50
53
 
51
54
  config.filter_sensitive_data("<#{secret}_URI>") {
52
- ERB::Util.url_encode(ENV[secret]) if ENV[secret]
55
+ ERB::Util.url_encode(ENV.fetch(secret, nil)) if ENV[secret]
53
56
  }
54
57
 
55
58
  config.filter_sensitive_data('<AUTHORIZATION_HEADER>') { |interaction|
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Radius
4
4
  module Spec
5
- VERSION = "0.11.0"
5
+ VERSION = "0.12.1"
6
6
  end
7
7
  end
data/radius-spec.gemspec CHANGED
@@ -32,8 +32,8 @@ Gem::Specification.new do |spec|
32
32
  spec.required_ruby_version = ">= 2.5" # rubocop:disable Gemspec/RequiredRubyVersion
33
33
 
34
34
  spec.add_runtime_dependency "rspec", "~> 3.7"
35
- spec.add_runtime_dependency "rubocop", "~> 1.25.0"
36
- spec.add_runtime_dependency "rubocop-rails", "~> 2.13.0"
35
+ spec.add_runtime_dependency "rubocop", ">= 1.25", "< 1.43"
36
+ spec.add_runtime_dependency "rubocop-rails", ">= 2.13", "< 2.18"
37
37
 
38
38
  spec.add_development_dependency "bundler", ">= 2.2.10"
39
39
  spec.add_development_dependency "rake", ">= 12.0", "< 14.0"
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.11.0
4
+ version: 0.12.1
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: 2022-01-21 00:00:00.000000000 Z
12
+ date: 2023-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -29,30 +29,42 @@ dependencies:
29
29
  name: rubocop
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '1.25'
35
+ - - "<"
33
36
  - !ruby/object:Gem::Version
34
- version: 1.25.0
37
+ version: '1.43'
35
38
  type: :runtime
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
38
41
  requirements:
39
- - - "~>"
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '1.25'
45
+ - - "<"
40
46
  - !ruby/object:Gem::Version
41
- version: 1.25.0
47
+ version: '1.43'
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: rubocop-rails
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
- - - "~>"
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '2.13'
55
+ - - "<"
47
56
  - !ruby/object:Gem::Version
48
- version: 2.13.0
57
+ version: '2.18'
49
58
  type: :runtime
50
59
  prerelease: false
51
60
  version_requirements: !ruby/object:Gem::Requirement
52
61
  requirements:
53
- - - "~>"
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '2.13'
65
+ - - "<"
54
66
  - !ruby/object:Gem::Version
55
- version: 2.13.0
67
+ version: '2.18'
56
68
  - !ruby/object:Gem::Dependency
57
69
  name: bundler
58
70
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +106,7 @@ executables: []
94
106
  extensions: []
95
107
  extra_rdoc_files: []
96
108
  files:
109
+ - ".github/dependabot.yml"
97
110
  - ".github/workflows/ci.yml"
98
111
  - ".github/workflows/reviewdog.yml"
99
112
  - ".gitignore"
@@ -151,8 +164,8 @@ licenses:
151
164
  - Apache-2.0
152
165
  metadata:
153
166
  bug_tracker_uri: https://github.com/RadiusNetworks/radius-spec/issues
154
- changelog_uri: https://github.com/RadiusNetworks/radius-spec/blob/v0.11.0/CHANGELOG.md
155
- source_code_uri: https://github.com/RadiusNetworks/radius-spec/tree/v0.11.0
167
+ changelog_uri: https://github.com/RadiusNetworks/radius-spec/blob/v0.12.1/CHANGELOG.md
168
+ source_code_uri: https://github.com/RadiusNetworks/radius-spec/tree/v0.12.1
156
169
  rubygems_mfa_required: 'true'
157
170
  post_install_message:
158
171
  rdoc_options: []
@@ -169,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
182
  - !ruby/object:Gem::Version
170
183
  version: '0'
171
184
  requirements: []
172
- rubygems_version: 3.1.2
185
+ rubygems_version: 3.1.6
173
186
  signing_key:
174
187
  specification_version: 4
175
188
  summary: Radius Networks RSpec setup and plug-ins