onkcop 0.48.1.1 → 0.49.0.0
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 +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/config/rubocop.yml +44 -34
- data/lib/onkcop/version.rb +1 -1
- data/onkcop.gemspec +2 -2
- data/templates/.rubocop.yml +1 -1
- metadata +7 -7
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 73fb717715a1d6ff381ce9093eff0cc8861555cb
         | 
| 4 | 
            +
              data.tar.gz: 39ca4d5292fa908b35d26971746bcd131fed9602
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8487a087fc8c97fb9e2aa39abbd6b5ef132802f3f2cf1d35101b85ff26bbebd8748c5ba2f822868ce9b30ee34990227662405d51c0e0dcfbd2b5b321cbcdd311
         | 
| 7 | 
            +
              data.tar.gz: a9d6df313b3867b9ac8f9889f90c04a12408ce5942c24cf65c1fd85719dc2db8d58197606a575c56611ac36ecd48dbc83b95f8261b92e0dfdb33cb7f802e42c5
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,7 +1,19 @@ | |
| 1 1 | 
             
            # onkcop
         | 
| 2 2 |  | 
| 3 | 
            +
            ## v0.49.0.0 (2017-05-25)
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            [full changelog](https://github.com/onk/onkcop/compare/v0.48.1.1...v0.49.0.0)
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            * Update `rubocop` v0.49.0 and `rubocop-rspec` v1.15.1
         | 
| 8 | 
            +
            * Enable `Lint/AmbiguousBlockAssociation` cop except `spec/**/*`
         | 
| 9 | 
            +
            * Change some cops to `Layout` department
         | 
| 10 | 
            +
            * Disable new `Style/YodaCondition` cop
         | 
| 11 | 
            +
             | 
| 12 | 
            +
             | 
| 3 13 | 
             
            ## v0.48.1.1 (2017-04-18)
         | 
| 4 14 |  | 
| 15 | 
            +
            [full changelog](https://github.com/onk/onkcop/compare/v0.48.1.0...v0.48.1.1)
         | 
| 16 | 
            +
             | 
| 5 17 | 
             
            * Disable `Lint/AmbiguousBlockAssociation` cop.
         | 
| 6 18 |  | 
| 7 19 |  | 
    
        data/README.md
    CHANGED
    
    
    
        data/config/rubocop.yml
    CHANGED
    
    | @@ -6,6 +6,38 @@ AllCops: | |
| 6 6 | 
             
                - "node_modules/**/*"
         | 
| 7 7 | 
             
              DisplayCopNames: true
         | 
| 8 8 |  | 
| 9 | 
            +
            #################### Layout ################################
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            # メソッドチェーンの改行は末尾に . を入れる
         | 
| 12 | 
            +
            # REPL に貼り付けた際の暴発を防ぐため
         | 
| 13 | 
            +
            Layout/DotPosition:
         | 
| 14 | 
            +
              EnforcedStyle: trailing
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            # 桁揃えが綺麗にならないことが多いので migration は除外
         | 
| 17 | 
            +
            Layout/ExtraSpacing:
         | 
| 18 | 
            +
              Exclude:
         | 
| 19 | 
            +
                - "db/migrate/*.rb"
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            # special_inside_parentheses (default) と比べて
         | 
| 22 | 
            +
            # * 横に長くなりづらい
         | 
| 23 | 
            +
            # * メソッド名の長さが変わったときに diff が少ない
         | 
| 24 | 
            +
            Layout/IndentArray:
         | 
| 25 | 
            +
              EnforcedStyle: consistent
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            # ({ と hash を開始した場合に ( の位置にインデントさせる
         | 
| 28 | 
            +
            # そもそも {} が必要ない可能性が高いが Style/BracesAroundHashParameters はチェックしないことにしたので
         | 
| 29 | 
            +
            Layout/IndentHash:
         | 
| 30 | 
            +
              EnforcedStyle: consistent
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            # private/protected は一段深くインデントする
         | 
| 33 | 
            +
            Layout/IndentationConsistency:
         | 
| 34 | 
            +
              EnforcedStyle: rails
         | 
| 35 | 
            +
             | 
| 36 | 
            +
            # メソッドチェーン感がより感じられるインデントにする
         | 
| 37 | 
            +
            Layout/MultilineMethodCallIndentation:
         | 
| 38 | 
            +
              EnforcedStyle: indented_relative_to_receiver
         | 
| 39 | 
            +
             | 
| 40 | 
            +
             | 
| 9 41 | 
             
            #################### Style #################################
         | 
| 10 42 |  | 
| 11 43 | 
             
            # レキシカルスコープの扱いが alias_method の方が自然。
         | 
| @@ -61,11 +93,6 @@ Style/CollectionMethods: | |
| 61 93 | 
             
            Style/Documentation:
         | 
| 62 94 | 
             
              Enabled: false
         | 
| 63 95 |  | 
| 64 | 
            -
            # メソッドチェーンの改行は末尾に . を入れる
         | 
| 65 | 
            -
            # REPL に貼り付けた際の暴発を防ぐため
         | 
| 66 | 
            -
            Style/DotPosition:
         | 
| 67 | 
            -
              EnforcedStyle: trailing
         | 
| 68 | 
            -
             | 
| 69 96 | 
             
            # !! のイディオムは積極的に使う
         | 
| 70 97 | 
             
            Style/DoubleNegation:
         | 
| 71 98 | 
             
              Enabled: false
         | 
| @@ -87,11 +114,6 @@ Style/EmptyElse: | |
| 87 114 | 
             
            Style/EmptyMethod:
         | 
| 88 115 | 
             
              EnforcedStyle: expanded
         | 
| 89 116 |  | 
| 90 | 
            -
            # 桁揃えが綺麗にならないことが多いので migration は除外
         | 
| 91 | 
            -
            Style/ExtraSpacing:
         | 
| 92 | 
            -
              Exclude:
         | 
| 93 | 
            -
                - "db/migrate/*.rb"
         | 
| 94 | 
            -
             | 
| 95 117 | 
             
            # いずれかに揃えるのならば `sprintf` や `format` より String#% が好きです
         | 
| 96 118 | 
             
            Style/FormatString:
         | 
| 97 119 | 
             
              EnforcedStyle: percent
         | 
| @@ -121,21 +143,6 @@ Style/IfInsideElse: | |
| 121 143 | 
             
            Style/IfUnlessModifier:
         | 
| 122 144 | 
             
              Enabled: false
         | 
| 123 145 |  | 
| 124 | 
            -
            # special_inside_parentheses (default) と比べて
         | 
| 125 | 
            -
            # * 横に長くなりづらい
         | 
| 126 | 
            -
            # * メソッド名の長さが変わったときに diff が少ない
         | 
| 127 | 
            -
            Style/IndentArray:
         | 
| 128 | 
            -
              EnforcedStyle: consistent
         | 
| 129 | 
            -
             | 
| 130 | 
            -
            # ({ と hash を開始した場合に ( の位置にインデントさせる
         | 
| 131 | 
            -
            # そもそも {} が必要ない可能性が高いが Style/BracesAroundHashParameters はチェックしないことにしたので
         | 
| 132 | 
            -
            Style/IndentHash:
         | 
| 133 | 
            -
              EnforcedStyle: consistent
         | 
| 134 | 
            -
             | 
| 135 | 
            -
            # private/protected は一段深くインデントする
         | 
| 136 | 
            -
            Style/IndentationConsistency:
         | 
| 137 | 
            -
              EnforcedStyle: rails
         | 
| 138 | 
            -
             | 
| 139 146 | 
             
            # scope 等は複数行でも lambda ではなく ->{} で揃えた方が見た目が綺麗
         | 
| 140 147 | 
             
            Style/Lambda:
         | 
| 141 148 | 
             
              EnforcedStyle: literal
         | 
| @@ -145,10 +152,6 @@ Style/Lambda: | |
| 145 152 | 
             
            Style/MethodCalledOnDoEndBlock:
         | 
| 146 153 | 
             
              Enabled: true
         | 
| 147 154 |  | 
| 148 | 
            -
            # メソッドチェーン感がより感じられるインデントにする
         | 
| 149 | 
            -
            Style/MultilineMethodCallIndentation:
         | 
| 150 | 
            -
              EnforcedStyle: indented_relative_to_receiver
         | 
| 151 | 
            -
             | 
| 152 155 | 
             
            # 1_000_000 と区切り文字が 2 個以上必要になる場合のみ _ 区切りを必須にする
         | 
| 153 156 | 
             
            # 10_000_00 は許可しない。(これは例えば 10000 ドルをセント単位にする時に便利だが
         | 
| 154 157 | 
             
            # 頻出しないので foolproof に振る
         | 
| @@ -225,6 +228,12 @@ Style/TernaryParentheses: | |
| 225 228 | 
             
            Style/TrailingCommaInLiteral:
         | 
| 226 229 | 
             
              EnforcedStyleForMultiline: comma
         | 
| 227 230 |  | 
| 231 | 
            +
            # 0 <= foo && foo < 5 のように数直線上に並べるのは
         | 
| 232 | 
            +
            # コードを読みやすくするテクニック。
         | 
| 233 | 
            +
            # また、self == other, __FILE__ == $0 はイディオムなので許可。
         | 
| 234 | 
            +
            Style/YodaCondition:
         | 
| 235 | 
            +
              Enabled: false
         | 
| 236 | 
            +
             | 
| 228 237 | 
             
            # %w() と %i() が見分けづらいので Style/SymbolArray と合わせて無効に。
         | 
| 229 238 | 
             
            # 書き手に委ねるという意味で、Enabled: false にしています。使っても良い。
         | 
| 230 239 | 
             
            Style/WordArray:
         | 
| @@ -241,12 +250,13 @@ Style/ZeroLengthPredicate: | |
| 241 250 |  | 
| 242 251 | 
             
            #################### Lint ##################################
         | 
| 243 252 |  | 
| 244 | 
            -
            #  | 
| 245 | 
            -
            #  | 
| 246 | 
            -
            # | 
| 247 | 
            -
            #  | 
| 253 | 
            +
            # spec 内では
         | 
| 254 | 
            +
            # expect { subject }.to change { foo }
         | 
| 255 | 
            +
            # という書き方をよく行うので () を省略したい。
         | 
| 256 | 
            +
            # { foo } は明らかに change に紐付く。
         | 
| 248 257 | 
             
            Lint/AmbiguousBlockAssociation:
         | 
| 249 | 
            -
               | 
| 258 | 
            +
              Exclude:
         | 
| 259 | 
            +
                - "spec/**/*"
         | 
| 250 260 |  | 
| 251 261 | 
             
            # Style/EmptyCaseCondition と同じく網羅の表現力が empty when を認めた方が高いし、
         | 
| 252 262 | 
             
            # 頻出する対象を最初の when で撥ねるのはパフォーマンス向上で頻出する。
         | 
    
        data/lib/onkcop/version.rb
    CHANGED
    
    
    
        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. | 
| 23 | 
            -
              spec.add_dependency "rubocop-rspec", ">= 1.15. | 
| 22 | 
            +
              spec.add_dependency "rubocop", "~> 0.49.0"
         | 
| 23 | 
            +
              spec.add_dependency "rubocop-rspec", ">= 1.15.1"
         | 
| 24 24 | 
             
              spec.add_development_dependency "bundler"
         | 
| 25 25 | 
             
              spec.add_development_dependency "rake"
         | 
| 26 26 | 
             
            end
         | 
    
        data/templates/.rubocop.yml
    CHANGED
    
    
    
        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. | 
| 4 | 
            +
              version: 0.49.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- | 
| 11 | 
            +
            date: 2017-05-25 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. | 
| 19 | 
            +
                    version: 0.49.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. | 
| 26 | 
            +
                    version: 0.49.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.15. | 
| 33 | 
            +
                    version: 1.15.1
         | 
| 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. | 
| 40 | 
            +
                    version: 1.15.1
         | 
| 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. | 
| 115 | 
            +
            rubygems_version: 2.6.12
         | 
| 116 116 | 
             
            signing_key: 
         | 
| 117 117 | 
             
            specification_version: 4
         | 
| 118 118 | 
             
            summary: OnkCop is a RuboCop configration gem.
         |