rubocop-katalyst 2.1.2 → 2.2.0
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 -3
- data/lib/rubocop/katalyst.rb +31 -9
- data/package.json +1 -1
- metadata +17 -3
- data/lib/rubocop/katalyst/inject.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fcabca7a63474d2fd576b751b5b263f2f40f438c00a994c622b5d84fb7db69f
|
4
|
+
data.tar.gz: f2fd011e30c68db781e686eeebba5c91498f2d1ca5ebe87fd850b4bc445a1050
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d374394320065f7e08c5785357a38e3c485a7d094c441d989d7123c87c9528bd96d0b7dc7a7b877ea4fbcd35bdbb6d15bdf1ed75a9a39bc5ccbb474a655e531
|
7
|
+
data.tar.gz: 7b1c90897776ae2fa073ae2074eb97c91843775abea96be7c14099a41e119cafe79dfd5bbac469983d690a8474787e9bd39e7a86e129af182b194d492e9de2d9
|
data/config/default.yml
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
# Configuration for all cops and global extension configuration
|
2
2
|
plugins:
|
3
|
+
- rubocop-capybara
|
3
4
|
- rubocop-factory_bot
|
4
5
|
- rubocop-performance
|
5
6
|
- rubocop-rails
|
6
7
|
- rubocop-rake
|
7
8
|
- rubocop-rspec
|
8
|
-
|
9
|
-
require:
|
10
|
-
- rubocop-capybara
|
11
9
|
- rubocop-rspec_rails
|
12
10
|
|
13
11
|
inherit_mode:
|
data/lib/rubocop/katalyst.rb
CHANGED
@@ -6,17 +6,39 @@ require "rubocop-rails"
|
|
6
6
|
require "rubocop-rake"
|
7
7
|
require "rubocop-rspec"
|
8
8
|
|
9
|
-
require_relative "katalyst/inject"
|
10
|
-
|
11
9
|
module RuboCop
|
12
10
|
module Katalyst
|
13
|
-
class
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
class Plugin < LintRoller::Plugin
|
12
|
+
def about
|
13
|
+
LintRoller::About.new(
|
14
|
+
name: "rubocop-katalyst",
|
15
|
+
version:,
|
16
|
+
homepage: "https://github.com/katalyst/rubocop-katalyst",
|
17
|
+
description: "Rubocop configuration for Katalyst projects.",
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
def supported?(context)
|
22
|
+
context.engine == :rubocop
|
23
|
+
end
|
24
|
+
|
25
|
+
def rules(_context)
|
26
|
+
LintRoller::Rules.new(
|
27
|
+
type: :path,
|
28
|
+
config_format: :rubocop,
|
29
|
+
value: Pathname.new(__dir__).join("../../config/default.yml"),
|
30
|
+
)
|
31
|
+
end
|
17
32
|
|
18
|
-
|
33
|
+
private
|
34
|
+
|
35
|
+
def version
|
36
|
+
Gem::Specification.find_by_name("rubocop-katalyst").version
|
37
|
+
end
|
38
|
+
|
39
|
+
def project_root
|
40
|
+
Pathname.new(__dir__).join("../..")
|
41
|
+
end
|
42
|
+
end
|
19
43
|
end
|
20
44
|
end
|
21
|
-
|
22
|
-
RuboCop::Katalyst::Inject.defaults!
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-katalyst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-12 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: lint_roller
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0'
|
12
26
|
- !ruby/object:Gem::Dependency
|
13
27
|
name: rubocop
|
14
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,7 +160,6 @@ files:
|
|
146
160
|
- config/rubocop-style.yml
|
147
161
|
- lib/rubocop/katalyst.rb
|
148
162
|
- lib/rubocop/katalyst/erb_lint_task.rb
|
149
|
-
- lib/rubocop/katalyst/inject.rb
|
150
163
|
- lib/rubocop/katalyst/prettier_task.rb
|
151
164
|
- lib/rubocop/katalyst/rake_task.rb
|
152
165
|
- lib/tasks/erb_lint.rake
|
@@ -157,6 +170,7 @@ licenses:
|
|
157
170
|
metadata:
|
158
171
|
allowed_push_host: https://rubygems.org
|
159
172
|
rubygems_mfa_required: 'true'
|
173
|
+
default_lint_roller_plugin: RuboCop::Katalyst::Plugin
|
160
174
|
rdoc_options: []
|
161
175
|
require_paths:
|
162
176
|
- lib
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# The original code is from https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
|
4
|
-
# See https://github.com/rubocop-hq/rubocop-rspec/blob/master/MIT-LICENSE.md
|
5
|
-
module RuboCop
|
6
|
-
module Katalyst
|
7
|
-
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
8
|
-
# bit of our configuration.
|
9
|
-
module Inject
|
10
|
-
def self.defaults!
|
11
|
-
path = CONFIG_DEFAULT.to_s
|
12
|
-
hash = ConfigLoader.send(:load_file, File.new(path))
|
13
|
-
config = RuboCop::Config.new(hash, path)
|
14
|
-
puts "configuration from #{path}" if ConfigLoader.debug?
|
15
|
-
config = ConfigLoader.merge_with_default(config, path)
|
16
|
-
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|