rubocop-vendor 0.13.2 → 0.14.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e0439da72760612cfdd159e1faa44b45c4b0948522eff236402b98db06cffd3
4
- data.tar.gz: 3acd1c52b98f2b1b7b007b94f66182ba4a92e3caf31f00efbd4ace00b0ede452
3
+ metadata.gz: 1ca5c4b0e4fc2bc54b443cfb5415ceb478bdf5f93b9c054be134b22a3d27fe9c
4
+ data.tar.gz: '0084ec81cb4c0a1e8836e734612e75a2f624300a558d24f09cfaf4bdf5105dcd'
5
5
  SHA512:
6
- metadata.gz: 28bc8ef7c4f34b8e5cab41feb4d31513fd335347a34926c55382e67bc3bcb0f9a24da1b066d51cfe70443be76dae1680b4cbb1b9bb059c48be8b625a5e133e6b
7
- data.tar.gz: a1e3d3f052a1924e37f8fde37aade7cf7ef0a44ededbf78e2139040362287ad47b58508562e396a42e038af3e9b6d765c75e1c07ed36f9730ea980b659af600a
6
+ metadata.gz: d95385cfe30d8da689d871bd9dd3741094d87be096e8cc2de07370f6f4ef4efe0b66859e79f4700f18182edeb07783a3cdc61e39ace5fcb80b9093c1e0dad581
7
+ data.tar.gz: b8f9416b02fd44e33c96a13cea019458422e7688711c1907f3864f35b604ed8aebd5894b99945246fa7de950fc52e1c17916e12d898c4edbb1cace2c7cb1c629
data/README.md CHANGED
@@ -29,7 +29,8 @@ ways to do this:
29
29
  Put this into your `.rubocop.yml`.
30
30
 
31
31
  ```yaml
32
- require: rubocop-vendor
32
+ plugins:
33
+ - rubocop-vendor
33
34
  ```
34
35
 
35
36
  Now you can run `rubocop` and it will automatically load the RuboCop Vendor
@@ -0,0 +1,29 @@
1
+ require 'lint_roller'
2
+
3
+ module RuboCop
4
+ module Vendor
5
+ # A plugin that integrates RuboCop Vendor with RuboCop's plugin system.
6
+ class Plugin < LintRoller::Plugin
7
+ def about
8
+ LintRoller::About.new(
9
+ name: 'rubocop-vendor',
10
+ version: VERSION,
11
+ homepage: 'https://github.com/wealthsimple/rubocop-vendor',
12
+ description: 'A collection of custom Wealthsimple specific RuboCop cops.',
13
+ )
14
+ end
15
+
16
+ def supported?(context)
17
+ context.engine == :rubocop
18
+ end
19
+
20
+ def rules(_context)
21
+ LintRoller::Rules.new(
22
+ type: :path,
23
+ config_format: :rubocop,
24
+ value: Pathname.new(__dir__).join('../../../config/default.yml'),
25
+ )
26
+ end
27
+ end
28
+ end
29
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Vendor
5
- VERSION = '0.13.2'
5
+ VERSION = '0.14.2'
6
6
  end
7
7
  end
@@ -1,12 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module RuboCop
4
- # RuboCop Vendor project namespace
5
- module Vendor
6
- PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
7
- CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
8
- CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
3
+ require 'rubocop'
4
+ require_relative 'vendor/version'
5
+ require_relative 'vendor/plugin'
9
6
 
10
- private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
11
- end
12
- end
7
+ require_relative 'cop/vendor_cops'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-vendor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danilo Cabello
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-10-23 00:00:00.000000000 Z
13
+ date: 2025-03-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -26,6 +26,20 @@ dependencies:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: lint_roller
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
29
43
  - !ruby/object:Gem::Dependency
30
44
  name: git
31
45
  requirement: !ruby/object:Gem::Requirement
@@ -95,7 +109,6 @@ files:
95
109
  - LICENSE
96
110
  - README.md
97
111
  - config/default.yml
98
- - lib/rubocop-vendor.rb
99
112
  - lib/rubocop/cop/vendor/active_record_base_transaction_use.rb
100
113
  - lib/rubocop/cop/vendor/active_record_connection_execute.rb
101
114
  - lib/rubocop/cop/vendor/base.rb
@@ -112,7 +125,7 @@ files:
112
125
  - lib/rubocop/cop/vendor/ws_sdk_path_injection.rb
113
126
  - lib/rubocop/cop/vendor_cops.rb
114
127
  - lib/rubocop/vendor.rb
115
- - lib/rubocop/vendor/inject.rb
128
+ - lib/rubocop/vendor/plugin.rb
116
129
  - lib/rubocop/vendor/version.rb
117
130
  homepage: https://github.com/wealthsimple/rubocop-vendor
118
131
  licenses:
@@ -124,6 +137,7 @@ metadata:
124
137
  documentation_uri: https://rubocop-vendor.readthedocs.io/
125
138
  bug_tracker_uri: https://github.com/wealthsimple/rubocop-vendor/issues
126
139
  rubygems_mfa_required: 'true'
140
+ default_lint_roller_plugin: RuboCop::Vendor::Plugin
127
141
  post_install_message:
128
142
  rdoc_options: []
129
143
  require_paths:
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module Vendor
5
- # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
6
- # bit of our configuration.
7
- module Inject
8
- def self.defaults!
9
- path = CONFIG_DEFAULT.to_s
10
- hash = ConfigLoader.send(:load_yaml_configuration, path)
11
- config = Config.new(hash, path)
12
- puts "configuration from #{path}" if ConfigLoader.debug?
13
- config = ConfigLoader.merge_with_default(config, path)
14
- ConfigLoader.instance_variable_set(:@default_configuration, config)
15
- end
16
- end
17
- end
18
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rubocop'
4
-
5
- require_relative 'rubocop/vendor'
6
- require_relative 'rubocop/vendor/version'
7
- require_relative 'rubocop/vendor/inject'
8
-
9
- RuboCop::Vendor::Inject.defaults!
10
-
11
- require_relative 'rubocop/cop/vendor_cops'