reform 2.3.1 → 2.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f22b2268e248120b5738d5387d464d8563d661d6749a6c371ed1172d9c3fb18b
4
- data.tar.gz: 534162094e74586a1c73634f1394f8ef8f37bb79b970c7003d37773c1f2109a1
3
+ metadata.gz: 1632a1964f6950c4451e586caae9bfe4766501e22c6e7961c442aae3327c6b8f
4
+ data.tar.gz: cfa18510a8fad6eab78a5d7ffdb890b3f8e80dbbe2dcb7390a386fded0b7f479
5
5
  SHA512:
6
- metadata.gz: d1f26ff2eb879a16cea3a230fb0fccf97525cf72321941b48312d47ed47e5a9759f67e44c9cd68057adf020ec0374706ae4991b9b29141b46ee963ef4e218d31
7
- data.tar.gz: 77c4f8dc39bb7616e12b2b8c74f3f45e0b9285bd95dcc0a9a7206e35905c1b4ef956ab87eef49b20b87efc322578e047caa0f84cc30024ff236320af93764308
6
+ metadata.gz: af8948ced80b6370a1878317d5cb99609c64e073c6206c511825358a9535de70f1ef34791d06fd240f864554b00ef8e04a595b8993aefa8d9f49580b6644c226
7
+ data.tar.gz: c3f5a610f6dad84cb451f8880aa84294cfbf610649fc33aba20cf69b0be0414868b77756843b3c842a872c54dfbab759f40b15505b2e19c3075e5010119076c5
data/CHANGES.md CHANGED
@@ -1,7 +1,6 @@
1
- ## 3.0.0
1
+ ## 2.3.2
2
2
 
3
- [* Removed `Reform::Contract` ?]
4
- [* Move Form#deserializer to Form::deserializer]
3
+ * Fix Validation block option :form incorrectly memoized between tests
5
4
 
6
5
  ## 2.3.1
7
6
  * With dry-validation 1.5 the form is always injected. Just add option :form to access it in the schema.
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
- require "rubocop/rake_task"
4
3
  require "dry/types/version"
5
4
 
6
5
  task default: %i[test]
@@ -21,4 +20,3 @@ Rake::TestTask.new(:test) do |test|
21
20
  test.verbose = true
22
21
  end
23
22
 
24
- RuboCop::RakeTask.new(:rubocop)
@@ -25,6 +25,8 @@ module Reform::Form::Dry
25
25
  @schema_inject_params = options.fetch(:with, {})
26
26
  end
27
27
 
28
+ attr_reader :validator, :schema_inject_params, :block
29
+
28
30
  def instance_exec(&block)
29
31
  @block = block
30
32
  end
@@ -32,13 +34,12 @@ module Reform::Form::Dry
32
34
  def call(form)
33
35
  # when passing options[:schema] the class instance is already created so we just need to call
34
36
  # "call"
35
- if @validator.is_a?(Class) && @validator <= ::Dry::Validation::Contract
36
- dynamic_options = {form: form}
37
- inject_options = @schema_inject_params.merge(dynamic_options)
38
- @validator = @validator.build(inject_options, &@block)
39
- end
37
+ return validator.call(input_hash(form)) unless validator.is_a?(Class) && @validator <= ::Dry::Validation::Contract
38
+
39
+ dynamic_options = { form: form }
40
+ inject_options = schema_inject_params.merge(dynamic_options)
40
41
 
41
- @validator.call(input_hash(form))
42
+ validator.build(inject_options, &block).call(input_hash(form))
42
43
  end
43
44
  end
44
45
  end
@@ -1,3 +1,3 @@
1
1
  module Reform
2
- VERSION = "2.3.1".freeze
2
+ VERSION = "2.3.2".freeze
3
3
  end
@@ -27,5 +27,4 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "pry-byebug"
28
28
  spec.add_development_dependency "multi_json"
29
29
  spec.add_development_dependency "rake"
30
- spec.add_development_dependency "rubocop"
31
30
  end
@@ -278,6 +278,51 @@ class ValidateWithInternalPopulatorOptionTest < MiniTest::Spec
278
278
  end
279
279
  end
280
280
 
281
+ class ValidateUsingDifferentFormObject < MiniTest::Spec
282
+ Album = Struct.new(:name)
283
+
284
+ class AlbumForm < TestForm
285
+ property :name
286
+
287
+ validation do
288
+ option :form
289
+
290
+ params { required(:name).filled(:str?) }
291
+
292
+ rule(:name) do
293
+ if form.name == 'invalid'
294
+ key.failure('Invalid name')
295
+ end
296
+ end
297
+ end
298
+ end
299
+
300
+ let(:album) { Album.new }
301
+
302
+ let(:form) { AlbumForm.new(album) }
303
+
304
+ it 'sets name correctly' do
305
+ assert form.validate(name: 'valid')
306
+ form.sync
307
+ assert_equal form.model.name, 'valid'
308
+ end
309
+
310
+ it 'validates presence of name' do
311
+ refute form.validate(name: nil)
312
+ assert_equal form.errors[:name], ["must be filled"]
313
+ end
314
+
315
+ it 'validates type of name' do
316
+ refute form.validate(name: 1)
317
+ assert_equal form.errors[:name], ["must be a string"]
318
+ end
319
+
320
+ it 'when name is invalid' do
321
+ refute form.validate(name: 'invalid')
322
+ assert_equal form.errors[:name], ["Invalid name"]
323
+ end
324
+ end
325
+
281
326
  # # not sure if we should catch that in Reform or rather do that in disposable. this is https://github.com/trailblazer/reform/pull/104
282
327
  # # describe ":populator with :empty" do
283
328
  # # let(:form) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reform
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-05-22 00:00:00.000000000 Z
12
+ date: 2020-07-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: disposable
@@ -149,20 +149,6 @@ dependencies:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
- - !ruby/object:Gem::Dependency
153
- name: rubocop
154
- requirement: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - ">="
157
- - !ruby/object:Gem::Version
158
- version: '0'
159
- type: :development
160
- prerelease: false
161
- version_requirements: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - ">="
164
- - !ruby/object:Gem::Version
165
- version: '0'
166
152
  description: Form object decoupled from models.
167
153
  email:
168
154
  - apotonick@gmail.com
@@ -172,8 +158,6 @@ extensions: []
172
158
  extra_rdoc_files: []
173
159
  files:
174
160
  - ".gitignore"
175
- - ".rubocop.yml"
176
- - ".rubocop_todo.yml"
177
161
  - ".travis.yml"
178
162
  - Appraisals
179
163
  - CHANGES.md
@@ -278,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
278
262
  - !ruby/object:Gem::Version
279
263
  version: '0'
280
264
  requirements: []
281
- rubygems_version: 3.0.6
265
+ rubygems_version: 3.0.3
282
266
  signing_key:
283
267
  specification_version: 4
284
268
  summary: Form object decoupled from models with validation, population and presentation.
@@ -1,30 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: '2.3'
3
-
4
- inherit_from:
5
- - https://raw.githubusercontent.com/trailblazer/meta/master/rubocop.yml
6
- - .rubocop_todo.yml
7
-
8
- Metrics/ClassLength:
9
- Max: 150
10
-
11
- Lint/AssignmentInCondition:
12
- Enabled: false
13
-
14
- Style/ClassAndModuleChildren:
15
- Enabled: false
16
-
17
- Style/OptionHash:
18
- Enabled: false
19
-
20
- Style/ParallelAssignment:
21
- Enabled: false
22
-
23
- Style/Send:
24
- Enabled: false
25
-
26
- Style/SingleLineMethods:
27
- Enabled: false
28
-
29
- Style/Lambda:
30
- EnforcedStyle: literal
@@ -1,460 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2019-08-18 11:55:38 +1000 using RuboCop version 0.74.0.
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
- # Cop supports --auto-correct.
11
- # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
12
- # Include: **/*.gemspec
13
- Gemspec/OrderedDependencies:
14
- Exclude:
15
- - 'reform.gemspec'
16
-
17
- # Offense count: 1
18
- # Cop supports --auto-correct.
19
- # Configuration parameters: EnforcedStyle, IndentationWidth.
20
- # SupportedStyles: outdent, indent
21
- Layout/AccessModifierIndentation:
22
- Exclude:
23
- - 'test/populate_test.rb'
24
-
25
- # Offense count: 6
26
- # Cop supports --auto-correct.
27
- # Configuration parameters: EnforcedStyle, IndentationWidth.
28
- # SupportedStyles: with_first_argument, with_fixed_indentation
29
- Layout/AlignArguments:
30
- Exclude:
31
- - 'test/deserialize_test.rb'
32
- - 'test/populate_test.rb'
33
- - 'test/validate_test.rb'
34
-
35
- # Offense count: 4
36
- # Cop supports --auto-correct.
37
- Layout/AlignArray:
38
- Exclude:
39
- - 'test/populate_test.rb'
40
-
41
- # Offense count: 56
42
- # Cop supports --auto-correct.
43
- # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
44
- # SupportedHashRocketStyles: key, separator, table
45
- # SupportedColonStyles: key, separator, table
46
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
47
- Layout/AlignHash:
48
- Exclude:
49
- - 'test/coercion_test.rb'
50
- - 'test/composition_test.rb'
51
- - 'test/errors_test.rb'
52
- - 'test/populate_test.rb'
53
- - 'test/validate_test.rb'
54
- - 'test/validation/dry_validation_test.rb'
55
- - 'test/validation/result_test.rb'
56
-
57
- # Offense count: 2
58
- # Cop supports --auto-correct.
59
- # Configuration parameters: EnforcedStyleAlignWith.
60
- # SupportedStylesAlignWith: either, start_of_block, start_of_line
61
- Layout/BlockAlignment:
62
- Exclude:
63
- - 'lib/reform/errors.rb'
64
- - 'test/from_test.rb'
65
-
66
- # Offense count: 2
67
- # Cop supports --auto-correct.
68
- Layout/BlockEndNewline:
69
- Exclude:
70
- - 'test/populate_test.rb'
71
- - 'test/validate_test.rb'
72
-
73
- # Offense count: 1
74
- # Cop supports --auto-correct.
75
- Layout/ClosingParenthesisIndentation:
76
- Exclude:
77
- - 'test/composition_test.rb'
78
-
79
- # Offense count: 7
80
- # Cop supports --auto-correct.
81
- Layout/EmptyLineAfterGuardClause:
82
- Exclude:
83
- - 'lib/reform/form/populator.rb'
84
- - 'lib/reform/form/prepopulate.rb'
85
- - 'lib/reform/validation/groups.rb'
86
- - 'test/populator_skip_test.rb'
87
-
88
- # Offense count: 1
89
- # Cop supports --auto-correct.
90
- Layout/EmptyLineAfterMagicComment:
91
- Exclude:
92
- - 'test/validation/dry_validation_test.rb'
93
-
94
- # Offense count: 3
95
- # Cop supports --auto-correct.
96
- # Configuration parameters: EnforcedStyle.
97
- # SupportedStyles: around, only_before
98
- Layout/EmptyLinesAroundAccessModifier:
99
- Exclude:
100
- - 'test/populate_test.rb'
101
- - 'test/prepopulator_test.rb'
102
-
103
- # Offense count: 10
104
- # Cop supports --auto-correct.
105
- # Configuration parameters: EnforcedStyle.
106
- # SupportedStyles: empty_lines, no_empty_lines
107
- Layout/EmptyLinesAroundBlockBody:
108
- Exclude:
109
- - 'test/from_test.rb'
110
- - 'test/inherit_test.rb'
111
- - 'test/populate_test.rb'
112
- - 'test/validate_test.rb'
113
- - 'test/validation/dry_validation_test.rb'
114
-
115
- # Offense count: 3
116
- # Cop supports --auto-correct.
117
- # Configuration parameters: EnforcedStyle.
118
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
119
- Layout/EmptyLinesAroundClassBody:
120
- Exclude:
121
- - 'test/skip_if_test.rb'
122
- - 'test/validation/dry_validation_test.rb'
123
-
124
- # Offense count: 8
125
- # Cop supports --auto-correct.
126
- # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
127
- Layout/ExtraSpacing:
128
- Exclude:
129
- - 'test/benchmarking.rb'
130
- - 'test/composition_test.rb'
131
- - 'test/populate_test.rb'
132
- - 'test/prepopulator_test.rb'
133
- - 'test/validation/dry_validation_test.rb'
134
-
135
- # Offense count: 2
136
- # Cop supports --auto-correct.
137
- Layout/FirstArrayElementLineBreak:
138
- Exclude:
139
- - 'test/populate_test.rb'
140
-
141
- # Offense count: 3
142
- # Cop supports --auto-correct.
143
- Layout/FirstHashElementLineBreak:
144
- Exclude:
145
- - 'test/validate_test.rb'
146
- - 'test/validation/dry_validation_test.rb'
147
- - 'test/validation/result_test.rb'
148
-
149
- # Offense count: 4
150
- # Cop supports --auto-correct.
151
- Layout/FirstMethodArgumentLineBreak:
152
- Exclude:
153
- - 'test/deserialize_test.rb'
154
- - 'test/validation/dry_validation_test.rb'
155
-
156
- # Offense count: 1
157
- # Cop supports --auto-correct.
158
- # Configuration parameters: EnforcedStyle.
159
- # SupportedStyles: normal, indented_internal_methods
160
- Layout/IndentationConsistency:
161
- Exclude:
162
- - 'test/benchmarking.rb'
163
-
164
- # Offense count: 5
165
- # Cop supports --auto-correct.
166
- # Configuration parameters: Width, IgnoredPatterns.
167
- Layout/IndentationWidth:
168
- Exclude:
169
- - 'lib/reform/errors.rb'
170
- - 'test/benchmarking.rb'
171
- - 'test/prepopulator_test.rb'
172
-
173
- # Offense count: 4
174
- # Cop supports --auto-correct.
175
- # Configuration parameters: AllowDoxygenCommentStyle.
176
- Layout/LeadingCommentSpace:
177
- Exclude:
178
- - 'test/docs/**/*'
179
- - 'test/benchmarking.rb'
180
-
181
- # Offense count: 1
182
- # Cop supports --auto-correct.
183
- # Configuration parameters: EnforcedStyle.
184
- # SupportedStyles: symmetrical, new_line, same_line
185
- Layout/MultilineHashBraceLayout:
186
- Exclude:
187
- - 'test/validation/result_test.rb'
188
-
189
- # Offense count: 3
190
- # Cop supports --auto-correct.
191
- # Configuration parameters: EnforcedStyle.
192
- # SupportedStyles: symmetrical, new_line, same_line
193
- Layout/MultilineMethodCallBraceLayout:
194
- Exclude:
195
- - 'test/composition_test.rb'
196
- - 'test/deserialize_test.rb'
197
-
198
- # Offense count: 1
199
- # Cop supports --auto-correct.
200
- # Configuration parameters: EnforcedStyle, IndentationWidth.
201
- # SupportedStyles: aligned, indented, indented_relative_to_receiver
202
- Layout/MultilineMethodCallIndentation:
203
- Exclude:
204
- - 'test/validation/dry_validation_test.rb'
205
-
206
- # Offense count: 3
207
- # Cop supports --auto-correct.
208
- # Configuration parameters: AllowForAlignment.
209
- Layout/SpaceAroundOperators:
210
- Exclude:
211
- - 'lib/reform/form.rb'
212
- - 'lib/reform/form/dry.rb'
213
-
214
- # Offense count: 3
215
- # Cop supports --auto-correct.
216
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
217
- # SupportedStyles: space, no_space, compact
218
- # SupportedStylesForEmptyBraces: space, no_space
219
- Layout/SpaceInsideHashLiteralBraces:
220
- Exclude:
221
- - 'Gemfile'
222
- - 'lib/reform/form.rb'
223
-
224
- # Offense count: 7
225
- # Cop supports --auto-correct.
226
- # Configuration parameters: IndentationWidth.
227
- Layout/Tab:
228
- Exclude:
229
- - 'lib/reform/errors.rb'
230
- - 'test/benchmarking.rb'
231
-
232
- # Offense count: 3
233
- Lint/IneffectiveAccessModifier:
234
- Exclude:
235
- - 'lib/reform/contract.rb'
236
- - 'lib/reform/form/validate.rb'
237
-
238
- # Offense count: 12
239
- # Cop supports --auto-correct.
240
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
241
- Lint/UnusedBlockArgument:
242
- Exclude:
243
- - 'lib/reform/errors.rb'
244
- - 'lib/reform/form.rb'
245
- - 'lib/reform/result.rb'
246
- - 'test/composition_test.rb'
247
- - 'test/parse_pipeline_test.rb'
248
- - 'test/populate_test.rb'
249
- - 'test/validate_test.rb'
250
- - 'test/validation/dry_validation_test.rb'
251
-
252
- # Offense count: 10
253
- # Cop supports --auto-correct.
254
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
255
- Lint/UnusedMethodArgument:
256
- Exclude:
257
- - 'lib/reform/contract/validate.rb'
258
- - 'lib/reform/errors.rb'
259
- - 'lib/reform/form/populator.rb'
260
- - 'lib/reform/form/validate.rb'
261
- - 'test/inherit_test.rb'
262
- - 'test/populate_test.rb'
263
- - 'test/prepopulator_test.rb'
264
-
265
- # Offense count: 2
266
- # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
267
- Lint/UselessAccessModifier:
268
- Exclude:
269
- - 'lib/reform/contract.rb'
270
- - 'test/populate_test.rb'
271
-
272
- # Offense count: 4
273
- Lint/UselessAssignment:
274
- Exclude:
275
- - 'lib/reform/form.rb'
276
- - 'lib/reform/form/dry.rb'
277
- - 'test/benchmarking.rb'
278
-
279
- # Offense count: 42
280
- # Cop supports --auto-correct.
281
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
282
- # URISchemes: http, https
283
- Metrics/LineLength:
284
- Max: 271
285
-
286
- # Offense count: 1
287
- # Configuration parameters: EnforcedStyleForLeadingUnderscores.
288
- # SupportedStylesForLeadingUnderscores: disallowed, required, optional
289
- Naming/MemoizedInstanceVariableName:
290
- Exclude:
291
- - 'lib/reform/validation.rb'
292
-
293
- # Offense count: 39
294
- # Cop supports --auto-correct.
295
- # Configuration parameters: EnforcedStyle.
296
- # SupportedStyles: braces, no_braces, context_dependent
297
- Style/BracesAroundHashParameters:
298
- Exclude:
299
- - 'test/call_test.rb'
300
- - 'test/composition_test.rb'
301
- - 'test/deserialize_test.rb'
302
- - 'test/from_test.rb'
303
- - 'test/module_test.rb'
304
- - 'test/reform_test.rb'
305
- - 'test/save_test.rb'
306
- - 'test/validation/dry_validation_test.rb'
307
- - 'test/validation/result_test.rb'
308
-
309
- # Offense count: 1
310
- # Cop supports --auto-correct.
311
- # Configuration parameters: Keywords.
312
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
313
- Style/CommentAnnotation:
314
- Exclude:
315
- - 'test/errors_test.rb'
316
-
317
- # Offense count: 9
318
- Style/CommentedKeyword:
319
- Exclude:
320
- - 'lib/reform/contract.rb'
321
- - 'lib/reform/form/populator.rb'
322
- - 'lib/reform/form/validate.rb'
323
- - 'lib/reform/result.rb'
324
- - 'test/module_test.rb'
325
- - 'test/reform_test.rb'
326
-
327
- # Offense count: 1
328
- # Cop supports --auto-correct.
329
- Style/Encoding:
330
- Exclude:
331
- - 'test/validation/dry_validation_test.rb'
332
-
333
- # Offense count: 1
334
- # Cop supports --auto-correct.
335
- Style/IfUnlessModifier:
336
- Exclude:
337
- - 'lib/reform/form.rb'
338
-
339
- # Offense count: 1
340
- Style/ImplicitRuntimeError:
341
- Exclude:
342
- - 'lib/reform/form/populator.rb'
343
-
344
- # Offense count: 1
345
- # Cop supports --auto-correct.
346
- Style/LineEndConcatenation:
347
- Exclude:
348
- - 'lib/reform/validation.rb'
349
-
350
- # Offense count: 1
351
- # Cop supports --auto-correct.
352
- # Configuration parameters: IgnoredMethods.
353
- Style/MethodCallWithoutArgsParentheses:
354
- Exclude:
355
- - 'test/reform_test.rb'
356
-
357
- # Offense count: 1
358
- Style/MethodMissingSuper:
359
- Exclude:
360
- - 'lib/reform/form/module.rb'
361
-
362
- # Offense count: 1
363
- # Configuration parameters: EnforcedStyle.
364
- # SupportedStyles: if, case, both
365
- Style/MissingElse:
366
- Exclude:
367
- - 'test/composition_test.rb'
368
-
369
- # Offense count: 1
370
- Style/MissingRespondToMissing:
371
- Exclude:
372
- - 'lib/reform/form/module.rb'
373
-
374
- # Offense count: 1
375
- # Cop supports --auto-correct.
376
- # Configuration parameters: EnforcedStyle.
377
- # SupportedStyles: predicate, comparison
378
- Style/NilComparison:
379
- Exclude:
380
- - 'test/prepopulator_test.rb'
381
-
382
- # Offense count: 2
383
- # Cop supports --auto-correct.
384
- # Configuration parameters: PreferredDelimiters.
385
- Style/PercentLiteralDelimiters:
386
- Exclude:
387
- - 'reform.gemspec'
388
- - 'test/validation/dry_validation_test.rb'
389
-
390
- # Offense count: 1
391
- # Cop supports --auto-correct.
392
- # Configuration parameters: EnforcedStyle.
393
- # SupportedStyles: compact, exploded
394
- Style/RaiseArgs:
395
- Exclude:
396
- - 'lib/reform/form.rb'
397
-
398
- # Offense count: 1
399
- # Cop supports --auto-correct.
400
- Style/RedundantParentheses:
401
- Exclude:
402
- - 'test/populate_test.rb'
403
-
404
- # Offense count: 1
405
- # Cop supports --auto-correct.
406
- Style/RedundantSelf:
407
- Exclude:
408
- - 'lib/reform/validation/groups.rb'
409
-
410
- # Offense count: 3
411
- # Cop supports --auto-correct.
412
- # Configuration parameters: EnforcedStyle.
413
- # SupportedStyles: only_raise, only_fail, semantic
414
- Style/SignalException:
415
- Exclude:
416
- - 'lib/reform/form.rb'
417
- - 'lib/reform/form/populator.rb'
418
- - 'lib/reform/validation.rb'
419
-
420
- # Offense count: 1
421
- # Cop supports --auto-correct.
422
- # Configuration parameters: EnforcedStyle.
423
- # SupportedStyles: use_perl_names, use_english_names
424
- Style/SpecialGlobalVars:
425
- Exclude:
426
- - 'reform.gemspec'
427
-
428
- # Offense count: 4
429
- # Cop supports --auto-correct.
430
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
431
- # SupportedStyles: single_quotes, double_quotes
432
- Style/StringLiterals:
433
- Exclude:
434
- - 'Gemfile'
435
-
436
- # Offense count: 1
437
- # Cop supports --auto-correct.
438
- # Configuration parameters: IgnoredMethods.
439
- # IgnoredMethods: respond_to, define_method
440
- Style/SymbolProc:
441
- Exclude:
442
- - 'lib/reform/errors.rb'
443
-
444
- # Offense count: 8
445
- # Cop supports --auto-correct.
446
- # Configuration parameters: EnforcedStyleForMultiline.
447
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
448
- Style/TrailingCommaInArguments:
449
- Exclude:
450
- - 'test/populate_test.rb'
451
- - 'test/validate_test.rb'
452
- - 'test/validation/dry_validation_test.rb'
453
-
454
- # Offense count: 1
455
- # Cop supports --auto-correct.
456
- # Configuration parameters: EnforcedStyleForMultiline.
457
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
458
- Style/TrailingCommaInHashLiteral:
459
- Exclude:
460
- - 'test/validation/result_test.rb'