Skip to content

Commit

Permalink
Cut 2.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Sep 17, 2022
1 parent 30e126a commit cd674c4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master (unreleased)

## 2.16.1 (2022-09-17)

### Bug fixes

* [#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][])
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: rubocop-rails
title: RuboCop Rails
# We always provide version without patch here (e.g. 1.1),
# as patch versions should not appear in the docs.
version: ~
version: '2.16'
nav:
- modules/ROOT/nav.adoc
15 changes: 15 additions & 0 deletions docs/modules/ROOT/pages/cops_rails.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4940,6 +4940,11 @@ so we can apply many IO methods directly.
This cop works best when used together with
`Style/FileRead`, `Style/FileWrite` and `Rails/RootJoinChain`.

=== Safety

This cop is unsafe for autocorrection because `Dir`'s `children`, `each_child`, `entries`, and `glob`
methods return string element, but these methods of `Pathname` return `Pathname` element.

=== Examples

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

=== Configurable attributes

|===
| Name | Default value | Configurable values

| SafeAutocorrect
| `false`
| Boolean
|===

== Rails/RootPublicPath

|===
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/rails/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RuboCop
module Rails
# This module holds the RuboCop Rails version information.
module Version
STRING = '2.16.0'
STRING = '2.16.1'

def self.document_version
STRING.match('\d+\.\d+').to_s
Expand Down
9 changes: 9 additions & 0 deletions relnotes/v2.16.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Bug fixes

* [#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][])
* [#772](https://github.com/rubocop/rubocop-rails/pull/772): Fix a false positive for `Rails/TopLevelHashWithIndifferentAccess` when using `HashWithIndifferentAccess` under namespace module. ([@koic][])
* [#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][])
* [#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][])
* [#763](https://github.com/rubocop/rubocop-rails/issues/763): Mark `Rails/RootPathnameMethods` as unsafe and fix an incorrect autocorrect when using `Dir.glob`. ([@koic][])

[@koic]: https://github.com/koic

0 comments on commit cd674c4

Please sign in to comment.