onkcop 0.50.0.0 → 0.51.0.0

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: ea0e6f1ee700df43e3b42b05de75ffb8518163704fa42021f9c74c3fadd6e499
4
- data.tar.gz: a9743904e7f371cfe3d14602a50b187031ccc4033bb02e46392511aff46ae960
3
+ metadata.gz: 7f59f884ff0507d3ba72afc6f7ee3187326786bf5f33d1bb60c7d3457c75b257
4
+ data.tar.gz: 9c5304a8a8327be1226f73821d7675b5ebbde57a70d1bcefeb1656ac1efc5fd2
5
5
  SHA512:
6
- metadata.gz: b9aaa2d2d3c18f1dd407e68fdce3a7cbcbe038f3498fc3874eff8035a5d0bc537ef43750483c982fdaeadaac9b92925904e2f8a04112f2f8f969b7e410db9830
7
- data.tar.gz: cb920dd1f004222fc5e31d0bb2a877b140bfdf6120a252d8b813efc06e7b2c597bbd4c677aa03cde0a6d64fe1537fd35d4b45454e2acb38b222f876f90499747
6
+ metadata.gz: c1bc840d525ce5855b3f6317a8f7ab900277a0ac7fed63d6596856b800ec1e429a3454a7e3399190a07496bf743717a80a9350c6cfc0c02c36900c4b88e5534f
7
+ data.tar.gz: 635e0dbfe39584f3aaa9f47e2bb547af1b8e5b2e693629c65cf32fa172bd38f2f4dc5e4207197f9b1eab8d050d47bfe526a300291ebd036960a366a19b47ffc5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # onkcop
2
2
 
3
+ ## v0.51.0.0 (2017-10-20)
4
+
5
+ * Update `rubocop` v0.51.0 and `rubocop-rspec` v1.19.0
6
+ * Enable `Lint/ReturnInVoidContext` cop
7
+ * Add `staging` env to `Rails/UnknownEnv` cop
8
+ * Add comments to `Style/SafeNavigation` and `Lint/UnusedMethodArgument` cop
9
+
10
+
3
11
  ## v0.50.0.0 (2017-10-12)
4
12
 
5
13
  * Update `rubocop` v0.50.0 and `rubocop-rspec` v1.18.0
data/config/rails.yml CHANGED
@@ -13,3 +13,11 @@ Rails/SafeNavigation:
13
13
  # valid? チェックし忘れを防ぎたい
14
14
  Rails/SaveBang:
15
15
  Enabled: true
16
+
17
+ # staging 環境を使っているので追加
18
+ Rails/UnknownEnv:
19
+ Environments:
20
+ - development # rubocop default.yml
21
+ - test # rubocop default.yml
22
+ - production # rubocop default.yml
23
+ - staging
data/config/rubocop.yml CHANGED
@@ -186,7 +186,14 @@ Style/RedundantReturn:
186
186
  Style/RedundantSelf:
187
187
  Enabled: false
188
188
 
189
- # 無理して使うモンじゃない
189
+ # user&.admin? が、[nil, true, false] の 3 値を返すことに一瞬で気づけず
190
+ # boolean を返すっぽく見えてしまうので無効に。
191
+ # user && user.admin? なら短絡評価で nil が返ってくるのが一目で分かるので。
192
+ # (boolean を返すメソッド以外なら積極的に使いたいんだけどねぇ
193
+ #
194
+ # 他に auto-correct してはいけないパターンとして
195
+ # if hoge && hoge.count > 1
196
+ # がある。
190
197
  Style/SafeNavigation:
191
198
  Enabled: false
192
199
 
@@ -310,7 +317,10 @@ Lint/RescueWithoutErrorClass:
310
317
  Lint/UnderscorePrefixedVariableName:
311
318
  Enabled: false
312
319
 
313
- # 子クラスで実装させるつもりのメソッドで引っかかるので
320
+ # 子クラスで実装させるつもりで中身が
321
+ # raise NotImplementedError
322
+ # のみのメソッドが引っかかるので。
323
+ # (raise せずに中身が空だと IgnoreEmptyMethods でセーフ)
314
324
  Lint/UnusedMethodArgument:
315
325
  Enabled: false
316
326
 
@@ -1,3 +1,3 @@
1
1
  module Onkcop
2
- VERSION = "0.50.0.0"
2
+ VERSION = "0.51.0.0"
3
3
  end
data/onkcop.gemspec CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "rubocop", "~> 0.50.0"
23
- spec.add_dependency "rubocop-rspec", ">= 1.18.0"
22
+ spec.add_dependency "rubocop", "~> 0.51.0"
23
+ spec.add_dependency "rubocop-rspec", ">= 1.19.0"
24
24
  spec.add_development_dependency "bundler"
25
25
  spec.add_development_dependency "rake"
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onkcop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.50.0.0
4
+ version: 0.51.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takafumi ONAKA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-11 00:00:00.000000000 Z
11
+ date: 2017-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.50.0
19
+ version: 0.51.0
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.50.0
26
+ version: 0.51.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.18.0
33
+ version: 1.19.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.18.0
40
+ version: 1.19.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement