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