unifacop 0.52.0.1 → 0.66.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dba615f9492bd92d1124475da227a8804882d6c256c75fc64dd177993d197532
4
- data.tar.gz: 483f377a687573df72edfbce1719c3b3f996116d6cd758ae6f50f33f702408ff
3
+ metadata.gz: d5a7980e79c4077481c8bbd5d292d05f98972f2d3d7d37a1f61c2a652538d951
4
+ data.tar.gz: 63ab828942dcc468473956a7c27d92e0b200eac0bfe944d6fbcf85ab9af9029e
5
5
  SHA512:
6
- metadata.gz: 1296a473a0a8106f56730bff5f452dc5a8e69d68ad8e6549e669a7f89f7078e1cffb7e41184fd0b2cf92d67d17b6079bf188480aca3e64d5d9f5d6e8e8d34eb2
7
- data.tar.gz: 9b48f0cbcbef96be2a42cc39dc90dfdd6bb7ae8fb57d416b7edf921c8a380d675dfbd33897c3f372d21e73d22b7dd50fad470f7f3d3e09f7bb784b15ecf4a836
6
+ metadata.gz: 2818c39c4cd0489f9a67311906bfa27b80e8d8ddf381be5345b4f506fd3bda00d71e742e7bc96e95893309f25b9678a18007b9daa89afe10841b19adbf3a2572
7
+ data.tar.gz: 7e650ea64ee2ab2f7ae9fd6c5db1cb97be6f7541f28c12ca231c44aa54b5b78c078c689361b8b10c071c599c259aa2418938a4e3faa0e81b686cadf9860ac014
@@ -1,6 +1,11 @@
1
1
  Rails:
2
2
  Enabled: true
3
3
 
4
+ # ActiveRecord aliases can also be understood
5
+ # For example update_attributes! for update!
6
+ Rails/ActiveRecordAliases:
7
+ Enabled: false
8
+
4
9
  # onkcop参照
5
10
  # > ActiveRecord で association を安易に delegate すると
6
11
  # > N+1 を起こしまくるので、なるべく delegate 的なメソッドを使わずに
@@ -19,6 +19,12 @@ AllCops:
19
19
  ## Layout cops
20
20
  # https://rubocop.readthedocs.io/en/latest/cops_layout/
21
21
 
22
+ # Does not allow both table and key alignment
23
+ # From v0.70.0 there are more configuration
24
+ # options it so could be used
25
+ Layout/AlignHash:
26
+ Enabled: false
27
+
22
28
  # ユニファの既存コードを見ると「leading」が多いため、こちらに統一する。
23
29
  Layout/DotPosition:
24
30
  Enabled: true
@@ -47,6 +53,11 @@ Layout/IndentHash:
47
53
  Layout/MultilineMethodCallIndentation:
48
54
  EnforcedStyle: indented_relative_to_receiver
49
55
 
56
+ # This is causing offences when a rescue block is used
57
+ # with variable assignment
58
+ Layout/RescueEnsureAlignment:
59
+ Enabled: false
60
+
50
61
  ## Lint cops
51
62
  # https://rubocop.readthedocs.io/en/latest/cops_lint/
52
63
 
@@ -166,6 +177,10 @@ Naming/PredicateName:
166
177
  - 'is_'
167
178
  - 'have_'
168
179
 
180
+ # Allow short method param names like e or _
181
+ Naming/UncommunicativeMethodParamName:
182
+ Enabled: false
183
+
169
184
  ## Performance
170
185
  # https://rubocop.readthedocs.io/en/latest/cops_performance/
171
186
 
@@ -175,12 +190,6 @@ Naming/PredicateName:
175
190
  Performance/Casecmp:
176
191
  Enabled: false
177
192
 
178
- # onkcop参照
179
- # > 2.4 以降では each_key でも特にパフォーマンスに差が無いので
180
- # > 読みやすさはほとんど変わらないし、書きやすさを取る。
181
- Performance/HashEachMethods:
182
- Enabled: false
183
-
184
193
  ## Security
185
194
  # https://rubocop.readthedocs.io/en/latest/cops_security/
186
195
 
@@ -429,9 +438,15 @@ Style/TernaryParentheses:
429
438
  EnforcedStyle: require_parentheses_when_complex
430
439
 
431
440
  # onkcop参照
432
- # > 複数行の場合はケツカンマを入れる
433
- # あとで行を追加するときに、変更行を少なくするため。
434
- Style/TrailingCommaInLiteral:
441
+ # > 複数行の場合はケツカンマを入れる(Arrayリテラル)
442
+ # > JSON がケツカンマを許していないという反対意見もあるが、
443
+ # > 古い JScript の仕様に縛られる必要は無い。
444
+ # > IE9 以降はリテラルでケツカンマ OK なので正しい差分行の検出に寄せる。
445
+ Style/TrailingCommaInArrayLiteral:
446
+ EnforcedStyleForMultiline: comma
447
+
448
+ # > 複数行の場合はケツカンマを入れる(Hashリテラル)
449
+ Style/TrailingCommaInHashLiteral:
435
450
  EnforcedStyleForMultiline: comma
436
451
 
437
452
  # onkcop参照
@@ -25,6 +25,7 @@ module UniFaCop
25
25
 
26
26
  def self.retrieve_command_name(args)
27
27
  return nil if args.empty?
28
+
28
29
  meth = args.first.to_s
29
30
  args.shift if meth !~ /^\-/
30
31
  end
@@ -38,6 +39,7 @@ module UniFaCop
38
39
 
39
40
  def init(args)
40
41
  raise 'usage: unifacop init' unless args.empty?
42
+
41
43
  template_path = File.expand_path('../../templates', __dir__)
42
44
  puts "#{File.exist?(CONFIG_FILE_NAME) ? 'overwrite' : 'create'} #{CONFIG_FILE_NAME}"
43
45
  FileUtils.copy_file(File.join(template_path, CONFIG_FILE_NAME), CONFIG_FILE_NAME)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UniFaCop
4
- VERSION = '0.52.0.1'.freeze
4
+ VERSION = '0.66.0.0'.freeze
5
5
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'unifacop/version'
6
6
 
@@ -21,10 +21,10 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.required_ruby_version = '>= 2.1.0'
24
+ spec.required_ruby_version = '>= 2.2.0'
25
25
 
26
- spec.add_runtime_dependency 'rubocop', '~> 0.52.0'
27
- spec.add_runtime_dependency 'rubocop-rspec', '>= 1.21.0'
26
+ spec.add_runtime_dependency 'rubocop', '~> 0.66.0'
27
+ spec.add_runtime_dependency 'rubocop-rspec', '>= 1.35.0'
28
28
  spec.add_development_dependency 'bundler'
29
29
  spec.add_development_dependency 'rake'
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unifacop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.52.0.1
4
+ version: 0.66.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - UniFa Co. Ltd.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2020-05-08 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.52.0
19
+ version: 0.66.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.52.0
26
+ version: 0.66.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.21.0
33
+ version: 1.35.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.21.0
40
+ version: 1.35.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -95,15 +95,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
- version: 2.1.0
98
+ version: 2.2.0
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubyforge_project:
106
- rubygems_version: 2.7.6
105
+ rubygems_version: 3.0.3
107
106
  signing_key:
108
107
  specification_version: 4
109
108
  summary: A rubocop configuration gem for UniFa Coding Style Guide.