rubocop-dbl 1.2.0 → 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: 1b5856effa41bb2d7e4dde8aefb6f9944b84801e9683a8fd8383e446ae293a5a
4
- data.tar.gz: cf576d04a8975fb239afcaf06d63a9138de9bf32916acb8bb9eb32be7d704e49
3
+ metadata.gz: f8fe3d4a4f7e6815e04cb657a97fbac59d0a376bec3b02f3935f5932f42f6b38
4
+ data.tar.gz: 2cfc77717d8b79375e569d0dce3743505eebde4ef449bdc42ec1e2309111c0e4
5
5
  SHA512:
6
- metadata.gz: 44ae420c179b0be16109a50b0b45b5ea7c9561c10e5a7e3650628cc815613a65410329f621e47f57f94cb5dc8dd0cd03d3390a8a5ab97bd9a7ac40918f2afc73
7
- data.tar.gz: 44d1c398449529e67d03c0fe1c9752a58207e84e91de19e8b5f561eb65d1da8876584a7551e2278aae8136a8d591c8810ae119f72c48469d685da5c1c4fdf16b
6
+ metadata.gz: 684c2c5dc56489b9c645c0806169a1b0721c8734fe092748f5b3a68e4a340d08004e544dd34fdeaf4b8fedf6a47d06235b87f29fca160646c7c499d47a610fea
7
+ data.tar.gz: 13db56ad3a82a228a1ac8e7024975552df2942b8721fdd0a7087f626483189d5a639bf90f04ec1ee6d6ae89c909c911c8faf3d919276b1c50774ddea001ffc4d
data/README.md CHANGED
@@ -26,6 +26,20 @@ rails generate rubocop_dbl:install
26
26
 
27
27
  or manually Aad this line to your application's `.rubocop.yml`:
28
28
 
29
+ When using Rails:
30
+
31
+ ```yml
32
+ require:
33
+ - rubocop-rails
34
+
35
+ inherit_gem:
36
+ rubocop-dbl:
37
+ - config/dbl.yml
38
+ - config/cops/rails.yml
39
+ ```
40
+
41
+ When not using Rails:
42
+
29
43
  ```yml
30
44
  inherit_gem:
31
45
  rubocop-dbl:
data/config/dbl.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  require:
2
2
  - rubocop-packaging
3
3
  - rubocop-performance
4
- - rubocop-rails
5
4
  - rubocop-rspec
6
5
  - rubocop-sorbet
7
6
 
@@ -12,7 +11,6 @@ inherit_from:
12
11
  - cops/metrics.yml
13
12
  - cops/naming.yml
14
13
  - cops/performance.yml
15
- - cops/rails.yml
16
14
  - cops/rspec.yml
17
15
  - cops/style.yml
18
16
  - cops/types.yml
@@ -22,7 +20,7 @@ inherit_from:
22
20
  # see: https://docs.rubocop.org/rubocop/usage/caching.html
23
21
  AllCops:
24
22
  UseCache: true
25
- TargetRubyVersion: 2.7.2
23
+ TargetRubyVersion: 3.1.4
26
24
  NewCops: enable
27
25
  Exclude:
28
26
  - '**/tmp/**/*'
@@ -1,13 +1,12 @@
1
1
  # typed: false
2
2
 
3
3
  require 'rails/generators/base'
4
- require 'active_support/core_ext/string'
5
4
  require 'railties'
6
5
 
7
6
  module RubocopDbl
8
7
  module Generators
9
8
  class InstallGenerator < Rails::Generators::Base
10
- desc 'Creates a .rubocop.yml config file that inherits from the official Ruby on Rails .rubocop.yml.'
9
+ desc 'Creates a .rubocop.yml config file that inherits from the various rubocop gems (Rails optional).'
11
10
 
12
11
  def create_config_file
13
12
  file_method = config_file_exists? ? :prepend : :create
@@ -25,11 +24,24 @@ module RubocopDbl
25
24
  end
26
25
 
27
26
  def config_file_content
28
- <<~HEREDOC
29
- inherit_gem:
30
- rubocop-dbl:
27
+ if defined?(Rails)
28
+ <<~HEREDOC
29
+ require:
30
+ - rubocop-rails
31
+
32
+ inherit_gem:
33
+ rubocop-dbl:
34
+ - config/dbl.yml
35
+ - config/cops/rails.yml
36
+ HEREDOC
37
+ else
38
+ <<~HEREDOC
39
+
40
+ inherit_gem:
41
+ rubocop-dbl:
31
42
  - config/dbl.yml
32
- HEREDOC
43
+ HEREDOC
44
+ end
33
45
  end
34
46
  end
35
47
  end
@@ -1,5 +1,5 @@
1
1
  # typed: false
2
2
 
3
3
  module RubocopDbl
4
- VERSION = '1.2.0'.freeze
4
+ VERSION = '2.0.0'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-dbl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'Team DBL :rocket:'
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-26 00:00:00.000000000 Z
11
+ date: 2023-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1'
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop-rails
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '2'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '2'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: rubocop-rspec
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -141,14 +127,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
141
127
  requirements:
142
128
  - - ">="
143
129
  - !ruby/object:Gem::Version
144
- version: '2.7'
130
+ version: '3.1'
145
131
  required_rubygems_version: !ruby/object:Gem::Requirement
146
132
  requirements:
147
133
  - - ">="
148
134
  - !ruby/object:Gem::Version
149
135
  version: '0'
150
136
  requirements: []
151
- rubygems_version: 3.4.13
137
+ rubygems_version: 3.5.3
152
138
  signing_key:
153
139
  specification_version: 4
154
140
  summary: RuboCop configuration for our Ruby on Rails projects