standard 1.41.1 → 1.42.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: 518f3cd8128adcdb51904e331444965466ab87f3cdceb6c8e48cbcc406d67844
4
- data.tar.gz: 9ca1ba65a3220da9690f86efdbf980646b94dbce5c601f77854bbf5c4135bd72
3
+ metadata.gz: '0297e5fe8c926fcc0d104811d5ea18751167321b677d90b3a103487372128863'
4
+ data.tar.gz: 7cc845b331082fadea50e51cdb8d7467c7b502ff452c40aaec17db7ed1a8dfab
5
5
  SHA512:
6
- metadata.gz: 2112c97536d431ef5e9b45979878e3b63ee55e08c1d8b1016d248737adef1212bbac79ebd20ed11b089dd4554e8db9128b039b585dffd070c3e82160c587489d
7
- data.tar.gz: d1028b2d67144598f17aaec23cd9f71262e75a757f441c7216da9b735effbc6ef2e3401a24698c4b1a6696833f9c92cea5265ee8af2a009af538bda83a4bd977
6
+ metadata.gz: 4f84b657321275fdf794441d537ff04f645207d44f5b3bdf74f5258bef0f990e01be0c48531ef9872d02ea706befcffeed90746a4e2e1c6b96b6cfc6a855b2fd
7
+ data.tar.gz: c7a9199c18586a6bfc8b8bc9a9afcf297be12635a77a1f0b85b5df418cae8b11d4f697cf5f2c8d39f3638a283c42730efcd58df34050e00ae81dd39790c05c17
@@ -12,15 +12,14 @@ on:
12
12
 
13
13
  jobs:
14
14
  test:
15
-
16
15
  strategy:
17
16
  matrix:
18
17
  os: [ubuntu-latest]
19
18
  ruby-version:
20
- - '3.0'
21
- - '3.1'
22
- - '3.2'
23
- - '3.3'
19
+ - "3.0"
20
+ - "3.1"
21
+ - "3.2"
22
+ - "3.3"
24
23
 
25
24
  runs-on: ${{ matrix.os }}
26
25
 
@@ -32,4 +31,4 @@ jobs:
32
31
  ruby-version: ${{ matrix.ruby-version }}
33
32
  bundler-cache: true
34
33
  - name: Run tests for Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
35
- run: bundle config unset deployment && bundle exec rake
34
+ run: bundle config unset deployment && ./bin/rake
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.42.1
6
+
7
+ * Fixes a very noisy typo!
8
+
9
+ ## 1.42.0
10
+
11
+ * Updates rubocop to [1.68.0](https://github.com/rubocop/rubocop/tree/v1.68.0)
12
+ * Inherit from `RuboCop::Cop::Base` fixing deprecation warnings.
13
+ * Add new cops
14
+
5
15
  ## 1.41.1
6
16
 
7
17
  * Adds a stub method to the Ruby LSP add-on to avoid a potential runtime exception
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.41.1)
4
+ standard (1.42.1)
5
5
  language_server-protocol (~> 3.17.0.2)
6
6
  lint_roller (~> 1.0)
7
- rubocop (~> 1.66.0)
7
+ rubocop (~> 1.68.0)
8
8
  standard-custom (~> 1.0.0)
9
9
  standard-performance (~> 1.5)
10
10
 
@@ -21,10 +21,10 @@ GEM
21
21
  method_source (>= 0.6.7)
22
22
  rake (>= 0.9.2.2)
23
23
  method_source (1.0.0)
24
- minitest (5.20.0)
24
+ minitest (5.25.1)
25
25
  mutex_m (0.2.0)
26
26
  parallel (1.23.0)
27
- parser (3.3.5.0)
27
+ parser (3.3.6.0)
28
28
  ast (~> 2.4.1)
29
29
  racc
30
30
  prism (0.30.0)
@@ -34,7 +34,7 @@ GEM
34
34
  rbs (3.5.2)
35
35
  logger
36
36
  regexp_parser (2.8.2)
37
- rubocop (1.66.1)
37
+ rubocop (1.68.0)
38
38
  json (~> 2.3)
39
39
  language_server-protocol (>= 3.17.0)
40
40
  parallel (~> 1.10)
@@ -59,7 +59,7 @@ GEM
59
59
  docile (~> 1.1)
60
60
  simplecov-html (~> 0.11)
61
61
  simplecov_json_formatter (~> 0.1)
62
- simplecov-html (0.12.3)
62
+ simplecov-html (0.13.1)
63
63
  simplecov_json_formatter (0.1.4)
64
64
  sorbet-runtime (0.5.11481)
65
65
  standard-custom (1.0.2)
@@ -85,4 +85,4 @@ DEPENDENCIES
85
85
  standard!
86
86
 
87
87
  BUNDLED WITH
88
- 2.4.12
88
+ 2.5.23
data/Rakefile CHANGED
@@ -1,10 +1,13 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rake/clean"
2
3
  require "rake/testtask"
3
4
  require_relative "lib/standard/rake"
4
5
 
6
+ CLOBBER.include "*.gem"
7
+
8
+ task default: [:test, "standard:fix"]
9
+
5
10
  Rake::TestTask.new(:test) do |t|
6
11
  t.warning = false
7
12
  t.test_files = FileList["test/**/*_test.rb"]
8
13
  end
9
-
10
- task default: [:test, "standard:fix"]
data/bin/rake ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rake' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
+
13
+ bundle_binstub = File.expand_path("bundle", __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require "rubygems"
25
+ require "bundler/setup"
26
+
27
+ load Gem.bin_path("rake", "rake")
data/config/base.yml CHANGED
@@ -512,6 +512,9 @@ Lint/DuplicateRequire:
512
512
  Lint/DuplicateRescueException:
513
513
  Enabled: true
514
514
 
515
+ Lint/DuplicateSetElement:
516
+ Enabled: false
517
+
515
518
  Lint/EachWithObjectArgument:
516
519
  Enabled: true
517
520
 
@@ -798,6 +801,9 @@ Lint/TripleQuotes:
798
801
  Lint/UnderscorePrefixedVariableName:
799
802
  Enabled: true
800
803
 
804
+ Lint/UnescapedBracketInRegexp:
805
+ Enabled: false
806
+
801
807
  Lint/UnexpectedBlockArity:
802
808
  Enabled: false
803
809
 
@@ -980,11 +986,14 @@ Style/Alias:
980
986
  Enabled: true
981
987
  EnforcedStyle: prefer_alias_method
982
988
 
989
+ Style/AmbiguousEndlessMethodDefinition:
990
+ Enabled: false
991
+
983
992
  Style/AndOr:
984
993
  Enabled: true
985
994
 
986
995
  Style/ArgumentsForwarding:
987
- Enabled: true
996
+ Enabled: false
988
997
 
989
998
  Style/ArrayCoercion:
990
999
  Enabled: false
@@ -1017,6 +1026,9 @@ Style/BeginBlock:
1017
1026
  Style/BisectedAttrAccessor:
1018
1027
  Enabled: false
1019
1028
 
1029
+ Style/BitwisePredicate:
1030
+ Enabled: false
1031
+
1020
1032
  Style/BlockComments:
1021
1033
  Enabled: true
1022
1034
 
@@ -1063,6 +1075,9 @@ Style/ColonMethodCall:
1063
1075
  Style/ColonMethodDefinition:
1064
1076
  Enabled: true
1065
1077
 
1078
+ Style/CombinableDefined:
1079
+ Enabled: false
1080
+
1066
1081
  Style/CombinableLoops:
1067
1082
  Enabled: false
1068
1083
 
@@ -1290,6 +1305,9 @@ Style/InvertibleUnlessCondition:
1290
1305
  Style/IpAddresses:
1291
1306
  Enabled: false
1292
1307
 
1308
+ Style/KeywordArgumentsMerging:
1309
+ Enabled: false
1310
+
1293
1311
  Style/KeywordParametersOrder:
1294
1312
  Enabled: true
1295
1313
 
@@ -1655,6 +1673,9 @@ Style/SafeNavigation:
1655
1673
  - try
1656
1674
  - try!
1657
1675
 
1676
+ Style/SafeNavigationChainLength:
1677
+ Enabled: false
1678
+
1658
1679
  Style/Sample:
1659
1680
  Enabled: true
1660
1681
 
data/config/ruby-3.1.yml CHANGED
@@ -7,5 +7,5 @@ Style/DataInheritance:
7
7
  Enabled: false
8
8
 
9
9
  Style/ArgumentsForwarding:
10
- Enabled: true
10
+ Enabled: false
11
11
  AllowOnlyRestArgument: true
data/docs/RELEASE.md CHANGED
@@ -15,13 +15,13 @@ rake install:local # Build and install standard-x.x.x.gem into system gems wi
15
15
  rake release[remote] # Create tag vx.x.x and build and push standard-0.5.2.gem to rubygems.org
16
16
  ```
17
17
 
18
- Most of these commands are depended on (read: run by) `rake release`, which is
18
+ Most of these commands are depended on (read: run by) `./bin/rake release`, which is
19
19
  really the only one we'll need for releasing the gem to
20
20
  [Rubygems.org](https://rubygems.org/gems/standard).
21
21
 
22
22
  ## Release steps
23
23
 
24
- 1. Make sure git is up to date and `bundle exec rake` exits cleanly
24
+ 1. Make sure git is up to date and `./bin/rake` exits cleanly
25
25
  1. If you upgraded a Rubocop dependency, be sure to lock it down in
26
26
  `standard.gemspec`. To avoid being broken transitively, we stick to exact
27
27
  release dependencies (e.g. "0.91.0" instead of "~> 0.91")
@@ -34,9 +34,8 @@ really the only one we'll need for releasing the gem to
34
34
  1. Run `bundle` so that Bundler writes this version to `Gemfile.lock`
35
35
  1. Commit `lib/standard/version.rb`, `Gemfile.lock`, and `CHANGELOG.md` together
36
36
  with the message equal to the new version (e.g. "0.42.1")
37
- 1. Finally, run `bundle exec rake release`, which will hopefully succeed
37
+ 1. Finally, run `./bin/rake release`, which will hopefully succeed
38
38
  1. Provide your multi-factor-auth token when prompted to finish publishing the
39
39
  gem
40
40
  1. [Tweet](https://twitter.com) about your awesome new release! (Shameless
41
41
  self-promotion is the most important part of open source software)
42
-
@@ -0,0 +1,51 @@
1
+ # Ruby versions
2
+
3
+ ## Handling new releases
4
+
5
+ When a new Ruby version comes out, you shouldn't have to make any immediate
6
+ changes to Standard Ruby. The default configuration is the `base.yml`
7
+ configuration and should continue to work correctly.
8
+
9
+ Often, Rubocop will add new rules to encourage usage of new language features in
10
+ new Ruby versions. When that happens:
11
+
12
+ 1. Add the rule to the `base.yml` file and disable it.
13
+ 1. Assess the new rule and see if it should be added to Standard Ruby. If not,
14
+ you're done. If so, enable it in `base.yml` and read on.
15
+ 1. Add a new config file for the penultimate minor version of Ruby. For example,
16
+ if the new version is `3.1` then the new config file would be for `3.0`.
17
+ 1. In the new config file, make sure it inherits from `base.yml` and disable the
18
+ new rule.
19
+ 1. In what was previously the latest config file, make sure it inherits from
20
+ your new config file.
21
+
22
+ That should add new rules to Standard Ruby safely and gracefully.
23
+
24
+ ## Maintenance and support
25
+
26
+ We will support the actively maintained ruby versions from the [ruby maintenance
27
+ policy](https://www.ruby-lang.org/en/downloads/branches/) along with the most
28
+ recently EOL version for an additional ~9 months, dropping support for EOL
29
+ versions around the time that a new supported ruby version is released and
30
+ added.
31
+
32
+ With the current ruby release cadence (new version near end of year, EOL drop
33
+ around April 1), this means we'll have a release of all the Standard gems around
34
+ the new year which adds support for the new ruby version and drops support for
35
+ what was an already-EOL but still-supported older ruby version.
36
+
37
+ ## Coordination across gems
38
+
39
+ We will align versions/dependencies amongst the Standard gems:
40
+
41
+ - [standard-custom](https://github.com/standardrb/standard-custom)
42
+ - [standard-performance](https://github.com/standardrb/standard-performance)
43
+ - [standard-rails](https://github.com/standardrb/standard-rails)
44
+ - [standard-sorbet](https://github.com/standardrb/standard-sorbet)
45
+ - [standard](https://github.com/standardrb/standard)
46
+
47
+ This means keeping them consistent in regard to:
48
+
49
+ - The minimum required ruby version configured in their `gemspec`
50
+ - Using that version in their internal `.standard.yml` configurations
51
+ - Including the full range of supported rubies in their CI ruby matrix
data/docs/UPGRADING.md CHANGED
@@ -11,21 +11,21 @@ The official standard plug-ins that are included in standard are:
11
11
 
12
12
  1. Update Rubocop plugin in the gemspec file and gem file.
13
13
  1. Keep standard in the gem file up-to-date. This will bring any testing utilities in standard into the plug-in repository.
14
- 1. Run bundle exec rake to run the tests
14
+ 1. Run `./bin/rake` to run the tests
15
15
  1. Configure any cops that need to be configured so that the tests pass
16
16
  1. Update the change log to the best of your ability and title it as unreleased
17
17
  1. Make your commit for these updates and push to the main branch
18
18
  1. Update the version in version.rb and update the version in the Changelog replacing the word “Unreleased”
19
19
  1. Run bundle to write the new version number to the lock file
20
- 1. Run bundle exec release to release the gem to RubyGems and create the version git tag. Push the tag to GitHub.
20
+ 1. Run `./bin/rake release` to release the gem to RubyGems and create the version git tag. Push the tag to GitHub.
21
21
 
22
22
  ## Updating Standard
23
23
 
24
24
  1. Update Rubocop as well as Standard Performance in the gemspec file and gem file.
25
- 1. Run bundle exec rake to run the tests
25
+ 1. Run `./bin/rake` to run the tests
26
26
  1. Configure any cops that need to be configured so that the tests pass
27
27
  1. Update the change log to the best of your ability and title it as unreleased
28
28
  1. Make your commit for these updates and push to the main branch
29
29
  1. Update the version in version.rb and update the version in the Changelog replacing the word “Unreleased”
30
30
  1. Run bundle to write the new version number to the lock file
31
- 1. Run bundle exec release to release the gem to RubyGems and create the version git tag. Push the tag to GitHub.
31
+ 1. Run `./bin/rake` to release the gem to RubyGems and create the version git tag. Push the tag to GitHub.
@@ -1,3 +1,3 @@
1
1
  module Standard
2
- VERSION = Gem::Version.new("1.41.1")
2
+ VERSION = Gem::Version.new("1.42.1")
3
3
  end
data/standard.gemspec CHANGED
@@ -1,6 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "standard/version"
1
+ require_relative "lib/standard/version"
4
2
 
5
3
  Gem::Specification.new do |spec|
6
4
  spec.name = "standard"
@@ -23,7 +21,7 @@ Gem::Specification.new do |spec|
23
21
  spec.require_paths = ["lib"]
24
22
  spec.metadata["rubygems_mfa_required"] = "true"
25
23
 
26
- spec.add_dependency "rubocop", "~> 1.66.0"
24
+ spec.add_dependency "rubocop", "~> 1.68.0"
27
25
 
28
26
  spec.add_dependency "lint_roller", "~> 1.0"
29
27
  spec.add_dependency "standard-custom", "~> 1.0.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.41.1
4
+ version: 1.42.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-17 00:00:00.000000000 Z
11
+ date: 2024-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.66.0
19
+ version: 1.68.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.66.0
26
+ version: 1.68.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: lint_roller
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,6 +100,7 @@ files:
100
100
  - README.md
101
101
  - Rakefile
102
102
  - bin/console
103
+ - bin/rake
103
104
  - bin/run
104
105
  - bin/setup
105
106
  - config/base.yml
@@ -119,8 +120,8 @@ files:
119
120
  - config/ruby-3.2.yml
120
121
  - config/ruby-3.3.yml
121
122
  - docs/ARCHITECTURE.md
122
- - docs/NEW_RUBIES.md
123
123
  - docs/RELEASE.md
124
+ - docs/RUBY_VERSIONS.md
124
125
  - docs/UPGRADING.md
125
126
  - exe/standardrb
126
127
  - lib/ruby_lsp/standard/addon.rb
@@ -188,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
189
  - !ruby/object:Gem::Version
189
190
  version: '0'
190
191
  requirements: []
191
- rubygems_version: 3.5.11
192
+ rubygems_version: 3.3.3
192
193
  signing_key:
193
194
  specification_version: 4
194
195
  summary: Ruby Style Guide, with linter & automatic code fixer
data/docs/NEW_RUBIES.md DELETED
@@ -1,13 +0,0 @@
1
- # Handling New Ruby Versions
2
-
3
- When a new Ruby version comes out, you shouldn't have to make any immediate changes to StandardRb. The default configuration is the `base.yml` configuration and should continue to work correctly.
4
-
5
- Often, Rubocop will add new rules to encourage usage of new language features in new Ruby versions. When that happens:
6
-
7
- 1. Add the rule to the base.yml file and disable it.
8
- 1. Assess the new rule and see if it should be added to StandardRb. If not, you're done. If so, enable in `base.yml` and read on.
9
- 1. Add a new config file for the penultimate minor version of Ruby, so for example, if the new Ruby version is `3.1` then the new config file would be for `3.0`.
10
- 1. In the new config file, make sure it inherits from `base.yml` and disable the new rule.
11
- 1. In the previous latest config file, make sure it inherits from your new config file.
12
-
13
- And that should add new rules to StandardRb safely and gracefully.