alchemy_cms 3.2.0 → 3.2.1

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