trailblazer-finder 0.1.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml +101 -0
  4. data/.rubocop.yml +3 -43
  5. data/.rubocop_todo.yml +42 -196
  6. data/.travis.yml +5 -8
  7. data/Gemfile +2 -2
  8. data/LICENSE.txt +7 -21
  9. data/README.md +177 -292
  10. data/Rakefile +12 -12
  11. data/lib/trailblazer/finder.rb +48 -23
  12. data/lib/trailblazer/finder/activity/find.rb +57 -0
  13. data/lib/trailblazer/finder/activity/prepare.rb +29 -0
  14. data/lib/trailblazer/finder/activity/prepare/adapters.rb +66 -0
  15. data/lib/trailblazer/finder/activity/prepare/entity.rb +32 -0
  16. data/lib/trailblazer/finder/activity/prepare/filters.rb +36 -0
  17. data/lib/trailblazer/finder/activity/prepare/paging.rb +49 -0
  18. data/lib/trailblazer/finder/activity/prepare/params.rb +33 -0
  19. data/lib/trailblazer/finder/activity/prepare/properties.rb +47 -0
  20. data/lib/trailblazer/finder/activity/prepare/sorting.rb +57 -0
  21. data/lib/trailblazer/finder/activity/process.rb +18 -0
  22. data/lib/trailblazer/finder/activity/process/adapters.rb +48 -0
  23. data/lib/trailblazer/finder/activity/process/filters.rb +28 -0
  24. data/lib/trailblazer/finder/activity/process/paging.rb +26 -0
  25. data/lib/trailblazer/finder/activity/process/predicates.rb +30 -0
  26. data/lib/trailblazer/finder/activity/process/sorting.rb +26 -0
  27. data/lib/trailblazer/finder/adapters/active_record/paging.rb +9 -8
  28. data/lib/trailblazer/finder/adapters/active_record/predicates.rb +78 -17
  29. data/lib/trailblazer/finder/adapters/active_record/sorting.rb +14 -12
  30. data/lib/trailblazer/finder/adapters/basic/paging.rb +21 -0
  31. data/lib/trailblazer/finder/adapters/basic/predicates.rb +115 -0
  32. data/lib/trailblazer/finder/adapters/basic/sorting.rb +40 -0
  33. data/lib/trailblazer/finder/adapters/kaminari/paging.rb +21 -0
  34. data/lib/trailblazer/finder/adapters/sequel/paging.rb +9 -8
  35. data/lib/trailblazer/finder/adapters/sequel/predicates.rb +78 -17
  36. data/lib/trailblazer/finder/adapters/sequel/sorting.rb +17 -15
  37. data/lib/trailblazer/finder/adapters/will_paginate/paging.rb +21 -0
  38. data/lib/trailblazer/finder/base.rb +20 -83
  39. data/lib/trailblazer/finder/dsl.rb +56 -0
  40. data/lib/trailblazer/finder/find.rb +28 -15
  41. data/lib/trailblazer/finder/helpers/basic.rb +44 -0
  42. data/lib/trailblazer/finder/helpers/sorting.rb +54 -0
  43. data/lib/trailblazer/finder/utils/array.rb +20 -0
  44. data/lib/trailblazer/finder/utils/extra.rb +10 -20
  45. data/lib/trailblazer/finder/utils/hash.rb +36 -0
  46. data/lib/trailblazer/finder/utils/splitter.rb +16 -17
  47. data/lib/trailblazer/finder/utils/string.rb +20 -10
  48. data/lib/trailblazer/finder/version.rb +3 -1
  49. data/lib/trailblazer/operation/finder.rb +20 -19
  50. data/spec/spec_helper.rb +5 -11
  51. data/spec/spec_helper_active_record.rb +11 -12
  52. data/spec/spec_helper_sequel.rb +4 -4
  53. data/spec/spec_helper_will_paginate.rb +13 -0
  54. data/spec/trailblazer/finder/adapters/active_record_spec.rb +267 -0
  55. data/spec/trailblazer/finder/adapters/basic_spec.rb +251 -0
  56. data/spec/trailblazer/finder/adapters/kaminari_spec.rb +78 -32
  57. data/spec/trailblazer/finder/adapters/sequel_spec.rb +267 -0
  58. data/spec/trailblazer/finder/adapters/will_paginate_spec.rb +81 -40
  59. data/spec/trailblazer/finder/base_spec.rb +292 -204
  60. data/spec/trailblazer/finder/dsl_spec.rb +213 -0
  61. data/spec/trailblazer/finder/utils/hash_spec.rb +26 -0
  62. data/spec/trailblazer/finder/utils/splitter_spec.rb +39 -0
  63. data/spec/trailblazer/finder/utils/string_spec.rb +52 -9
  64. data/spec/trailblazer/operation/finder_spec.rb +35 -32
  65. data/trailblazer-finder.gemspec +31 -30
  66. metadata +119 -137
  67. data/lib/trailblazer/finder/adapters.rb +0 -26
  68. data/lib/trailblazer/finder/adapters/active_record.rb +0 -32
  69. data/lib/trailblazer/finder/adapters/data_mapper.rb +0 -32
  70. data/lib/trailblazer/finder/adapters/data_mapper/paging.rb +0 -20
  71. data/lib/trailblazer/finder/adapters/data_mapper/predicates.rb +0 -42
  72. data/lib/trailblazer/finder/adapters/data_mapper/sorting.rb +0 -38
  73. data/lib/trailblazer/finder/adapters/friendly_id.rb +0 -31
  74. data/lib/trailblazer/finder/adapters/kaminari.rb +0 -18
  75. data/lib/trailblazer/finder/adapters/sequel.rb +0 -32
  76. data/lib/trailblazer/finder/adapters/will_paginate.rb +0 -18
  77. data/lib/trailblazer/finder/errors/block_ignored.rb +0 -11
  78. data/lib/trailblazer/finder/errors/invalid_defined_by_value.rb +0 -11
  79. data/lib/trailblazer/finder/errors/invalid_number.rb +0 -16
  80. data/lib/trailblazer/finder/errors/missing_entity_type.rb +0 -11
  81. data/lib/trailblazer/finder/errors/with_ignored.rb +0 -11
  82. data/lib/trailblazer/finder/features.rb +0 -23
  83. data/lib/trailblazer/finder/features/paging.rb +0 -55
  84. data/lib/trailblazer/finder/features/predicate.rb +0 -32
  85. data/lib/trailblazer/finder/features/sorting.rb +0 -108
  86. data/lib/trailblazer/finder/filter.rb +0 -66
  87. data/lib/trailblazer/finder/predicates.rb +0 -39
  88. data/lib/trailblazer/finder/utils/deep_locate.rb +0 -30
  89. data/lib/trailblazer/finder/utils/params.rb +0 -28
  90. data/lib/trailblazer/finder/utils/parse.rb +0 -25
  91. data/spec/spec_helper_data_mapper.rb +0 -35
  92. data/spec/support/paging_shared_example.rb +0 -65
  93. data/spec/support/sorting_shared_example.rb +0 -125
  94. data/spec/trailblazer/finder/adapters/active_record/base_spec.rb +0 -112
  95. data/spec/trailblazer/finder/adapters/active_record/paging_spec.rb +0 -64
  96. data/spec/trailblazer/finder/adapters/active_record/predicates_spec.rb +0 -101
  97. data/spec/trailblazer/finder/adapters/active_record/sorting_spec.rb +0 -99
  98. data/spec/trailblazer/finder/adapters/data_mapper/base_spec.rb +0 -112
  99. data/spec/trailblazer/finder/adapters/data_mapper/paging_spec.rb +0 -64
  100. data/spec/trailblazer/finder/adapters/data_mapper/predicates_spec.rb +0 -100
  101. data/spec/trailblazer/finder/adapters/data_mapper/sorting_spec.rb +0 -97
  102. data/spec/trailblazer/finder/adapters/friendly_id_spec.rb +0 -46
  103. data/spec/trailblazer/finder/adapters/sequel/base_spec.rb +0 -125
  104. data/spec/trailblazer/finder/adapters/sequel/paging_spec.rb +0 -64
  105. data/spec/trailblazer/finder/adapters/sequel/predicates_spec.rb +0 -89
  106. data/spec/trailblazer/finder/adapters/sequel/sorting_spec.rb +0 -110
  107. data/spec/trailblazer/finder/adapters_spec.rb +0 -110
  108. data/spec/trailblazer/finder/features/paging_spec.rb +0 -104
  109. data/spec/trailblazer/finder/features/predicates_spec.rb +0 -99
  110. data/spec/trailblazer/finder/features/sorting_spec.rb +0 -96
  111. data/spec/trailblazer/finder/features_spec.rb +0 -55
  112. data/spec/trailblazer/finder/filter_spec.rb +0 -133
  113. data/spec/trailblazer/finder/find_spec.rb +0 -72
  114. data/spec/trailblazer/finder/utils/extra_spec.rb +0 -41
  115. data/spec/trailblazer/finder/utils/params_spec.rb +0 -39
  116. data/spec/trailblazer/finder/utils/parse_spec.rb +0 -33
  117. data/spec/trailblazer/operation/paging_spec.rb +0 -68
  118. data/spec/trailblazer/operation/predicates_spec.rb +0 -127
  119. data/spec/trailblazer/operation/sorting_spec.rb +0 -80
  120. data/spec/trailblazer/test_spec.rb +0 -41
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60587025c9bddf5a856868fa908615064b1b5a683c187d9606670e00ceb999f4
4
- data.tar.gz: d110b70e65eef74d6cba432740c4df30b2449cd338c9a933e1c82a2b3bb4e9ef
3
+ metadata.gz: dc3cc06785eeaa846359a0577ece8ba7d42a93ac122d732607b6f01ca535b782
4
+ data.tar.gz: a55de72ba22507d8a22854fb94998df91b08e29b9260161e3ac9177db5048c72
5
5
  SHA512:
6
- metadata.gz: 9ab8dc1682c4a9968af5a442a27ff1be21a98b78c87776cbd477e809ade202bc28732d0bb00fbc6857f107c8a3cb296dd99ffd192557b7de04ba35c24f08ccb1
7
- data.tar.gz: 5f5b69d3715e35f3350509fd8b32613e7b39c219049c3411bd95cda17a8f0ad2675dce7ee51dc412bfdbe159a7fb87885c18accbc3847efae2c6ed41009cae5e
6
+ metadata.gz: 62888964119288ea47b1c4a2beaf88a51fb6c5185bf1866e4f2362f4461b6f4e616a4ebc38641fce019e70f6fe44d9d6170a0642dd0ec92cac68829866a48c58
7
+ data.tar.gz: dd1d405a36b76e271115bf69d36b26285cbc96dd18fe1be5a03ce05a5a0a95468c175eb160e65e36e74a97f1137147c8ba2d057b66b8242f2d15866811d324bf
data/.gitignore CHANGED
@@ -17,3 +17,6 @@ test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
19
  bitbucket-pipelines.yml
20
+ .byebug_history
21
+ .idea/
22
+ .tool-versions
@@ -0,0 +1,101 @@
1
+ AllCops:
2
+ DisplayCopNames: true
3
+ Layout/CaseIndentation:
4
+ IndentOneStep: true
5
+ Layout/FirstArrayElementLineBreak:
6
+ Enabled: true
7
+ Layout/FirstHashElementLineBreak:
8
+ Enabled: true
9
+ Layout/FirstMethodArgumentLineBreak:
10
+ Enabled: true
11
+ Layout/FirstMethodParameterLineBreak:
12
+ Enabled: true
13
+ Layout/MultilineAssignmentLayout:
14
+ Enabled: true
15
+ EnforcedStyle: same_line
16
+ Layout/SpaceInsideHashLiteralBraces:
17
+ EnforcedStyle: no_space
18
+ Metrics/LineLength:
19
+ Max: 130
20
+ Metrics/ParameterLists:
21
+ Max: 5
22
+ Naming/VariableNumber:
23
+ EnforcedStyle: snake_case
24
+ Style/AndOr:
25
+ EnforcedStyle: conditionals
26
+ Style/AutoResourceCleanup:
27
+ Enabled: true
28
+ Style/CollectionMethods:
29
+ Enabled: true
30
+ Style/Documentation:
31
+ Enabled: false
32
+ Style/EmptyLiteral:
33
+ Enabled: false
34
+ Style/EmptyMethod:
35
+ EnforcedStyle: expanded
36
+ Style/FormatStringToken:
37
+ EnforcedStyle: template
38
+ Style/ImplicitRuntimeError:
39
+ Enabled: true
40
+ Style/MethodCalledOnDoEndBlock:
41
+ Enabled: true
42
+ Style/MethodDefParentheses:
43
+ EnforcedStyle: require_parentheses
44
+ Style/MissingElse:
45
+ Enabled: true
46
+ EnforcedStyle: case
47
+ Style/NumericLiterals:
48
+ Enabled: false
49
+ Style/OptionHash:
50
+ Enabled: true
51
+ Style/PercentLiteralDelimiters:
52
+ PreferredDelimiters:
53
+ "%w": "[]"
54
+ "%W": "[]"
55
+ "%i": "[]"
56
+ "%I": "[]"
57
+ "%r": "()"
58
+ Style/ReturnNil:
59
+ Enabled: true
60
+ Style/SafeNavigation:
61
+ Enabled: false
62
+ Style/Send:
63
+ Enabled: true
64
+ Style/SignalException:
65
+ EnforcedStyle: semantic
66
+ Style/StringLiterals:
67
+ EnforcedStyle: double_quotes
68
+ Style/StringLiteralsInInterpolation:
69
+ EnforcedStyle: double_quotes
70
+ Style/StringMethods:
71
+ Enabled: true
72
+ Style/SymbolArray:
73
+ Enabled: true
74
+ # this allows in rspec to have expect { } with multiple lines
75
+ Style/BlockDelimiters:
76
+ EnforcedStyle: braces_for_chaining
77
+ Layout/EndOfLine:
78
+ Enabled: false
79
+ # don't need these checks in test folders
80
+ Metrics/ModuleLength:
81
+ Exclude:
82
+ - "spec/**/*"
83
+ - "test/**/*"
84
+ Metrics/BlockLength:
85
+ Exclude:
86
+ - "spec/**/*"
87
+ - "test/**/*"
88
+ - "*.gemspec" # definitely not in the gemspec
89
+ Metrics/MethodLength:
90
+ Max: 20
91
+ Lint/UnreachableCode:
92
+ Description: 'Unreachable code.'
93
+ Enabled: false
94
+ Lint/Void:
95
+ Enabled: false
96
+ Layout/AlignHash:
97
+ EnforcedLastArgumentHashStyle: ignore_implicit
98
+ Metrics/AbcSize:
99
+ Max: 25
100
+ Style/LambdaCall:
101
+ Enabled: false
data/.rubocop.yml CHANGED
@@ -1,45 +1,5 @@
1
1
  require: rubocop-rspec
2
2
 
3
- inherit_from: .rubocop_todo.yml
4
-
5
- AllCops:
6
- Exclude:
7
- - Rakefile
8
- - coverage
9
- - test-reports
10
- - bitbucket-pipelines.yml
11
- - trailblazer-finder.gemspec
12
- - spec/trailblazer/finder/base_spec.rb
13
- - lib/trailblazer/operation/finder.rb
14
-
15
- # Disables "Line is too long"
16
- LineLength:
17
- Enabled: false
18
-
19
- # Disables Module has too many lines
20
- ModuleLength:
21
- Enabled: false
22
-
23
- # Disables "Missing top-level class documentation comment"
24
- Documentation:
25
- Enabled: false
26
-
27
- # Disables "Use each_with_object instead of inject"
28
- Style/EachWithObject:
29
- Enabled: false
30
-
31
- # Disables "Prefer reduce over inject."
32
- Style/CollectionMethods:
33
- Enabled: false
34
-
35
- # Disables "Block has too many lines."
36
- Metrics/BlockLength:
37
- Enabled: false
38
-
39
- # Disables "Example has too many lines."
40
- RSpec/ExampleLength:
41
- Enabled: false
42
-
43
- # Disables "Too many expectations."
44
- RSpec/MultipleExpectations:
45
- Enabled: false
3
+ inherit_from:
4
+ - https://raw.githubusercontent.com/trailblazer/meta/master/rubocop.yml
5
+ - .rubocop_todo.yml
data/.rubocop_todo.yml CHANGED
@@ -1,232 +1,78 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-03-17 16:23:14 +0100 using RuboCop version 0.53.0.
3
+ # on 2018-08-23 00:10:15 +0200 using RuboCop version 0.58.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
9
  # Offense count: 1
10
- # Cop supports --auto-correct.
11
- Layout/CommentIndentation:
12
- Exclude:
13
- - 'spec/trailblazer/finder/adapters/sequel/predicates_spec.rb'
14
-
15
- # Offense count: 1
16
- # Cop supports --auto-correct.
17
- Layout/EmptyLines:
18
- Exclude:
19
- - 'spec/trailblazer/operation/finder_spec.rb'
20
-
21
- # Offense count: 2
22
- # Cop supports --auto-correct.
23
- # Configuration parameters: EnforcedStyle.
24
- # SupportedStyles: empty_lines, no_empty_lines
25
- Layout/EmptyLinesAroundBlockBody:
26
- Exclude:
27
- - 'spec/trailblazer/finder/adapters/active_record/sorting_spec.rb'
28
- - 'spec/trailblazer/finder/features/sorting_spec.rb'
29
-
30
- # Offense count: 1
31
- # Cop supports --auto-correct.
32
- # Configuration parameters: EnforcedStyle.
33
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
34
- Layout/EmptyLinesAroundModuleBody:
35
- Exclude:
36
- - 'lib/trailblazer/finder/adapters/sequel/predicates.rb'
10
+ Metrics/AbcSize:
11
+ Max: 31
37
12
 
38
13
  # Offense count: 2
39
- # Configuration parameters: EnforcedStyle.
40
- # SupportedStyles: native, lf, crlf
41
- Layout/EndOfLine:
42
- Exclude:
43
- - 'lib/trailblazer/finder/adapters/data_mapper/predicates.rb'
44
- - 'spec/trailblazer/finder/adapters/data_mapper/predicates_spec.rb'
45
-
46
- # Offense count: 1
47
- # Cop supports --auto-correct.
48
- # Configuration parameters: EnforcedStyle.
49
- # SupportedStyles: normal, rails
50
- Layout/IndentationConsistency:
51
- Exclude:
52
- - 'spec/trailblazer/finder/adapters/sequel/predicates_spec.rb'
14
+ Metrics/CyclomaticComplexity:
15
+ Max: 7
53
16
 
54
- # Offense count: 1
55
- # Cop supports --auto-correct.
56
- # Configuration parameters: Width, IgnoredPatterns.
57
- Layout/IndentationWidth:
58
- Exclude:
59
- - 'spec/trailblazer/finder/adapters/sequel/predicates_spec.rb'
60
-
61
- # Offense count: 1
62
- # Cop supports --auto-correct.
63
- Layout/SpaceAroundKeyword:
64
- Exclude:
65
- - 'spec/trailblazer/finder/features/predicates_spec.rb'
66
-
67
- # Offense count: 4
68
- # Cop supports --auto-correct.
69
- # Configuration parameters: AllowForAlignment.
70
- Layout/SpaceAroundOperators:
71
- Exclude:
72
- - 'spec/trailblazer/finder/features/predicates_spec.rb'
73
-
74
- # Offense count: 4
75
- # Cop supports --auto-correct.
76
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
77
- # SupportedStyles: space, no_space
78
- # SupportedStylesForEmptyBraces: space, no_space
79
- Layout/SpaceBeforeBlockBraces:
80
- Exclude:
81
- - 'lib/trailblazer/finder/adapters/sequel/predicates.rb'
82
-
83
- # Offense count: 8
84
- # Cop supports --auto-correct.
85
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
86
- # SupportedStyles: space, no_space
87
- # SupportedStylesForEmptyBraces: space, no_space
88
- Layout/SpaceInsideBlockBraces:
89
- Exclude:
90
- - 'lib/trailblazer/finder/adapters/sequel/predicates.rb'
91
-
92
- # Offense count: 4
93
- # Cop supports --auto-correct.
94
- Layout/SpaceInsideParens:
95
- Exclude:
96
- - 'lib/trailblazer/finder/utils/splitter.rb'
97
-
98
- # Offense count: 3
99
- # Cop supports --auto-correct.
100
- Layout/TrailingWhitespace:
101
- Exclude:
102
- - 'lib/trailblazer/finder/filter.rb'
103
- - 'spec/trailblazer/finder/adapters/active_record/base_spec.rb'
17
+ # Offense count: 13
18
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
19
+ # URISchemes: http, https
20
+ Metrics/LineLength:
21
+ Max: 283
104
22
 
105
23
  # Offense count: 1
106
- Lint/DuplicateMethods:
107
- Exclude:
108
- - 'lib/trailblazer/finder/utils/splitter.rb'
24
+ # Configuration parameters: CountKeywordArgs.
25
+ Metrics/ParameterLists:
26
+ Max: 6
109
27
 
110
28
  # Offense count: 1
111
- Lint/NestedMethodDefinition:
112
- Exclude:
113
- - 'spec/trailblazer/finder/adapters/sequel/base_spec.rb'
114
-
115
- # Offense count: 2
116
- # Cop supports --auto-correct.
117
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
118
- Lint/UnusedMethodArgument:
119
- Exclude:
120
- - 'lib/trailblazer/finder/adapters/sequel/predicates.rb'
121
-
122
- # Offense count: 3
123
- Metrics/AbcSize:
124
- Max: 17
125
-
126
- # Offense count: 9
127
- # Configuration parameters: CountComments.
128
- Metrics/MethodLength:
129
- Max: 51
130
-
131
- # Offense count: 8
132
29
  RSpec/DescribeClass:
133
30
  Exclude:
134
- - 'spec/trailblazer/finder/adapters/active_record/sorting_spec.rb'
135
- - 'spec/trailblazer/finder/adapters/data_mapper/sorting_spec.rb'
136
- - 'spec/trailblazer/finder/adapters/sequel/predicates_spec.rb'
137
- - 'spec/trailblazer/finder/adapters/sequel/sorting_spec.rb'
138
31
  - 'spec/trailblazer/operation/finder_spec.rb'
139
- - 'spec/trailblazer/operation/paging_spec.rb'
140
- - 'spec/trailblazer/operation/predicates_spec.rb'
141
- - 'spec/trailblazer/operation/sorting_spec.rb'
142
32
 
143
- # Offense count: 50
144
- # Configuration parameters: CustomTransform, IgnoredWords.
145
- RSpec/ExampleWording:
33
+ # Offense count: 78
34
+ # Configuration parameters: Max.
35
+ RSpec/ExampleLength:
146
36
  Exclude:
147
- - 'spec/trailblazer/finder/adapters/active_record/predicates_spec.rb'
148
- - 'spec/trailblazer/finder/adapters/data_mapper/predicates_spec.rb'
149
- - 'spec/trailblazer/finder/adapters/sequel/predicates_spec.rb'
150
- - 'spec/trailblazer/finder/features/predicates_spec.rb'
151
- - 'spec/trailblazer/operation/predicates_spec.rb'
37
+ - 'spec/trailblazer/finder/adapters/active_record_spec.rb'
38
+ - 'spec/trailblazer/finder/adapters/basic_spec.rb'
39
+ - 'spec/trailblazer/finder/adapters/kaminari_spec.rb'
40
+ - 'spec/trailblazer/finder/adapters/sequel_spec.rb'
41
+ - 'spec/trailblazer/finder/adapters/will_paginate_spec.rb'
42
+ - 'spec/trailblazer/finder/base_spec.rb'
43
+ - 'spec/trailblazer/finder/dsl_spec.rb'
44
+ - 'spec/trailblazer/finder/utils/string_spec.rb'
45
+
46
+ # Offense count: 62
47
+ # Configuration parameters: AggregateFailuresByDefault.
48
+ RSpec/MultipleExpectations:
49
+ Max: 7
152
50
 
153
51
  # Offense count: 2
154
- # Cop supports --auto-correct.
155
- # Configuration parameters: EnforcedStyle.
156
- # SupportedStyles: prefer_alias, prefer_alias_method
157
- Style/Alias:
52
+ RSpec/RepeatedDescription:
158
53
  Exclude:
159
- - 'lib/trailblazer/finder/utils/splitter.rb'
54
+ - 'spec/trailblazer/finder/adapters/basic_spec.rb'
160
55
 
161
- # Offense count: 18
56
+ # Offense count: 6
162
57
  # Cop supports --auto-correct.
163
58
  # Configuration parameters: AutoCorrect, EnforcedStyle.
164
59
  # SupportedStyles: nested, compact
165
60
  Style/ClassAndModuleChildren:
166
61
  Exclude:
167
62
  - 'spec/trailblazer/operation/finder_spec.rb'
168
- - 'spec/trailblazer/operation/paging_spec.rb'
169
- - 'spec/trailblazer/operation/predicates_spec.rb'
170
- - 'spec/trailblazer/operation/sorting_spec.rb'
171
-
172
- # Offense count: 1
173
- # Cop supports --auto-correct.
174
- # Configuration parameters: EnforcedStyle.
175
- # SupportedStyles: compact, expanded
176
- Style/EmptyMethod:
177
- Exclude:
178
- - 'spec/trailblazer/finder/adapters/sequel/sorting_spec.rb'
179
63
 
180
64
  # Offense count: 1
181
- # Cop supports --auto-correct.
182
- Style/IfUnlessModifier:
183
- Exclude:
184
- - 'lib/trailblazer/finder/utils/deep_locate.rb'
185
-
186
- # Offense count: 2
187
- # Cop supports --auto-correct.
188
- # Configuration parameters: IncludeSemanticChanges.
189
- Style/NonNilCheck:
65
+ # Configuration parameters: SuspiciousParamNames.
66
+ # SuspiciousParamNames: options, opts, args, params, parameters
67
+ Style/OptionHash:
190
68
  Exclude:
191
- - 'lib/trailblazer/finder/predicates.rb'
69
+ - 'lib/trailblazer/finder/dsl.rb'
192
70
 
193
- # Offense count: 2
194
- # Cop supports --auto-correct.
195
- Style/ParallelAssignment:
196
- Exclude:
197
- - 'lib/trailblazer/finder/utils/splitter.rb'
198
-
199
- # Offense count: 2
200
- # Cop supports --auto-correct.
201
- Style/PerlBackrefs:
202
- Exclude:
203
- - 'lib/trailblazer/finder/utils/splitter.rb'
204
-
205
- # Offense count: 191
206
- # Cop supports --auto-correct.
207
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
208
- # SupportedStyles: single_quotes, double_quotes
209
- Style/StringLiterals:
71
+ # Offense count: 3
72
+ Style/Send:
210
73
  Exclude:
211
- - 'lib/trailblazer/finder/adapters/sequel/predicates.rb'
212
- - 'spec/trailblazer/finder/adapters/active_record/predicates_spec.rb'
213
- - 'spec/trailblazer/finder/adapters/active_record/sorting_spec.rb'
214
- - 'spec/trailblazer/finder/adapters/data_mapper/predicates_spec.rb'
215
- - 'spec/trailblazer/finder/adapters/data_mapper/sorting_spec.rb'
216
- - 'spec/trailblazer/finder/adapters/sequel/predicates_spec.rb'
217
- - 'spec/trailblazer/finder/features/predicates_spec.rb'
218
- - 'spec/trailblazer/operation/predicates_spec.rb'
74
+ - 'lib/trailblazer/finder/adapters/sequel/sorting.rb'
75
+ - 'lib/trailblazer/operation/finder.rb'
219
76
 
220
- # Offense count: 24
221
- # Cop supports --auto-correct.
222
- # Configuration parameters: WordRegex.
223
- # SupportedStyles: percent, brackets
224
- Style/WordArray:
225
- EnforcedStyle: percent
226
- MinSize: 9
227
-
228
- # Offense count: 191
229
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
230
- # URISchemes: http, https
231
- Metrics/LineLength:
232
- Max: 172
77
+ RSpec/DescribedClass:
78
+ SkipBlocks: true
data/.travis.yml CHANGED
@@ -1,13 +1,10 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  before_install:
3
4
  - gem install bundler
4
5
  matrix:
5
6
  include:
6
- - rvm: 2.2
7
- gemfile: Gemfile
8
- - rvm: 2.3.1
9
- gemfile: Gemfile
10
- - rvm: 2.4.1
11
- gemfile: Gemfile
12
- - rvm: 2.5.0
13
- gemfile: Gemfile
7
+ - rvm: 2.3.8
8
+ - rvm: 2.4.6
9
+ - rvm: 2.5.5
10
+ - rvm: 2.6.3