fablicop 1.0.4 → 1.0.9

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
- SHA1:
3
- metadata.gz: 29f9486e6fb456c7432526c273459cb2990abd77
4
- data.tar.gz: db9ac7a82a228425545798b7b2eebbcec2f2d575
2
+ SHA256:
3
+ metadata.gz: e221bafa27300d5b7a6f2ac50fde2801067fe05a2d383d00ce4a92e85d42c436
4
+ data.tar.gz: ee8f711d1ac0d19543d615a395366d1ecae88a90bbb1b6b8612a500a8ee0795b
5
5
  SHA512:
6
- metadata.gz: 87eed1aa3318aa6ba6dffb3f989e34e19e64736bd7d977b0da90ecc71437741380248d4e299d49c5db7dba93903d917b11429da22cdcb28510b5a2e34a6a9a68
7
- data.tar.gz: 743b8c20ed745b07d4a9ef64051198dc5218602c6409c6ad2645a3714347e8049844c4dbc76332cf8c4a99b3e4d813a79c39a0579dab4cc212751cd18d929d76
6
+ metadata.gz: bc59b1d764b4d4aad55663c114babfb5a3a997025c4ce0b14e00da46bc95e8a0be33c65041c8696a528406c7bb1af72060182e702e821bbde7420815e31c7ad5
7
+ data.tar.gz: 8b7d45aad11ae241ff61b99bfd94d52441a66b80a21da26d8c1561451c5130c7b72a879e5ad12fc94bacd1d66ccc9d614a53cd29146ca1358c0cd2308005df50
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.5.5
data/README.md CHANGED
@@ -20,9 +20,6 @@ inherit_gem:
20
20
  # - "config/rails.yml"
21
21
  # uncomment if use rspec cops
22
22
  # - "config/rspec.yml"
23
-
24
- AllCops:
25
- TargetRubyVersion: 2.3
26
23
  ```
27
24
 
28
25
  ```sh
@@ -1,3 +1,6 @@
1
+ require:
2
+ - rubocop-rails
3
+
1
4
  # 自動生成されるものやテストデータはチェック対象から除外する
2
5
  AllCops:
3
6
  Exclude:
@@ -10,13 +13,29 @@ AllCops:
10
13
  - "spec/test_app/db/*"
11
14
 
12
15
  DisplayCopNames: true
13
- TargetRubyVersion: 2.3
16
+ NewCops: enable # 新しい規約も随時取り入れる
17
+
14
18
  Rails:
15
19
  Enabled: true
20
+
16
21
  # rails >= 5 の設定のため
17
22
  Rails/HttpPositionalArguments:
18
23
  Enabled: false
19
24
 
25
+ Rails/InverseOf:
26
+ Enabled: false
27
+
28
+ Rails/UnknownEnv:
29
+ Environments:
30
+ - production
31
+ - staging
32
+ - development
33
+ - local
34
+ - test
35
+
36
+ Gemspec/OrderedDependencies:
37
+ Enabled: false
38
+
20
39
  ##################### Style ##################################
21
40
 
22
41
  # 日本語のコメントを許可する
@@ -63,6 +82,43 @@ Style/MultilineBlockChain:
63
82
  Enabled: false
64
83
  Style/EmptyMethod:
65
84
  Enabled: false
85
+
86
+ # 候補が多いときはcondみたいに使いたい
87
+ Style/EmptyCaseCondition:
88
+ Enabled: false
89
+
90
+ Style/DoubleNegation:
91
+ Enabled: false
92
+
93
+ Style/ParallelAssignment:
94
+ Enabled: false
95
+
96
+ Style/MethodCallWithoutArgsParentheses:
97
+ Enabled: false
98
+
99
+ Style/DefWithParentheses:
100
+ Enabled: false
101
+
102
+ # classが入れ子になった場合、テストの順番によってはエラーになりうる
103
+ Style/ClassAndModuleChildren:
104
+ Exclude:
105
+ - "test/**/*.rb"
106
+ - "spec/**/*.rb"
107
+
108
+ # 3桁ごとに_を入れるとSQLの表示方法と乖離するためfixtureは対象外
109
+ Style/NumericLiterals:
110
+ Exclude:
111
+ - "db/fixtures/*.rb"
112
+
113
+ ##################### Layout ##################################
114
+ # 引数前のスペースは複数許可
115
+ Layout/SpaceBeforeFirstArg:
116
+ Enabled: false
117
+ Layout/SpaceInLambdaLiteral:
118
+ Enabled: false
119
+ Layout/HeredocIndentation:
120
+ Enabled: false
121
+
66
122
  # 引数の書き方の多様性を許可
67
123
  # foo(a,
68
124
  # b
@@ -104,25 +160,6 @@ Layout/MultilineMethodCallIndentation:
104
160
  Layout/FirstParameterIndentation:
105
161
  Enabled: false
106
162
 
107
- # 候補が多いときはcondみたいに使いたい
108
- Style/EmptyCaseCondition:
109
- Enabled: false
110
-
111
- Style/DoubleNegation:
112
- Enabled: false
113
-
114
- Style/ParallelAssignment:
115
- Enabled: false
116
-
117
- Style/BracesAroundHashParameters:
118
- Enabled: false
119
-
120
- Style/MethodCallWithoutArgsParentheses:
121
- Enabled: false
122
-
123
- Style/DefWithParentheses:
124
- Enabled: false
125
-
126
163
  # 以下の両方を許容
127
164
  # aaa.
128
165
  # bb().
@@ -135,24 +172,23 @@ Style/DefWithParentheses:
135
172
  Layout/DotPosition:
136
173
  Enabled: false
137
174
 
138
- # classが入れ子になった場合、テストの順番によってはエラーになりうる
139
- Style/ClassAndModuleChildren:
175
+ # fixtureファイルの1行 -> DBの1レコードとして記述している
176
+ # 複数行にまたがると直感的でなくなるため無効化
177
+ Layout/ClosingParenthesisIndentation:
140
178
  Exclude:
141
- - "test/**/*.rb"
142
- - "spec/**/*.rb"
179
+ - "db/fixtures/*.rb"
180
+ Layout/ParameterAlignment:
181
+ Exclude:
182
+ - "db/fixtures/*.rb"
143
183
 
144
- ##################### Layout ##################################
145
- # 引数前のスペースは複数許可
146
- Layout/SpaceBeforeFirstArg:
147
- Enabled: false
148
- Layout/SpaceInLambdaLiteral:
149
- Enabled: false
150
- Layout/IndentHeredoc:
151
- Enabled: false
152
- Layout/MultilineMethodCallBraceLayout:
153
- Enabled: false
154
- Layout/MultilineMethodCallIndentation:
155
- Enabled: false
184
+ # * 警告 120文字
185
+ # * 禁止 160文字
186
+ # のイメージ
187
+ Layout/LineLength:
188
+ Max: 160
189
+ Exclude:
190
+ - "db/migrate/*.rb"
191
+ - "db/fixtures/*.rb" # カラムが多い、もしくは文章が含まれるfixtureは一行が長くなってしまうため無効化
156
192
 
157
193
  ##################### Lint ##################################
158
194
 
@@ -162,14 +198,6 @@ Lint/ParenthesesAsGroupedExpression:
162
198
 
163
199
  ##################### Metrics ##################################
164
200
 
165
- # * 警告 120文字
166
- # * 禁止 160文字
167
- # のイメージ
168
- Metrics/LineLength:
169
- Max: 160
170
- Exclude:
171
- - "db/migrate/*.rb"
172
-
173
201
  # 20 行超えるのは migration ファイル以外滅多に無い
174
202
  Metrics/MethodLength:
175
203
  Max: 20
@@ -177,7 +205,7 @@ Metrics/MethodLength:
177
205
  - "db/migrate/*.rb"
178
206
 
179
207
  # キーワード引数は引数の数に含めない
180
- ParameterLists:
208
+ Metrics/ParameterLists:
181
209
  CountKeywordArgs: false
182
210
 
183
211
  Metrics/BlockLength:
@@ -188,24 +216,10 @@ Metrics/BlockLength:
188
216
  - "app/admin/*.rb"
189
217
  - "config/**/*.rb"
190
218
 
191
- # Explicitly set the default value 15
192
219
  Metrics/AbcSize:
193
- Max: 15
194
220
  Exclude:
195
221
  - "test/**/*.rb"
196
222
 
197
- # キーワード引数は引数の数に含めない
198
- ParameterLists:
199
- CountKeywordArgs: false
200
-
201
223
  Metrics/ClassLength:
202
224
  Exclude:
203
225
  - "test/**/*.rb"
204
-
205
- Rails/UnknownEnv:
206
- Environments:
207
- - production
208
- - staging
209
- - development
210
- - local
211
- - test
data/fablicop.gemspec CHANGED
@@ -30,8 +30,9 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_dependency "rubocop", "~> 0.53.0"
33
+ spec.add_dependency "rubocop", "~> 1.14.0"
34
34
  spec.add_dependency "rubocop-rspec", ">= 1.15.1"
35
+ spec.add_dependency "rubocop-rails"
35
36
  spec.add_development_dependency "bundler"
36
37
  spec.add_development_dependency "rake"
37
38
  end
@@ -1,3 +1,3 @@
1
1
  module Fablicop
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.9'
3
3
  end
@@ -5,6 +5,3 @@ inherit_gem:
5
5
  # - "config/rails.yml"
6
6
  # uncomment if use rspec cops
7
7
  # - "config/rspec.yml"
8
-
9
- AllCops:
10
- TargetRubyVersion: 2.3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fablicop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - tommy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2018-07-25 00:00:00.000000000 Z
13
+ date: 2021-06-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 0.53.0
21
+ version: 1.14.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 0.53.0
28
+ version: 1.14.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rubocop-rspec
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -40,6 +40,20 @@ dependencies:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: 1.15.1
43
+ - !ruby/object:Gem::Dependency
44
+ name: rubocop-rails
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
43
57
  - !ruby/object:Gem::Dependency
44
58
  name: bundler
45
59
  requirement: !ruby/object:Gem::Requirement
@@ -115,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
129
  version: '0'
116
130
  requirements: []
117
131
  rubyforge_project:
118
- rubygems_version: 2.5.1
132
+ rubygems_version: 2.7.6.2
119
133
  signing_key:
120
134
  specification_version: 4
121
135
  summary: fablicop is a RuboCop configration gem.