fablicop 1.0.5 → 1.1.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
- SHA1:
3
- metadata.gz: 3bc4d692f130353295d26cb6fa68f40f807d1979
4
- data.tar.gz: 2625e6a6435135bb9cdf36664cdb29013d6bef7a
2
+ SHA256:
3
+ metadata.gz: 6b5caa1ee8828550cee968cb6207cc13bed218e6807a40411856ba69a43cb534
4
+ data.tar.gz: 8cb4ecff9101a1e21e308b7bb72614c1f85311dd5a089bf8802c2d14b9907f50
5
5
  SHA512:
6
- metadata.gz: 169b5712345819a2f7e6f0ab3757c833ea094e091be1c64a3fa0e7ee9e46c9f40d7f0c2d0d67de8316481288e3373fdcaf04ff44e52e951cfa783b29d8a463f5
7
- data.tar.gz: 3f86995b09726eba27128e6e429252aa9d7e5c6d6b96b6e4e91d6e2515a213e1def13386e14e4f0e67944204b7bb1142c8500e5198489152dc959186541ab6d5
6
+ metadata.gz: af21d0e9d4474a040648c2163ae72555c5c10d887793a4c5cbb7337ef59039355b00eb6223bc13a2d2f24e00a02524991a63bd2ea01d00039cd7fdbac1618d0d
7
+ data.tar.gz: 4c3bc61b9626a3b899e84cc6cfeedcf1971cc9d8ca048e9332d6fcd9813fc5d82fa9be4e97d3fbdac17b0a15e14c52cef252cde9a158a8de1fe00e4d57cba03d
@@ -0,0 +1,17 @@
1
+ name: Run CI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ 'run-ci':
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
12
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
13
+ uses: ruby/setup-ruby@v1
14
+ with:
15
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
16
+ - name: Run rspecs
17
+ run: bundle exec rspec
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,2 +1 @@
1
- inherit_gem:
2
- fablicop: "config/base_rubocop.yml"
1
+ inherit_from: config/.base_rubocop.yml
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,27 +216,15 @@ 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
226
 
205
- Rails/UnknownEnv:
206
- Environments:
207
- - production
208
- - staging
209
- - development
210
- - local
211
- - test
212
-
213
- Gemspec/OrderedDependencies:
227
+ # Does the variable name for an exception object really matter?
228
+ # There are many things to think about before taking care of it.
229
+ Naming/RescuedExceptionsVariableName:
214
230
  Enabled: false
data/fablicop.gemspec CHANGED
@@ -30,8 +30,11 @@ 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"
37
+ spec.add_development_dependency "rspec"
36
38
  spec.add_development_dependency "rake"
39
+ spec.add_development_dependency 'byebug'
37
40
  end
@@ -1,3 +1,3 @@
1
1
  module Fablicop
2
- VERSION = '1.0.5'
2
+ VERSION = '1.1.0'
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,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fablicop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tommy
8
8
  - ujihisa
9
9
  - sinamon129
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2018-08-20 00:00:00.000000000 Z
13
+ date: 2021-07-01 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
@@ -54,6 +68,20 @@ dependencies:
54
68
  - - ">="
55
69
  - !ruby/object:Gem::Version
56
70
  version: '0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rspec
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
57
85
  - !ruby/object:Gem::Dependency
58
86
  name: rake
59
87
  requirement: !ruby/object:Gem::Requirement
@@ -68,6 +96,20 @@ dependencies:
68
96
  - - ">="
69
97
  - !ruby/object:Gem::Version
70
98
  version: '0'
99
+ - !ruby/object:Gem::Dependency
100
+ name: byebug
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
71
113
  description: fablicop is a RuboCop configration gem.
72
114
  email:
73
115
  - kazushige_tominaga@fablic.co.jp
@@ -78,7 +120,9 @@ executables:
78
120
  extensions: []
79
121
  extra_rdoc_files: []
80
122
  files:
123
+ - ".github/workflows/run-ci.yml"
81
124
  - ".gitignore"
125
+ - ".rspec"
82
126
  - ".rubocop.yml"
83
127
  - ".ruby-version"
84
128
  - CODE_OF_CONDUCT.md
@@ -99,7 +143,7 @@ homepage: https://github.com/Fablic/fablicop
99
143
  licenses:
100
144
  - MIT
101
145
  metadata: {}
102
- post_install_message:
146
+ post_install_message:
103
147
  rdoc_options: []
104
148
  require_paths:
105
149
  - lib
@@ -114,9 +158,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
158
  - !ruby/object:Gem::Version
115
159
  version: '0'
116
160
  requirements: []
117
- rubyforge_project:
118
- rubygems_version: 2.5.1
119
- signing_key:
161
+ rubyforge_project:
162
+ rubygems_version: 2.7.6.2
163
+ signing_key:
120
164
  specification_version: 4
121
165
  summary: fablicop is a RuboCop configration gem.
122
166
  test_files: []