rubocop-sequel 0.3.8 → 0.4.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/.github/workflows/actions.yml +2 -0
- data/.rubocop.yml +1 -1
- data/Gemfile +1 -1
- data/README.md +6 -3
- data/lib/rubocop/sequel/plugin.rb +31 -0
- data/lib/rubocop-sequel.rb +1 -3
- data/rubocop-sequel.gemspec +5 -3
- metadata +28 -7
- data/lib/rubocop/sequel/inject.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2d09b1a9e96d359603f2f32bb8a0db799c0492b162eeac2db55f7fb28cdb909
|
4
|
+
data.tar.gz: 0a09867eff4ba23036a30003bcc0ce4350fe1d1be605eeedc7134e51650fb712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84d837517a27a61c4daa7df76b7befaec99e961fc62937fec0ffc5864174ad333e6f1b6c4aaf752958e4b02a58822bd9e5aff7be94e661a5dedcc0426fceebb9
|
7
|
+
data.tar.gz: 4125dd4740f496dbea502534b7165e698feb8f4b328e1943382b6021b6324d28a5f7f594221342f58199598f71c2453303abc001e9c97cc794ecc1ef9da6f4a4
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -25,22 +25,25 @@ gem 'rubocop-sequel'
|
|
25
25
|
Add to your `.rubocop.yml`.
|
26
26
|
|
27
27
|
```
|
28
|
-
|
28
|
+
plugins: rubocop-sequel
|
29
29
|
```
|
30
30
|
|
31
31
|
`rubocop` will now automatically load RuboCop Sequel
|
32
32
|
cops alongside with the standard cops.
|
33
33
|
|
34
|
+
> [!NOTE]
|
35
|
+
> The plugin system is supported in RuboCop 1.72+. In earlier versions, use `require` instead of `plugins`.
|
36
|
+
|
34
37
|
### Command line
|
35
38
|
|
36
39
|
```bash
|
37
|
-
rubocop --
|
40
|
+
rubocop --plugin rubocop-sequel
|
38
41
|
```
|
39
42
|
|
40
43
|
### Rake task
|
41
44
|
|
42
45
|
```ruby
|
43
46
|
RuboCop::RakeTask.new do |task|
|
44
|
-
task.
|
47
|
+
task.plugins << 'rubocop-sequel'
|
45
48
|
end
|
46
49
|
```
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'lint_roller'
|
4
|
+
|
5
|
+
module RuboCop
|
6
|
+
module Sequel
|
7
|
+
# A plugin that integrates rubocop-sequel with RuboCop's plugin system.
|
8
|
+
class Plugin < LintRoller::Plugin
|
9
|
+
def about
|
10
|
+
LintRoller::About.new(
|
11
|
+
name: 'rubocop-sequel',
|
12
|
+
version: Version::STRING,
|
13
|
+
homepage: 'https://github.com/rubocop/rubocop-sequel',
|
14
|
+
description: 'Code style checking for Sequel.'
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
def supported?(context)
|
19
|
+
context.engine == :rubocop
|
20
|
+
end
|
21
|
+
|
22
|
+
def rules(_context)
|
23
|
+
LintRoller::Rules.new(
|
24
|
+
type: :path,
|
25
|
+
config_format: :rubocop,
|
26
|
+
value: Pathname.new(__dir__).join('../../../config/default.yml')
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/rubocop-sequel.rb
CHANGED
data/rubocop-sequel.gemspec
CHANGED
@@ -12,10 +12,12 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
13
13
|
gem.name = 'rubocop-sequel'
|
14
14
|
gem.require_paths = ['lib']
|
15
|
-
gem.version = '0.
|
15
|
+
gem.version = '0.4.0'
|
16
16
|
gem.metadata['rubygems_mfa_required'] = 'true'
|
17
|
+
gem.metadata['default_lint_roller_plugin'] = 'RuboCop::Sequel::Plugin'
|
17
18
|
|
18
|
-
gem.required_ruby_version = '>= 2.
|
19
|
+
gem.required_ruby_version = '>= 2.7'
|
19
20
|
|
20
|
-
gem.add_dependency '
|
21
|
+
gem.add_dependency 'lint_roller', '~> 1.1'
|
22
|
+
gem.add_dependency 'rubocop', '>= 1.72.1', '< 1.74.0'
|
21
23
|
end
|
metadata
CHANGED
@@ -1,29 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timothée Peignier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: lint_roller
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.72.1
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 1.74.0
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.72.1
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.74.0
|
27
47
|
description: Code style checking for Sequel
|
28
48
|
email:
|
29
49
|
- timothee.peignier@tryphon.org
|
@@ -50,7 +70,7 @@ files:
|
|
50
70
|
- lib/rubocop/cop/sequel/partial_constraint.rb
|
51
71
|
- lib/rubocop/cop/sequel/save_changes.rb
|
52
72
|
- lib/rubocop/sequel.rb
|
53
|
-
- lib/rubocop/sequel/
|
73
|
+
- lib/rubocop/sequel/plugin.rb
|
54
74
|
- lib/rubocop/sequel/version.rb
|
55
75
|
- rubocop-sequel.gemspec
|
56
76
|
- spec/project_spec.rb
|
@@ -67,6 +87,7 @@ licenses:
|
|
67
87
|
- MIT
|
68
88
|
metadata:
|
69
89
|
rubygems_mfa_required: 'true'
|
90
|
+
default_lint_roller_plugin: RuboCop::Sequel::Plugin
|
70
91
|
post_install_message:
|
71
92
|
rdoc_options: []
|
72
93
|
require_paths:
|
@@ -75,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
96
|
requirements:
|
76
97
|
- - ">="
|
77
98
|
- !ruby/object:Gem::Version
|
78
|
-
version: '2.
|
99
|
+
version: '2.7'
|
79
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
101
|
requirements:
|
81
102
|
- - ">="
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RuboCop
|
4
|
-
module Sequel
|
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).tap(&:make_excludes_absolute)
|
12
|
-
puts "configuration from #{path}" if ConfigLoader.debug?
|
13
|
-
config = ConfigLoader.merge_with_default(config, path, unset_nil: false)
|
14
|
-
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|