rubocop-rails 2.30.0 → 2.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/default.yml +1 -1
- data/lib/rubocop/rails/plugin.rb +17 -0
- data/lib/rubocop/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b27c710b734d026be33bd2bb2f777e58aa4b1bfbedbcfb487b9a900bcb3689d6
|
4
|
+
data.tar.gz: d817c2bdda07d206ef7521122ed915859f820fe45c059740c885f7478d75bbfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf49fe022c9885721fe7d5b0466052fbfbff90c3e421cc23d0abdb1f8f45e964e12aed5978202e7a9894c50c82cc4df3ce686a74735df80255628db05136df26
|
7
|
+
data.tar.gz: 8117361c6ae1e240c8994c482810278e5d157316ed3b01416630b0c3ee868ebac02c74e2c073a8e9d3958bcd04d849d9ae1f8ea90c0cc8289d8a136f3ab5e97d
|
data/config/default.yml
CHANGED
@@ -28,7 +28,7 @@ AllCops:
|
|
28
28
|
# By specifying `MigratedSchemaVersion` option, migration files that have been migrated can be ignored.
|
29
29
|
# When `MigratedSchemaVersion: '20241231000000'` is set. Migration files lower than or equal to '20250101000000' will be ignored.
|
30
30
|
# For example, this is the timestamp in db/migrate/20250101000000_create_articles.rb.
|
31
|
-
MigratedSchemaVersion:
|
31
|
+
MigratedSchemaVersion: '19700101000000' # NOTE: Used as a sentinel value for the UNIX epoch time.
|
32
32
|
|
33
33
|
Lint/NumberConversion:
|
34
34
|
# Add Rails' duration methods to the ignore list for `Lint/NumberConversion`
|
data/lib/rubocop/rails/plugin.rb
CHANGED
@@ -24,8 +24,25 @@ module RuboCop
|
|
24
24
|
|
25
25
|
ConfigObsoletion.files << project_root.join('config', 'obsoletion.yml')
|
26
26
|
|
27
|
+
# FIXME: This is a dirty hack relying on a private constant to prevent
|
28
|
+
# "Warning: AllCops does not support TargetRailsVersion parameter".
|
29
|
+
# It should be updated to a better design in the future.
|
30
|
+
without_warnings do
|
31
|
+
ConfigValidator.const_set(:COMMON_PARAMS, ConfigValidator::COMMON_PARAMS.dup << 'TargetRailsVersion')
|
32
|
+
end
|
33
|
+
|
27
34
|
LintRoller::Rules.new(type: :path, config_format: :rubocop, value: project_root.join('config', 'default.yml'))
|
28
35
|
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def without_warnings
|
40
|
+
original_verbose = $VERBOSE
|
41
|
+
$VERBOSE = nil
|
42
|
+
yield
|
43
|
+
ensure
|
44
|
+
$VERBOSE = original_verbose
|
45
|
+
end
|
29
46
|
end
|
30
47
|
end
|
31
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.30.
|
4
|
+
version: 2.30.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
- Yuji Nakayama
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-02-
|
12
|
+
date: 2025-02-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|