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 +4 -4
- data/README.md +2 -1
- data/lib/rubocop/vendor/plugin.rb +29 -0
- data/lib/rubocop/vendor/version.rb +1 -1
- data/lib/rubocop/vendor.rb +4 -9
- metadata +18 -4
- data/lib/rubocop/vendor/inject.rb +0 -18
- data/lib/rubocop-vendor.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ca5c4b0e4fc2bc54b443cfb5415ceb478bdf5f93b9c054be134b22a3d27fe9c
|
4
|
+
data.tar.gz: '0084ec81cb4c0a1e8836e734612e75a2f624300a558d24f09cfaf4bdf5105dcd'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95385cfe30d8da689d871bd9dd3741094d87be096e8cc2de07370f6f4ef4efe0b66859e79f4700f18182edeb07783a3cdc61e39ace5fcb80b9093c1e0dad581
|
7
|
+
data.tar.gz: b8f9416b02fd44e33c96a13cea019458422e7688711c1907f3864f35b604ed8aebd5894b99945246fa7de950fc52e1c17916e12d898c4edbb1cace2c7cb1c629
|
data/README.md
CHANGED
@@ -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
|
data/lib/rubocop/vendor.rb
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
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.
|
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:
|
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/
|
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
|
data/lib/rubocop-vendor.rb
DELETED
@@ -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'
|