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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d10d4740ced7d92de99e8476e16f2890a7815acb3fa853b5df6303c93c9b052
4
- data.tar.gz: 6241b482726c177d57c33e4c4fcd1e90866372f765a52058e721b0e9fe213e32
3
+ metadata.gz: 7cf7c7e3f950562da4f1bf14f37861285a9cea6b5bb7df0baa356bd86369670c
4
+ data.tar.gz: affa4780ee83c9b2cd56ca28e4f2f28b966aefab141e029dcd973cd0ff31c545
5
5
  SHA512:
6
- metadata.gz: 88170d9409056e29020ed82187d9b9e7cf8ee59c9f7a546a1077ba4ae3e25365f53adee247a57fefef4a37cd8c404ba2b4debaeaa757edd162cc5b79cf10672e
7
- data.tar.gz: 4add4ee80e36e1e4bf8cba470db528ac71fafd90a5e7b980516acdc80dcd8682998c70f2b64caec6acb0f5dee707493e63363bc098a58f9eb4e32f3465a7f943
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
@@ -54,7 +54,7 @@ Metrics/MethodLength:
54
54
  Enabled: false
55
55
 
56
56
  Naming/MemoizedInstanceVariableName:
57
- Enabled: false
57
+ EnforcedStyleForLeadingUnderscores: optional
58
58
 
59
59
  Metrics/ParameterLists:
60
60
  Enabled: false
@@ -1,5 +1,5 @@
1
1
  module Lifen
2
2
  module RubyStyle
3
- VERSION = '0.0.6'.freeze
3
+ VERSION = '0.0.7'.freeze
4
4
  end
5
5
  end
@@ -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.57"
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.6
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-06-18 00:00:00.000000000 Z
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.57'
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.57'
26
+ version: '0.58'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement