rubocop-dbl 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -66
- data/config/cops/metrics.yml +7 -0
- data/lib/rubocop_dbl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b5856effa41bb2d7e4dde8aefb6f9944b84801e9683a8fd8383e446ae293a5a
|
4
|
+
data.tar.gz: cf576d04a8975fb239afcaf06d63a9138de9bf32916acb8bb9eb32be7d704e49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44ae420c179b0be16109a50b0b45b5ea7c9561c10e5a7e3650628cc815613a65410329f621e47f57f94cb5dc8dd0cd03d3390a8a5ab97bd9a7ac40918f2afc73
|
7
|
+
data.tar.gz: 44d1c398449529e67d03c0fe1c9752a58207e84e91de19e8b5f561eb65d1da8876584a7551e2278aae8136a8d591c8810ae119f72c48469d685da5c1c4fdf16b
|
data/README.md
CHANGED
@@ -6,41 +6,25 @@ RuboCop configuration for our Ruby on Rails projects.
|
|
6
6
|
|
7
7
|
[Official RoR RuboCop Configuration](https://github.com/rails/rails/blob/master/.rubocop.yml).
|
8
8
|
|
9
|
-
Releases are published to [
|
10
|
-
|
9
|
+
Releases are published to [RubyGems](https://rubygems.org/gems/rubocop-dbl).
|
11
10
|
|
12
11
|
## Installation
|
13
12
|
|
14
|
-
Install from command line:
|
15
|
-
|
16
|
-
```shell
|
17
|
-
gem install rubocop-dbl --version "0.2.0" --source "https://rubygems.pkg.github.com/dbl-works"
|
18
|
-
```
|
19
|
-
|
20
|
-
install via Gemfile:
|
21
|
-
|
22
|
-
DO NOT DO THIS:
|
23
13
|
```ruby
|
24
14
|
group :development, :test do
|
25
|
-
gem
|
15
|
+
gem 'rubocop-dbl'
|
26
16
|
end
|
27
17
|
```
|
28
18
|
|
29
|
-
|
30
|
-
|
31
|
-
```ruby
|
32
|
-
# Gemfile
|
33
|
-
group :development, :test do
|
34
|
-
gem 'rubocop-dbl', git: 'git@github.com:dbl-works/rubocop-dbl', branch: :main
|
35
|
-
end
|
36
|
-
```
|
37
|
-
WHY: we cannot install a public (!!) package from GitHub packages without a PAT (personal access token), see this [thread](https://github.community/t/download-from-github-package-registry-without-authentication/14407).
|
38
|
-
E.g. CircleCI does not allow reading a ENV var within the ci.yml, hence it is impossible to configure bundle to have auth for GitHub packages (this might work using GitHub actions).
|
19
|
+
## Setup
|
39
20
|
|
21
|
+
run
|
40
22
|
|
41
|
-
|
23
|
+
```shell
|
24
|
+
rails generate rubocop_dbl:install
|
25
|
+
```
|
42
26
|
|
43
|
-
|
27
|
+
or manually Aad this line to your application's `.rubocop.yml`:
|
44
28
|
|
45
29
|
```yml
|
46
30
|
inherit_gem:
|
@@ -48,28 +32,16 @@ inherit_gem:
|
|
48
32
|
- config/dbl.yml
|
49
33
|
```
|
50
34
|
|
51
|
-
Or just run:
|
52
|
-
|
53
|
-
```shell
|
54
|
-
rails generate rubocop_dbl:install
|
55
|
-
```
|
56
|
-
|
57
|
-
|
58
|
-
|
59
35
|
## Configuration
|
60
36
|
|
61
|
-
|
62
37
|
### TargetRubyVersion
|
63
38
|
|
64
39
|
We only support the latest 2 versions of ruby, which is currently >= 2.7.
|
65
40
|
We only support the latest 2 versions of rails, which is currently >= 6.0.
|
66
41
|
See [test.yml](.github/workflows/test.yml) for details.
|
67
42
|
|
68
|
-
|
69
43
|
If you'd like to change `TargetRubyVersion`, see [Customization](#customization).
|
70
44
|
|
71
|
-
|
72
|
-
|
73
45
|
## Customization
|
74
46
|
|
75
47
|
If you'd like to customize the rubocop setting on your project, you can override it.
|
@@ -88,42 +60,16 @@ AllCops:
|
|
88
60
|
```
|
89
61
|
|
90
62
|
## Build & install gem locally
|
91
|
-
```shell
|
92
|
-
gem build rubocop-dbl.gemspec
|
93
|
-
gem install rubocop-dbl-0.1.0.gem
|
94
|
-
irb
|
95
|
-
```
|
96
|
-
|
97
|
-
## Publish as package on GitHub packages
|
98
|
-
* create a valid PAT (personal access token) for your GitHub user with full access to packages (read & write) and private repos (read), read the [docs](https://docs.github.com/en/free-pro-team@latest/packages/guides/configuring-rubygems-for-use-with-github-packages) for more details
|
99
|
-
* add following information to `~/.gemrc`:
|
100
|
-
|
101
|
-
```
|
102
|
-
---
|
103
|
-
:github: YOUR_PAT
|
104
|
-
:backtrace: false
|
105
|
-
:bulk_threshold: 1000
|
106
|
-
:sources:
|
107
|
-
- https://rubygems.org/
|
108
|
-
- https://rubygems.pkg.github.com
|
109
|
-
:update_sources: true
|
110
|
-
:verbose: true
|
111
|
-
:concurrent_downloads: 8
|
112
|
-
gem: "--document=yri"
|
113
|
-
|
114
|
-
```
|
115
|
-
|
116
|
-
* build the latest version of the gem locally with
|
117
63
|
|
118
64
|
```shell
|
119
65
|
gem build rubocop-dbl.gemspec
|
66
|
+
gem install rubocop-dbl-0.1.0.gem
|
120
67
|
```
|
121
|
-
take note of the most current version of the gem, which will be printed to console.
|
122
68
|
|
123
|
-
|
69
|
+
## Publish on RubyGems
|
124
70
|
|
125
71
|
```shell
|
126
|
-
|
72
|
+
bin/release
|
127
73
|
```
|
128
74
|
|
129
|
-
|
75
|
+
will guide you through the process.
|
data/config/cops/metrics.yml
CHANGED
data/lib/rubocop_dbl/version.rb
CHANGED
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.
|
4
|
+
version: 1.2.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-
|
11
|
+
date: 2023-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|