lifen-ruby-style 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -0
- data/default.yml +1 -1
- data/lib/lifen/ruby_style/version.rb +1 -1
- data/lifen-ruby-style.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cf7c7e3f950562da4f1bf14f37861285a9cea6b5bb7df0baa356bd86369670c
|
4
|
+
data.tar.gz: affa4780ee83c9b2cd56ca28e4f2f28b966aefab141e029dcd973cd0ff31c545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 819bf37db061eb205258d15a4878b86072981521ff886e58b1cf86ef78c32a021fbb3cbf952e2d3bf642d7f452c4e7612370a37ce7b7c53d7f56a673a15b9685
|
7
|
+
data.tar.gz: 678b89b02686981e33ac4beff7e8203d1334a2d9918b6a93cd7bea51ed6f582d34e6230ffc49033e91fa325ca06ebb3bfb1d71319e1b61a0d45f6ed2ae100b22
|
data/README.md
CHANGED
@@ -34,8 +34,18 @@ inherit_gem:
|
|
34
34
|
|
35
35
|
Il n'est pas nécessaire d'ajouter Rubocop dans les dépendances de l'application.
|
36
36
|
|
37
|
+
Il faut ensuite ajouter un "hook" git en créant le fichier `.git/hooks/pre-commit` avec :
|
38
|
+
|
39
|
+
```
|
40
|
+
#!/bin/bash
|
41
|
+
|
42
|
+
git status -s | grep -E 'A|M|R' | awk '{print $2}' | xargs rubocop --display-cop-names --extra-details --parallel --force-exclusion
|
43
|
+
```
|
44
|
+
|
37
45
|
## Usage
|
38
46
|
|
47
|
+
### En local
|
48
|
+
|
39
49
|
Lancement de Rubocop pour vérifier :
|
40
50
|
|
41
51
|
```bash
|
@@ -46,4 +56,12 @@ Lancement de Rubocop pour corriger automatiquement :
|
|
46
56
|
|
47
57
|
```bash
|
48
58
|
$ bundle exec rubocop -a
|
59
|
+
```
|
60
|
+
|
61
|
+
### Sur CircleCI
|
62
|
+
|
63
|
+
Il suffit d'ajouter dans le flow un job avant les tests (ou en parallèles) avec la commande suivante :
|
64
|
+
|
65
|
+
```bash
|
66
|
+
git diff-tree -r --no-commit-id --name-only 'origin/develop..HEAD' | xargs --no-run-if-empty bundle exec rubocop --config .rubocop.yml --force-exclusion --fail-level warn
|
49
67
|
```
|
data/default.yml
CHANGED
data/lifen-ruby-style.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_dependency "rubocop", "~> 0.
|
31
|
+
spec.add_dependency "rubocop", "~> 0.58"
|
32
32
|
spec.add_development_dependency "bundler", "~> 1.15"
|
33
33
|
spec.add_development_dependency "rake", "~> 10.0"
|
34
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lifen-ruby-style
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Team Lifen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.58'
|
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: '0.
|
26
|
+
version: '0.58'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|