alchemy_cms 3.1.3 → 3.2.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +2 -2
- data/.hound.yml +2 -0
- data/.rubocop.yml +1063 -0
- data/.travis.yml +14 -10
- data/Gemfile +4 -7
- data/README.md +16 -8
- data/alchemy_cms.gemspec +8 -7
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +10 -11
- data/app/assets/javascripts/alchemy/alchemy.js +1 -1
- data/app/assets/stylesheets/alchemy/{admin.css.scss → admin.scss} +1 -0
- data/app/assets/stylesheets/alchemy/{icon-font.css.scss → icon-font.scss} +0 -0
- data/app/assets/stylesheets/alchemy/{menubar.css.scss → menubar.scss} +0 -0
- data/app/assets/stylesheets/alchemy/{print.css.scss → print.scss} +0 -0
- data/app/assets/stylesheets/alchemy/selects.scss +0 -6
- data/app/controllers/alchemy/admin/contents_controller.rb +3 -4
- data/app/controllers/alchemy/admin/pictures_controller.rb +0 -2
- data/app/controllers/alchemy/api/contents_controller.rb +1 -1
- data/app/controllers/alchemy/api/elements_controller.rb +2 -2
- data/app/controllers/alchemy/api/pages_controller.rb +1 -1
- data/app/controllers/alchemy/elements_controller.rb +0 -6
- data/app/controllers/alchemy/pages_controller.rb +17 -13
- data/app/controllers/alchemy/pictures_controller.rb +1 -0
- data/app/helpers/alchemy/admin/navigation_helper.rb +1 -1
- data/app/models/alchemy/element.rb +41 -17
- data/app/models/alchemy/page/page_naming.rb +16 -29
- data/bin/alchemy +1 -1
- data/config/routes.rb +1 -2
- data/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -17
- data/lib/alchemy/capistrano.rb +3 -4
- data/lib/alchemy/controller_actions.rb +2 -1
- data/lib/alchemy/engine.rb +1 -0
- data/lib/alchemy/errors.rb +7 -0
- data/lib/alchemy/essence.rb +4 -4
- data/lib/alchemy/permissions.rb +1 -1
- data/lib/alchemy/shell.rb +26 -11
- data/lib/alchemy/test_support/controller_requests.rb +48 -12
- data/lib/alchemy/upgrader.rb +1 -0
- data/lib/alchemy/upgrader/three_point_one.rb +0 -1
- data/lib/alchemy/upgrader/three_point_two.rb +39 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/rails/templates/alchemy.rb +2 -2
- data/lib/tasks/alchemy/install.rake +2 -1
- data/spec/controllers/admin/attachments_controller_spec.rb +14 -14
- data/spec/controllers/admin/clipboard_controller_spec.rb +5 -5
- data/spec/controllers/admin/contents_controller_spec.rb +8 -14
- data/spec/controllers/admin/dashboard_controller_spec.rb +12 -12
- data/spec/controllers/admin/elements_controller_spec.rb +30 -31
- data/spec/controllers/admin/essence_files_controller_spec.rb +6 -6
- data/spec/controllers/admin/essence_pictures_controller_spec.rb +17 -17
- data/spec/controllers/admin/languages_controller_spec.rb +3 -3
- data/spec/controllers/admin/layoutpages_controller_spec.rb +3 -3
- data/spec/controllers/admin/pages_controller_spec.rb +48 -48
- data/spec/controllers/admin/pictures_controller_spec.rb +19 -19
- data/spec/controllers/admin/resources_controller_spec.rb +2 -2
- data/spec/controllers/admin/trash_controller_spec.rb +5 -5
- data/spec/controllers/alchemy/admin/tags_controller_spec.rb +5 -5
- data/spec/controllers/alchemy/api/contents_controller_spec.rb +46 -11
- data/spec/controllers/alchemy/api/elements_controller_spec.rb +42 -14
- data/spec/controllers/alchemy/api/pages_controller_spec.rb +26 -16
- data/spec/controllers/attachments_controller_spec.rb +7 -7
- data/spec/controllers/elements_controller_spec.rb +16 -19
- data/spec/controllers/messages_controller_spec.rb +15 -15
- data/spec/controllers/pages_controller_spec.rb +16 -25
- data/spec/controllers/pictures_controller_spec.rb +75 -49
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/assets/stylesheets/application.css +5 -3
- data/spec/dummy/config/application.rb +11 -1
- data/spec/dummy/config/boot.rb +1 -1
- data/spec/dummy/config/environment.rb +1 -1
- data/spec/dummy/config/environments/development.rb +14 -2
- data/spec/dummy/config/environments/production.rb +18 -21
- data/spec/dummy/config/environments/test.rb +9 -4
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/config/initializers/session_store.rb +1 -1
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +380 -0
- data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +5 -0
- data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +5 -0
- data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +5 -0
- data/spec/dummy/db/migrate/20150122213511_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +31 -0
- data/{db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb → spec/dummy/db/migrate/20150122213512_add_missing_unique_indices.acts_as_taggable_on_engine.rb} +5 -6
- data/{db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb → spec/dummy/db/migrate/20150122213513_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb} +2 -1
- data/{db/migrate/20140701160225_add_missing_taggable_index.rb → spec/dummy/db/migrate/20150122213514_add_missing_taggable_index.acts_as_taggable_on_engine.rb} +1 -0
- data/spec/dummy/db/schema.rb +27 -31
- data/spec/dummy/public/404.html +20 -11
- data/spec/dummy/public/422.html +20 -11
- data/spec/dummy/public/500.html +19 -10
- data/spec/features/admin/page_creation_feature_spec.rb +2 -2
- data/spec/libraries/resource_spec.rb +1 -1
- data/spec/libraries/shell_spec.rb +2 -0
- data/spec/models/page_spec.rb +1 -13
- data/spec/spec_helper.rb +6 -4
- data/spec/support/rspec-activemodel-mocks_patch.rb +8 -0
- metadata +63 -56
- data/app/controllers/alchemy/contents_controller.rb +0 -18
- data/spec/controllers/contents_controller_spec.rb +0 -22
- data/spec/dummy/app/models/dummy_model.rb +0 -3
- data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -1
- data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +0 -1
- data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +0 -1
- data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +0 -1
- data/spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb +0 -1
- data/spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb +0 -1
- data/spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb +0 -1
- data/spec/dummy/db/migrate/20150412103152_create_dummy_model.rb +0 -7
- data/spec/dummy/spec/javascripts +0 -1
- data/spec/models/dummy_model_spec.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d02423e2d293983c8074336ea6257e4f5396b01
|
4
|
+
data.tar.gz: 2960201acb1ac8abe310c514e95232c4e9e79c14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d9e11f92a046901b26063580acd9501ba993ce8941039bbfe63043d3b2b69be11b8c551b5bb8aa832578d6995941b089320a6611ab162655cd85980a044ba01
|
7
|
+
data.tar.gz: f1eb90673caf49095f03a350c4f89a603accf8311e2f320a08b96506252834fad22ed8c883b68da38b78d877f6a3173dff36fd15d81aff2c93ee48756c97b6a4
|
data/.editorconfig
CHANGED
data/.hound.yml
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,1063 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- "**/*.gemspec"
|
4
|
+
- "**/*.podspec"
|
5
|
+
- "**/*.jbuilder"
|
6
|
+
- "**/*.rake"
|
7
|
+
- "**/*.opal"
|
8
|
+
- "**/Gemfile"
|
9
|
+
- "**/Rakefile"
|
10
|
+
- "**/Capfile"
|
11
|
+
- "**/Guardfile"
|
12
|
+
- "**/Podfile"
|
13
|
+
- "**/Thorfile"
|
14
|
+
- "**/Vagrantfile"
|
15
|
+
- "**/Berksfile"
|
16
|
+
- "**/Cheffile"
|
17
|
+
- "**/Vagabondfile"
|
18
|
+
Exclude:
|
19
|
+
- "vendor/**/*"
|
20
|
+
- "db/schema.rb"
|
21
|
+
RunRailsCops: false
|
22
|
+
DisplayCopNames: false
|
23
|
+
StyleGuideCopsOnly: false
|
24
|
+
Style/AccessModifierIndentation:
|
25
|
+
Description: Check indentation of private/protected visibility modifiers.
|
26
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
27
|
+
Enabled: true
|
28
|
+
EnforcedStyle: indent
|
29
|
+
SupportedStyles:
|
30
|
+
- outdent
|
31
|
+
- indent
|
32
|
+
Style/AlignHash:
|
33
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
34
|
+
Enabled: true
|
35
|
+
EnforcedHashRocketStyle: key
|
36
|
+
EnforcedColonStyle: key
|
37
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
38
|
+
SupportedLastArgumentHashStyles:
|
39
|
+
- always_inspect
|
40
|
+
- always_ignore
|
41
|
+
- ignore_implicit
|
42
|
+
- ignore_explicit
|
43
|
+
Style/AlignParameters:
|
44
|
+
Description: Align the parameters of a method call if they span more than one line.
|
45
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
46
|
+
Enabled: true
|
47
|
+
EnforcedStyle: with_first_parameter
|
48
|
+
SupportedStyles:
|
49
|
+
- with_first_parameter
|
50
|
+
- with_fixed_indentation
|
51
|
+
Style/AndOr:
|
52
|
+
Description: Use &&/|| instead of and/or.
|
53
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
54
|
+
Enabled: true
|
55
|
+
EnforcedStyle: always
|
56
|
+
SupportedStyles:
|
57
|
+
- always
|
58
|
+
- conditionals
|
59
|
+
Style/BarePercentLiterals:
|
60
|
+
Description: Checks if usage of %() or %Q() matches configuration.
|
61
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
62
|
+
Enabled: true
|
63
|
+
EnforcedStyle: bare_percent
|
64
|
+
SupportedStyles:
|
65
|
+
- percent_q
|
66
|
+
- bare_percent
|
67
|
+
Style/BracesAroundHashParameters:
|
68
|
+
Description: Enforce braces style around hash parameters.
|
69
|
+
Enabled: true
|
70
|
+
EnforcedStyle: no_braces
|
71
|
+
SupportedStyles:
|
72
|
+
- braces
|
73
|
+
- no_braces
|
74
|
+
- context_dependent
|
75
|
+
Style/CaseIndentation:
|
76
|
+
Description: Indentation of when in a case/when/[else/]end.
|
77
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
78
|
+
Enabled: true
|
79
|
+
IndentWhenRelativeTo: case
|
80
|
+
SupportedStyles:
|
81
|
+
- case
|
82
|
+
- end
|
83
|
+
IndentOneStep: false
|
84
|
+
Style/ClassAndModuleChildren:
|
85
|
+
Description: Checks style of children classes and modules.
|
86
|
+
Enabled: false
|
87
|
+
EnforcedStyle: nested
|
88
|
+
SupportedStyles:
|
89
|
+
- nested
|
90
|
+
- compact
|
91
|
+
Style/ClassCheck:
|
92
|
+
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
93
|
+
Enabled: true
|
94
|
+
EnforcedStyle: is_a?
|
95
|
+
SupportedStyles:
|
96
|
+
- is_a?
|
97
|
+
- kind_of?
|
98
|
+
Style/CollectionMethods:
|
99
|
+
Description: Preferred collection methods.
|
100
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
101
|
+
Enabled: true
|
102
|
+
PreferredMethods:
|
103
|
+
collect: map
|
104
|
+
collect!: map!
|
105
|
+
find: detect
|
106
|
+
find_all: select
|
107
|
+
reduce: inject
|
108
|
+
Style/CommentAnnotation:
|
109
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
110
|
+
REVIEW).
|
111
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
112
|
+
Enabled: false
|
113
|
+
Keywords:
|
114
|
+
- TODO
|
115
|
+
- FIXME
|
116
|
+
- OPTIMIZE
|
117
|
+
- HACK
|
118
|
+
- REVIEW
|
119
|
+
Style/DotPosition:
|
120
|
+
Description: Checks the position of the dot in multi-line method calls.
|
121
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
122
|
+
Enabled: true
|
123
|
+
EnforcedStyle: trailing
|
124
|
+
SupportedStyles:
|
125
|
+
- leading
|
126
|
+
- trailing
|
127
|
+
Style/EmptyLineBetweenDefs:
|
128
|
+
Description: Use empty lines between defs.
|
129
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
130
|
+
Enabled: true
|
131
|
+
AllowAdjacentOneLineDefs: false
|
132
|
+
Style/EmptyLinesAroundBlockBody:
|
133
|
+
Description: Keeps track of empty lines around block bodies.
|
134
|
+
Enabled: true
|
135
|
+
EnforcedStyle: no_empty_lines
|
136
|
+
SupportedStyles:
|
137
|
+
- empty_lines
|
138
|
+
- no_empty_lines
|
139
|
+
Style/EmptyLinesAroundClassBody:
|
140
|
+
Description: Keeps track of empty lines around class bodies.
|
141
|
+
Enabled: true
|
142
|
+
EnforcedStyle: no_empty_lines
|
143
|
+
SupportedStyles:
|
144
|
+
- empty_lines
|
145
|
+
- no_empty_lines
|
146
|
+
Style/EmptyLinesAroundModuleBody:
|
147
|
+
Description: Keeps track of empty lines around module bodies.
|
148
|
+
Enabled: true
|
149
|
+
EnforcedStyle: no_empty_lines
|
150
|
+
SupportedStyles:
|
151
|
+
- empty_lines
|
152
|
+
- no_empty_lines
|
153
|
+
Style/Encoding:
|
154
|
+
Description: Use UTF-8 as the source file encoding.
|
155
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
156
|
+
Enabled: false
|
157
|
+
EnforcedStyle: always
|
158
|
+
SupportedStyles:
|
159
|
+
- when_needed
|
160
|
+
- always
|
161
|
+
Style/FileName:
|
162
|
+
Description: Use snake_case for source file names.
|
163
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
164
|
+
Enabled: false
|
165
|
+
Exclude: []
|
166
|
+
Style/FirstParameterIndentation:
|
167
|
+
Description: Checks the indentation of the first parameter in a method call.
|
168
|
+
Enabled: true
|
169
|
+
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
170
|
+
SupportedStyles:
|
171
|
+
- consistent
|
172
|
+
- special_for_inner_method_call
|
173
|
+
- special_for_inner_method_call_in_parentheses
|
174
|
+
Style/For:
|
175
|
+
Description: Checks use of for or each in multiline loops.
|
176
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
177
|
+
Enabled: true
|
178
|
+
EnforcedStyle: each
|
179
|
+
SupportedStyles:
|
180
|
+
- for
|
181
|
+
- each
|
182
|
+
Style/FormatString:
|
183
|
+
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
184
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
185
|
+
Enabled: false
|
186
|
+
EnforcedStyle: format
|
187
|
+
SupportedStyles:
|
188
|
+
- format
|
189
|
+
- sprintf
|
190
|
+
- percent
|
191
|
+
Style/GlobalVars:
|
192
|
+
Description: Do not introduce global variables.
|
193
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
194
|
+
Enabled: false
|
195
|
+
AllowedVariables: []
|
196
|
+
Style/GuardClause:
|
197
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
198
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
199
|
+
Enabled: false
|
200
|
+
MinBodyLength: 1
|
201
|
+
Style/HashSyntax:
|
202
|
+
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
203
|
+
1, :b => 2 }.'
|
204
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
205
|
+
Enabled: true
|
206
|
+
EnforcedStyle: ruby19
|
207
|
+
SupportedStyles:
|
208
|
+
- ruby19
|
209
|
+
- hash_rockets
|
210
|
+
Style/IfUnlessModifier:
|
211
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
212
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
213
|
+
Enabled: false
|
214
|
+
MaxLineLength: 100
|
215
|
+
Style/IndentationWidth:
|
216
|
+
Description: Use 2 spaces for indentation.
|
217
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
218
|
+
Enabled: true
|
219
|
+
Width: 2
|
220
|
+
Style/IndentHash:
|
221
|
+
Description: Checks the indentation of the first key in a hash literal.
|
222
|
+
Enabled: true
|
223
|
+
EnforcedStyle: special_inside_parentheses
|
224
|
+
SupportedStyles:
|
225
|
+
- special_inside_parentheses
|
226
|
+
- consistent
|
227
|
+
Style/LambdaCall:
|
228
|
+
Description: Use lambda.call(...) instead of lambda.(...).
|
229
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
230
|
+
Enabled: false
|
231
|
+
EnforcedStyle: call
|
232
|
+
SupportedStyles:
|
233
|
+
- call
|
234
|
+
- braces
|
235
|
+
Style/Next:
|
236
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
237
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
238
|
+
Enabled: false
|
239
|
+
EnforcedStyle: skip_modifier_ifs
|
240
|
+
MinBodyLength: 3
|
241
|
+
SupportedStyles:
|
242
|
+
- skip_modifier_ifs
|
243
|
+
- always
|
244
|
+
Style/NonNilCheck:
|
245
|
+
Description: Checks for redundant nil checks.
|
246
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
247
|
+
Enabled: true
|
248
|
+
IncludeSemanticChanges: false
|
249
|
+
Style/MethodDefParentheses:
|
250
|
+
Description: Checks if the method definitions have or don't have parentheses.
|
251
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
252
|
+
Enabled: true
|
253
|
+
EnforcedStyle: require_parentheses
|
254
|
+
SupportedStyles:
|
255
|
+
- require_parentheses
|
256
|
+
- require_no_parentheses
|
257
|
+
Style/MethodName:
|
258
|
+
Description: Use the configured style when naming methods.
|
259
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
260
|
+
Enabled: true
|
261
|
+
EnforcedStyle: snake_case
|
262
|
+
SupportedStyles:
|
263
|
+
- snake_case
|
264
|
+
- camelCase
|
265
|
+
Style/MultilineOperationIndentation:
|
266
|
+
Description: Checks indentation of binary operations that span more than one line.
|
267
|
+
Enabled: true
|
268
|
+
EnforcedStyle: aligned
|
269
|
+
SupportedStyles:
|
270
|
+
- aligned
|
271
|
+
- indented
|
272
|
+
Style/NumericLiterals:
|
273
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
274
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
275
|
+
Enabled: false
|
276
|
+
MinDigits: 5
|
277
|
+
Style/ParenthesesAroundCondition:
|
278
|
+
Description: Don't use parentheses around the condition of an if/unless/while.
|
279
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
|
280
|
+
Enabled: true
|
281
|
+
AllowSafeAssignment: true
|
282
|
+
Style/PercentLiteralDelimiters:
|
283
|
+
Description: Use `%`-literal delimiters consistently
|
284
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
285
|
+
Enabled: false
|
286
|
+
PreferredDelimiters:
|
287
|
+
"%": "()"
|
288
|
+
"%i": "()"
|
289
|
+
"%q": "()"
|
290
|
+
"%Q": "()"
|
291
|
+
"%r": "{}"
|
292
|
+
"%s": "()"
|
293
|
+
"%w": "()"
|
294
|
+
"%W": "()"
|
295
|
+
"%x": "()"
|
296
|
+
Style/PercentQLiterals:
|
297
|
+
Description: Checks if uses of %Q/%q match the configured preference.
|
298
|
+
Enabled: true
|
299
|
+
EnforcedStyle: lower_case_q
|
300
|
+
SupportedStyles:
|
301
|
+
- lower_case_q
|
302
|
+
- upper_case_q
|
303
|
+
Style/PredicateName:
|
304
|
+
Description: Check the names of predicate methods.
|
305
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
306
|
+
Enabled: true
|
307
|
+
NamePrefix:
|
308
|
+
- is_
|
309
|
+
- has_
|
310
|
+
- have_
|
311
|
+
NamePrefixBlacklist:
|
312
|
+
- is_
|
313
|
+
Style/RaiseArgs:
|
314
|
+
Description: Checks the arguments passed to raise/fail.
|
315
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
316
|
+
Enabled: false
|
317
|
+
EnforcedStyle: exploded
|
318
|
+
SupportedStyles:
|
319
|
+
- compact
|
320
|
+
- exploded
|
321
|
+
Style/RedundantReturn:
|
322
|
+
Description: Don't use return where it's not required.
|
323
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
324
|
+
Enabled: true
|
325
|
+
AllowMultipleReturnValues: false
|
326
|
+
Style/RegexpLiteral:
|
327
|
+
Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
|
328
|
+
characters. Use %r only for regular expressions matching more than `MaxSlashes`
|
329
|
+
'/' character.
|
330
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
331
|
+
Enabled: false
|
332
|
+
MaxSlashes: 1
|
333
|
+
Style/Semicolon:
|
334
|
+
Description: Don't use semicolons to terminate expressions.
|
335
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
336
|
+
Enabled: true
|
337
|
+
AllowAsExpressionSeparator: false
|
338
|
+
Style/SignalException:
|
339
|
+
Description: Checks for proper usage of fail and raise.
|
340
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
341
|
+
Enabled: false
|
342
|
+
EnforcedStyle: semantic
|
343
|
+
SupportedStyles:
|
344
|
+
- only_raise
|
345
|
+
- only_fail
|
346
|
+
- semantic
|
347
|
+
Style/SingleLineBlockParams:
|
348
|
+
Description: Enforces the names of some block params.
|
349
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
350
|
+
Enabled: false
|
351
|
+
Methods:
|
352
|
+
- reduce:
|
353
|
+
- a
|
354
|
+
- e
|
355
|
+
- inject:
|
356
|
+
- a
|
357
|
+
- e
|
358
|
+
Style/SingleLineMethods:
|
359
|
+
Description: Avoid single-line methods.
|
360
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
361
|
+
Enabled: false
|
362
|
+
AllowIfMethodIsEmpty: true
|
363
|
+
Style/StringLiterals:
|
364
|
+
Description: Checks if uses of quotes match the configured preference.
|
365
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
366
|
+
Enabled: false
|
367
|
+
EnforcedStyle: double_quotes
|
368
|
+
SupportedStyles:
|
369
|
+
- single_quotes
|
370
|
+
- double_quotes
|
371
|
+
Style/StringLiteralsInInterpolation:
|
372
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
373
|
+
match the configured preference.
|
374
|
+
Enabled: true
|
375
|
+
EnforcedStyle: single_quotes
|
376
|
+
SupportedStyles:
|
377
|
+
- single_quotes
|
378
|
+
- double_quotes
|
379
|
+
Style/SpaceAroundBlockParameters:
|
380
|
+
Description: Checks the spacing inside and after block parameters pipes.
|
381
|
+
Enabled: true
|
382
|
+
EnforcedStyleInsidePipes: no_space
|
383
|
+
SupportedStyles:
|
384
|
+
- space
|
385
|
+
- no_space
|
386
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
387
|
+
Description: Checks that the equals signs in parameter default assignments have
|
388
|
+
or don't have surrounding space depending on configuration.
|
389
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
390
|
+
Enabled: true
|
391
|
+
EnforcedStyle: space
|
392
|
+
SupportedStyles:
|
393
|
+
- space
|
394
|
+
- no_space
|
395
|
+
Style/SpaceBeforeBlockBraces:
|
396
|
+
Description: Checks that the left block brace has or doesn't have space before it.
|
397
|
+
Enabled: true
|
398
|
+
EnforcedStyle: space
|
399
|
+
SupportedStyles:
|
400
|
+
- space
|
401
|
+
- no_space
|
402
|
+
Style/SpaceInsideBlockBraces:
|
403
|
+
Description: Checks that block braces have or don't have surrounding space. For
|
404
|
+
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
405
|
+
space.
|
406
|
+
Enabled: true
|
407
|
+
EnforcedStyle: space
|
408
|
+
SupportedStyles:
|
409
|
+
- space
|
410
|
+
- no_space
|
411
|
+
EnforcedStyleForEmptyBraces: no_space
|
412
|
+
SpaceBeforeBlockParameters: true
|
413
|
+
Style/SpaceInsideHashLiteralBraces:
|
414
|
+
Description: Use spaces inside hash literal braces - or don't.
|
415
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
416
|
+
Enabled: true
|
417
|
+
EnforcedStyle: no_space
|
418
|
+
EnforcedStyleForEmptyBraces: no_space
|
419
|
+
SupportedStyles:
|
420
|
+
- space
|
421
|
+
- no_space
|
422
|
+
Style/SymbolProc:
|
423
|
+
Description: Use symbols as procs instead of blocks when possible.
|
424
|
+
Enabled: true
|
425
|
+
IgnoredMethods:
|
426
|
+
- respond_to
|
427
|
+
Style/TrailingBlankLines:
|
428
|
+
Description: Checks trailing blank lines and final newline.
|
429
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
430
|
+
Enabled: true
|
431
|
+
EnforcedStyle: final_newline
|
432
|
+
SupportedStyles:
|
433
|
+
- final_newline
|
434
|
+
- final_blank_line
|
435
|
+
Style/TrailingComma:
|
436
|
+
Description: Checks for trailing comma in parameter lists and literals.
|
437
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
438
|
+
Enabled: false
|
439
|
+
EnforcedStyleForMultiline: no_comma
|
440
|
+
SupportedStyles:
|
441
|
+
- comma
|
442
|
+
- no_comma
|
443
|
+
Style/TrivialAccessors:
|
444
|
+
Description: Prefer attr_* methods to trivial readers/writers.
|
445
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
446
|
+
Enabled: false
|
447
|
+
ExactNameMatch: false
|
448
|
+
AllowPredicates: false
|
449
|
+
AllowDSLWriters: false
|
450
|
+
Whitelist:
|
451
|
+
- to_ary
|
452
|
+
- to_a
|
453
|
+
- to_c
|
454
|
+
- to_enum
|
455
|
+
- to_h
|
456
|
+
- to_hash
|
457
|
+
- to_i
|
458
|
+
- to_int
|
459
|
+
- to_io
|
460
|
+
- to_open
|
461
|
+
- to_path
|
462
|
+
- to_proc
|
463
|
+
- to_r
|
464
|
+
- to_regexp
|
465
|
+
- to_str
|
466
|
+
- to_s
|
467
|
+
- to_sym
|
468
|
+
Style/VariableName:
|
469
|
+
Description: Use the configured style when naming variables.
|
470
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
471
|
+
Enabled: true
|
472
|
+
EnforcedStyle: snake_case
|
473
|
+
SupportedStyles:
|
474
|
+
- snake_case
|
475
|
+
- camelCase
|
476
|
+
Style/WhileUntilModifier:
|
477
|
+
Description: Favor modifier while/until usage when you have a single-line body.
|
478
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
479
|
+
Enabled: false
|
480
|
+
MaxLineLength: 100
|
481
|
+
Style/WordArray:
|
482
|
+
Description: Use %w or %W for arrays of words.
|
483
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
484
|
+
Enabled: false
|
485
|
+
MinSize: 0
|
486
|
+
WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
|
487
|
+
Metrics/AbcSize:
|
488
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
489
|
+
conditions.
|
490
|
+
Enabled: true
|
491
|
+
Max: 15
|
492
|
+
Metrics/BlockNesting:
|
493
|
+
Description: Avoid excessive block nesting
|
494
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
495
|
+
Enabled: false
|
496
|
+
Max: 3
|
497
|
+
Metrics/ClassLength:
|
498
|
+
Description: Avoid classes longer than 100 lines of code.
|
499
|
+
Enabled: false
|
500
|
+
CountComments: false
|
501
|
+
Max: 100
|
502
|
+
Metrics/CyclomaticComplexity:
|
503
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
504
|
+
cases needed to validate a method.
|
505
|
+
Enabled: false
|
506
|
+
Max: 6
|
507
|
+
Metrics/LineLength:
|
508
|
+
Description: Limit lines to 100 characters.
|
509
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
510
|
+
Enabled: true
|
511
|
+
Max: 100
|
512
|
+
AllowURI: true
|
513
|
+
URISchemes:
|
514
|
+
- http
|
515
|
+
- https
|
516
|
+
Metrics/MethodLength:
|
517
|
+
Description: Avoid methods longer than 10 lines of code.
|
518
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
519
|
+
Enabled: false
|
520
|
+
CountComments: false
|
521
|
+
Max: 10
|
522
|
+
Metrics/ParameterLists:
|
523
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
524
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
525
|
+
Enabled: false
|
526
|
+
Max: 5
|
527
|
+
CountKeywordArgs: true
|
528
|
+
Metrics/PerceivedComplexity:
|
529
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
530
|
+
reader.
|
531
|
+
Enabled: false
|
532
|
+
Max: 7
|
533
|
+
Lint/AssignmentInCondition:
|
534
|
+
Description: Don't use assignment in conditions.
|
535
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
536
|
+
Enabled: false
|
537
|
+
AllowSafeAssignment: true
|
538
|
+
Lint/EndAlignment:
|
539
|
+
Description: Align ends correctly.
|
540
|
+
Enabled: true
|
541
|
+
AlignWith: keyword
|
542
|
+
SupportedStyles:
|
543
|
+
- keyword
|
544
|
+
- variable
|
545
|
+
Lint/DefEndAlignment:
|
546
|
+
Description: Align ends corresponding to defs correctly.
|
547
|
+
Enabled: true
|
548
|
+
AlignWith: start_of_line
|
549
|
+
SupportedStyles:
|
550
|
+
- start_of_line
|
551
|
+
- def
|
552
|
+
Rails/ActionFilter:
|
553
|
+
Description: Enforces consistent use of action filter methods.
|
554
|
+
Enabled: false
|
555
|
+
EnforcedStyle: action
|
556
|
+
SupportedStyles:
|
557
|
+
- action
|
558
|
+
- filter
|
559
|
+
Include:
|
560
|
+
- app/controllers/**/*.rb
|
561
|
+
Rails/DefaultScope:
|
562
|
+
Description: Checks if the argument passed to default_scope is a block.
|
563
|
+
Enabled: true
|
564
|
+
Include:
|
565
|
+
- app/models/**/*.rb
|
566
|
+
Rails/HasAndBelongsToMany:
|
567
|
+
Description: Prefer has_many :through to has_and_belongs_to_many.
|
568
|
+
Enabled: true
|
569
|
+
Include:
|
570
|
+
- app/models/**/*.rb
|
571
|
+
Rails/Output:
|
572
|
+
Description: Checks for calls to puts, print, etc.
|
573
|
+
Enabled: true
|
574
|
+
Include:
|
575
|
+
- app/**/*.rb
|
576
|
+
- config/**/*.rb
|
577
|
+
- db/**/*.rb
|
578
|
+
- lib/**/*.rb
|
579
|
+
Rails/ReadWriteAttribute:
|
580
|
+
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
581
|
+
Enabled: true
|
582
|
+
Include:
|
583
|
+
- app/models/**/*.rb
|
584
|
+
Rails/ScopeArgs:
|
585
|
+
Description: Checks the arguments of ActiveRecord scopes.
|
586
|
+
Enabled: true
|
587
|
+
Include:
|
588
|
+
- app/models/**/*.rb
|
589
|
+
Rails/Validation:
|
590
|
+
Description: Use validates :attribute, hash of validations.
|
591
|
+
Enabled: true
|
592
|
+
Include:
|
593
|
+
- app/models/**/*.rb
|
594
|
+
Style/InlineComment:
|
595
|
+
Description: Avoid inline comments.
|
596
|
+
Enabled: false
|
597
|
+
Style/MethodCalledOnDoEndBlock:
|
598
|
+
Description: Avoid chaining a method call on a do...end block.
|
599
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
600
|
+
Enabled: false
|
601
|
+
Style/SymbolArray:
|
602
|
+
Description: Use %i or %I for arrays of symbols.
|
603
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
604
|
+
Enabled: false
|
605
|
+
Style/ExtraSpacing:
|
606
|
+
Description: Do not use unnecessary spacing.
|
607
|
+
Enabled: true
|
608
|
+
Style/AccessorMethodName:
|
609
|
+
Description: Check the naming of accessor methods for get_/set_.
|
610
|
+
Enabled: false
|
611
|
+
Style/Alias:
|
612
|
+
Description: Use alias_method instead of alias.
|
613
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
614
|
+
Enabled: false
|
615
|
+
Style/AlignArray:
|
616
|
+
Description: Align the elements of an array literal if they span more than one line.
|
617
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
618
|
+
Enabled: true
|
619
|
+
Style/ArrayJoin:
|
620
|
+
Description: Use Array#join instead of Array#*.
|
621
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
622
|
+
Enabled: false
|
623
|
+
Style/AsciiComments:
|
624
|
+
Description: Use only ascii symbols in comments.
|
625
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
626
|
+
Enabled: false
|
627
|
+
Style/AsciiIdentifiers:
|
628
|
+
Description: Use only ascii symbols in identifiers.
|
629
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
630
|
+
Enabled: false
|
631
|
+
Style/Attr:
|
632
|
+
Description: Checks for uses of Module#attr.
|
633
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
634
|
+
Enabled: false
|
635
|
+
Style/BeginBlock:
|
636
|
+
Description: Avoid the use of BEGIN blocks.
|
637
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
638
|
+
Enabled: true
|
639
|
+
Style/BlockComments:
|
640
|
+
Description: Do not use block comments.
|
641
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
642
|
+
Enabled: true
|
643
|
+
Style/BlockEndNewline:
|
644
|
+
Description: Put end statement of multiline block on its own line.
|
645
|
+
Enabled: true
|
646
|
+
Style/Blocks:
|
647
|
+
Description: Avoid using {...} for multi-line blocks (multiline chaining is always
|
648
|
+
ugly). Prefer {...} over do...end for single-line blocks.
|
649
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
650
|
+
Enabled: true
|
651
|
+
Style/CaseEquality:
|
652
|
+
Description: Avoid explicit use of the case equality operator(===).
|
653
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
654
|
+
Enabled: false
|
655
|
+
Style/CharacterLiteral:
|
656
|
+
Description: Checks for uses of character literals.
|
657
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
658
|
+
Enabled: false
|
659
|
+
Style/ClassAndModuleCamelCase:
|
660
|
+
Description: Use CamelCase for classes and modules.
|
661
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
662
|
+
Enabled: true
|
663
|
+
Style/ClassMethods:
|
664
|
+
Description: Use self when defining module/class methods.
|
665
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
|
666
|
+
Enabled: true
|
667
|
+
Style/ClassVars:
|
668
|
+
Description: Avoid the use of class variables.
|
669
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
670
|
+
Enabled: false
|
671
|
+
Style/ColonMethodCall:
|
672
|
+
Description: 'Do not use :: for method call.'
|
673
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
674
|
+
Enabled: false
|
675
|
+
Style/CommentIndentation:
|
676
|
+
Description: Indentation of comments.
|
677
|
+
Enabled: true
|
678
|
+
Style/ConstantName:
|
679
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
680
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
681
|
+
Enabled: true
|
682
|
+
Style/DefWithParentheses:
|
683
|
+
Description: Use def with parentheses when there are arguments.
|
684
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
685
|
+
Enabled: true
|
686
|
+
Style/DeprecatedHashMethods:
|
687
|
+
Description: Checks for use of deprecated Hash methods.
|
688
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
689
|
+
Enabled: false
|
690
|
+
Style/Documentation:
|
691
|
+
Description: Document classes and non-namespace modules.
|
692
|
+
Enabled: false
|
693
|
+
Style/DoubleNegation:
|
694
|
+
Description: Checks for uses of double negation (!!).
|
695
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
696
|
+
Enabled: false
|
697
|
+
Style/EachWithObject:
|
698
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
699
|
+
Enabled: false
|
700
|
+
Style/ElseAlignment:
|
701
|
+
Description: Align elses and elsifs correctly.
|
702
|
+
Enabled: true
|
703
|
+
Style/EmptyElse:
|
704
|
+
Description: Avoid empty else-clauses.
|
705
|
+
Enabled: true
|
706
|
+
Style/EmptyLines:
|
707
|
+
Description: Don't use several empty lines in a row.
|
708
|
+
Enabled: true
|
709
|
+
Style/EmptyLinesAroundAccessModifier:
|
710
|
+
Description: Keep blank lines around access modifiers.
|
711
|
+
Enabled: true
|
712
|
+
Style/EmptyLinesAroundMethodBody:
|
713
|
+
Description: Keeps track of empty lines around method bodies.
|
714
|
+
Enabled: true
|
715
|
+
Style/EmptyLiteral:
|
716
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
717
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
718
|
+
Enabled: false
|
719
|
+
Style/EndBlock:
|
720
|
+
Description: Avoid the use of END blocks.
|
721
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
722
|
+
Enabled: true
|
723
|
+
Style/EndOfLine:
|
724
|
+
Description: Use Unix-style line endings.
|
725
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
726
|
+
Enabled: true
|
727
|
+
Style/EvenOdd:
|
728
|
+
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
729
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
730
|
+
Enabled: false
|
731
|
+
Style/FlipFlop:
|
732
|
+
Description: Checks for flip flops
|
733
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
734
|
+
Enabled: false
|
735
|
+
Style/IfWithSemicolon:
|
736
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
737
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
738
|
+
Enabled: false
|
739
|
+
Style/IndentationConsistency:
|
740
|
+
Description: Keep indentation straight.
|
741
|
+
Enabled: true
|
742
|
+
Style/IndentArray:
|
743
|
+
Description: Checks the indentation of the first element in an array literal.
|
744
|
+
Enabled: true
|
745
|
+
Style/InfiniteLoop:
|
746
|
+
Description: Use Kernel#loop for infinite loops.
|
747
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
748
|
+
Enabled: true
|
749
|
+
Style/Lambda:
|
750
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
751
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
752
|
+
Enabled: false
|
753
|
+
Style/LeadingCommentSpace:
|
754
|
+
Description: Comments should start with a space.
|
755
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
756
|
+
Enabled: true
|
757
|
+
Style/LineEndConcatenation:
|
758
|
+
Description: Use \ instead of + or << to concatenate two string literals at line
|
759
|
+
end.
|
760
|
+
Enabled: false
|
761
|
+
Style/MethodCallParentheses:
|
762
|
+
Description: Do not use parentheses for method calls with no arguments.
|
763
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
764
|
+
Enabled: true
|
765
|
+
Style/ModuleFunction:
|
766
|
+
Description: Checks for usage of `extend self` in modules.
|
767
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
768
|
+
Enabled: false
|
769
|
+
Style/MultilineBlockChain:
|
770
|
+
Description: Avoid multi-line chains of blocks.
|
771
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
772
|
+
Enabled: true
|
773
|
+
Style/MultilineBlockLayout:
|
774
|
+
Description: Ensures newlines after multiline block do statements.
|
775
|
+
Enabled: true
|
776
|
+
Style/MultilineIfThen:
|
777
|
+
Description: Do not use then for multi-line if/unless.
|
778
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
779
|
+
Enabled: true
|
780
|
+
Style/MultilineTernaryOperator:
|
781
|
+
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
782
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
783
|
+
Enabled: true
|
784
|
+
Style/NegatedIf:
|
785
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
786
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
787
|
+
Enabled: false
|
788
|
+
Style/NegatedWhile:
|
789
|
+
Description: Favor until over while for negative conditions.
|
790
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
791
|
+
Enabled: false
|
792
|
+
Style/NestedTernaryOperator:
|
793
|
+
Description: Use one expression per branch in a ternary operator.
|
794
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
795
|
+
Enabled: true
|
796
|
+
Style/NilComparison:
|
797
|
+
Description: Prefer x.nil? to x == nil.
|
798
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
799
|
+
Enabled: false
|
800
|
+
Style/Not:
|
801
|
+
Description: Use ! instead of not.
|
802
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
803
|
+
Enabled: false
|
804
|
+
Style/OneLineConditional:
|
805
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
806
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
807
|
+
Enabled: false
|
808
|
+
Style/OpMethod:
|
809
|
+
Description: When defining binary operators, name the argument other.
|
810
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
811
|
+
Enabled: false
|
812
|
+
Style/PerlBackrefs:
|
813
|
+
Description: Avoid Perl-style regex back references.
|
814
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
815
|
+
Enabled: false
|
816
|
+
Style/Proc:
|
817
|
+
Description: Use proc instead of Proc.new.
|
818
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
819
|
+
Enabled: false
|
820
|
+
Style/RedundantBegin:
|
821
|
+
Description: Don't use begin blocks when they are not needed.
|
822
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
823
|
+
Enabled: true
|
824
|
+
Style/RedundantException:
|
825
|
+
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
826
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
827
|
+
Enabled: true
|
828
|
+
Style/RedundantSelf:
|
829
|
+
Description: Don't use self where it's not needed.
|
830
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
831
|
+
Enabled: true
|
832
|
+
Style/RescueModifier:
|
833
|
+
Description: Avoid using rescue in its modifier form.
|
834
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
835
|
+
Enabled: true
|
836
|
+
Style/SelfAssignment:
|
837
|
+
Description: Checks for places where self-assignment shorthand should have been
|
838
|
+
used.
|
839
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
840
|
+
Enabled: false
|
841
|
+
Style/SingleSpaceBeforeFirstArg:
|
842
|
+
Description: Checks that exactly one space is used between a method name and the
|
843
|
+
first argument for method calls without parentheses.
|
844
|
+
Enabled: true
|
845
|
+
Style/SpaceAfterColon:
|
846
|
+
Description: Use spaces after colons.
|
847
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
848
|
+
Enabled: true
|
849
|
+
Style/SpaceAfterComma:
|
850
|
+
Description: Use spaces after commas.
|
851
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
852
|
+
Enabled: true
|
853
|
+
Style/SpaceAfterControlKeyword:
|
854
|
+
Description: Use spaces after if/elsif/unless/while/until/case/when.
|
855
|
+
Enabled: true
|
856
|
+
Style/SpaceAfterMethodName:
|
857
|
+
Description: Do not put a space between a method name and the opening parenthesis
|
858
|
+
in a method definition.
|
859
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
860
|
+
Enabled: true
|
861
|
+
Style/SpaceAfterNot:
|
862
|
+
Description: Tracks redundant space after the ! operator.
|
863
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
864
|
+
Enabled: true
|
865
|
+
Style/SpaceAfterSemicolon:
|
866
|
+
Description: Use spaces after semicolons.
|
867
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
868
|
+
Enabled: true
|
869
|
+
Style/SpaceBeforeComma:
|
870
|
+
Description: No spaces before commas.
|
871
|
+
Enabled: true
|
872
|
+
Style/SpaceBeforeComment:
|
873
|
+
Description: Checks for missing space between code and a comment on the same line.
|
874
|
+
Enabled: true
|
875
|
+
Style/SpaceBeforeSemicolon:
|
876
|
+
Description: No spaces before semicolons.
|
877
|
+
Enabled: true
|
878
|
+
Style/SpaceAroundOperators:
|
879
|
+
Description: Use spaces around operators.
|
880
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
881
|
+
Enabled: true
|
882
|
+
Style/SpaceBeforeModifierKeyword:
|
883
|
+
Description: Put a space before the modifier keyword.
|
884
|
+
Enabled: true
|
885
|
+
Style/SpaceInsideBrackets:
|
886
|
+
Description: No spaces after [ or before ].
|
887
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
888
|
+
Enabled: true
|
889
|
+
Style/SpaceInsideParens:
|
890
|
+
Description: No spaces after ( or before ).
|
891
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
892
|
+
Enabled: true
|
893
|
+
Style/SpaceInsideRangeLiteral:
|
894
|
+
Description: No spaces inside range literals.
|
895
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
896
|
+
Enabled: true
|
897
|
+
Style/SpecialGlobalVars:
|
898
|
+
Description: Avoid Perl-style global variables.
|
899
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
900
|
+
Enabled: false
|
901
|
+
Style/StructInheritance:
|
902
|
+
Description: Checks for inheritance from Struct.new.
|
903
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
904
|
+
Enabled: true
|
905
|
+
Style/Tab:
|
906
|
+
Description: No hard tabs.
|
907
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
908
|
+
Enabled: true
|
909
|
+
Style/TrailingWhitespace:
|
910
|
+
Description: Avoid trailing whitespace.
|
911
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
912
|
+
Enabled: true
|
913
|
+
Style/UnlessElse:
|
914
|
+
Description: Do not use unless with else. Rewrite these with the positive case first.
|
915
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
916
|
+
Enabled: true
|
917
|
+
Style/UnneededCapitalW:
|
918
|
+
Description: Checks for %W when interpolation is not needed.
|
919
|
+
Enabled: true
|
920
|
+
Style/UnneededPercentQ:
|
921
|
+
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
922
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
923
|
+
Enabled: true
|
924
|
+
Style/UnneededPercentX:
|
925
|
+
Description: Checks for %x when `` would do.
|
926
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
|
927
|
+
Enabled: true
|
928
|
+
Style/VariableInterpolation:
|
929
|
+
Description: Don't interpolate global, instance and class variables directly in
|
930
|
+
strings.
|
931
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
932
|
+
Enabled: false
|
933
|
+
Style/WhenThen:
|
934
|
+
Description: Use when x then ... for one-line cases.
|
935
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
936
|
+
Enabled: false
|
937
|
+
Style/WhileUntilDo:
|
938
|
+
Description: Checks for redundant do after while or until.
|
939
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
940
|
+
Enabled: true
|
941
|
+
Lint/AmbiguousOperator:
|
942
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation
|
943
|
+
without parentheses.
|
944
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
|
945
|
+
Enabled: false
|
946
|
+
Lint/AmbiguousRegexpLiteral:
|
947
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method
|
948
|
+
invocation without parenthesis.
|
949
|
+
Enabled: false
|
950
|
+
Lint/BlockAlignment:
|
951
|
+
Description: Align block ends correctly.
|
952
|
+
Enabled: true
|
953
|
+
Lint/ConditionPosition:
|
954
|
+
Description: Checks for condition placed in a confusing position relative to the
|
955
|
+
keyword.
|
956
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
957
|
+
Enabled: false
|
958
|
+
Lint/Debugger:
|
959
|
+
Description: Check for debugger calls.
|
960
|
+
Enabled: true
|
961
|
+
Lint/DeprecatedClassMethods:
|
962
|
+
Description: Check for deprecated class method calls.
|
963
|
+
Enabled: false
|
964
|
+
Lint/DuplicateMethods:
|
965
|
+
Description: Check for duplicate methods calls.
|
966
|
+
Enabled: true
|
967
|
+
Lint/ElseLayout:
|
968
|
+
Description: Check for odd code arrangement in an else block.
|
969
|
+
Enabled: false
|
970
|
+
Lint/EmptyEnsure:
|
971
|
+
Description: Checks for empty ensure block.
|
972
|
+
Enabled: true
|
973
|
+
Lint/EmptyInterpolation:
|
974
|
+
Description: Checks for empty string interpolation.
|
975
|
+
Enabled: true
|
976
|
+
Lint/EndInMethod:
|
977
|
+
Description: END blocks should not be placed inside method definitions.
|
978
|
+
Enabled: true
|
979
|
+
Lint/EnsureReturn:
|
980
|
+
Description: Do not use return in an ensure block.
|
981
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
982
|
+
Enabled: true
|
983
|
+
Lint/Eval:
|
984
|
+
Description: The use of eval represents a serious security risk.
|
985
|
+
Enabled: true
|
986
|
+
Lint/HandleExceptions:
|
987
|
+
Description: Don't suppress exception.
|
988
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
989
|
+
Enabled: false
|
990
|
+
Lint/InvalidCharacterLiteral:
|
991
|
+
Description: Checks for invalid character literals with a non-escaped whitespace
|
992
|
+
character.
|
993
|
+
Enabled: false
|
994
|
+
Lint/LiteralInCondition:
|
995
|
+
Description: Checks of literals used in conditions.
|
996
|
+
Enabled: false
|
997
|
+
Lint/LiteralInInterpolation:
|
998
|
+
Description: Checks for literals used in interpolation.
|
999
|
+
Enabled: false
|
1000
|
+
Lint/Loop:
|
1001
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
1002
|
+
for post-loop tests.
|
1003
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
1004
|
+
Enabled: false
|
1005
|
+
Lint/ParenthesesAsGroupedExpression:
|
1006
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
1007
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
1008
|
+
Enabled: false
|
1009
|
+
Lint/RequireParentheses:
|
1010
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
1011
|
+
Enabled: false
|
1012
|
+
Lint/RescueException:
|
1013
|
+
Description: Avoid rescuing the Exception class.
|
1014
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
1015
|
+
Enabled: true
|
1016
|
+
Lint/ShadowingOuterLocalVariable:
|
1017
|
+
Description: Do not use the same name as outer local variable for block arguments
|
1018
|
+
or block local variables.
|
1019
|
+
Enabled: true
|
1020
|
+
Lint/SpaceBeforeFirstArg:
|
1021
|
+
Description: Put a space between a method name and the first argument in a method
|
1022
|
+
call without parentheses.
|
1023
|
+
Enabled: true
|
1024
|
+
Lint/StringConversionInInterpolation:
|
1025
|
+
Description: Checks for Object#to_s usage in string interpolation.
|
1026
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
1027
|
+
Enabled: true
|
1028
|
+
Lint/UnderscorePrefixedVariableName:
|
1029
|
+
Description: Do not use prefix `_` for a variable that is used.
|
1030
|
+
Enabled: false
|
1031
|
+
Lint/UnusedBlockArgument:
|
1032
|
+
Description: Checks for unused block arguments.
|
1033
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1034
|
+
Enabled: true
|
1035
|
+
Lint/UnusedMethodArgument:
|
1036
|
+
Description: Checks for unused method arguments.
|
1037
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1038
|
+
Enabled: true
|
1039
|
+
Lint/UnreachableCode:
|
1040
|
+
Description: Unreachable code.
|
1041
|
+
Enabled: true
|
1042
|
+
Lint/UselessAccessModifier:
|
1043
|
+
Description: Checks for useless access modifiers.
|
1044
|
+
Enabled: true
|
1045
|
+
Lint/UselessAssignment:
|
1046
|
+
Description: Checks for useless assignment to a local variable.
|
1047
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1048
|
+
Enabled: true
|
1049
|
+
Lint/UselessComparison:
|
1050
|
+
Description: Checks for comparison of something with itself.
|
1051
|
+
Enabled: true
|
1052
|
+
Lint/UselessElseWithoutRescue:
|
1053
|
+
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
1054
|
+
Enabled: true
|
1055
|
+
Lint/UselessSetterCall:
|
1056
|
+
Description: Checks for useless setter call to a local variable.
|
1057
|
+
Enabled: true
|
1058
|
+
Lint/Void:
|
1059
|
+
Description: Possible use of operator/literal/variable in void context.
|
1060
|
+
Enabled: false
|
1061
|
+
Rails/Delegate:
|
1062
|
+
Description: Prefer delegate method for delegations.
|
1063
|
+
Enabled: false
|