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.
@@ -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.20.2
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
- YAML.load_file(Pathname.new(__dir__).join("../../../config/base.yml")).tap do |rules|
37
- if @config.key?("target_rails_version")
38
- rules["AllCops"]["TargetRailsVersion"] = @config["target_rails_version"]
39
- end
40
- end
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.
@@ -1,5 +1,5 @@
1
1
  module Standard
2
2
  module Rails
3
- VERSION = "0.2.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
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.2.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: 2023-09-08 00:00:00.000000000 Z
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.20.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.20.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.2.15
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