redi_search 1.0.3 → 2.0.2

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/lint.yml +20 -0
  3. data/.github/workflows/tests.yml +44 -0
  4. data/.rubocop.yml +67 -189
  5. data/Appraisals +4 -8
  6. data/Gemfile +3 -4
  7. data/README.md +79 -74
  8. data/Rakefile +15 -3
  9. data/bin/console +29 -0
  10. data/gemfiles/{rails_6.gemfile → activerecord_51.gemfile} +1 -5
  11. data/gemfiles/{rails_51.gemfile → activerecord_52.gemfile} +1 -5
  12. data/lib/redi_search.rb +8 -6
  13. data/lib/redi_search/add.rb +9 -5
  14. data/lib/redi_search/{alter.rb → add_field.rb} +13 -5
  15. data/lib/redi_search/client.rb +8 -6
  16. data/lib/redi_search/client/response.rb +8 -8
  17. data/lib/redi_search/configuration.rb +1 -11
  18. data/lib/redi_search/create.rb +6 -4
  19. data/lib/redi_search/document.rb +5 -4
  20. data/lib/redi_search/document/display.rb +9 -9
  21. data/lib/redi_search/document/finder.rb +10 -2
  22. data/lib/redi_search/index.rb +9 -9
  23. data/lib/redi_search/lazily_load.rb +7 -13
  24. data/lib/redi_search/log_subscriber.rb +23 -52
  25. data/lib/redi_search/model.rb +43 -39
  26. data/lib/redi_search/schema.rb +3 -3
  27. data/lib/redi_search/schema/field.rb +2 -3
  28. data/lib/redi_search/schema/tag_field.rb +1 -1
  29. data/lib/redi_search/schema/text_field.rb +1 -1
  30. data/lib/redi_search/search.rb +15 -26
  31. data/lib/redi_search/search/clauses.rb +6 -7
  32. data/lib/redi_search/search/clauses/application_clause.rb +20 -5
  33. data/lib/redi_search/search/clauses/boolean.rb +8 -6
  34. data/lib/redi_search/search/clauses/highlight.rb +18 -2
  35. data/lib/redi_search/search/clauses/limit.rb +7 -5
  36. data/lib/redi_search/search/clauses/return.rb +1 -1
  37. data/lib/redi_search/search/clauses/slop.rb +1 -1
  38. data/lib/redi_search/search/clauses/sort_by.rb +1 -1
  39. data/lib/redi_search/search/clauses/where.rb +13 -3
  40. data/lib/redi_search/search/result.rb +27 -11
  41. data/lib/redi_search/search/term.rb +7 -6
  42. data/lib/redi_search/spellcheck.rb +3 -4
  43. data/lib/redi_search/spellcheck/result.rb +1 -1
  44. data/lib/redi_search/validatable.rb +49 -0
  45. data/lib/redi_search/validations/inclusion.rb +26 -0
  46. data/lib/redi_search/validations/numericality.rb +45 -0
  47. data/lib/redi_search/validations/presence.rb +29 -0
  48. data/lib/redi_search/version.rb +1 -1
  49. data/redi_search.gemspec +1 -3
  50. metadata +14 -45
  51. data/.travis.yml +0 -31
  52. data/bin/test +0 -7
  53. data/gemfiles/rails_52.gemfile +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 545df5a367ca42e36411318186a3e47a8e0a2aaadd39688bea2bb4c736d00d24
4
- data.tar.gz: da9318587f49808e64bc158a47218b0fe64dc2b934548447dd7b562113ee5d3a
3
+ metadata.gz: 7b7bc12a1d3a50de259ae10c27658e164d3ef84b65f0c4108c925138e53c1239
4
+ data.tar.gz: 899ac067a70ee3f5d43c833a59aa32546ca4e18a57beaba3bccabc496ffff96a
5
5
  SHA512:
6
- metadata.gz: 909c3bd0b367a367e52625ac05dca8ac69754fddff3a68ec0b6aed68dd4575a64280d3762ae63bc8a78133f617d42c5578c61652c28a74267841cc34b3a1f6da
7
- data.tar.gz: 98280d7f190632e23322632fc929fa207fa29eab6918b48b28349759eb057f02451bc2716cb947ce6bc0c1e336925752f9effefaea9be74ca770088dfece9720
6
+ metadata.gz: 131f1b1c9a4e2dad0740da6398a41a5ea01725e6e7dc02b9d604b252d3ad2612d3d23946fa1029e2d897c879b9b8c1c2951a73b1d7e4bca415d65998c0d8d0b8
7
+ data.tar.gz: c1a6d747b27f77054c797feee442359306a36609fe1d8d8483467df93916ea4b2e7af7a1db5c3bd442aba04e54dad0131ac673dc6aa10ddba89b63ef48dbad37
@@ -0,0 +1,20 @@
1
+ name: lint
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ lint:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v1
10
+ - name: Set up Ruby 2.7
11
+ uses: actions/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7.x
14
+ - name: Install dependencies
15
+ run: |
16
+ sudo apt-get install libsqlite3-dev
17
+ gem install bundler --no-document
18
+ bundle install
19
+ - name: Run tests
20
+ run: bundle exec rubocop --config=./.rubocop.yml --parallel
@@ -0,0 +1,44 @@
1
+ name: tests
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ unit:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby: [ '2.5.x', '2.6.x', '2.7.x' ]
11
+ gemfile: [ 'Gemfile', 'gemfiles/activerecord_51.gemfile', 'gemfiles/activerecord_52.gemfile' ]
12
+ steps:
13
+ - uses: actions/checkout@v1
14
+ - name: Set up Ruby ${{ matrix.ruby }}
15
+ uses: actions/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ - name: Install dependencies
19
+ run: |
20
+ sudo apt-get install libsqlite3-dev -y
21
+ gem install bundler --no-document
22
+ BUNDLE_GEMFILE=${{ matrix.gemfile }} bundle install
23
+ - name: Run tests
24
+ run: BUNDLE_GEMFILE=${{ matrix.gemfile }} bundle exec rake test:unit
25
+ integration:
26
+ runs-on: ubuntu-latest
27
+ strategy:
28
+ matrix:
29
+ redi_search: [ '1.4.28', '1.6.13', 'edge' ]
30
+ steps:
31
+ - uses: actions/checkout@v1
32
+ - name: Set up Ruby 2.7
33
+ uses: actions/setup-ruby@v1
34
+ with:
35
+ ruby-version: 2.7.x
36
+ - name: Install dependencies
37
+ run: |
38
+ sudo apt-get install libsqlite3-dev -y
39
+ gem install bundler --no-document
40
+ bundle install
41
+ docker run -d -p 6379:6379 redislabs/redisearch:${{ matrix.redi_search }} --protected-mode no --loadmodule /usr/lib/redis/modules/redisearch.so
42
+ - name: Run tests
43
+ run: |
44
+ bundle exec rake test:integration
@@ -1,6 +1,5 @@
1
1
  require:
2
2
  - rubocop-performance
3
- - rubocop-rails
4
3
  AllCops:
5
4
  Exclude:
6
5
  - vendor/**/*
@@ -36,16 +35,16 @@ Layout/AccessModifierIndentation:
36
35
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
37
36
  Enabled: false
38
37
 
39
- Layout/AlignArray:
38
+ Layout/ArrayAlignment:
40
39
  Description: Align the elements of an array literal if they span more than one line.
41
40
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
42
41
  Enabled: true
43
42
 
44
- Layout/AlignHash:
43
+ Layout/HashAlignment:
45
44
  Description: Align the elements of a hash literal if they span more than one line.
46
45
  Enabled: true
47
46
 
48
- Layout/AlignParameters:
47
+ Layout/ParameterAlignment:
49
48
  Description: Align the parameters of a method call if they span more than one line.
50
49
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
51
50
  Enabled: true
@@ -151,7 +150,7 @@ Layout/InitialIndentation:
151
150
  Description: Checks the indentation of the first non-blank non-comment line in a file.
152
151
  Enabled: false
153
152
 
154
- Layout/IndentFirstArgument:
153
+ Layout/FirstArgumentIndentation:
155
154
  Description: Checks the indentation of the first parameter in a method call.
156
155
  Enabled: false
157
156
 
@@ -165,19 +164,19 @@ Layout/IndentationWidth:
165
164
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
166
165
  Enabled: true
167
166
 
168
- Layout/IndentFirstArrayElement:
167
+ Layout/FirstArrayElementIndentation:
169
168
  Description: Checks the indentation of the first element in an array literal.
170
169
  Enabled: false
171
170
 
172
- Layout/IndentAssignment:
171
+ Layout/AssignmentIndentation:
173
172
  Description: Checks the indentation of the first line of the right-hand-side of a multi-line assignment.
174
173
  Enabled: true
175
174
 
176
- Layout/IndentFirstHashElement:
175
+ Layout/FirstHashElementIndentation:
177
176
  Description: Checks the indentation of the first key in a hash literal.
178
177
  Enabled: false
179
178
 
180
- Layout/IndentHeredoc:
179
+ Layout/HeredocIndentation:
181
180
  Description: This cops checks the indentation of the here document bodies.
182
181
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#squiggly-heredocs
183
182
  Enabled: true
@@ -328,12 +327,15 @@ Layout/SpaceInsideStringInterpolation:
328
327
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#string-interpolation
329
328
  Enabled: false
330
329
 
331
- Layout/Tab:
330
+ Layout/IndentationStyle:
332
331
  Description: No hard tabs.
333
332
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
334
333
  Enabled: false
335
334
 
336
- Layout/TrailingBlankLines:
335
+ Layout/SpaceAroundMethodCallOperator:
336
+ Enabled: true
337
+
338
+ Layout/TrailingEmptyLines:
337
339
  Description: Checks trailing blank lines and final newline.
338
340
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
339
341
  Enabled: false
@@ -400,7 +402,7 @@ Lint/DuplicateMethods:
400
402
  Description: Check for duplicate method definitions.
401
403
  Enabled: true
402
404
 
403
- Lint/DuplicatedKey:
405
+ Lint/DuplicateHashKey:
404
406
  Description: Check for duplicate keys in hash literals.
405
407
  Enabled: true
406
408
 
@@ -433,10 +435,6 @@ Layout/EndAlignment:
433
435
  Description: Align ends correctly.
434
436
  Enabled: true
435
437
 
436
- Lint/EndInMethod:
437
- Description: END blocks should not be placed inside method definitions.
438
- Enabled: true
439
-
440
438
  Lint/EnsureReturn:
441
439
  Description: Do not use return in an ensure block.
442
440
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
@@ -450,7 +448,7 @@ Lint/FormatParameterMismatch:
450
448
  Description: The number of parameters to format/sprint must match the fields.
451
449
  Enabled: true
452
450
 
453
- Lint/HandleExceptions:
451
+ Lint/SuppressedException:
454
452
  Description: Don't suppress exception.
455
453
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
456
454
  Enabled: true
@@ -484,7 +482,7 @@ Lint/Loop:
484
482
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
485
483
  Enabled: true
486
484
 
487
- Lint/MultipleCompare:
485
+ Lint/MultipleComparison:
488
486
  Description: Use `&&` operator to compare multiple value.
489
487
  Enabled: true
490
488
 
@@ -559,7 +557,7 @@ Lint/ShadowingOuterLocalVariable:
559
557
  Description: Do not use the same name as outer local variable for block arguments or block local variables.
560
558
  Enabled: true
561
559
 
562
- Lint/StringConversionInInterpolation:
560
+ Lint/RedundantStringCoercion:
563
561
  Description: Checks for Object#to_s usage in string interpolation.
564
562
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
565
563
  Enabled: true
@@ -572,11 +570,11 @@ Lint/UnifiedInteger:
572
570
  Description: Use Integer instead of Fixnum or Bignum
573
571
  Enabled: true
574
572
 
575
- Lint/UnneededRequireStatement:
573
+ Lint/RedundantRequireStatement:
576
574
  Description: Checks for unnecessary `require` statement.
577
575
  Enabled: true
578
576
 
579
- Lint/UnneededSplatExpansion:
577
+ Lint/RedundantSplatExpansion:
580
578
  Description: Checks for splat unnecessarily being called on literals
581
579
  Enabled: true
582
580
 
@@ -647,7 +645,6 @@ Metrics/BlockLength:
647
645
  - Rakefile
648
646
  - "**/*.rake"
649
647
  - spec/**/*.rb
650
- - 'config/routes.rb'
651
648
  - 'config/environments/*.rb'
652
649
 
653
650
  Metrics/BlockNesting:
@@ -665,12 +662,15 @@ Metrics/CyclomaticComplexity:
665
662
  Description: A complexity metric that is strongly correlated to the number of test cases needed to validate a method.
666
663
  Enabled: true
667
664
 
668
- Metrics/LineLength:
665
+ Layout/LineLength:
669
666
  Description: Limit lines to 80 characters.
670
667
  StyleGuide: '#80-character-limits'
671
668
  Enabled: true
669
+ Max: 80
672
670
  Exclude:
673
671
  - 'db/**/*'
672
+ - 'config/initializers/**/*'
673
+ - 'config/environments/**/*'
674
674
 
675
675
  Metrics/MethodLength:
676
676
  Description: Avoid methods longer than 10 lines of code.
@@ -774,13 +774,13 @@ Performance/CaseWhenSplat:
774
774
 
775
775
  Performance/Count:
776
776
  Description: Use `count` instead of `select...size`, `reject...size`, `select...count`, `reject...count`, `select...length`, and `reject...length`.
777
- SafeMode: true
777
+ SafeAutoCorrect: true
778
778
  Enabled: true
779
779
 
780
780
  Performance/Detect:
781
781
  Description: Use `detect` instead of `select.first`, `find_all.first`, `select.last`, and `find_all.last`.
782
782
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
783
- SafeMode: true
783
+ SafeAutoCorrect: true
784
784
  Enabled: true
785
785
 
786
786
  Performance/DoubleStartEndWith:
@@ -822,6 +822,9 @@ Performance/RedundantMerge:
822
822
  Reference: https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code
823
823
  Enabled: true
824
824
 
825
+ Style/ExponentialNotation:
826
+ Enabled: true
827
+
825
828
  Style/RedundantSortBy:
826
829
  Description: Use `sort` instead of `sort_by { |x| x }`.
827
830
  Enabled: true
@@ -873,161 +876,6 @@ Performance/UriDefaultParser:
873
876
  Description: Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.
874
877
  Enabled: true
875
878
 
876
- # Department Rails
877
- Rails/ActionFilter:
878
- Description: Enforces consistent use of action filter methods.
879
- Enabled: false
880
-
881
- Rails/ApplicationJob:
882
- Description: Check that jobs subclass ApplicationJob.
883
- Enabled: true
884
-
885
- Rails/ApplicationRecord:
886
- Description: Check that models subclass ApplicationRecord.
887
- Enabled: true
888
-
889
- Rails/ActiveSupportAliases:
890
- Description: 'Avoid ActiveSupport aliases of standard ruby methods: `String#starts_with?`, `String#ends_with?`, `Array#append`, `Array#prepend`.'
891
- Enabled: true
892
-
893
- Rails/Blank:
894
- Description: Enforce using `blank?` and `present?`.
895
- Enabled: true
896
- NilOrEmpty: true
897
- NotPresent: true
898
- UnlessPresent: true
899
-
900
- Rails/Date:
901
- Description: Checks the correct usage of date aware methods, such as Date.today, Date.current etc.
902
- Enabled: true
903
-
904
- Rails/Delegate:
905
- Description: Prefer delegate method for delegations.
906
- Enabled: true
907
-
908
- Rails/DelegateAllowBlank:
909
- Description: Do not use allow_blank as an option to delegate.
910
- Enabled: true
911
-
912
- Rails/DynamicFindBy:
913
- Description: Use `find_by` instead of dynamic `find_by_*`.
914
- StyleGuide: https://github.com/bbatsov/rails-style-guide#find_by
915
- Enabled: true
916
-
917
- Rails/EnumUniqueness:
918
- Description: Avoid duplicate integers in hash-syntax `enum` declaration.
919
- Enabled: true
920
-
921
- Rails/Exit:
922
- Description: Favor `fail`, `break`, `return`, etc. over `exit` in application or library code outside of Rake files to avoid exits during unit testing or running in production.
923
- Enabled: true
924
-
925
- Rails/FilePath:
926
- Description: Use `Rails.root.join` for file path joining.
927
- Enabled: true
928
-
929
- Rails/FindBy:
930
- Description: Prefer find_by over where.first.
931
- StyleGuide: https://github.com/bbatsov/rails-style-guide#find_by
932
- Enabled: true
933
-
934
- Rails/FindEach:
935
- Description: Prefer all.find_each over all.find.
936
- StyleGuide: https://github.com/bbatsov/rails-style-guide#find-each
937
- Enabled: true
938
-
939
- Rails/HasAndBelongsToMany:
940
- Description: Prefer has_many :through to has_and_belongs_to_many.
941
- StyleGuide: https://github.com/bbatsov/rails-style-guide#has-many-through
942
- Enabled: true
943
-
944
- Rails/HasManyOrHasOneDependent:
945
- Description: Define the dependent option to the has_many and has_one associations.
946
- StyleGuide: https://github.com/bbatsov/rails-style-guide#has_many-has_one-dependent-option
947
- Enabled: true
948
-
949
- Rails/HttpPositionalArguments:
950
- Description: Use keyword arguments instead of positional arguments in http method calls.
951
- Enabled: true
952
-
953
- Rails/NotNullColumn:
954
- Description: Do not add a NOT NULL column without a default value
955
- Enabled: true
956
-
957
- Rails/Output:
958
- Description: Checks for calls to puts, print, etc.
959
- Enabled: true
960
-
961
- Rails/OutputSafety:
962
- Description: The use of `html_safe` or `raw` may be a security risk.
963
- Enabled: true
964
-
965
- Rails/PluralizationGrammar:
966
- Description: Checks for incorrect grammar when using methods like `3.day.ago`.
967
- Enabled: true
968
-
969
- Rails/Present:
970
- Description: Enforce using `blank?` and `present?`.
971
- Enabled: true
972
- NotNilAndNotEmpty: true
973
- NotBlank: true
974
- UnlessBlank: true
975
-
976
- Rails/ReadWriteAttribute:
977
- Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
978
- StyleGuide: https://github.com/bbatsov/rails-style-guide#read-attribute
979
- Enabled: false
980
-
981
- Rails/RelativeDateConstant:
982
- Description: Do not assign relative date to constants.
983
- Enabled: true
984
-
985
- Rails/RequestReferer:
986
- Description: Use consistent syntax for request.referer.
987
- Enabled: true
988
-
989
- Rails/ReversibleMigration:
990
- Description: Checks whether the change method of the migration file is reversible.
991
- StyleGuide: https://github.com/bbatsov/rails-style-guide#reversible-migration
992
- Reference: http://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html
993
- Enabled: true
994
-
995
- Rails/SafeNavigation:
996
- Description: Use Ruby's safe navigation operator (`&.`) instead of `try!`
997
- Enabled: true
998
-
999
- Rails/SaveBang:
1000
- Description: Identifies possible cases where Active Record save! or related should be used.
1001
- StyleGuide: https://github.com/bbatsov/rails-style-guide#save-bang
1002
- Enabled: false
1003
-
1004
- Rails/ScopeArgs:
1005
- Description: Checks the arguments of ActiveRecord scopes.
1006
- Enabled: true
1007
-
1008
- Rails/TimeZone:
1009
- Description: Checks the correct usage of time zone aware methods.
1010
- StyleGuide: https://github.com/bbatsov/rails-style-guide#time
1011
- Reference: http://danilenko.org/2012/7/6/rails_timezones
1012
- Enabled: true
1013
-
1014
- Rails/UniqBeforePluck:
1015
- Description: Prefer the use of uniq or distinct before pluck.
1016
- Enabled: true
1017
-
1018
- Rails/UnknownEnv:
1019
- Description: Use correct environment name.
1020
- Enabled: true
1021
-
1022
- Rails/SkipsModelValidations:
1023
- Description: Use methods that skips model validations with caution. See reference for more information.
1024
- Reference: http://guides.rubyonrails.org/active_record_validations.html#skipping-validations
1025
- Enabled: true
1026
-
1027
- Rails/Validation:
1028
- Description: Use validates :attribute, hash of validations.
1029
- Enabled: true
1030
-
1031
879
  # Department Security
1032
880
  Security/Eval:
1033
881
  Description: The use of eval represents a serious security risk.
@@ -1102,10 +950,6 @@ Style/BlockDelimiters:
1102
950
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
1103
951
  Enabled: true
1104
952
 
1105
- Style/BracesAroundHashParameters:
1106
- Description: Enforce braces style around hash parameters.
1107
- Enabled: false
1108
-
1109
953
  Style/CaseEquality:
1110
954
  Description: Avoid explicit use of the case equality operator(===).
1111
955
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
@@ -1229,7 +1073,7 @@ Style/EmptyMethod:
1229
1073
  Style/EndBlock:
1230
1074
  Description: Avoid the use of END blocks.
1231
1075
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
1232
- Enabled: false
1076
+ Enabled: true
1233
1077
 
1234
1078
  Style/Encoding:
1235
1079
  Description: Use UTF-8 as the source file encoding.
@@ -1412,7 +1256,7 @@ Style/MultipleComparison:
1412
1256
 
1413
1257
  Style/MutableConstant:
1414
1258
  Description: Do not assign mutable objects to constants.
1415
- Enabled: true
1259
+ Enabled: false
1416
1260
 
1417
1261
  Style/NegatedIf:
1418
1262
  Description: Favor unless over if for negative conditions (or control flow or).
@@ -1703,15 +1547,15 @@ Style/UnlessElse:
1703
1547
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
1704
1548
  Enabled: true
1705
1549
 
1706
- Style/UnneededCapitalW:
1550
+ Style/RedundantCapitalW:
1707
1551
  Description: Checks for %W when interpolation is not needed.
1708
1552
  Enabled: false
1709
1553
 
1710
- Style/UnneededInterpolation:
1554
+ Style/RedundantInterpolation:
1711
1555
  Description: Checks for strings that are just an interpolated expression.
1712
1556
  Enabled: true
1713
1557
 
1714
- Style/UnneededPercentQ:
1558
+ Style/RedundantPercentQ:
1715
1559
  Description: Checks for %q/%Q when single quotes or double quotes would do.
1716
1560
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
1717
1561
  Enabled: false
@@ -1754,3 +1598,37 @@ Style/YodaCondition:
1754
1598
  Style/ZeroLengthPredicate:
1755
1599
  Description: Use #empty? when testing for objects of length 0.
1756
1600
  Enabled: true
1601
+
1602
+ Lint/RaiseException:
1603
+ Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
1604
+ Enabled: true
1605
+ Lint/StructNewOverride:
1606
+ Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.'
1607
+ Enabled: true
1608
+ Style/HashEachMethods:
1609
+ Description: 'Use Hash#each_key and Hash#each_value.'
1610
+ Enabled: true
1611
+ Safe: false
1612
+ Style/HashTransformKeys:
1613
+ Description: 'Prefer `transform_keys` over `each_with_object` and `map`.'
1614
+ Enabled: true
1615
+ Safe: false
1616
+ Style/HashTransformValues:
1617
+ Description: 'Prefer `transform_values` over `each_with_object` and `map`.'
1618
+ Enabled: true
1619
+ Safe: false
1620
+
1621
+ Layout/EmptyLinesAroundAttributeAccessor:
1622
+ Enabled: true
1623
+ Lint/DeprecatedOpenSSLConstant:
1624
+ Enabled: true
1625
+ Style/SlicingWithRange:
1626
+ Enabled: true
1627
+ Lint/MixedRegexpCaptureTypes:
1628
+ Enabled: true
1629
+ Style/RedundantRegexpCharacterClass:
1630
+ Enabled: true
1631
+ Style/RedundantRegexpEscape:
1632
+ Enabled: true
1633
+ Style/RedundantFetchBlock:
1634
+ Enabled: true