rubocop-ransack 0.1.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 +7 -0
- data/README.md +28 -0
- data/config/default.yml +1 -0
- data/lib/rubocop/cop/ransack_cops.rb +0 -0
- data/lib/rubocop/ransack/plugin.rb +28 -0
- data/lib/rubocop/ransack/version.rb +5 -0
- data/lib/rubocop/ransack.rb +6 -0
- data/lib/rubocop-ransack.rb +6 -0
- metadata +84 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 22e426a9d1a79e82720ebd329c705b5f5b8006a0a289700730a8941199fb0853
|
|
4
|
+
data.tar.gz: c117ade3cebaa028ed936aa59761b59f39a3b85346feff9ffb3ea0bc06ed49b8
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 583ace98ec7badd2b0ac5b12d2605e7fc3f9397d868a708a63fcc1e0f3d90dc14424aae09e2d8381a4e00832f191d4aeb121954e5c2653f44288772d08ec6562
|
|
7
|
+
data.tar.gz: 056a892de0e11155b1d245ca506dd5741b00f4c111c2d572ac7addb156c18390eb2d35fe72973dadd4fc64121af0e736e3006908cd633aebf081b0220041280a
|
data/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# RuboCop::Ransack
|
|
2
|
+
|
|
3
|
+
An empty RuboCop plugin for future Ransack-specific cops.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bundle add rubocop-ransack --require=false
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
gem install rubocop-ransack
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Add the plugin to `.rubocop.yml`:
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
plugins:
|
|
23
|
+
- rubocop-ransack
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Development
|
|
27
|
+
|
|
28
|
+
Run `bundle install`, then `bundle exec rake`.
|
data/config/default.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--- {}
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'lint_roller'
|
|
2
|
+
|
|
3
|
+
module RuboCop
|
|
4
|
+
module Ransack
|
|
5
|
+
class Plugin < LintRoller::Plugin
|
|
6
|
+
def about
|
|
7
|
+
LintRoller::About.new(
|
|
8
|
+
name: 'rubocop-ransack',
|
|
9
|
+
version: VERSION,
|
|
10
|
+
homepage: 'https://rubygems.org/gems/rubocop-ransack',
|
|
11
|
+
description: 'RuboCop plugin for Ransack-specific cops.'
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def supported?(context)
|
|
16
|
+
context.engine == :rubocop
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def rules(_context)
|
|
20
|
+
LintRoller::Rules.new(
|
|
21
|
+
type: :path,
|
|
22
|
+
config_format: :rubocop,
|
|
23
|
+
value: Pathname.new(__dir__).join('../../../config/default.yml')
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rubocop-ransack
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Anton Ivanov
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
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: '1.1'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '1.1'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: rubocop
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 1.72.2
|
|
33
|
+
- - "<"
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: '2.0'
|
|
36
|
+
type: :runtime
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: 1.72.2
|
|
43
|
+
- - "<"
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '2.0'
|
|
46
|
+
description: An empty RuboCop plugin for future Ransack-specific cops.
|
|
47
|
+
email:
|
|
48
|
+
- anton.i@hey.com
|
|
49
|
+
executables: []
|
|
50
|
+
extensions: []
|
|
51
|
+
extra_rdoc_files: []
|
|
52
|
+
files:
|
|
53
|
+
- README.md
|
|
54
|
+
- config/default.yml
|
|
55
|
+
- lib/rubocop-ransack.rb
|
|
56
|
+
- lib/rubocop/cop/ransack_cops.rb
|
|
57
|
+
- lib/rubocop/ransack.rb
|
|
58
|
+
- lib/rubocop/ransack/plugin.rb
|
|
59
|
+
- lib/rubocop/ransack/version.rb
|
|
60
|
+
homepage: https://rubygems.org/gems/rubocop-ransack
|
|
61
|
+
licenses:
|
|
62
|
+
-
|
|
63
|
+
metadata:
|
|
64
|
+
allowed_push_host: https://rubygems.org
|
|
65
|
+
homepage_uri: https://rubygems.org/gems/rubocop-ransack
|
|
66
|
+
default_lint_roller_plugin: RuboCop::Ransack::Plugin
|
|
67
|
+
rdoc_options: []
|
|
68
|
+
require_paths:
|
|
69
|
+
- lib
|
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: 2.7.0
|
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
|
+
requirements:
|
|
77
|
+
- - ">="
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: '0'
|
|
80
|
+
requirements: []
|
|
81
|
+
rubygems_version: 3.6.9
|
|
82
|
+
specification_version: 4
|
|
83
|
+
summary: RuboCop plugin for Ransack-specific cops.
|
|
84
|
+
test_files: []
|