trailblazer-macro 2.1.11 → 2.1.13

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-macro
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.11
4
+ version: 2.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
@@ -9,22 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-08-22 00:00:00.000000000 Z
12
+ date: 2022-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: bundler
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: '0'
28
14
  - !ruby/object:Gem::Dependency
29
15
  name: minitest
30
16
  requirement: !ruby/object:Gem::Requirement
@@ -53,34 +39,6 @@ dependencies:
53
39
  - - ">="
54
40
  - !ruby/object:Gem::Version
55
41
  version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: multi_json
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- - !ruby/object:Gem::Dependency
71
- name: roar
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
42
  - !ruby/object:Gem::Dependency
85
43
  name: trailblazer-developer
86
44
  requirement: !ruby/object:Gem::Requirement
@@ -101,34 +59,34 @@ dependencies:
101
59
  requirements:
102
60
  - - ">="
103
61
  - !ruby/object:Gem::Version
104
- version: 1.0.0
62
+ version: 1.1.0
105
63
  - - "<"
106
64
  - !ruby/object:Gem::Version
107
- version: 1.1.0
65
+ version: 1.2.0
108
66
  type: :runtime
109
67
  prerelease: false
110
68
  version_requirements: !ruby/object:Gem::Requirement
111
69
  requirements:
112
70
  - - ">="
113
71
  - !ruby/object:Gem::Version
114
- version: 1.0.0
72
+ version: 1.1.0
115
73
  - - "<"
116
74
  - !ruby/object:Gem::Version
117
- version: 1.1.0
75
+ version: 1.2.0
118
76
  - !ruby/object:Gem::Dependency
119
77
  name: trailblazer-operation
120
78
  requirement: !ruby/object:Gem::Requirement
121
79
  requirements:
122
80
  - - ">="
123
81
  - !ruby/object:Gem::Version
124
- version: 0.8.0
82
+ version: 0.9.0
125
83
  type: :runtime
126
84
  prerelease: false
127
85
  version_requirements: !ruby/object:Gem::Requirement
128
86
  requirements:
129
87
  - - ">="
130
88
  - !ruby/object:Gem::Version
131
- version: 0.8.0
89
+ version: 0.9.0
132
90
  description: Macros for Trailblazer's operation
133
91
  email:
134
92
  - apotonick@gmail.com
@@ -138,9 +96,10 @@ extensions: []
138
96
  extra_rdoc_files: []
139
97
  files:
140
98
  - ".github/workflows/ci.yml"
99
+ - ".github/workflows/ci_jruby.yml"
100
+ - ".github/workflows/ci_legacy.yml"
101
+ - ".github/workflows/ci_truffleruby.yml"
141
102
  - ".gitignore"
142
- - ".rubocop.yml"
143
- - ".rubocop_todo.yml"
144
103
  - CHANGES.md
145
104
  - Gemfile
146
105
  - LICENSE
@@ -148,24 +107,27 @@ files:
148
107
  - Rakefile
149
108
  - lib/trailblazer-macro.rb
150
109
  - lib/trailblazer/macro.rb
110
+ - lib/trailblazer/macro/each.rb
151
111
  - lib/trailblazer/macro/guard.rb
152
112
  - lib/trailblazer/macro/model.rb
153
113
  - lib/trailblazer/macro/nested.rb
154
114
  - lib/trailblazer/macro/policy.rb
155
115
  - lib/trailblazer/macro/pundit.rb
156
116
  - lib/trailblazer/macro/rescue.rb
117
+ - lib/trailblazer/macro/strategy.rb
157
118
  - lib/trailblazer/macro/version.rb
158
119
  - lib/trailblazer/macro/wrap.rb
120
+ - test/docs/autogenerated/operation_each_test.rb
121
+ - test/docs/autogenerated/operation_model_test.rb
122
+ - test/docs/each_test.rb
159
123
  - test/docs/guard_test.rb
160
124
  - test/docs/macro_test.rb
161
125
  - test/docs/model_test.rb
162
- - test/docs/nested_test.rb
126
+ - test/docs/nested_static_test.rb
163
127
  - test/docs/pundit_test.rb
164
128
  - test/docs/rescue_test.rb
165
129
  - test/docs/wrap_test.rb
166
130
  - test/operation/integration_test.rb
167
- - test/operation/model_test.rb
168
- - test/operation/nested_test.rb
169
131
  - test/operation/pundit_test.rb
170
132
  - test/test_helper.rb
171
133
  - trailblazer-macro.gemspec
@@ -193,15 +155,16 @@ signing_key:
193
155
  specification_version: 4
194
156
  summary: 'Macros for Trailblazer''s operation: Policy, Wrap, Rescue and more.'
195
157
  test_files:
158
+ - test/docs/autogenerated/operation_each_test.rb
159
+ - test/docs/autogenerated/operation_model_test.rb
160
+ - test/docs/each_test.rb
196
161
  - test/docs/guard_test.rb
197
162
  - test/docs/macro_test.rb
198
163
  - test/docs/model_test.rb
199
- - test/docs/nested_test.rb
164
+ - test/docs/nested_static_test.rb
200
165
  - test/docs/pundit_test.rb
201
166
  - test/docs/rescue_test.rb
202
167
  - test/docs/wrap_test.rb
203
168
  - test/operation/integration_test.rb
204
- - test/operation/model_test.rb
205
- - test/operation/nested_test.rb
206
169
  - test/operation/pundit_test.rb
207
170
  - test/test_helper.rb
data/.rubocop.yml DELETED
@@ -1,6 +0,0 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/trailblazer/meta/master/rubocop.yml
3
- - .rubocop_todo.yml
4
-
5
- Naming/MethodName:
6
- Enabled: false
data/.rubocop_todo.yml DELETED
@@ -1,423 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2019-04-11 20:01:18 +1000 using RuboCop version 0.58.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Configuration parameters: Include.
11
- # Include: **/*.gemspec
12
- Gemspec/RequiredRubyVersion:
13
- Exclude:
14
- - 'trailblazer-macro.gemspec'
15
-
16
- # Offense count: 1
17
- # Cop supports --auto-correct.
18
- # Configuration parameters: EnforcedStyle, IndentationWidth.
19
- # SupportedStyles: outdent, indent
20
- Layout/AccessModifierIndentation:
21
- Exclude:
22
- - 'lib/trailblazer/macro/pundit.rb'
23
-
24
- # Offense count: 1
25
- # Cop supports --auto-correct.
26
- # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
27
- # SupportedHashRocketStyles: key, separator, table
28
- # SupportedColonStyles: key, separator, table
29
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
30
- Layout/AlignHash:
31
- Exclude:
32
- - 'test/operation/integration_test.rb'
33
-
34
- # Offense count: 2
35
- # Cop supports --auto-correct.
36
- # Configuration parameters: EnforcedStyle, IndentationWidth.
37
- # SupportedStyles: with_first_parameter, with_fixed_indentation
38
- Layout/AlignParameters:
39
- Exclude:
40
- - 'test/docs/guard_test.rb'
41
- - 'test/docs/wrap_test.rb'
42
-
43
- # Offense count: 3
44
- # Cop supports --auto-correct.
45
- Layout/BlockEndNewline:
46
- Exclude:
47
- - 'test/docs/guard_test.rb'
48
- - 'test/docs/pundit_test.rb'
49
-
50
- # Offense count: 1
51
- # Cop supports --auto-correct.
52
- Layout/ClosingParenthesisIndentation:
53
- Exclude:
54
- - 'test/docs/pundit_test.rb'
55
-
56
- # Offense count: 14
57
- # Cop supports --auto-correct.
58
- Layout/CommentIndentation:
59
- Exclude:
60
- - 'test/docs/guard_test.rb'
61
- - 'test/docs/macro_test.rb'
62
- - 'test/docs/nested_test.rb'
63
- - 'test/docs/pundit_test.rb'
64
-
65
- # Offense count: 8
66
- # Cop supports --auto-correct.
67
- # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
68
- Layout/EmptyLineBetweenDefs:
69
- Exclude:
70
- - 'lib/trailblazer/macro/nested.rb'
71
- - 'test/operation/model_test.rb'
72
- - 'test/operation/pundit_test.rb'
73
- - 'test/test_helper.rb'
74
-
75
- # Offense count: 7
76
- # Cop supports --auto-correct.
77
- Layout/EmptyLines:
78
- Exclude:
79
- - 'lib/trailblazer/macro/nested.rb'
80
- - 'test/docs/model_test.rb'
81
- - 'test/docs/nested_test.rb'
82
- - 'test/docs/pundit_test.rb'
83
- - 'test/operation/pundit_test.rb'
84
- - 'test/test_helper.rb'
85
-
86
- # Offense count: 1
87
- # Cop supports --auto-correct.
88
- Layout/EmptyLinesAroundAccessModifier:
89
- Exclude:
90
- - 'lib/trailblazer/macro/pundit.rb'
91
-
92
- # Offense count: 1
93
- # Cop supports --auto-correct.
94
- # Configuration parameters: EnforcedStyle.
95
- # SupportedStyles: empty_lines, no_empty_lines
96
- Layout/EmptyLinesAroundBlockBody:
97
- Exclude:
98
- - 'test/operation/model_test.rb'
99
-
100
- # Offense count: 1
101
- # Cop supports --auto-correct.
102
- # Configuration parameters: EnforcedStyle.
103
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
104
- Layout/EmptyLinesAroundClassBody:
105
- Exclude:
106
- - 'test/docs/rescue_test.rb'
107
-
108
- # Offense count: 1
109
- # Cop supports --auto-correct.
110
- # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
111
- Layout/ExtraSpacing:
112
- Exclude:
113
- - 'test/docs/pundit_test.rb'
114
-
115
- # Offense count: 1
116
- # Cop supports --auto-correct.
117
- Layout/FirstMethodArgumentLineBreak:
118
- Exclude:
119
- - 'test/docs/pundit_test.rb'
120
-
121
- # Offense count: 2
122
- # Cop supports --auto-correct.
123
- # Configuration parameters: IndentationWidth.
124
- Layout/IndentAssignment:
125
- Exclude:
126
- - 'test/docs/guard_test.rb'
127
- - 'test/docs/pundit_test.rb'
128
-
129
- # Offense count: 5
130
- # Cop supports --auto-correct.
131
- # Configuration parameters: EnforcedStyle.
132
- # SupportedStyles: normal, rails
133
- Layout/IndentationConsistency:
134
- Exclude:
135
- - 'lib/trailblazer/macro/nested.rb'
136
- - 'test/docs/pundit_test.rb'
137
-
138
- # Offense count: 3
139
- # Cop supports --auto-correct.
140
- # Configuration parameters: Width, IgnoredPatterns.
141
- Layout/IndentationWidth:
142
- Exclude:
143
- - 'test/docs/guard_test.rb'
144
- - 'test/docs/pundit_test.rb'
145
-
146
- # Offense count: 1
147
- # Cop supports --auto-correct.
148
- Layout/LeadingCommentSpace:
149
- Exclude:
150
- - 'test/docs/**/*'
151
- - 'test/operation/model_test.rb'
152
-
153
- # Offense count: 1
154
- # Cop supports --auto-correct.
155
- # Configuration parameters: EnforcedStyle.
156
- # SupportedStyles: symmetrical, new_line, same_line
157
- Layout/MultilineMethodCallBraceLayout:
158
- Exclude:
159
- - 'test/docs/pundit_test.rb'
160
-
161
- # Offense count: 2
162
- # Cop supports --auto-correct.
163
- # Configuration parameters: AllowForAlignment.
164
- Layout/SpaceAroundOperators:
165
- Exclude:
166
- - 'test/docs/guard_test.rb'
167
- - 'test/docs/model_test.rb'
168
-
169
- # Offense count: 1
170
- # Cop supports --auto-correct.
171
- Layout/SpaceBeforeComment:
172
- Exclude:
173
- - 'test/operation/model_test.rb'
174
-
175
- # Offense count: 12
176
- # Cop supports --auto-correct.
177
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
178
- # SupportedStyles: space, no_space, compact
179
- # SupportedStylesForEmptyBrackets: space, no_space
180
- Layout/SpaceInsideArrayLiteralBrackets:
181
- Exclude:
182
- - 'test/docs/wrap_test.rb'
183
-
184
- # Offense count: 52
185
- # Cop supports --auto-correct.
186
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
187
- # SupportedStyles: space, no_space, compact
188
- # SupportedStylesForEmptyBraces: space, no_space
189
- Layout/SpaceInsideHashLiteralBraces:
190
- Exclude:
191
- - 'test/docs/model_test.rb'
192
- - 'test/docs/rescue_test.rb'
193
- - 'test/docs/wrap_test.rb'
194
- - 'test/operation/model_test.rb'
195
- - 'test/operation/pundit_test.rb'
196
-
197
- # Offense count: 118
198
- # Cop supports --auto-correct.
199
- # Configuration parameters: EnforcedStyle.
200
- # SupportedStyles: space, no_space
201
- Layout/SpaceInsideParens:
202
- Exclude:
203
- - 'test/docs/guard_test.rb'
204
- - 'test/docs/macro_test.rb'
205
- - 'test/docs/model_test.rb'
206
- - 'test/docs/nested_test.rb'
207
- - 'test/docs/pundit_test.rb'
208
- - 'test/docs/rescue_test.rb'
209
- - 'test/docs/wrap_test.rb'
210
- - 'test/operation/model_test.rb'
211
- - 'test/operation/pundit_test.rb'
212
-
213
- # Offense count: 3
214
- Lint/AmbiguousBlockAssociation:
215
- Exclude:
216
- - 'test/docs/rescue_test.rb'
217
-
218
- # Offense count: 2
219
- Lint/AmbiguousRegexpLiteral:
220
- Exclude:
221
- - 'test/docs/rescue_test.rb'
222
- - 'test/docs/wrap_test.rb'
223
-
224
- # Offense count: 1
225
- # Cop supports --auto-correct.
226
- Lint/UnneededCopDisableDirective:
227
- Exclude:
228
- - 'lib/trailblazer-macro.rb'
229
-
230
- # Offense count: 13
231
- # Cop supports --auto-correct.
232
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
233
- Lint/UnusedBlockArgument:
234
- Exclude:
235
- - 'lib/trailblazer/macro/rescue.rb'
236
- - 'lib/trailblazer/macro/wrap.rb'
237
- - 'test/docs/guard_test.rb'
238
- - 'test/docs/macro_test.rb'
239
- - 'test/test_helper.rb'
240
-
241
- # Offense count: 17
242
- # Cop supports --auto-correct.
243
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
244
- Lint/UnusedMethodArgument:
245
- Exclude:
246
- - 'lib/trailblazer/macro/guard.rb'
247
- - 'lib/trailblazer/macro/model.rb'
248
- - 'lib/trailblazer/macro/nested.rb'
249
- - 'lib/trailblazer/macro/policy.rb'
250
- - 'test/docs/guard_test.rb'
251
- - 'test/docs/wrap_test.rb'
252
- - 'test/test_helper.rb'
253
-
254
- # Offense count: 6
255
- Lint/UselessAssignment:
256
- Exclude:
257
- - 'lib/trailblazer/macro/nested.rb'
258
- - 'test/docs/model_test.rb'
259
- - 'test/docs/nested_test.rb'
260
- - 'test/docs/wrap_test.rb'
261
-
262
- # Offense count: 28
263
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
264
- # URISchemes: http, https
265
- Metrics/LineLength:
266
- Max: 219
267
-
268
- # Offense count: 5
269
- # Configuration parameters: .
270
- # SupportedStyles: snake_case, camelCase
271
- Naming/MethodName:
272
- EnforcedStyle: snake_case
273
-
274
- # Offense count: 1
275
- # Cop supports --auto-correct.
276
- Performance/StringReplacement:
277
- Exclude:
278
- - 'test/docs/wrap_test.rb'
279
-
280
- # Offense count: 1
281
- # Configuration parameters: EnforcedStyle.
282
- # SupportedStyles: inline, group
283
- Style/AccessModifierDeclarations:
284
- Exclude:
285
- - 'lib/trailblazer/macro/wrap.rb'
286
-
287
- # Offense count: 13
288
- # Cop supports --auto-correct.
289
- Style/BlockComments:
290
- Exclude:
291
- - 'test/docs/macro_test.rb'
292
- - 'test/docs/nested_test.rb'
293
- - 'test/docs/rescue_test.rb'
294
- - 'test/docs/wrap_test.rb'
295
-
296
- # Offense count: 18
297
- # Cop supports --auto-correct.
298
- # Configuration parameters: EnforcedStyle.
299
- # SupportedStyles: braces, no_braces, context_dependent
300
- Style/BracesAroundHashParameters:
301
- Exclude:
302
- - 'test/docs/rescue_test.rb'
303
- - 'test/docs/wrap_test.rb'
304
-
305
- # Offense count: 1
306
- # Cop supports --auto-correct.
307
- # Configuration parameters: EnforcedStyle.
308
- # SupportedStyles: is_a?, kind_of?
309
- Style/ClassCheck:
310
- Exclude:
311
- - 'lib/trailblazer/macro/nested.rb'
312
-
313
- # Offense count: 1
314
- # Cop supports --auto-correct.
315
- # Configuration parameters: Keywords.
316
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
317
- Style/CommentAnnotation:
318
- Exclude:
319
- - 'test/docs/pundit_test.rb'
320
-
321
- # Offense count: 1
322
- Style/CommentedKeyword:
323
- Exclude:
324
- - 'lib/trailblazer/macro/wrap.rb'
325
-
326
- # Offense count: 1
327
- Style/DoubleNegation:
328
- Exclude:
329
- - 'lib/trailblazer/macro/guard.rb'
330
-
331
- # Offense count: 1
332
- # Cop supports --auto-correct.
333
- Style/ExpandPathArguments:
334
- Exclude:
335
- - 'trailblazer-macro.gemspec'
336
-
337
- # Offense count: 1
338
- # Cop supports --auto-correct.
339
- # Configuration parameters: EnforcedStyle.
340
- # SupportedStyles: line_count_dependent, lambda, literal
341
- Style/Lambda:
342
- Exclude:
343
- - 'lib/trailblazer/macro/rescue.rb'
344
-
345
- # Offense count: 1
346
- Style/MultilineTernaryOperator:
347
- Exclude:
348
- - 'lib/trailblazer/macro/nested.rb'
349
-
350
- # Offense count: 1
351
- # Cop supports --auto-correct.
352
- # Configuration parameters: EnforcedStyle.
353
- # SupportedStyles: both, prefix, postfix
354
- Style/NegatedIf:
355
- Exclude:
356
- - 'lib/trailblazer/macro/pundit.rb'
357
-
358
- # Offense count: 3
359
- # Cop supports --auto-correct.
360
- Style/ParallelAssignment:
361
- Exclude:
362
- - 'lib/trailblazer/macro/pundit.rb'
363
- - 'test/docs/pundit_test.rb'
364
- - 'test/operation/pundit_test.rb'
365
-
366
- # Offense count: 6
367
- # Cop supports --auto-correct.
368
- Style/RedundantBegin:
369
- Exclude:
370
- - 'lib/trailblazer/macro/rescue.rb'
371
- - 'test/docs/wrap_test.rb'
372
-
373
- # Offense count: 5
374
- # Cop supports --auto-correct.
375
- # Configuration parameters: EnforcedStyle.
376
- # SupportedStyles: implicit, explicit
377
- Style/RescueStandardError:
378
- Exclude:
379
- - 'test/docs/wrap_test.rb'
380
-
381
- # Offense count: 2
382
- # Cop supports --auto-correct.
383
- # Configuration parameters: EnforcedStyle.
384
- # SupportedStyles: return, return_nil
385
- Style/ReturnNil:
386
- Exclude:
387
- - 'test/docs/model_test.rb'
388
- - 'test/operation/model_test.rb'
389
-
390
- # Offense count: 3
391
- Style/Send:
392
- Exclude:
393
- - 'lib/trailblazer/macro/model.rb'
394
- - 'lib/trailblazer/macro/pundit.rb'
395
-
396
- # Offense count: 3
397
- # Cop supports --auto-correct.
398
- # Configuration parameters: EnforcedStyle.
399
- # SupportedStyles: only_raise, only_fail, semantic
400
- Style/SignalException:
401
- Exclude:
402
- - 'test/docs/rescue_test.rb'
403
- - 'test/test_helper.rb'
404
-
405
- # Offense count: 5
406
- # Cop supports --auto-correct.
407
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
408
- # SupportedStyles: single_quotes, double_quotes
409
- Style/StringLiterals:
410
- Exclude:
411
- - 'Gemfile'
412
- - 'Rakefile'
413
- - 'trailblazer-macro.gemspec'
414
-
415
- # Offense count: 4
416
- # Cop supports --auto-correct.
417
- # Configuration parameters: EnforcedStyleForMultiline.
418
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
419
- Style/TrailingCommaInHashLiteral:
420
- Exclude:
421
- - 'lib/trailblazer/macro/nested.rb'
422
- - 'lib/trailblazer/macro/wrap.rb'
423
- - 'test/docs/rescue_test.rb'