active_record_tweaks 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +9 -10
- data/Appraisals +18 -8
- data/CHANGELOG.md +8 -0
- data/Rakefile +0 -3
- data/active_record_tweaks.gemspec +2 -3
- data/gemfiles/rails_4_2.gemfile +1 -0
- data/gemfiles/rails_5_0.gemfile +1 -0
- data/gemfiles/rails_5_2.gemfile +10 -0
- data/gemfiles/rails_6_0.gemfile +10 -0
- data/lib/active_record_tweaks/version.rb +3 -1
- data/spec/active_record_tweaks_spec.rb +10 -10
- metadata +10 -25
- data/.rubocop.yml +0 -803
- data/gemfiles/rails_4_1.gemfile +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 03b026d5c1ec24a5ba344dc64d057f628320a2f86c89530e06c8433d292a4bcf
|
4
|
+
data.tar.gz: 3ea850e1ea5e51f96e8d1cf36b565a6ec834845c1114fee86f44d3f0e0c5d372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43514d615932ca8c7e608caa9df927d4859bfd253acf059836b365c466297f70bcdcff6348b17a836f70144a69cfd7d615d15d87e43fbf6aa5f740f0bbeb40d3
|
7
|
+
data.tar.gz: 5e1948b5728ff0139090143576b0bdb048ad44d73152b10cfb5b459534e00df1183fbce92ccc49d4dfaa2273d44132651e110f8edda74242c1bdb84bc4997113
|
data/.travis.yml
CHANGED
@@ -3,23 +3,22 @@
|
|
3
3
|
sudo: false
|
4
4
|
language: ruby
|
5
5
|
cache:
|
6
|
-
- bundler
|
6
|
+
- bundler
|
7
7
|
rvm:
|
8
|
-
- 2.
|
9
|
-
- 2.
|
10
|
-
- 2.
|
8
|
+
- 2.4
|
9
|
+
- 2.5
|
10
|
+
- 2.6
|
11
11
|
- ruby-head
|
12
12
|
gemfile:
|
13
13
|
- gemfiles/rails_4_2.gemfile
|
14
14
|
- gemfiles/rails_5_0.gemfile
|
15
15
|
- gemfiles/rails_5_1.gemfile
|
16
|
+
- gemfiles/rails_5_2.gemfile
|
17
|
+
- gemfiles/rails_6_0.gemfile
|
16
18
|
matrix:
|
17
19
|
fast_finish: true
|
20
|
+
exclude:
|
21
|
+
- rvm: 2.4
|
22
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
18
23
|
allow_failures:
|
19
24
|
- rvm: ruby-head
|
20
|
-
include:
|
21
|
-
- rvm: 2.2.6
|
22
|
-
gemfile: gemfiles/rails_4_1.gemfile
|
23
|
-
- rvm: 2.3.3
|
24
|
-
gemfile: gemfiles/rails_4_1.gemfile
|
25
|
-
|
data/Appraisals
CHANGED
@@ -1,18 +1,11 @@
|
|
1
1
|
|
2
|
-
appraise "rails_4_1" do
|
3
|
-
version = "~> 4.1.8"
|
4
|
-
gem "activesupport", version
|
5
|
-
gem "actionpack", version
|
6
|
-
gem "activerecord", version
|
7
|
-
gem "railties", version
|
8
|
-
end
|
9
|
-
|
10
2
|
appraise "rails_4_2" do
|
11
3
|
version = "~> 4.2.0"
|
12
4
|
gem "activesupport", version
|
13
5
|
gem "actionpack", version
|
14
6
|
gem "activerecord", version
|
15
7
|
gem "railties", version
|
8
|
+
gem "sqlite3", "~> 1.3.6"
|
16
9
|
end
|
17
10
|
|
18
11
|
appraise "rails_5_0" do
|
@@ -21,6 +14,7 @@ appraise "rails_5_0" do
|
|
21
14
|
gem "actionpack", version
|
22
15
|
gem "activerecord", version
|
23
16
|
gem "railties", version
|
17
|
+
gem "sqlite3", "~> 1.3.6"
|
24
18
|
end
|
25
19
|
|
26
20
|
appraise "rails_5_1" do
|
@@ -30,3 +24,19 @@ appraise "rails_5_1" do
|
|
30
24
|
gem "activerecord", version
|
31
25
|
gem "railties", version
|
32
26
|
end
|
27
|
+
|
28
|
+
appraise "rails_5_2" do
|
29
|
+
version = "~> 5.2.0"
|
30
|
+
gem "activesupport", version
|
31
|
+
gem "actionpack", version
|
32
|
+
gem "activerecord", version
|
33
|
+
gem "railties", version
|
34
|
+
end
|
35
|
+
|
36
|
+
appraise "rails_6_0" do
|
37
|
+
version = "~> 6.0.0.beta1"
|
38
|
+
gem "activesupport", version
|
39
|
+
gem "actionpack", version
|
40
|
+
gem "activerecord", version
|
41
|
+
gem "railties", version
|
42
|
+
end
|
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
require "appraisal"
|
2
2
|
require "bundler"
|
3
3
|
require "rspec/core/rake_task"
|
4
|
-
require "rubocop/rake_task"
|
5
4
|
|
6
5
|
Bundler::GemHelper.install_tasks
|
7
6
|
|
8
7
|
RSpec::Core::RakeTask.new(:spec)
|
9
8
|
|
10
|
-
RuboCop::RakeTask.new(:rubocop)
|
11
|
-
|
12
9
|
if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
|
13
10
|
task :default do
|
14
11
|
sh "appraisal install && rake appraisal spec"
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
28
28
|
s.require_paths = ["lib"]
|
29
29
|
|
30
|
-
s.add_dependency "activerecord", ">= 4.
|
30
|
+
s.add_dependency "activerecord", ">= 4.2.0", "< 7.0.0"
|
31
31
|
|
32
32
|
s.add_development_dependency "bundler", ">= 1.0.0"
|
33
33
|
s.add_development_dependency "rake", ">= 10.0", "<= 13.0"
|
@@ -39,9 +39,8 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.add_development_dependency "coveralls", ">= 0.7"
|
40
40
|
s.add_development_dependency "gem-release", ">= 0.7"
|
41
41
|
s.add_development_dependency "timecop", ">= 0.7.1"
|
42
|
-
s.add_development_dependency "rubocop", "~> 0.30"
|
43
42
|
|
44
|
-
s.required_ruby_version = ">= 2.
|
43
|
+
s.required_ruby_version = ">= 2.4.0"
|
45
44
|
|
46
45
|
s.required_rubygems_version = ">= 1.4.0"
|
47
46
|
end
|
data/gemfiles/rails_4_2.gemfile
CHANGED
data/gemfiles/rails_5_0.gemfile
CHANGED
@@ -258,13 +258,13 @@ describe Parent do
|
|
258
258
|
let!(:person) { klass.create! }
|
259
259
|
|
260
260
|
context "and it has updated_at value only" do
|
261
|
-
before { person.
|
261
|
+
before { person.update!(updated_at: Time.now, updated_on: nil) }
|
262
262
|
|
263
263
|
it { should eq "people/all/#{klass.count}" }
|
264
264
|
end
|
265
265
|
|
266
266
|
context "and it has updated_on value only" do
|
267
|
-
before { person.
|
267
|
+
before { person.update!(updated_at: nil, updated_on: Time.now) }
|
268
268
|
|
269
269
|
it do
|
270
270
|
should eq "people/all/"\
|
@@ -287,7 +287,7 @@ describe Parent do
|
|
287
287
|
|
288
288
|
context "and it has updated_on value only" do
|
289
289
|
before do
|
290
|
-
person.
|
290
|
+
person.update!(
|
291
291
|
updated_at: nil,
|
292
292
|
updated_on: Time.now,
|
293
293
|
)
|
@@ -301,7 +301,7 @@ describe Parent do
|
|
301
301
|
|
302
302
|
context "and it has newer updated_at" do
|
303
303
|
before do
|
304
|
-
person.
|
304
|
+
person.update!(
|
305
305
|
updated_at: Time.now + 3600,
|
306
306
|
updated_on: Time.now,
|
307
307
|
)
|
@@ -315,7 +315,7 @@ describe Parent do
|
|
315
315
|
|
316
316
|
context "and it has newer updated_on" do
|
317
317
|
before do
|
318
|
-
person.
|
318
|
+
person.update!(
|
319
319
|
updated_at: Time.now,
|
320
320
|
updated_on: Time.now + 3600,
|
321
321
|
)
|
@@ -342,7 +342,7 @@ describe Parent do
|
|
342
342
|
|
343
343
|
context "and it has updated_on value only" do
|
344
344
|
before do
|
345
|
-
person.
|
345
|
+
person.update!(
|
346
346
|
updated_at: nil,
|
347
347
|
updated_on: Time.now,
|
348
348
|
)
|
@@ -353,7 +353,7 @@ describe Parent do
|
|
353
353
|
|
354
354
|
context "and it has newer updated_at" do
|
355
355
|
before do
|
356
|
-
person.
|
356
|
+
person.update!(
|
357
357
|
updated_at: Time.now + 3600,
|
358
358
|
updated_on: Time.now,
|
359
359
|
)
|
@@ -364,7 +364,7 @@ describe Parent do
|
|
364
364
|
|
365
365
|
context "and it has newer updated_on" do
|
366
366
|
before do
|
367
|
-
person.
|
367
|
+
person.update!(
|
368
368
|
updated_at: Time.now,
|
369
369
|
updated_on: Time.now + 3600,
|
370
370
|
)
|
@@ -439,13 +439,13 @@ describe Parent do
|
|
439
439
|
let!(:person) { klass.create! }
|
440
440
|
|
441
441
|
context "and it has updated_at value only" do
|
442
|
-
before { person.
|
442
|
+
before { person.update!(updated_at: Time.now, updated_on: nil) }
|
443
443
|
|
444
444
|
it { should eq "people/all/#{klass.count}" }
|
445
445
|
end
|
446
446
|
|
447
447
|
context "and it has updated_on value only" do
|
448
|
-
before { person.
|
448
|
+
before { person.update!(updated_at: nil, updated_on: Time.now) }
|
449
449
|
|
450
450
|
it { should eq "people/all/#{klass.count}" }
|
451
451
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_tweaks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PikachuEXE
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.2.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 7.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 4.
|
29
|
+
version: 4.2.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 7.0.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: bundler
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,20 +176,6 @@ dependencies:
|
|
176
176
|
- - ">="
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: 0.7.1
|
179
|
-
- !ruby/object:Gem::Dependency
|
180
|
-
name: rubocop
|
181
|
-
requirement: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - "~>"
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: '0.30'
|
186
|
-
type: :development
|
187
|
-
prerelease: false
|
188
|
-
version_requirements: !ruby/object:Gem::Requirement
|
189
|
-
requirements:
|
190
|
-
- - "~>"
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: '0.30'
|
193
179
|
description: " ActiveRecord is great, but could be better. Here are some tweaks
|
194
180
|
for it.\n"
|
195
181
|
email:
|
@@ -200,7 +186,6 @@ extra_rdoc_files: []
|
|
200
186
|
files:
|
201
187
|
- ".gitignore"
|
202
188
|
- ".rspec"
|
203
|
-
- ".rubocop.yml"
|
204
189
|
- ".travis.yml"
|
205
190
|
- Appraisals
|
206
191
|
- CHANGELOG.md
|
@@ -210,10 +195,11 @@ files:
|
|
210
195
|
- Rakefile
|
211
196
|
- active_record_tweaks.gemspec
|
212
197
|
- gemfiles/.bundle/config
|
213
|
-
- gemfiles/rails_4_1.gemfile
|
214
198
|
- gemfiles/rails_4_2.gemfile
|
215
199
|
- gemfiles/rails_5_0.gemfile
|
216
200
|
- gemfiles/rails_5_1.gemfile
|
201
|
+
- gemfiles/rails_5_2.gemfile
|
202
|
+
- gemfiles/rails_6_0.gemfile
|
217
203
|
- lib/active_record_tweaks.rb
|
218
204
|
- lib/active_record_tweaks/integration.rb
|
219
205
|
- lib/active_record_tweaks/version.rb
|
@@ -231,15 +217,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
217
|
requirements:
|
232
218
|
- - ">="
|
233
219
|
- !ruby/object:Gem::Version
|
234
|
-
version: 2.
|
220
|
+
version: 2.4.0
|
235
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
222
|
requirements:
|
237
223
|
- - ">="
|
238
224
|
- !ruby/object:Gem::Version
|
239
225
|
version: 1.4.0
|
240
226
|
requirements: []
|
241
|
-
|
242
|
-
rubygems_version: 2.6.12
|
227
|
+
rubygems_version: 3.0.6
|
243
228
|
signing_key:
|
244
229
|
specification_version: 4
|
245
230
|
summary: Some Tweaks for ActiveRecord
|
data/.rubocop.yml
DELETED
@@ -1,803 +0,0 @@
|
|
1
|
-
# This is the default configuration file. Enabling and disabling is configured
|
2
|
-
# in separate files. This file adds all other parameters apart from Enabled.
|
3
|
-
|
4
|
-
# Common configuration.
|
5
|
-
AllCops:
|
6
|
-
# Include gemspec and Rakefile
|
7
|
-
Include:
|
8
|
-
- "**/*.gemspec"
|
9
|
-
- "**/*.podspec"
|
10
|
-
- "**/*.jbuilder"
|
11
|
-
- "**/*.rake"
|
12
|
-
- "**/*.opal"
|
13
|
-
- "**/Gemfile"
|
14
|
-
- "**/Rakefile"
|
15
|
-
- "**/Capfile"
|
16
|
-
- "**/Guardfile"
|
17
|
-
- "**/Podfile"
|
18
|
-
- "**/Thorfile"
|
19
|
-
- "**/Vagrantfile"
|
20
|
-
- "**/Berksfile"
|
21
|
-
- "**/Cheffile"
|
22
|
-
- "**/Vagabondfile"
|
23
|
-
Exclude:
|
24
|
-
- "vendor/**/*"
|
25
|
-
- "gemfiles/vendor/**/*"
|
26
|
-
# Cop names are not displayed in offense messages by default. Change behavior
|
27
|
-
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
|
28
|
-
# option.
|
29
|
-
DisplayCopNames: true
|
30
|
-
# Style guide URLs are not displayed in offense messages by default. Change
|
31
|
-
# behavior by overriding DisplayStyleGuide, or by giving the
|
32
|
-
# -S/--display-style-guide option.
|
33
|
-
DisplayStyleGuide: false
|
34
|
-
# Additional cops that do not reference a style guide rule may be enabled by
|
35
|
-
# default. Change behavior by overriding StyleGuideCopsOnly, or by giving
|
36
|
-
# the --only-guide-cops option.
|
37
|
-
StyleGuideCopsOnly: false
|
38
|
-
|
39
|
-
# Indent private/protected/public as deep as method definitions
|
40
|
-
Style/AccessModifierIndentation:
|
41
|
-
EnforcedStyle: indent
|
42
|
-
SupportedStyles:
|
43
|
-
- outdent
|
44
|
-
- indent
|
45
|
-
|
46
|
-
# Align the elements of a hash literal if they span more than one line.
|
47
|
-
Style/AlignHash:
|
48
|
-
# Alignment of entries using hash rocket as separator. Valid values are:
|
49
|
-
#
|
50
|
-
# key - left alignment of keys
|
51
|
-
# "a" => 2
|
52
|
-
# "bb" => 3
|
53
|
-
# separator - alignment of hash rockets, keys are right aligned
|
54
|
-
# "a" => 2
|
55
|
-
# "bb" => 3
|
56
|
-
# table - left alignment of keys, hash rockets, and values
|
57
|
-
# "a" => 2
|
58
|
-
# "bb" => 3
|
59
|
-
EnforcedHashRocketStyle: table
|
60
|
-
# Alignment of entries using colon as separator. Valid values are:
|
61
|
-
#
|
62
|
-
# key - left alignment of keys
|
63
|
-
# a: 0
|
64
|
-
# bb: 1
|
65
|
-
# separator - alignment of colons, keys are right aligned
|
66
|
-
# a: 0
|
67
|
-
# bb: 1
|
68
|
-
# table - left alignment of keys and values
|
69
|
-
# a: 0
|
70
|
-
# bb: 1
|
71
|
-
EnforcedColonStyle: table
|
72
|
-
# Select whether hashes that are the last argument in a method call should be
|
73
|
-
# inspected? Valid values are:
|
74
|
-
#
|
75
|
-
# always_inspect - Inspect both implicit and explicit hashes.
|
76
|
-
# Registers an offense for:
|
77
|
-
# function(a: 1,
|
78
|
-
# b: 2)
|
79
|
-
# Registers an offense for:
|
80
|
-
# function({a: 1,
|
81
|
-
# b: 2})
|
82
|
-
# always_ignore - Ignore both implicit and explicit hashes.
|
83
|
-
# Accepts:
|
84
|
-
# function(a: 1,
|
85
|
-
# b: 2)
|
86
|
-
# Accepts:
|
87
|
-
# function({a: 1,
|
88
|
-
# b: 2})
|
89
|
-
# ignore_implicit - Ignore only implicit hashes.
|
90
|
-
# Accepts:
|
91
|
-
# function(a: 1,
|
92
|
-
# b: 2)
|
93
|
-
# Registers an offense for:
|
94
|
-
# function({a: 1,
|
95
|
-
# b: 2})
|
96
|
-
# ignore_explicit - Ignore only explicit hashes.
|
97
|
-
# Accepts:
|
98
|
-
# function({a: 1,
|
99
|
-
# b: 2})
|
100
|
-
# Registers an offense for:
|
101
|
-
# function(a: 1,
|
102
|
-
# b: 2)
|
103
|
-
EnforcedLastArgumentHashStyle: always_inspect
|
104
|
-
SupportedLastArgumentHashStyles:
|
105
|
-
- always_inspect
|
106
|
-
- always_ignore
|
107
|
-
- ignore_implicit
|
108
|
-
- ignore_explicit
|
109
|
-
|
110
|
-
Style/AlignParameters:
|
111
|
-
# Alignment of parameters in multi-line method calls.
|
112
|
-
#
|
113
|
-
# The `with_first_parameter` style aligns the following lines along the same
|
114
|
-
# column as the first parameter.
|
115
|
-
#
|
116
|
-
# method_call(a,
|
117
|
-
# b)
|
118
|
-
#
|
119
|
-
# The `with_fixed_indentation` style aligns the following lines with one
|
120
|
-
# level of indentation relative to the start of the line with the method call.
|
121
|
-
#
|
122
|
-
# method_call(a,
|
123
|
-
# b)
|
124
|
-
EnforcedStyle: with_fixed_indentation
|
125
|
-
SupportedStyles:
|
126
|
-
- with_first_parameter
|
127
|
-
- with_fixed_indentation
|
128
|
-
|
129
|
-
Style/AndOr:
|
130
|
-
# Whether `and` and `or` are banned only in conditionals (conditionals)
|
131
|
-
# or completely (always).
|
132
|
-
EnforcedStyle: always
|
133
|
-
SupportedStyles:
|
134
|
-
- always
|
135
|
-
- conditionals
|
136
|
-
|
137
|
-
|
138
|
-
# Checks if usage of %() or %Q() matches configuration.
|
139
|
-
Style/BarePercentLiterals:
|
140
|
-
EnforcedStyle: percent_q
|
141
|
-
SupportedStyles:
|
142
|
-
- percent_q
|
143
|
-
- bare_percent
|
144
|
-
|
145
|
-
Style/BlockDelimiters:
|
146
|
-
EnforcedStyle: line_count_based
|
147
|
-
SupportedStyles:
|
148
|
-
# The `line_count_based` style enforces braces around single line blocks and
|
149
|
-
# do..end around multi-line blocks.
|
150
|
-
- line_count_based
|
151
|
-
# The `semantic` style enforces braces around functional blocks, where the
|
152
|
-
# primary purpose of the block is to return a value and do..end for
|
153
|
-
# procedural blocks, where the primary purpose of the block is its
|
154
|
-
# side-effects.
|
155
|
-
#
|
156
|
-
# This looks at the usage of a block"s method to determine its type (e.g. is
|
157
|
-
# the result of a `map` assigned to a variable or passed to another
|
158
|
-
# method) but exceptions are permitted in the `ProceduralMethods`,
|
159
|
-
# `FunctionalMethods` and `IgnoredMethods` sections below.
|
160
|
-
- semantic
|
161
|
-
ProceduralMethods:
|
162
|
-
# Methods that are known to be procedural in nature but look functional from
|
163
|
-
# their usage, e.g.
|
164
|
-
#
|
165
|
-
# time = Benchmark.realtime do
|
166
|
-
# foo.bar
|
167
|
-
# end
|
168
|
-
#
|
169
|
-
# Here, the return value of the block is discarded but the return value of
|
170
|
-
# `Benchmark.realtime` is used.
|
171
|
-
- benchmark
|
172
|
-
- bm
|
173
|
-
- bmbm
|
174
|
-
- create
|
175
|
-
- each_with_object
|
176
|
-
- measure
|
177
|
-
- new
|
178
|
-
- realtime
|
179
|
-
- tap
|
180
|
-
- with_object
|
181
|
-
FunctionalMethods:
|
182
|
-
# Methods that are known to be functional in nature but look procedural from
|
183
|
-
# their usage, e.g.
|
184
|
-
#
|
185
|
-
# let(:foo) { Foo.new }
|
186
|
-
#
|
187
|
-
# Here, the return value of `Foo.new` is used to define a `foo` helper but
|
188
|
-
# doesn"t appear to be used from the return value of `let`.
|
189
|
-
- let
|
190
|
-
- let!
|
191
|
-
- subject
|
192
|
-
- watch
|
193
|
-
IgnoredMethods:
|
194
|
-
# Methods that can be either procedural or functional and cannot be
|
195
|
-
# categorised from their usage alone, e.g.
|
196
|
-
#
|
197
|
-
# foo = lambda do |x|
|
198
|
-
# puts "Hello, #{x}"
|
199
|
-
# end
|
200
|
-
#
|
201
|
-
# foo = lambda do |x|
|
202
|
-
# x * 100
|
203
|
-
# end
|
204
|
-
#
|
205
|
-
# Here, it is impossible to tell from the return value of `lambda` whether
|
206
|
-
# the inner block"s return value is significant.
|
207
|
-
- lambda
|
208
|
-
- proc
|
209
|
-
- it
|
210
|
-
|
211
|
-
Style/BracesAroundHashParameters:
|
212
|
-
EnforcedStyle: context_dependent
|
213
|
-
SupportedStyles:
|
214
|
-
# The `braces` style enforces braces around all method parameters that are
|
215
|
-
# hashes.
|
216
|
-
- braces
|
217
|
-
# The `no_braces` style checks that the last parameter doesn"t have braces
|
218
|
-
# around it.
|
219
|
-
- no_braces
|
220
|
-
# The `context_dependent` style checks that the last parameter doesn"t have
|
221
|
-
# braces around it, but requires braces if the second to last parameter is
|
222
|
-
# also a hash literal.
|
223
|
-
- context_dependent
|
224
|
-
|
225
|
-
# Indentation of `when`.
|
226
|
-
Style/CaseIndentation:
|
227
|
-
IndentWhenRelativeTo: case
|
228
|
-
SupportedStyles:
|
229
|
-
- case
|
230
|
-
- end
|
231
|
-
IndentOneStep: false
|
232
|
-
|
233
|
-
Style/ClassAndModuleChildren:
|
234
|
-
# Checks the style of children definitions at classes and modules.
|
235
|
-
#
|
236
|
-
# Basically there are two different styles:
|
237
|
-
#
|
238
|
-
# `nested` - have each child on a separate line
|
239
|
-
# class Foo
|
240
|
-
# class Bar
|
241
|
-
# end
|
242
|
-
# end
|
243
|
-
#
|
244
|
-
# `compact` - combine definitions as much as possible
|
245
|
-
# class Foo::Bar
|
246
|
-
# end
|
247
|
-
#
|
248
|
-
# The compact style is only forced, for classes / modules with one child.
|
249
|
-
EnforcedStyle: nested
|
250
|
-
SupportedStyles:
|
251
|
-
- nested
|
252
|
-
- compact
|
253
|
-
|
254
|
-
Style/ClassCheck:
|
255
|
-
EnforcedStyle: is_a?
|
256
|
-
SupportedStyles:
|
257
|
-
- is_a?
|
258
|
-
- kind_of?
|
259
|
-
|
260
|
-
# Align with the style guide.
|
261
|
-
Style/CollectionMethods:
|
262
|
-
# Mapping from undesired method to desired_method
|
263
|
-
# e.g. to use `detect` over `find`:
|
264
|
-
#
|
265
|
-
# CollectionMethods:
|
266
|
-
# PreferredMethods:
|
267
|
-
# find: detect
|
268
|
-
PreferredMethods:
|
269
|
-
collect: "map"
|
270
|
-
collect!: "map!"
|
271
|
-
inject: "reduce"
|
272
|
-
detect: "find"
|
273
|
-
find_all: "select"
|
274
|
-
|
275
|
-
# Use ` or %x around command literals.
|
276
|
-
Style/CommandLiteral:
|
277
|
-
EnforcedStyle: mixed
|
278
|
-
# backticks: Always use backticks.
|
279
|
-
# percent_x: Always use %x.
|
280
|
-
# mixed: Use backticks on single-line commands, and %x on multi-line commands.
|
281
|
-
SupportedStyles:
|
282
|
-
- backticks
|
283
|
-
- percent_x
|
284
|
-
- mixed
|
285
|
-
# If false, the cop will always recommend using %x if one or more backticks
|
286
|
-
# are found in the command string.
|
287
|
-
AllowInnerBackticks: false
|
288
|
-
|
289
|
-
# Checks formatting of special comments
|
290
|
-
Style/CommentAnnotation:
|
291
|
-
Keywords:
|
292
|
-
- TODO
|
293
|
-
- FIXME
|
294
|
-
- OPTIMIZE
|
295
|
-
- HACK
|
296
|
-
- REVIEW
|
297
|
-
|
298
|
-
# Checks that you have put a copyright in a comment before any code.
|
299
|
-
#
|
300
|
-
# You can override the default Notice in your .rubocop.yml file.
|
301
|
-
#
|
302
|
-
# In order to use autocorrect, you must supply a value for the
|
303
|
-
# AutocorrectNotice key that matches the regexp Notice. A blank
|
304
|
-
# AutocorrectNotice will cause an error during autocorrect.
|
305
|
-
#
|
306
|
-
# Autocorrect will add a copyright notice in a comment at the top
|
307
|
-
# of the file immediately after any shebang or encoding comments.
|
308
|
-
#
|
309
|
-
# Example rubocop.yml:
|
310
|
-
#
|
311
|
-
# Style/Copyright:
|
312
|
-
# Enabled: true
|
313
|
-
# Notice: "Copyright (\(c\) )?2015 Yahoo! Inc"
|
314
|
-
# AutocorrectNotice: "# Copyright (c) 2015 Yahoo! Inc."
|
315
|
-
#
|
316
|
-
Style/Copyright:
|
317
|
-
Enabled: false
|
318
|
-
Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
|
319
|
-
AutocorrectNotice: ""
|
320
|
-
|
321
|
-
Style/Documentation:
|
322
|
-
Enabled: false
|
323
|
-
|
324
|
-
# Multi-line method chaining should be done with leading dots.
|
325
|
-
Style/DotPosition:
|
326
|
-
EnforcedStyle: trailing
|
327
|
-
SupportedStyles:
|
328
|
-
- leading
|
329
|
-
- trailing
|
330
|
-
|
331
|
-
# Warn on empty else statements
|
332
|
-
# empty - warn only on empty else
|
333
|
-
# nil - warn on else with nil in it
|
334
|
-
# both - warn on empty else and else with nil in it
|
335
|
-
Style/EmptyElse:
|
336
|
-
EnforcedStyle: both
|
337
|
-
SupportedStyles:
|
338
|
-
- empty
|
339
|
-
- nil
|
340
|
-
- both
|
341
|
-
|
342
|
-
# Use empty lines between defs.
|
343
|
-
Style/EmptyLineBetweenDefs:
|
344
|
-
# If true, this parameter means that single line method definitions don"t
|
345
|
-
# need an empty line between them.
|
346
|
-
AllowAdjacentOneLineDefs: false
|
347
|
-
|
348
|
-
Style/EmptyLinesAroundBlockBody:
|
349
|
-
EnforcedStyle: no_empty_lines
|
350
|
-
SupportedStyles:
|
351
|
-
- empty_lines
|
352
|
-
- no_empty_lines
|
353
|
-
|
354
|
-
Style/EmptyLinesAroundClassBody:
|
355
|
-
EnforcedStyle: no_empty_lines
|
356
|
-
SupportedStyles:
|
357
|
-
- empty_lines
|
358
|
-
- no_empty_lines
|
359
|
-
|
360
|
-
Style/EmptyLinesAroundModuleBody:
|
361
|
-
EnforcedStyle: no_empty_lines
|
362
|
-
SupportedStyles:
|
363
|
-
- empty_lines
|
364
|
-
- no_empty_lines
|
365
|
-
|
366
|
-
# Checks whether the source file has a utf-8 encoding comment or not
|
367
|
-
# AutoCorrectEncodingComment must match the regex
|
368
|
-
# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
|
369
|
-
Style/Encoding:
|
370
|
-
EnforcedStyle: always
|
371
|
-
SupportedStyles:
|
372
|
-
- when_needed
|
373
|
-
- always
|
374
|
-
AutoCorrectEncodingComment: "# encoding: utf-8"
|
375
|
-
|
376
|
-
Style/FileName:
|
377
|
-
# File names listed in AllCops:Include are excluded by default. Add extra
|
378
|
-
# excludes here.
|
379
|
-
Exclude: []
|
380
|
-
|
381
|
-
Style/FirstParameterIndentation:
|
382
|
-
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
383
|
-
SupportedStyles:
|
384
|
-
# The first parameter should always be indented one step more than the
|
385
|
-
# preceding line.
|
386
|
-
- consistent
|
387
|
-
# The first parameter should normally be indented one step more than the
|
388
|
-
# preceding line, but if it"s a parameter for a method call that is itself
|
389
|
-
# a parameter in a method call, then the inner parameter should be indented
|
390
|
-
# relative to the inner method.
|
391
|
-
- special_for_inner_method_call
|
392
|
-
# Same as special_for_inner_method_call except that the special rule only
|
393
|
-
# applies if the outer method call encloses its arguments in parentheses.
|
394
|
-
- special_for_inner_method_call_in_parentheses
|
395
|
-
|
396
|
-
# Checks use of for or each in multiline loops.
|
397
|
-
Style/For:
|
398
|
-
EnforcedStyle: each
|
399
|
-
SupportedStyles:
|
400
|
-
- for
|
401
|
-
- each
|
402
|
-
|
403
|
-
# Enforce the method used for string formatting.
|
404
|
-
Style/FormatString:
|
405
|
-
EnforcedStyle: format
|
406
|
-
SupportedStyles:
|
407
|
-
- format
|
408
|
-
- sprintf
|
409
|
-
- percent
|
410
|
-
|
411
|
-
# Built-in global variables are allowed by default.
|
412
|
-
Style/GlobalVars:
|
413
|
-
AllowedVariables: []
|
414
|
-
|
415
|
-
# `MinBodyLength` defines the number of lines of the a body of an if / unless
|
416
|
-
# needs to have to trigger this cop
|
417
|
-
Style/GuardClause:
|
418
|
-
MinBodyLength: 1
|
419
|
-
|
420
|
-
Style/HashSyntax:
|
421
|
-
EnforcedStyle: ruby19_no_mixed_keys
|
422
|
-
SupportedStyles:
|
423
|
-
- ruby19
|
424
|
-
- ruby19_no_mixed_keys
|
425
|
-
- hash_rockets
|
426
|
-
# Force hashes that have a symbol value to use hash rockets
|
427
|
-
UseHashRocketsWithSymbolValues: false
|
428
|
-
|
429
|
-
Style/IfUnlessModifier:
|
430
|
-
MaxLineLength: 80
|
431
|
-
|
432
|
-
Style/IndentationConsistency:
|
433
|
-
# The difference between `rails` and `normal` is that the `rails` style
|
434
|
-
# prescribes that in classes and modules the `protected` and `private`
|
435
|
-
# modifier keywords shall be indented the same as public methods and that
|
436
|
-
# protected and private members shall be indented one step more than the
|
437
|
-
# modifiers. Other than that, both styles mean that entities on the same
|
438
|
-
# logical depth shall have the same indentation.
|
439
|
-
EnforcedStyle: normal
|
440
|
-
SupportedStyles:
|
441
|
-
- normal
|
442
|
-
- rails
|
443
|
-
|
444
|
-
Style/IndentationWidth:
|
445
|
-
# Number of spaces for each indentation level.
|
446
|
-
Width: 2
|
447
|
-
|
448
|
-
# Checks the indentation of the first key in a hash literal.
|
449
|
-
Style/IndentHash:
|
450
|
-
# The value `special_inside_parentheses` means that hash literals with braces
|
451
|
-
# that have their opening brace on the same line as a surrounding opening
|
452
|
-
# round parenthesis, shall have their first key indented relative to the
|
453
|
-
# first position inside the parenthesis.
|
454
|
-
# The value `consistent` means that the indentation of the first key shall
|
455
|
-
# always be relative to the first position of the line where the opening
|
456
|
-
# brace is.
|
457
|
-
EnforcedStyle: special_inside_parentheses
|
458
|
-
SupportedStyles:
|
459
|
-
- special_inside_parentheses
|
460
|
-
- consistent
|
461
|
-
|
462
|
-
Style/LambdaCall:
|
463
|
-
EnforcedStyle: call
|
464
|
-
SupportedStyles:
|
465
|
-
- call
|
466
|
-
- braces
|
467
|
-
|
468
|
-
Style/Next:
|
469
|
-
# With `always` all conditions at the end of an iteration needs to be
|
470
|
-
# replaced by next - with `skip_modifier_ifs` the modifier if like this one
|
471
|
-
# are ignored: [1, 2].each { |a| return "yes" if a == 1 }
|
472
|
-
EnforcedStyle: skip_modifier_ifs
|
473
|
-
# `MinBodyLength` defines the number of lines of the a body of an if / unless
|
474
|
-
# needs to have to trigger this cop
|
475
|
-
MinBodyLength: 3
|
476
|
-
SupportedStyles:
|
477
|
-
- skip_modifier_ifs
|
478
|
-
- always
|
479
|
-
|
480
|
-
Style/NonNilCheck:
|
481
|
-
# With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
|
482
|
-
# `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
|
483
|
-
# **usually** OK, but might change behavior.
|
484
|
-
#
|
485
|
-
# With `IncludeSemanticChanges` set to `false`, this cop does not report
|
486
|
-
# offenses for `!x.nil?` and does no changes that might change behavior.
|
487
|
-
IncludeSemanticChanges: false
|
488
|
-
|
489
|
-
Style/MethodDefParentheses:
|
490
|
-
EnforcedStyle: require_parentheses
|
491
|
-
SupportedStyles:
|
492
|
-
- require_parentheses
|
493
|
-
- require_no_parentheses
|
494
|
-
|
495
|
-
Style/MethodName:
|
496
|
-
EnforcedStyle: snake_case
|
497
|
-
SupportedStyles:
|
498
|
-
- snake_case
|
499
|
-
- camelCase
|
500
|
-
|
501
|
-
Style/MultilineOperationIndentation:
|
502
|
-
EnforcedStyle: aligned
|
503
|
-
SupportedStyles:
|
504
|
-
- aligned
|
505
|
-
- indented
|
506
|
-
|
507
|
-
Style/NumericLiterals:
|
508
|
-
MinDigits: 5
|
509
|
-
|
510
|
-
# Allow safe assignment in conditions.
|
511
|
-
Style/ParenthesesAroundCondition:
|
512
|
-
AllowSafeAssignment: true
|
513
|
-
|
514
|
-
Style/PercentLiteralDelimiters:
|
515
|
-
PreferredDelimiters:
|
516
|
-
"%": ()
|
517
|
-
"%i": ()
|
518
|
-
"%q": ()
|
519
|
-
"%Q": ()
|
520
|
-
"%r": "||"
|
521
|
-
"%s": ()
|
522
|
-
"%w": ()
|
523
|
-
"%W": ()
|
524
|
-
"%x": ()
|
525
|
-
|
526
|
-
Style/PercentQLiterals:
|
527
|
-
EnforcedStyle: upper_case_q
|
528
|
-
SupportedStyles:
|
529
|
-
- lower_case_q # Use %q when possible, %Q when necessary
|
530
|
-
- upper_case_q # Always use %Q
|
531
|
-
|
532
|
-
Style/PredicateName:
|
533
|
-
# Predicate name prefices.
|
534
|
-
NamePrefix:
|
535
|
-
- is_
|
536
|
-
- has_
|
537
|
-
- have_
|
538
|
-
# Predicate name prefices that should be removed.
|
539
|
-
NamePrefixBlacklist:
|
540
|
-
- is_
|
541
|
-
- has_
|
542
|
-
- have_
|
543
|
-
|
544
|
-
Style/RaiseArgs:
|
545
|
-
EnforcedStyle: exploded
|
546
|
-
SupportedStyles:
|
547
|
-
- compact # raise Exception.new(msg)
|
548
|
-
- exploded # raise Exception, msg
|
549
|
-
|
550
|
-
Style/RedundantReturn:
|
551
|
-
# When true allows code like `return x, y`.
|
552
|
-
AllowMultipleReturnValues: false
|
553
|
-
|
554
|
-
# Use / or %r around regular expressions.
|
555
|
-
Style/RegexpLiteral:
|
556
|
-
EnforcedStyle: mixed
|
557
|
-
# slashes: Always use slashes.
|
558
|
-
# percent_r: Always use %r.
|
559
|
-
# mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
|
560
|
-
SupportedStyles:
|
561
|
-
- slashes
|
562
|
-
- percent_r
|
563
|
-
- mixed
|
564
|
-
# If false, the cop will always recommend using %r if one or more slashes
|
565
|
-
# are found in the regexp string.
|
566
|
-
AllowInnerSlashes: false
|
567
|
-
|
568
|
-
Style/Semicolon:
|
569
|
-
# Allow ; to separate several expressions on the same line.
|
570
|
-
AllowAsExpressionSeparator: false
|
571
|
-
|
572
|
-
Style/SignalException:
|
573
|
-
EnforcedStyle: only_fail
|
574
|
-
SupportedStyles:
|
575
|
-
- only_raise
|
576
|
-
- only_fail
|
577
|
-
- semantic
|
578
|
-
|
579
|
-
Style/SingleLineBlockParams:
|
580
|
-
Methods:
|
581
|
-
- reduce:
|
582
|
-
- a
|
583
|
-
- e
|
584
|
-
- inject:
|
585
|
-
- a
|
586
|
-
- e
|
587
|
-
|
588
|
-
Style/SingleLineMethods:
|
589
|
-
AllowIfMethodIsEmpty: true
|
590
|
-
|
591
|
-
Style/StringLiterals:
|
592
|
-
EnforcedStyle: double_quotes
|
593
|
-
SupportedStyles:
|
594
|
-
- single_quotes
|
595
|
-
- double_quotes
|
596
|
-
|
597
|
-
Style/StringLiteralsInInterpolation:
|
598
|
-
EnforcedStyle: double_quotes
|
599
|
-
SupportedStyles:
|
600
|
-
- single_quotes
|
601
|
-
- double_quotes
|
602
|
-
|
603
|
-
Style/SpaceAroundBlockParameters:
|
604
|
-
EnforcedStyleInsidePipes: no_space
|
605
|
-
SupportedStyles:
|
606
|
-
- space
|
607
|
-
- no_space
|
608
|
-
|
609
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
610
|
-
EnforcedStyle: space
|
611
|
-
SupportedStyles:
|
612
|
-
- space
|
613
|
-
- no_space
|
614
|
-
|
615
|
-
Style/SpaceAroundOperators:
|
616
|
-
AllowForAlignment: true
|
617
|
-
|
618
|
-
Style/SpaceBeforeBlockBraces:
|
619
|
-
EnforcedStyle: space
|
620
|
-
SupportedStyles:
|
621
|
-
- space
|
622
|
-
- no_space
|
623
|
-
|
624
|
-
Style/SpaceInsideBlockBraces:
|
625
|
-
EnforcedStyle: space
|
626
|
-
SupportedStyles:
|
627
|
-
- space
|
628
|
-
- no_space
|
629
|
-
# Valid values are: space, no_space
|
630
|
-
EnforcedStyleForEmptyBraces: no_space
|
631
|
-
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
|
632
|
-
SpaceBeforeBlockParameters: true
|
633
|
-
|
634
|
-
Style/SpaceInsideHashLiteralBraces:
|
635
|
-
EnforcedStyle: no_space
|
636
|
-
EnforcedStyleForEmptyBraces: no_space
|
637
|
-
SupportedStyles:
|
638
|
-
- space
|
639
|
-
- no_space
|
640
|
-
|
641
|
-
Style/SymbolProc:
|
642
|
-
# A list of method names to be ignored by the check.
|
643
|
-
# The names should be fairly unique, otherwise you"ll end up ignoring lots of code.
|
644
|
-
IgnoredMethods:
|
645
|
-
- respond_to
|
646
|
-
|
647
|
-
Style/TrailingBlankLines:
|
648
|
-
EnforcedStyle: final_newline
|
649
|
-
SupportedStyles:
|
650
|
-
- final_newline
|
651
|
-
- final_blank_line
|
652
|
-
|
653
|
-
Style/TrailingCommaInArguments:
|
654
|
-
# If `comma`, the cop requires a comma after the last argument, but only for
|
655
|
-
# parenthesized method calls where each argument is on its own line.
|
656
|
-
# If `consistent_comma`, the cop requires a comma after the last argument,
|
657
|
-
# for all parenthesized method calls with arguments.
|
658
|
-
EnforcedStyleForMultiline: comma
|
659
|
-
SupportedStyles:
|
660
|
-
- comma
|
661
|
-
- consistent_comma
|
662
|
-
- no_comma
|
663
|
-
|
664
|
-
Style/TrailingCommaInLiteral:
|
665
|
-
# If `comma`, the cop requires a comma after the last item in an array or
|
666
|
-
# hash, but only when each item is on its own line.
|
667
|
-
# If `consistent_comma`, the cop requires a comma after the last item of all
|
668
|
-
# non-empty array and hash literals.
|
669
|
-
EnforcedStyleForMultiline: comma
|
670
|
-
SupportedStyles:
|
671
|
-
- comma
|
672
|
-
- consistent_comma
|
673
|
-
- no_comma
|
674
|
-
|
675
|
-
# TrivialAccessors requires exact name matches and doesn"t allow
|
676
|
-
# predicated methods by default.
|
677
|
-
Style/TrivialAccessors:
|
678
|
-
# When set to false the cop will suggest the use of accessor methods
|
679
|
-
# in situations like:
|
680
|
-
#
|
681
|
-
# def name
|
682
|
-
# @other_name
|
683
|
-
# end
|
684
|
-
#
|
685
|
-
# This way you can uncover "hidden" attributes in your code.
|
686
|
-
ExactNameMatch: false
|
687
|
-
AllowPredicates: false
|
688
|
-
# Allows trivial writers that don"t end in an equal sign. e.g.
|
689
|
-
#
|
690
|
-
# def on_exception(action)
|
691
|
-
# @on_exception=action
|
692
|
-
# end
|
693
|
-
# on_exception :restart
|
694
|
-
#
|
695
|
-
# Commonly used in DSLs
|
696
|
-
AllowDSLWriters: false
|
697
|
-
IgnoreClassMethods: false
|
698
|
-
Whitelist:
|
699
|
-
- to_ary
|
700
|
-
- to_a
|
701
|
-
- to_c
|
702
|
-
- to_enum
|
703
|
-
- to_h
|
704
|
-
- to_hash
|
705
|
-
- to_i
|
706
|
-
- to_int
|
707
|
-
- to_io
|
708
|
-
- to_open
|
709
|
-
- to_path
|
710
|
-
- to_proc
|
711
|
-
- to_r
|
712
|
-
- to_regexp
|
713
|
-
- to_str
|
714
|
-
- to_s
|
715
|
-
- to_sym
|
716
|
-
|
717
|
-
Style/UnneededPercentQ:
|
718
|
-
Enabled: false
|
719
|
-
|
720
|
-
Style/VariableName:
|
721
|
-
EnforcedStyle: snake_case
|
722
|
-
SupportedStyles:
|
723
|
-
- snake_case
|
724
|
-
- camelCase
|
725
|
-
|
726
|
-
Style/WhileUntilModifier:
|
727
|
-
MaxLineLength: 80
|
728
|
-
|
729
|
-
Style/WordArray:
|
730
|
-
MinSize: 0
|
731
|
-
# The regular expression WordRegex decides what is considered a word.
|
732
|
-
WordRegex: !ruby/regexp '/\A[\p{Word}]+\z/'
|
733
|
-
|
734
|
-
##################### Metrics ##################################
|
735
|
-
|
736
|
-
Metrics/AbcSize:
|
737
|
-
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
|
738
|
-
# a Float.
|
739
|
-
Max: 15
|
740
|
-
|
741
|
-
Metrics/BlockNesting:
|
742
|
-
Max: 3
|
743
|
-
|
744
|
-
Metrics/ClassLength:
|
745
|
-
CountComments: false # count full line comments?
|
746
|
-
Max: 100
|
747
|
-
|
748
|
-
# Avoid complex methods.
|
749
|
-
Metrics/CyclomaticComplexity:
|
750
|
-
Max: 6
|
751
|
-
|
752
|
-
Metrics/LineLength:
|
753
|
-
Max: 100
|
754
|
-
# To make it possible to copy or click on URIs in the code, we allow lines
|
755
|
-
# contaning a URI to be longer than Max.
|
756
|
-
AllowURI: true
|
757
|
-
URISchemes:
|
758
|
-
- http
|
759
|
-
- https
|
760
|
-
|
761
|
-
Metrics/MethodLength:
|
762
|
-
CountComments: false # count full line comments?
|
763
|
-
Max: 10
|
764
|
-
|
765
|
-
Metrics/ParameterLists:
|
766
|
-
Max: 5
|
767
|
-
CountKeywordArgs: true
|
768
|
-
|
769
|
-
Metrics/PerceivedComplexity:
|
770
|
-
Max: 7
|
771
|
-
|
772
|
-
##################### Lint ##################################
|
773
|
-
|
774
|
-
# Allow safe assignment in conditions.
|
775
|
-
Lint/AssignmentInCondition:
|
776
|
-
AllowSafeAssignment: true
|
777
|
-
|
778
|
-
# Align ends correctly.
|
779
|
-
Lint/EndAlignment:
|
780
|
-
# The value `keyword` means that `end` should be aligned with the matching
|
781
|
-
# keyword (if, while, etc.).
|
782
|
-
# The value `variable` means that in assignments, `end` should be aligned
|
783
|
-
# with the start of the variable on the left hand side of `=`. In all other
|
784
|
-
# situations, `end` should still be aligned with the keyword.
|
785
|
-
AlignWith: variable
|
786
|
-
SupportedStyles:
|
787
|
-
- keyword
|
788
|
-
- variable
|
789
|
-
|
790
|
-
Lint/DefEndAlignment:
|
791
|
-
# The value `def` means that `end` should be aligned with the def keyword.
|
792
|
-
# The value `start_of_line` means that `end` should be aligned with method
|
793
|
-
# calls like `private`, `public`, etc, if present in front of the `def`
|
794
|
-
# keyword on the same line.
|
795
|
-
AlignWith: start_of_line
|
796
|
-
SupportedStyles:
|
797
|
-
- start_of_line
|
798
|
-
- def
|
799
|
-
|
800
|
-
##################### Rails ##################################
|
801
|
-
|
802
|
-
Rails:
|
803
|
-
Enabled: false
|
data/gemfiles/rails_4_1.gemfile
DELETED