rubocop-katalyst 1.1.4 → 2.0.0

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: 813965be9e6b107ca9f01c57d01ca5674c9cafeac976d5ea4841e374afeb61e7
4
- data.tar.gz: 4ab544fdbe2d16323f93f6a3cd1064d770ac05bf036edf0db0d46de0b1f3dcb4
3
+ metadata.gz: e750b4c719c39526276ce85557d2fa953130f440d113619f1348a8cf98fde5f1
4
+ data.tar.gz: 3263ad867d1e322185d4e8cbcf2f56bc893f0eed2a368debadac7cecf6391b32
5
5
  SHA512:
6
- metadata.gz: 5968dbc4666e584a9b23f72ef608061888a4d274fe4bbc43f27c7649692189aa3ad7e86db9a34eb437d26f5ce489f21c08327c1d9623d6efce11678a0223183b
7
- data.tar.gz: d346e2ac72baee66528414a9acb67db148a81841016c09919e66fec51997b6ca1811ec75bbf00fbb77a0956d5c6542c9e1a488f655a27bb5f23e1c267bc5d26d
6
+ metadata.gz: 25886809eb3a08a17ad02e206fbadc8cbf8d7b86f7e5f5dc0ba4b2a96c769958602999d668a43e3b181c912b41777c828364562bcde69623b79f52c0beb0d181
7
+ data.tar.gz: 4670dea507d6782b16d1198bcf12a3fcb00eacb60457a1b6a69b8bb9eb7c6ef31a316786110059fe10bd313e58e92332a53a26f8e4aed1435e9e59a7e931a4be
data/config/default.yml CHANGED
@@ -1,9 +1,12 @@
1
1
  # Configuration for all cops and global extension configuration
2
2
  require:
3
+ - rubocop-capybara
4
+ - rubocop-factory_bot
3
5
  - rubocop-performance
4
6
  - rubocop-rails
5
7
  - rubocop-rake
6
8
  - rubocop-rspec
9
+ - rubocop-rspec_rails
7
10
 
8
11
  inherit_mode:
9
12
  merge:
@@ -24,12 +27,17 @@ inherit_from:
24
27
 
25
28
  AllCops:
26
29
  Exclude:
27
- - ".git/**/*"
28
- - "node_modules/**/*"
29
- - Dockerfile
30
- - docker-compose.yml
31
- NewCops: disable # review new cops for styleguide before including
32
- TargetRubyVersion: 2.7
30
+ - .git/**/*
31
+ - node_modules/**/*
32
+ - vendor/bundle/**/*
33
+ NewCops: enable
34
+ TargetRubyVersion: 3.3
35
+
36
+ Capybara:
37
+ Enabled: true
38
+
39
+ FactoryBot:
40
+ Enabled: true
33
41
 
34
42
  Performance:
35
43
  Enabled: true
@@ -42,3 +50,6 @@ Rake:
42
50
 
43
51
  RSpec:
44
52
  Enabled: true
53
+
54
+ RSpecRails:
55
+ Enabled: true
@@ -1,2 +1,5 @@
1
1
  # Bundler configuration overrides
2
2
  # https://docs.rubocop.org/rubocop/1.5/cops_bundler.html
3
+
4
+ Bundler/OrderedGems:
5
+ Enabled: true
@@ -53,6 +53,14 @@ Rails/TimeZone:
53
53
  Reference: 'https://danilenko.org/2012/7/6/rails_timezones'
54
54
  Enabled: false
55
55
 
56
+ Rails/UnknownEnv:
57
+ Environments:
58
+ - production
59
+ - staging
60
+ - development
61
+ - test
62
+ Enabled: true
63
+
56
64
  Rails/Validation:
57
65
  Description: 'Use validates :attribute, hash of validations.'
58
66
  Enabled: false
@@ -22,6 +22,9 @@ RSpec/MultipleExpectations:
22
22
  - spec/features/**/*
23
23
  - spec/system/**/*
24
24
 
25
+ RSpec/MultipleMemoizedHelpers:
26
+ Enabled: false
27
+
25
28
  RSpec/RepeatedExample:
26
29
  Exclude:
27
30
  - spec/policies/**/*
@@ -31,9 +31,10 @@ module RuboCop
31
31
  def run_cli(verbose, *options)
32
32
  require "erb_lint/cli"
33
33
 
34
+ options.unshift("--config", config.to_path, "--allow-no-files")
34
35
  cli = ERBLint::CLI.new
35
- puts "Running ERBLint" if verbose
36
- result = cli.run(["--config", config.to_path, *options])
36
+ puts "Running erbLint #{options.join(' ')}" if verbose
37
+ result = cli.run(options)
37
38
  abort("ERBLint failed!") unless result
38
39
  end
39
40
 
@@ -52,7 +53,7 @@ module RuboCop
52
53
  end
53
54
 
54
55
  def config
55
- config = ::Rails.application.root.join(".erb-lint.yml")
56
+ config = Pathname.new(root).join(".erb-lint.yml")
56
57
  config = default_config unless config.exist?
57
58
  config
58
59
  end
@@ -60,6 +61,10 @@ module RuboCop
60
61
  def default_config
61
62
  Pathname.new(__dir__).join("../../../.erb-lint.yml")
62
63
  end
64
+
65
+ def root
66
+ @root ||= Dir.pwd
67
+ end
63
68
  end
64
69
  end
65
70
  end
@@ -42,11 +42,9 @@ module RuboCop
42
42
 
43
43
  def install_prettier
44
44
  yarn("add", "--dev", "prettier")
45
- File.open(config, "w") do |f|
46
- f.write <<~JSON
47
- {}
48
- JSON
49
- end
45
+ File.write(config, <<~JSON)
46
+ {}
47
+ JSON
50
48
  yarn("install")
51
49
  end
52
50
 
@@ -11,7 +11,7 @@ module RuboCop
11
11
  class RakeTask < ::RuboCop::RakeTask
12
12
  attr_accessor :verbose
13
13
 
14
- def initialize(name = :rubocop, *args, &task_block)
14
+ def initialize(name = :rubocop, *, &)
15
15
  super
16
16
 
17
17
  task(lint: :rubocop)
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "katalyst/version"
4
-
5
3
  module RuboCop
6
4
  module Katalyst
7
5
  class Error < StandardError; end
@@ -8,7 +8,6 @@ require "rubocop-rspec"
8
8
 
9
9
  require_relative "rubocop/katalyst"
10
10
  require_relative "rubocop/katalyst/inject"
11
- require_relative "rubocop/katalyst/version"
12
11
 
13
12
  RuboCop::Katalyst::Inject.defaults!
14
13
 
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: 1.1.4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2024-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -24,6 +24,34 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-capybara
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-factory_bot
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: rubocop-performance
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +108,21 @@ dependencies:
80
108
  - - ">="
81
109
  - !ruby/object:Gem::Version
82
110
  version: '0'
83
- description: Custom RuboCop for the Katalyst styleguide
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-rspec_rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description:
84
126
  email:
85
127
  - developers@katalyst.com.au
86
128
  executables: []
@@ -111,7 +153,6 @@ files:
111
153
  - lib/rubocop/katalyst/inject.rb
112
154
  - lib/rubocop/katalyst/prettier_task.rb
113
155
  - lib/rubocop/katalyst/rake_task.rb
114
- - lib/rubocop/katalyst/version.rb
115
156
  - lib/tasks/erb_lint.rake
116
157
  - package.json
117
158
  homepage: https://github.com/katalyst/rubocop-katalyst
@@ -119,11 +160,8 @@ licenses:
119
160
  - MIT
120
161
  metadata:
121
162
  allowed_push_host: https://rubygems.org
122
- homepage_uri: https://github.com/katalyst/rubocop-katalyst
123
- source_code_uri: https://github.com/katalyst/rubocop-katalyst
124
- changelog_uri: https://github.com/katalyst/rubocop-katalyst/blob/main/CHANGELOG.md
125
163
  rubygems_mfa_required: 'true'
126
- post_install_message:
164
+ post_install_message:
127
165
  rdoc_options: []
128
166
  require_paths:
129
167
  - lib
@@ -131,15 +169,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
169
  requirements:
132
170
  - - ">="
133
171
  - !ruby/object:Gem::Version
134
- version: 2.7.0
172
+ version: '3.3'
135
173
  required_rubygems_version: !ruby/object:Gem::Requirement
136
174
  requirements:
137
175
  - - ">="
138
176
  - !ruby/object:Gem::Version
139
177
  version: '0'
140
178
  requirements: []
141
- rubygems_version: 3.4.12
142
- signing_key:
179
+ rubygems_version: 3.5.9
180
+ signing_key:
143
181
  specification_version: 4
144
182
  summary: Code standards for Katalyst
145
183
  test_files: []
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RuboCop
4
- module Katalyst
5
- VERSION = "1.1.4"
6
- end
7
- end