wordpress_client 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +124 -69
- data/Changelog.md +4 -0
- data/README.md +36 -13
- data/lib/wordpress_client.rb +0 -3
- data/lib/wordpress_client/client.rb +20 -74
- data/lib/wordpress_client/connection.rb +9 -10
- data/lib/wordpress_client/media.rb +15 -1
- data/lib/wordpress_client/media_parser.rb +1 -0
- data/lib/wordpress_client/post.rb +16 -36
- data/lib/wordpress_client/post_parser.rb +9 -37
- data/lib/wordpress_client/term.rb +1 -1
- data/lib/wordpress_client/version.rb +1 -1
- data/spec/client_spec.rb +17 -181
- data/spec/connection_spec.rb +8 -11
- data/spec/docker/Dockerfile +8 -8
- data/spec/docker/README.md +19 -9
- data/spec/docker/dbdump.sql.gz +0 -0
- data/spec/docker/restore-dbdump.sh +2 -2
- data/spec/fixtures/post-with-metadata.json +99 -1
- data/spec/fixtures/simple-post.json +324 -1
- data/spec/integration/attachments_crud_spec.rb +1 -1
- data/spec/integration/posts_crud_spec.rb +1 -1
- data/spec/integration/posts_finding_spec.rb +0 -69
- data/spec/integration/posts_metadata_spec.rb +11 -11
- data/spec/integration/posts_with_attachments_spec.rb +20 -6
- data/spec/media_spec.rb +13 -0
- data/spec/post_spec.rb +5 -31
- data/spec/support/docker_runner.rb +25 -10
- data/spec/support/wordpress_server.rb +15 -7
- data/wordpress_client.gemspec +11 -12
- metadata +5 -15
- data/lib/wordpress_client/replace_metadata.rb +0 -82
- data/lib/wordpress_client/replace_terms.rb +0 -63
- data/spec/fixtures/post-with-forbidden-metadata.json +0 -1
- data/spec/integration/category_assignment_spec.rb +0 -29
- data/spec/integration/tag_assignment_spec.rb +0 -29
- data/spec/replace_metadata_spec.rb +0 -56
- data/spec/replace_terms_spec.rb +0 -51
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8051dd7199ef0753644f695391ced1d8f23240d9
|
4
|
+
data.tar.gz: 86823e7cca14844a3866cdc7610560a9b00d83c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 961f98dfcf9534fb21c764acf603fd52958ade9b5acf602594a97ea3384aeb1233d5c420f55ffd6662b763eabcc91f837b0f3a9e3b7163519098b832591dfc5c
|
7
|
+
data.tar.gz: 2c7635e04d3a907c2a218b9eb3aa140ff9fc682911e0ad615342ff452f049727de41bad413f663fd3f42000edc57b9ce5d0d6a3229bf35c64769859ec30012e0
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
AllCops:
|
2
2
|
TargetRubyVersion: 2.2
|
3
|
+
TargetRailsVersion: 4.2
|
3
4
|
Include:
|
4
5
|
- "**/*.gemspec"
|
5
6
|
- "**/*.podspec"
|
@@ -16,11 +17,16 @@ AllCops:
|
|
16
17
|
- "**/Berksfile"
|
17
18
|
- "**/Cheffile"
|
18
19
|
- "**/Vagabondfile"
|
19
|
-
|
20
|
+
Exclude:
|
21
|
+
- "vendor/**/*"
|
22
|
+
- "db/schema.rb"
|
23
|
+
- "tmp/**/*"
|
24
|
+
DisplayCopNames: true
|
20
25
|
StyleGuideCopsOnly: false
|
26
|
+
require: rubocop-rspec
|
21
27
|
Rails:
|
22
|
-
Enabled:
|
23
|
-
|
28
|
+
Enabled: true
|
29
|
+
Layout/AccessModifierIndentation:
|
24
30
|
Description: Check indentation of private/protected visibility modifiers.
|
25
31
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
26
32
|
Enabled: true
|
@@ -28,7 +34,7 @@ Style/AccessModifierIndentation:
|
|
28
34
|
SupportedStyles:
|
29
35
|
- outdent
|
30
36
|
- indent
|
31
|
-
|
37
|
+
Layout/AlignHash:
|
32
38
|
Description: Align the elements of a hash literal if they span more than one line.
|
33
39
|
Enabled: true
|
34
40
|
EnforcedHashRocketStyle: key
|
@@ -39,7 +45,7 @@ Style/AlignHash:
|
|
39
45
|
- always_ignore
|
40
46
|
- ignore_implicit
|
41
47
|
- ignore_explicit
|
42
|
-
|
48
|
+
Layout/AlignParameters:
|
43
49
|
Description: Align the parameters of a method call if they span more than one line.
|
44
50
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
45
51
|
Enabled: true
|
@@ -71,11 +77,11 @@ Style/BracesAroundHashParameters:
|
|
71
77
|
- braces
|
72
78
|
- no_braces
|
73
79
|
- context_dependent
|
74
|
-
|
80
|
+
Layout/CaseIndentation:
|
75
81
|
Description: Indentation of when in a case/when/[else/]end.
|
76
82
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
77
83
|
Enabled: true
|
78
|
-
|
84
|
+
EnforcedStyle: case
|
79
85
|
SupportedStyles:
|
80
86
|
- case
|
81
87
|
- end
|
@@ -94,7 +100,7 @@ Style/ClassCheck:
|
|
94
100
|
SupportedStyles:
|
95
101
|
- is_a?
|
96
102
|
- kind_of?
|
97
|
-
|
103
|
+
Layout/ClosingParenthesisIndentation:
|
98
104
|
Description: Checks the indentation of hanging closing parentheses.
|
99
105
|
Enabled: false
|
100
106
|
Style/CollectionMethods:
|
@@ -118,7 +124,7 @@ Style/CommentAnnotation:
|
|
118
124
|
- OPTIMIZE
|
119
125
|
- HACK
|
120
126
|
- REVIEW
|
121
|
-
|
127
|
+
Layout/DotPosition:
|
122
128
|
Description: Checks the position of the dot in multi-line method calls.
|
123
129
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
124
130
|
Enabled: true
|
@@ -126,26 +132,26 @@ Style/DotPosition:
|
|
126
132
|
SupportedStyles:
|
127
133
|
- leading
|
128
134
|
- trailing
|
129
|
-
|
135
|
+
Layout/EmptyLineBetweenDefs:
|
130
136
|
Description: Use empty lines between defs.
|
131
137
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
132
138
|
Enabled: true
|
133
139
|
AllowAdjacentOneLineDefs: false
|
134
|
-
|
140
|
+
Layout/EmptyLinesAroundBlockBody:
|
135
141
|
Description: Keeps track of empty lines around block bodies.
|
136
142
|
Enabled: true
|
137
143
|
EnforcedStyle: no_empty_lines
|
138
144
|
SupportedStyles:
|
139
145
|
- empty_lines
|
140
146
|
- no_empty_lines
|
141
|
-
|
147
|
+
Layout/EmptyLinesAroundClassBody:
|
142
148
|
Description: Keeps track of empty lines around class bodies.
|
143
149
|
Enabled: true
|
144
150
|
EnforcedStyle: no_empty_lines
|
145
151
|
SupportedStyles:
|
146
152
|
- empty_lines
|
147
153
|
- no_empty_lines
|
148
|
-
|
154
|
+
Layout/EmptyLinesAroundModuleBody:
|
149
155
|
Description: Keeps track of empty lines around module bodies.
|
150
156
|
Enabled: true
|
151
157
|
EnforcedStyle: no_empty_lines
|
@@ -165,7 +171,7 @@ Style/FileName:
|
|
165
171
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
166
172
|
Enabled: false
|
167
173
|
Exclude: []
|
168
|
-
|
174
|
+
Layout/FirstParameterIndentation:
|
169
175
|
Description: Checks the indentation of the first parameter in a method call.
|
170
176
|
Enabled: true
|
171
177
|
EnforcedStyle: consistent
|
@@ -214,12 +220,12 @@ Style/IfUnlessModifier:
|
|
214
220
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
215
221
|
Enabled: false
|
216
222
|
MaxLineLength: 100
|
217
|
-
|
223
|
+
Layout/IndentationWidth:
|
218
224
|
Description: Use 2 spaces for indentation.
|
219
225
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
220
226
|
Enabled: true
|
221
227
|
Width: 2
|
222
|
-
|
228
|
+
Layout/IndentHash:
|
223
229
|
Description: Checks the indentation of the first key in a hash literal.
|
224
230
|
Enabled: true
|
225
231
|
EnforcedStyle: consistent
|
@@ -264,7 +270,7 @@ Style/MethodName:
|
|
264
270
|
SupportedStyles:
|
265
271
|
- snake_case
|
266
272
|
- camelCase
|
267
|
-
|
273
|
+
Layout/MultilineOperationIndentation:
|
268
274
|
Description: Checks indentation of binary operations that span more than one line.
|
269
275
|
Enabled: true
|
270
276
|
EnforcedStyle: aligned
|
@@ -375,14 +381,11 @@ Style/StringLiteralsInInterpolation:
|
|
375
381
|
SupportedStyles:
|
376
382
|
- single_quotes
|
377
383
|
- double_quotes
|
378
|
-
|
384
|
+
Layout/SpaceAroundBlockParameters:
|
379
385
|
Description: Checks the spacing inside and after block parameters pipes.
|
380
386
|
Enabled: true
|
381
387
|
EnforcedStyleInsidePipes: no_space
|
382
|
-
|
383
|
-
- space
|
384
|
-
- no_space
|
385
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
388
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
386
389
|
Description: Checks that the equals signs in parameter default assignments have
|
387
390
|
or don't have surrounding space depending on configuration.
|
388
391
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
@@ -391,14 +394,14 @@ Style/SpaceAroundEqualsInParameterDefault:
|
|
391
394
|
SupportedStyles:
|
392
395
|
- space
|
393
396
|
- no_space
|
394
|
-
|
397
|
+
Layout/SpaceBeforeBlockBraces:
|
395
398
|
Description: Checks that the left block brace has or doesn't have space before it.
|
396
399
|
Enabled: true
|
397
400
|
EnforcedStyle: space
|
398
401
|
SupportedStyles:
|
399
402
|
- space
|
400
403
|
- no_space
|
401
|
-
|
404
|
+
Layout/SpaceInsideBlockBraces:
|
402
405
|
Description: Checks that block braces have or don't have surrounding space. For
|
403
406
|
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
404
407
|
space.
|
@@ -409,7 +412,7 @@ Style/SpaceInsideBlockBraces:
|
|
409
412
|
- no_space
|
410
413
|
EnforcedStyleForEmptyBraces: no_space
|
411
414
|
SpaceBeforeBlockParameters: true
|
412
|
-
|
415
|
+
Layout/SpaceInsideHashLiteralBraces:
|
413
416
|
Description: Use spaces inside hash literal braces - or don't.
|
414
417
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
415
418
|
Enabled: false
|
@@ -423,7 +426,7 @@ Style/SymbolProc:
|
|
423
426
|
Enabled: true
|
424
427
|
IgnoredMethods:
|
425
428
|
- respond_to
|
426
|
-
|
429
|
+
Layout/TrailingBlankLines:
|
427
430
|
Description: Checks trailing blank lines and final newline.
|
428
431
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
429
432
|
Enabled: true
|
@@ -434,11 +437,13 @@ Style/TrailingBlankLines:
|
|
434
437
|
Style/TrailingCommaInArguments:
|
435
438
|
Description: 'Checks for trailing comma in argument lists.'
|
436
439
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
437
|
-
|
440
|
+
EnforcedStyleForMultiline: comma
|
441
|
+
Enabled: true
|
438
442
|
Style/TrailingCommaInLiteral:
|
439
443
|
Description: 'Checks for trailing comma in array and hash literals.'
|
440
444
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
441
|
-
|
445
|
+
EnforcedStyleForMultiline: comma
|
446
|
+
Enabled: true
|
442
447
|
Style/TrivialAccessors:
|
443
448
|
Description: Prefer attr_* methods to trivial readers/writers.
|
444
449
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
@@ -493,6 +498,30 @@ Metrics/BlockNesting:
|
|
493
498
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
494
499
|
Enabled: false
|
495
500
|
Max: 3
|
501
|
+
Metrics/BlockLength:
|
502
|
+
CountComments: false # count full line comments?
|
503
|
+
Max: 25
|
504
|
+
# Excluded for DSL files that uses blocks a lot.
|
505
|
+
Exclude:
|
506
|
+
# Rake
|
507
|
+
- 'Rakefile'
|
508
|
+
- '**/*.rake'
|
509
|
+
# Capistrano
|
510
|
+
- 'Capfile'
|
511
|
+
- 'lib/capistrano/tasks/*.cap'
|
512
|
+
- 'lib/capistrano/tasks/*.rb'
|
513
|
+
- 'config/deploy.rb'
|
514
|
+
- 'config/deploy/*.rb'
|
515
|
+
# Rails
|
516
|
+
- 'config/environments/*.rb'
|
517
|
+
- 'config/routes.rb'
|
518
|
+
- 'config/routes/*.rb'
|
519
|
+
- 'db/migrate/*.rb'
|
520
|
+
# RSpec
|
521
|
+
- 'spec/**/*.rb'
|
522
|
+
# GraphQL definitions
|
523
|
+
- 'app/graph/**/*.rb'
|
524
|
+
|
496
525
|
Metrics/ClassLength:
|
497
526
|
Description: Avoid classes longer than 100 lines of code.
|
498
527
|
Enabled: false
|
@@ -537,17 +566,11 @@ Lint/AssignmentInCondition:
|
|
537
566
|
Lint/EndAlignment:
|
538
567
|
Description: Align ends correctly.
|
539
568
|
Enabled: true
|
540
|
-
|
541
|
-
SupportedStyles:
|
542
|
-
- keyword
|
543
|
-
- variable
|
569
|
+
EnforcedStyleAlignWith: variable
|
544
570
|
Lint/DefEndAlignment:
|
545
571
|
Description: Align ends corresponding to defs correctly.
|
546
572
|
Enabled: true
|
547
|
-
|
548
|
-
SupportedStyles:
|
549
|
-
- start_of_line
|
550
|
-
- def
|
573
|
+
EnforcedStyleAlignWith: start_of_line
|
551
574
|
Rails/ActionFilter:
|
552
575
|
Description: Enforces consistent use of action filter methods.
|
553
576
|
Enabled: false
|
@@ -601,7 +624,7 @@ Style/SymbolArray:
|
|
601
624
|
Description: Use %i or %I for arrays of symbols.
|
602
625
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
603
626
|
Enabled: false
|
604
|
-
|
627
|
+
Layout/ExtraSpacing:
|
605
628
|
Description: Do not use unnecessary spacing.
|
606
629
|
Enabled: false
|
607
630
|
Style/AccessorMethodName:
|
@@ -611,7 +634,7 @@ Style/Alias:
|
|
611
634
|
Description: Use alias_method instead of alias.
|
612
635
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
613
636
|
Enabled: false
|
614
|
-
|
637
|
+
Layout/AlignArray:
|
615
638
|
Description: Align the elements of an array literal if they span more than one line.
|
616
639
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
617
640
|
Enabled: true
|
@@ -639,7 +662,7 @@ Style/BlockComments:
|
|
639
662
|
Description: Do not use block comments.
|
640
663
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
641
664
|
Enabled: true
|
642
|
-
|
665
|
+
Layout/BlockEndNewline:
|
643
666
|
Description: Put end statement of multiline block on its own line.
|
644
667
|
Enabled: true
|
645
668
|
Style/BlockDelimiters:
|
@@ -673,7 +696,7 @@ Style/ColonMethodCall:
|
|
673
696
|
Description: 'Do not use :: for method call.'
|
674
697
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
675
698
|
Enabled: false
|
676
|
-
|
699
|
+
Layout/CommentIndentation:
|
677
700
|
Description: Indentation of comments.
|
678
701
|
Enabled: true
|
679
702
|
Style/ConstantName:
|
@@ -684,7 +707,7 @@ Style/DefWithParentheses:
|
|
684
707
|
Description: Use def with parentheses when there are arguments.
|
685
708
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
686
709
|
Enabled: true
|
687
|
-
Style/
|
710
|
+
Style/PreferredHashMethods:
|
688
711
|
Description: Checks for use of deprecated Hash methods.
|
689
712
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
690
713
|
Enabled: false
|
@@ -698,19 +721,19 @@ Style/DoubleNegation:
|
|
698
721
|
Style/EachWithObject:
|
699
722
|
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
700
723
|
Enabled: false
|
701
|
-
|
724
|
+
Layout/ElseAlignment:
|
702
725
|
Description: Align elses and elsifs correctly.
|
703
726
|
Enabled: true
|
704
727
|
Style/EmptyElse:
|
705
728
|
Description: Avoid empty else-clauses.
|
706
729
|
Enabled: true
|
707
|
-
|
730
|
+
Layout/EmptyLines:
|
708
731
|
Description: Don't use several empty lines in a row.
|
709
732
|
Enabled: true
|
710
|
-
|
733
|
+
Layout/EmptyLinesAroundAccessModifier:
|
711
734
|
Description: Keep blank lines around access modifiers.
|
712
735
|
Enabled: false
|
713
|
-
|
736
|
+
Layout/EmptyLinesAroundMethodBody:
|
714
737
|
Description: Keeps track of empty lines around method bodies.
|
715
738
|
Enabled: true
|
716
739
|
Style/EmptyLiteral:
|
@@ -721,7 +744,7 @@ Style/EndBlock:
|
|
721
744
|
Description: Avoid the use of END blocks.
|
722
745
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
723
746
|
Enabled: true
|
724
|
-
|
747
|
+
Layout/EndOfLine:
|
725
748
|
Description: Use Unix-style line endings.
|
726
749
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
727
750
|
Enabled: true
|
@@ -737,10 +760,10 @@ Style/IfWithSemicolon:
|
|
737
760
|
Description: Do not use if x; .... Use the ternary operator instead.
|
738
761
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
739
762
|
Enabled: false
|
740
|
-
|
763
|
+
Layout/IndentationConsistency:
|
741
764
|
Description: Keep indentation straight.
|
742
765
|
Enabled: true
|
743
|
-
|
766
|
+
Layout/IndentArray:
|
744
767
|
Description: Checks the indentation of the first element in an array literal.
|
745
768
|
Enabled: true
|
746
769
|
EnforcedStyle: consistent
|
@@ -752,7 +775,7 @@ Style/Lambda:
|
|
752
775
|
Description: Use the new lambda literal syntax for single-line blocks.
|
753
776
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
754
777
|
Enabled: false
|
755
|
-
|
778
|
+
Layout/LeadingCommentSpace:
|
756
779
|
Description: Comments should start with a space.
|
757
780
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
758
781
|
Enabled: true
|
@@ -760,7 +783,7 @@ Style/LineEndConcatenation:
|
|
760
783
|
Description: Use \ instead of + or << to concatenate two string literals at line
|
761
784
|
end.
|
762
785
|
Enabled: false
|
763
|
-
Style/
|
786
|
+
Style/MethodCallWithoutArgsParentheses:
|
764
787
|
Description: Do not use parentheses for method calls with no arguments.
|
765
788
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
766
789
|
Enabled: true
|
@@ -772,7 +795,7 @@ Style/MultilineBlockChain:
|
|
772
795
|
Description: Avoid multi-line chains of blocks.
|
773
796
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
774
797
|
Enabled: false
|
775
|
-
|
798
|
+
Layout/MultilineBlockLayout:
|
776
799
|
Description: Ensures newlines after multiline block do statements.
|
777
800
|
Enabled: true
|
778
801
|
Style/MultilineIfThen:
|
@@ -840,57 +863,57 @@ Style/SelfAssignment:
|
|
840
863
|
used.
|
841
864
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
842
865
|
Enabled: false
|
843
|
-
|
866
|
+
Layout/SpaceBeforeFirstArg:
|
844
867
|
Description: >-
|
845
868
|
Checks that exactly one space is used between a method name
|
846
869
|
and the first argument for method calls without parentheses.
|
847
870
|
Enabled: true
|
848
|
-
|
871
|
+
Layout/SpaceAfterColon:
|
849
872
|
Description: Use spaces after colons.
|
850
873
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
851
874
|
Enabled: true
|
852
|
-
|
875
|
+
Layout/SpaceAfterComma:
|
853
876
|
Description: Use spaces after commas.
|
854
877
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
855
878
|
Enabled: true
|
856
|
-
|
879
|
+
Layout/SpaceAroundKeyword:
|
857
880
|
Description: 'Use a space around keywords if appropriate.'
|
858
881
|
Enabled: true
|
859
|
-
|
882
|
+
Layout/SpaceAfterMethodName:
|
860
883
|
Description: Do not put a space between a method name and the opening parenthesis
|
861
884
|
in a method definition.
|
862
885
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
863
886
|
Enabled: true
|
864
|
-
|
887
|
+
Layout/SpaceAfterNot:
|
865
888
|
Description: Tracks redundant space after the ! operator.
|
866
889
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
867
890
|
Enabled: true
|
868
|
-
|
891
|
+
Layout/SpaceAfterSemicolon:
|
869
892
|
Description: Use spaces after semicolons.
|
870
893
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
871
894
|
Enabled: true
|
872
|
-
|
895
|
+
Layout/SpaceBeforeComma:
|
873
896
|
Description: No spaces before commas.
|
874
897
|
Enabled: true
|
875
|
-
|
898
|
+
Layout/SpaceBeforeComment:
|
876
899
|
Description: Checks for missing space between code and a comment on the same line.
|
877
900
|
Enabled: true
|
878
|
-
|
901
|
+
Layout/SpaceBeforeSemicolon:
|
879
902
|
Description: No spaces before semicolons.
|
880
903
|
Enabled: true
|
881
|
-
|
904
|
+
Layout/SpaceAroundOperators:
|
882
905
|
Description: Use spaces around operators.
|
883
906
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
884
907
|
Enabled: true
|
885
|
-
|
908
|
+
Layout/SpaceInsideBrackets:
|
886
909
|
Description: No spaces after [ or before ].
|
887
910
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
888
911
|
Enabled: true
|
889
|
-
|
912
|
+
Layout/SpaceInsideParens:
|
890
913
|
Description: No spaces after ( or before ).
|
891
914
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
892
915
|
Enabled: true
|
893
|
-
|
916
|
+
Layout/SpaceInsideRangeLiteral:
|
894
917
|
Description: No spaces inside range literals.
|
895
918
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
896
919
|
Enabled: true
|
@@ -902,11 +925,11 @@ Style/StructInheritance:
|
|
902
925
|
Description: Checks for inheritance from Struct.new.
|
903
926
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
904
927
|
Enabled: true
|
905
|
-
|
928
|
+
Layout/Tab:
|
906
929
|
Description: No hard tabs.
|
907
930
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
908
931
|
Enabled: true
|
909
|
-
|
932
|
+
Layout/TrailingWhitespace:
|
910
933
|
Description: Avoid trailing whitespace.
|
911
934
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
912
935
|
Enabled: true
|
@@ -938,7 +961,7 @@ Style/WhileUntilDo:
|
|
938
961
|
Description: Checks for redundant do after while or until.
|
939
962
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
940
963
|
Enabled: true
|
941
|
-
|
964
|
+
Layout/MultilineMethodCallIndentation:
|
942
965
|
Description: Checks the indentation of the method name part in method calls that span more than one line.
|
943
966
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
944
967
|
Enabled: true
|
@@ -985,7 +1008,7 @@ Lint/EnsureReturn:
|
|
985
1008
|
Description: Do not use return in an ensure block.
|
986
1009
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
987
1010
|
Enabled: true
|
988
|
-
|
1011
|
+
Security/Eval:
|
989
1012
|
Description: The use of eval represents a serious security risk.
|
990
1013
|
Enabled: true
|
991
1014
|
Lint/HandleExceptions:
|
@@ -1065,3 +1088,35 @@ Rails/Delegate:
|
|
1065
1088
|
Rails/TimeZone:
|
1066
1089
|
Enabled: true
|
1067
1090
|
EnforcedStyle: flexible
|
1091
|
+
Rails/HttpPositionalArguments:
|
1092
|
+
# This is just for Rails 5. We're on Rails 4.2 right now, so this lint leads to invalid code.
|
1093
|
+
Enabled: false
|
1094
|
+
RSpec/DescribeClass:
|
1095
|
+
# Not all specs must be tied to a specific unit of code.
|
1096
|
+
# Examples: integration tests; multi-class behaviour tests
|
1097
|
+
Enabled: false
|
1098
|
+
RSpec/DescribedClass:
|
1099
|
+
# `described_class` is reserved for where it's variable, such as
|
1100
|
+
# shared examples. Otherwise it's just unnecessary indirection.
|
1101
|
+
Enabled: false
|
1102
|
+
RSpec/DescribeMethod:
|
1103
|
+
# BDD describes the system's _behaviour_, not its API or method signatures.
|
1104
|
+
Enabled: false
|
1105
|
+
RSpec/MultipleExpectations:
|
1106
|
+
# Not suitable for integration tests.
|
1107
|
+
Enabled: false
|
1108
|
+
RSpec/VerifiedDoubles:
|
1109
|
+
# We are not sure if this will help us or not. Experience needed from code reviews.
|
1110
|
+
Enabled: true
|
1111
|
+
RSpec/NotToNot:
|
1112
|
+
# This is just noise.
|
1113
|
+
Enabled: false
|
1114
|
+
RSpec/ExampleLength:
|
1115
|
+
# Examples are not methods. Longer examples can sometimes be better than indirection.
|
1116
|
+
Enabled: false
|
1117
|
+
RSpec/MessageExpectation:
|
1118
|
+
# `allow`/`expect` have different behaviour. We shouldn't enforce either one.
|
1119
|
+
Enabled: false
|
1120
|
+
RSpec/NestedGroups:
|
1121
|
+
Enabled: true
|
1122
|
+
Max: 3
|