onkcop 0.49.1.0 → 0.49.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '0258c3828b1a566b35eca8eb49960925ad231c18'
4
- data.tar.gz: a617c68077e93760347b5e9184da7f5992d27d0f
3
+ metadata.gz: fdb37d6c801687405ca031a85f0a7becbf4beeb0
4
+ data.tar.gz: 16759f03e1651e13263c324ede37bd5e480f7fa4
5
5
  SHA512:
6
- metadata.gz: 76146edd6f6d764d101bb36cb101ad0621799116c1c4127d8dce7c522e4d4e6d461110a0afce81a6d2efced289801fe0ff64e8164ad3efc5df7c9baf4063a6b4
7
- data.tar.gz: b1b5bfe2c89a378394c67e0029cede762d0ced735beb445ad95e281bab60d8c3e392dbbacceb2448db5da14731cf1c7ebfe69b07b0084d3037a92d13ccd21de7
6
+ metadata.gz: 26a1f18ad9d6a1bc38f8bbedd24a90804ec65dd1a85f26a234f45a074e774f1512f1ee6479f6ec4726e66b066bcd4b98e68da1e4082541ed900d918445d30a36
7
+ data.tar.gz: 291d56ab68641568f03c166192a866b09509140af9c36c31eab31552c1afd4683c2df878ad61b5caf6b213988079422733c96426bd4d871b80a825809f279918
@@ -1,5 +1,17 @@
1
1
  # onkcop
2
2
 
3
+ ## v0.49.1.1 (2017-09-11)
4
+
5
+ [full changelog](https://github.com/onk/onkcop/compare/v0.49.1.0...v0.49.1.1)
6
+
7
+ * Update `rubocop-rspec` v1.16.0
8
+ * Disable new `RSpec/ReturnFromStub` cop.
9
+ * Exclude `config/environments/*.rb` from Metrics/BlockLength cop.
10
+ * Disable `Performance/Casecmp` cop.
11
+ * Disable `RSpec/EmptyLineAfterFinalLet` cop.
12
+ * Relax `RSpec/NestedGroups` cop.
13
+
14
+
3
15
  ## v0.49.1.0 (2017-05-31)
4
16
 
5
17
  [full changelog](https://github.com/onk/onkcop/compare/v0.49.0.0...v0.49.1.0)
@@ -4,6 +4,14 @@ require: "rubocop-rspec"
4
4
  RSpec/DescribedClass:
5
5
  EnforcedStyle: explicit
6
6
 
7
+ # it が一つしか無いような context では空行を開ける方が読みづらい
8
+ # context "when foo is bar" do
9
+ # let(:foo) { bar }
10
+ # it { is_expected.to do_something }
11
+ # end
12
+ RSpec/EmptyLineAfterFinalLet:
13
+ Enabled: false
14
+
7
15
  # each で回したり aggregate_failures 使ってたりすると厳しい。
8
16
  # feature spec は exclude でも良いかもしれない。
9
17
  # ヒアドキュメント使うと一瞬で超えるので disable も検討。
@@ -28,3 +36,21 @@ RSpec/MultipleExpectations:
28
36
  # テスト対象メソッドを呼ぶだけの subject 以外を書かないようにする方が効く。
29
37
  RSpec/NamedSubject:
30
38
  Enabled: false
39
+
40
+ # Model
41
+ # `- #method
42
+ # |- 頻出ケースのテスト 1
43
+ # |- 頻出ケースのテスト 2
44
+ # `- レアケース
45
+ # |- レアケースのテスト 1
46
+ # `- レアケースのテスト 2
47
+ # のように括り出すと、レアケースのテストを読み飛ばせるようになり
48
+ # テストを読む人にやさしくなる。
49
+ # デフォルトの 3 より少し緩めてもヨサソウ。
50
+ RSpec/NestedGroups:
51
+ Max: 4
52
+
53
+ # ブロックは初見だと返り値を書いていると気づけないので and_return にしたいが、
54
+ # ブロックの方が見た目がスッキリして見やすいので、どちらでもお好きにどうぞ。
55
+ RSpec/ReturnFromStub:
56
+ Enabled: false
@@ -309,7 +309,7 @@ Metrics/AbcSize:
309
309
  Max: 24
310
310
 
311
311
  # Gemfile, Guardfile は DSL 的で基本的に複雑にはならないので除外
312
- # rake, rspec, routes は巨大な block 不可避なので除外
312
+ # rake, rspec, environments, routes は巨大な block 不可避なので除外
313
313
  # TODO: ExcludedMethods の精査
314
314
  Metrics/BlockLength:
315
315
  Exclude:
@@ -318,6 +318,7 @@ Metrics/BlockLength:
318
318
  - "spec/**/*.rb"
319
319
  - "Gemfile"
320
320
  - "Guardfile"
321
+ - "config/environments/*.rb"
321
322
  - "config/routes.rb"
322
323
  - "config/routes/**/*.rb"
323
324
  - "*.gemspec"
@@ -344,6 +345,13 @@ Metrics/MethodLength:
344
345
  Metrics/PerceivedComplexity:
345
346
  Max: 8
346
347
 
348
+ #################### Performance ###########################
349
+
350
+ # downcase or upcase しての比較はイディオムの域なので、多少の
351
+ # パフォーマンスの違いがあろうが casecmp に変える意義を感じない
352
+ Performance/Casecmp:
353
+ Enabled: false
354
+
347
355
  #################### Security ##############################
348
356
 
349
357
  # 毎回 YAML.safe_load(yaml_str, [Date, Time]) するのは面倒で。。
@@ -1,3 +1,3 @@
1
1
  module Onkcop
2
- VERSION = "0.49.1.0"
2
+ VERSION = "0.49.1.1"
3
3
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency "rubocop", "~> 0.49.1"
23
- spec.add_dependency "rubocop-rspec", ">= 1.15.1"
23
+ spec.add_dependency "rubocop-rspec", ">= 1.16.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.49.1.0
4
+ version: 0.49.1.1
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-05-31 00:00:00.000000000 Z
11
+ date: 2017-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.15.1
33
+ version: 1.16.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.15.1
40
+ version: 1.16.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.6.12
115
+ rubygems_version: 2.6.13
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: OnkCop is a RuboCop configration gem.