rubocop-katalyst 2.0.2 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36ba8278b8c5a7f5029936127ede1df6d2ce0bba060a147fff84d0065f456d20
4
- data.tar.gz: ab76377879e0638dfd66d99b8255764b8aa63a974e512bcbe9c35915ea8ae054
3
+ metadata.gz: 7a22dd03201445475c45cfd51f148ec7adb00d0232dc654c94cd29f8d326982e
4
+ data.tar.gz: 2f2e64564b2b5175e6a92f63beb796e01abcf1bdf73cf400846b5a8828b88dab
5
5
  SHA512:
6
- metadata.gz: 36c78b67171c2d243d96703548f99c2a377b08f71a8414745f842217eb05d36fb513d35990b8214734fafdf6118bfc5a9c92e2e9165b4e643447e50b52776489
7
- data.tar.gz: 58ede43e22f71d6e0c97fe769e60b577b0c56b76707d717c8e7679c3ec9d0f78382fc2877230f62ae8593cca19f998102199e6cde54e97b4a7db892c9b7eb022
6
+ metadata.gz: c96f55ad181d2527cfc6ece53486949e100b4f9ca336a0172e891dd014598a407fff3ec8a3440b934ad46b37e5f7479feac8548f13d276d799f0fa2fda161dec
7
+ data.tar.gz: 9e8ac5ebd5c8688d6c8024a92ce45a823f133f7dea709ed187c0171be5ccc58b56af41b207509f65a447d04aadcc36ea1bd3737af22a08f7f2c82146249c0c56
data/README.md CHANGED
@@ -28,6 +28,10 @@ Add the following to your `.rubocop.yml` file:
28
28
  ```yml
29
29
  require:
30
30
  - rubocop-katalyst
31
+
32
+ inherit_mode:
33
+ merge:
34
+ - Exclude
31
35
  ```
32
36
 
33
37
  You can integrate this gem with Rake by adding the following to your `Rakefile`:
@@ -23,6 +23,7 @@ Metrics/AbcSize:
23
23
  Metrics/BlockLength:
24
24
  CountComments: false # count full line comments?
25
25
  Max: 25
26
+ AllowedMethods: [ refine, class_methods, extended, included ]
26
27
  Exclude:
27
28
  - "config/environments/*" # rails environment configuration
28
29
  - "config/routes.rb"
@@ -8,9 +8,7 @@ module RuboCop
8
8
  # bit of our configuration.
9
9
  module Inject
10
10
  def self.defaults!
11
- project_root = Pathname.new(__dir__).parent.parent.parent.expand_path
12
- config_default = project_root.join("config", "default.yml")
13
- path = config_default.to_s
11
+ path = CONFIG_DEFAULT.to_s
14
12
  hash = ConfigLoader.send(:load_file, File.new(path))
15
13
  config = RuboCop::Config.new(hash, path)
16
14
  puts "configuration from #{path}" if ConfigLoader.debug?
@@ -1,9 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rubocop"
4
+ require "rubocop-performance"
5
+ require "rubocop-rails"
6
+ require "rubocop-rake"
7
+ require "rubocop-rspec"
8
+
9
+ require_relative "katalyst/inject"
10
+
3
11
  module RuboCop
4
12
  module Katalyst
5
13
  class Error < StandardError; end
6
- # Your code goes here...
7
14
  PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
8
15
  CONFIG_DEFAULT = PROJECT_ROOT.join("config", "default.yml").freeze
9
16
  CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
@@ -11,3 +18,5 @@ module RuboCop
11
18
  private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
12
19
  end
13
20
  end
21
+
22
+ RuboCop::Katalyst::Inject.defaults!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-katalyst
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-05 00:00:00.000000000 Z
11
+ date: 2024-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -146,8 +146,6 @@ files:
146
146
  - config/rubocop-rspec.yml
147
147
  - config/rubocop-security.yml
148
148
  - config/rubocop-style.yml
149
- - lib/rubocop-katalyst.rb
150
- - lib/rubocop/cop/katalyst_cops.rb
151
149
  - lib/rubocop/katalyst.rb
152
150
  - lib/rubocop/katalyst/erb_lint_task.rb
153
151
  - lib/rubocop/katalyst/inject.rb
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module Cop
5
- module Katalyst; end
6
- end
7
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "rubocop"
4
- require "rubocop-performance"
5
- require "rubocop-rails"
6
- require "rubocop-rake"
7
- require "rubocop-rspec"
8
-
9
- require_relative "rubocop/katalyst"
10
- require_relative "rubocop/katalyst/inject"
11
-
12
- RuboCop::Katalyst::Inject.defaults!
13
-
14
- require_relative "rubocop/cop/katalyst_cops"