Skip to content

Commit cd674c4

Browse files
committed
Cut 2.16.1
1 parent 30e126a commit cd674c4

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## master (unreleased)
44

5+
## 2.16.1 (2022-09-17)
6+
57
### Bug fixes
68

79
* [#769](https://github.com/rubocop/rubocop-rails/issues/769): Fix a false positive for `Rails/FreezeTime` when using `travel_to` with an argument of `DateTime.new` with arguments. ([@koic][])

docs/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ name: rubocop-rails
22
title: RuboCop Rails
33
# We always provide version without patch here (e.g. 1.1),
44
# as patch versions should not appear in the docs.
5-
version: ~
5+
version: '2.16'
66
nav:
77
- modules/ROOT/nav.adoc

docs/modules/ROOT/pages/cops_rails.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4940,6 +4940,11 @@ so we can apply many IO methods directly.
49404940
This cop works best when used together with
49414941
`Style/FileRead`, `Style/FileWrite` and `Rails/RootJoinChain`.
49424942

4943+
=== Safety
4944+
4945+
This cop is unsafe for autocorrection because `Dir`'s `children`, `each_child`, `entries`, and `glob`
4946+
methods return string element, but these methods of `Pathname` return `Pathname` element.
4947+
49434948
=== Examples
49444949

49454950
[source,ruby]
@@ -4961,6 +4966,16 @@ Rails.root.join('db', 'schema.rb').write(content)
49614966
Rails.root.join('db', 'schema.rb').binwrite(content)
49624967
----
49634968

4969+
=== Configurable attributes
4970+
4971+
|===
4972+
| Name | Default value | Configurable values
4973+
4974+
| SafeAutocorrect
4975+
| `false`
4976+
| Boolean
4977+
|===
4978+
49644979
== Rails/RootPublicPath
49654980

49664981
|===

lib/rubocop/rails/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module RuboCop
44
module Rails
55
# This module holds the RuboCop Rails version information.
66
module Version
7-
STRING = '2.16.0'
7+
STRING = '2.16.1'
88

99
def self.document_version
1010
STRING.match('\d+\.\d+').to_s

relnotes/v2.16.1.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Bug fixes
2+
3+
* [#769](https://github.com/rubocop/rubocop-rails/issues/769): Fix a false positive for `Rails/FreezeTime` when using `travel_to` with an argument of `DateTime.new` with arguments. ([@koic][])
4+
* [#772](https://github.com/rubocop/rubocop-rails/pull/772): Fix a false positive for `Rails/TopLevelHashWithIndifferentAccess` when using `HashWithIndifferentAccess` under namespace module. ([@koic][])
5+
* [#762](https://github.com/rubocop/rubocop-rails/issues/762): Fix an error for `Rails/FreezeTime` when using `travel_to` with an argument of `current` method without receiver. ([@koic][])
6+
* [#764](https://github.com/rubocop/rubocop-rails/issues/764): Fix an incorrect autocorrect for `Rails/FreezeTime` when using `travel_to` with an argument of the current time and proc argument. ([@koic][])
7+
* [#763](https://github.com/rubocop/rubocop-rails/issues/763): Mark `Rails/RootPathnameMethods` as unsafe and fix an incorrect autocorrect when using `Dir.glob`. ([@koic][])
8+
9+
[@koic]: https://github.com/koic

0 commit comments

Comments
 (0)