standard-rails 0.2.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +38 -26
- data/README.md +12 -7
- data/config/base.yml +98 -792
- data/lib/standard/rails/load_rubocop_rails_without_the_monkey_patch.rb +9 -1
- data/lib/standard/rails/plugin.rb +9 -5
- data/lib/standard/rails/version.rb +1 -1
- metadata +5 -5
@@ -7,7 +7,7 @@
|
|
7
7
|
# of RuboCop built-in cops in this file, we need to monitor it for changes
|
8
8
|
# in rubocop-rails and keep it up to date.
|
9
9
|
#
|
10
|
-
# Last updated from rubocop-rails v2.
|
10
|
+
# Last updated from rubocop-rails v2.23.1
|
11
11
|
|
12
12
|
# frozen_string_literal: true
|
13
13
|
|
@@ -29,6 +29,14 @@ require require_path.join("rubocop/cop/rails_cops")
|
|
29
29
|
|
30
30
|
RuboCop::Cop::Style::HashExcept.minimum_target_ruby_version(2.0)
|
31
31
|
|
32
|
+
RuboCop::Cop::Style::InverseMethods.singleton_class.prepend(
|
33
|
+
Module.new do
|
34
|
+
def autocorrect_incompatible_with
|
35
|
+
super.push(RuboCop::Cop::Rails::NegateInclude)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
)
|
39
|
+
|
32
40
|
RuboCop::Cop::Style::MethodCallWithArgsParentheses.singleton_class.prepend(
|
33
41
|
Module.new do
|
34
42
|
def autocorrect_incompatible_with
|
@@ -5,6 +5,7 @@ module Standard
|
|
5
5
|
class Plugin < LintRoller::Plugin
|
6
6
|
def initialize(config)
|
7
7
|
@config = config
|
8
|
+
@merges_upstream_metadata = LintRoller::Support::MergesUpstreamMetadata.new
|
8
9
|
end
|
9
10
|
|
10
11
|
def about
|
@@ -33,11 +34,14 @@ module Standard
|
|
33
34
|
private
|
34
35
|
|
35
36
|
def rules_with_config_applied
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
@merges_upstream_metadata.merge(
|
38
|
+
YAML.load_file(Pathname.new(__dir__).join("../../../config/base.yml")).tap do |rules|
|
39
|
+
if @config.key?("target_rails_version")
|
40
|
+
rules["AllCops"]["TargetRailsVersion"] = @config["target_rails_version"]
|
41
|
+
end
|
42
|
+
end,
|
43
|
+
YAML.load_file(Pathname.new(Gem.loaded_specs["rubocop-rails"].full_gem_path).join("config/default.yml"))
|
44
|
+
)
|
41
45
|
end
|
42
46
|
|
43
47
|
# This is not fantastic.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standard-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.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:
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lint_roller
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.23.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.23.1
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- searls@gmail.com
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
|
-
rubygems_version: 3.
|
85
|
+
rubygems_version: 3.4.21
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: A Standard plugin that adds Rails-specific rules to Standard
|