reform-rails 0.2.2 → 0.2.4
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/.github/workflows/ci.yml +28 -0
- data/CHANGES.md +9 -0
- data/lib/reform/form/active_model/validations.rb +4 -2
- data/lib/reform/form/active_model.rb +2 -4
- data/lib/reform/rails/version.rb +1 -1
- metadata +7 -9
- data/.rubocop.yml +0 -3
- data/.rubocop_todo.yml +0 -661
- data/.travis.yml +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 517a3912b77e3e81b2a86ef61dfb1e3c4d552258de8f6630fb4144551447b858
|
4
|
+
data.tar.gz: e30f051b92acde0a70a27d82bffd53c166a1cb9a2253c41101c126e741d08bdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e35493c33bb127e2fef2be4379fff16c45f17e25718c4d39956176f08619bf6cfc8dd2019afb9fb98ed39ba12c1f52986b447e952be46671da62bfe60ae4daa
|
7
|
+
data.tar.gz: 9583ec0b967f22a1611c1d808a59d9c51234cf1717bbef1c81c140eececb59e39a880547d8f7bc20634a89d6debaa750827bc3db6645fd525db0eecfbdacce58
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
strategy:
|
6
|
+
fail-fast: false
|
7
|
+
matrix:
|
8
|
+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
9
|
+
ruby: [2.5, 2.6, 2.7, '3.0', head]
|
10
|
+
rails: ['6.1', '6.0', '5.2']
|
11
|
+
mongodb-version: ['4.4']
|
12
|
+
exclude:
|
13
|
+
- ruby: '3.0'
|
14
|
+
rails: 5.2
|
15
|
+
- ruby: head
|
16
|
+
rails: 5.2
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- uses: supercharge/mongodb-github-action@1.6.0
|
21
|
+
with:
|
22
|
+
mongodb-version: ${{ matrix.mongodb-version }}
|
23
|
+
- uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby }}
|
26
|
+
# bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
27
|
+
- run: RAILS_VERSION=${{ matrix.rails }} bundle install
|
28
|
+
- run: RAILS_VERSION=${{ matrix.rails }} bundle exec rake
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 0.2.4
|
2
|
+
|
3
|
+
* Fix keyword argument warning in `method_missing` (https://github.com/trailblazer/reform-rails/pull/97)
|
4
|
+
* Internal: Replace Uber::Delegates with Forwardable in Form::ActiveModel
|
5
|
+
|
6
|
+
# 0.2.3
|
7
|
+
|
8
|
+
* Fix deprecation warning related to `respond_to?`
|
9
|
+
|
1
10
|
# 0.2.2
|
2
11
|
|
3
12
|
* Support ActiveRecord 6.1
|
@@ -161,9 +161,10 @@ module Reform
|
|
161
161
|
def method_missing(m, *args, &block)
|
162
162
|
@amv_errors.send(m, *args, &block) # send all methods to the AMV errors, even privates.
|
163
163
|
end
|
164
|
+
ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
|
164
165
|
|
165
|
-
def respond_to?(method)
|
166
|
-
@amv_errors.respond_to?(method) ? true : super
|
166
|
+
def respond_to?(method, include_all = false)
|
167
|
+
@amv_errors.respond_to?(method, include_all) ? true : super
|
167
168
|
end
|
168
169
|
|
169
170
|
def full_messages
|
@@ -233,6 +234,7 @@ module Reform
|
|
233
234
|
def method_missing(m, *args, &block)
|
234
235
|
__getobj__.send(m, *args, &block) # send all methods to the form, even privates.
|
235
236
|
end
|
237
|
+
ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
|
236
238
|
end
|
237
239
|
end
|
238
240
|
|
@@ -1,13 +1,11 @@
|
|
1
|
-
require "uber/delegates"
|
2
|
-
|
3
1
|
module Reform::Form::ActiveModel
|
4
2
|
def self.included(base)
|
5
3
|
base.class_eval do
|
6
4
|
extend ClassMethods
|
7
5
|
register_feature ActiveModel
|
8
6
|
|
9
|
-
extend
|
10
|
-
|
7
|
+
extend Forwardable
|
8
|
+
def_delegators :model, :persisted?, :to_key, :to_param, :id
|
11
9
|
|
12
10
|
def to_model # this is called somewhere in FormBuilder and ActionController.
|
13
11
|
self
|
data/lib/reform/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reform-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reform
|
@@ -52,10 +52,8 @@ executables: []
|
|
52
52
|
extensions: []
|
53
53
|
extra_rdoc_files: []
|
54
54
|
files:
|
55
|
+
- ".github/workflows/ci.yml"
|
55
56
|
- ".gitignore"
|
56
|
-
- ".rubocop.yml"
|
57
|
-
- ".rubocop_todo.yml"
|
58
|
-
- ".travis.yml"
|
59
57
|
- CHANGES.md
|
60
58
|
- Gemfile
|
61
59
|
- LICENSE.txt
|
@@ -82,7 +80,7 @@ homepage: https://github.com/trailblazer/reform-rails
|
|
82
80
|
licenses:
|
83
81
|
- MIT
|
84
82
|
metadata: {}
|
85
|
-
post_install_message:
|
83
|
+
post_install_message:
|
86
84
|
rdoc_options: []
|
87
85
|
require_paths:
|
88
86
|
- lib
|
@@ -97,8 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
95
|
- !ruby/object:Gem::Version
|
98
96
|
version: '0'
|
99
97
|
requirements: []
|
100
|
-
rubygems_version: 3.
|
101
|
-
signing_key:
|
98
|
+
rubygems_version: 3.4.6
|
99
|
+
signing_key:
|
102
100
|
specification_version: 4
|
103
101
|
summary: Automatically load and include all common Rails form features.
|
104
102
|
test_files: []
|
data/.rubocop.yml
DELETED
data/.rubocop_todo.yml
DELETED
@@ -1,661 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2019-10-31 18:47:53 +1100 using RuboCop version 0.76.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: 3
|
10
|
-
# Configuration parameters: Include.
|
11
|
-
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
12
|
-
Bundler/DuplicatedGem:
|
13
|
-
Exclude:
|
14
|
-
- 'Gemfile'
|
15
|
-
|
16
|
-
# Offense count: 1
|
17
|
-
# Cop supports --auto-correct.
|
18
|
-
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
|
19
|
-
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
20
|
-
Bundler/OrderedGems:
|
21
|
-
Exclude:
|
22
|
-
- 'Gemfile'
|
23
|
-
|
24
|
-
# Offense count: 1
|
25
|
-
# Cop supports --auto-correct.
|
26
|
-
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
|
27
|
-
# Include: **/*.gemspec
|
28
|
-
Gemspec/OrderedDependencies:
|
29
|
-
Exclude:
|
30
|
-
- 'reform-rails.gemspec'
|
31
|
-
|
32
|
-
# Offense count: 5
|
33
|
-
# Cop supports --auto-correct.
|
34
|
-
# Configuration parameters: IndentationWidth.
|
35
|
-
# SupportedStyles: outdent, indent
|
36
|
-
Layout/AccessModifierIndentation:
|
37
|
-
EnforcedStyle: outdent
|
38
|
-
|
39
|
-
# Offense count: 13
|
40
|
-
# Cop supports --auto-correct.
|
41
|
-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
42
|
-
# SupportedHashRocketStyles: key, separator, table
|
43
|
-
# SupportedColonStyles: key, separator, table
|
44
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
45
|
-
Layout/AlignHash:
|
46
|
-
Exclude:
|
47
|
-
- 'test/activemodel_validation_test.rb'
|
48
|
-
- 'test/form_builder_test.rb'
|
49
|
-
- 'test/test_helper.rb'
|
50
|
-
|
51
|
-
# Offense count: 2
|
52
|
-
# Cop supports --auto-correct.
|
53
|
-
# Configuration parameters: EnforcedStyleAlignWith.
|
54
|
-
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
55
|
-
Layout/BlockAlignment:
|
56
|
-
Exclude:
|
57
|
-
- 'reform-rails.gemspec'
|
58
|
-
- 'test/activemodel_validation_test.rb'
|
59
|
-
|
60
|
-
# Offense count: 1
|
61
|
-
# Cop supports --auto-correct.
|
62
|
-
Layout/BlockEndNewline:
|
63
|
-
Exclude:
|
64
|
-
- 'test/active_model_custom_validation_translations_test.rb'
|
65
|
-
|
66
|
-
# Offense count: 2
|
67
|
-
# Cop supports --auto-correct.
|
68
|
-
Layout/CommentIndentation:
|
69
|
-
Exclude:
|
70
|
-
- 'lib/reform/form/active_model/validations.rb'
|
71
|
-
- 'test/activemodel_validation_test.rb'
|
72
|
-
|
73
|
-
# Offense count: 2
|
74
|
-
# Cop supports --auto-correct.
|
75
|
-
Layout/EmptyLineAfterGuardClause:
|
76
|
-
Exclude:
|
77
|
-
- 'lib/reform/form/active_model.rb'
|
78
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
79
|
-
|
80
|
-
# Offense count: 1
|
81
|
-
# Cop supports --auto-correct.
|
82
|
-
Layout/EmptyLineAfterMagicComment:
|
83
|
-
Exclude:
|
84
|
-
- 'reform-rails.gemspec'
|
85
|
-
|
86
|
-
# Offense count: 2
|
87
|
-
# Cop supports --auto-correct.
|
88
|
-
# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
89
|
-
Layout/EmptyLineBetweenDefs:
|
90
|
-
Exclude:
|
91
|
-
- 'lib/reform/form/active_record.rb'
|
92
|
-
- 'lib/reform/form/mongoid.rb'
|
93
|
-
|
94
|
-
# Offense count: 32
|
95
|
-
# Cop supports --auto-correct.
|
96
|
-
Layout/EmptyLines:
|
97
|
-
Exclude:
|
98
|
-
- 'lib/reform/form/active_model.rb'
|
99
|
-
- 'lib/reform/form/active_model/validations.rb'
|
100
|
-
- 'test/active_model_custom_validation_translations_test.rb'
|
101
|
-
- 'test/active_model_test.rb'
|
102
|
-
- 'test/active_record_test.rb'
|
103
|
-
- 'test/activemodel_validation_test.rb'
|
104
|
-
- 'test/form_builder_test.rb'
|
105
|
-
- 'test/model_reflections_test.rb'
|
106
|
-
- 'test/mongoid_test.rb'
|
107
|
-
- 'test/multi_parameter_attributes_test.rb'
|
108
|
-
- 'test/test_helper.rb'
|
109
|
-
- 'test/unique_test.rb'
|
110
|
-
|
111
|
-
# Offense count: 3
|
112
|
-
# Cop supports --auto-correct.
|
113
|
-
# Configuration parameters: EnforcedStyle.
|
114
|
-
# SupportedStyles: around, only_before
|
115
|
-
Layout/EmptyLinesAroundAccessModifier:
|
116
|
-
Exclude:
|
117
|
-
- 'lib/reform/form/active_model.rb'
|
118
|
-
- 'lib/reform/form/active_model/form_builder_methods.rb'
|
119
|
-
- 'lib/reform/form/multi_parameter_attributes.rb'
|
120
|
-
|
121
|
-
# Offense count: 7
|
122
|
-
# Cop supports --auto-correct.
|
123
|
-
# Configuration parameters: EnforcedStyle.
|
124
|
-
# SupportedStyles: empty_lines, no_empty_lines
|
125
|
-
Layout/EmptyLinesAroundBlockBody:
|
126
|
-
Exclude:
|
127
|
-
- 'test/activemodel_validation_test.rb'
|
128
|
-
- 'test/custom_validation_test.rb'
|
129
|
-
- 'test/model_validations_test.rb'
|
130
|
-
|
131
|
-
# Offense count: 10
|
132
|
-
# Cop supports --auto-correct.
|
133
|
-
# Configuration parameters: EnforcedStyle.
|
134
|
-
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
|
135
|
-
Layout/EmptyLinesAroundClassBody:
|
136
|
-
Exclude:
|
137
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
138
|
-
- 'test/active_record_test.rb'
|
139
|
-
- 'test/custom_validation_test.rb'
|
140
|
-
- 'test/model_validations_test.rb'
|
141
|
-
- 'test/mongoid_test.rb'
|
142
|
-
|
143
|
-
# Offense count: 2
|
144
|
-
# Cop supports --auto-correct.
|
145
|
-
# Configuration parameters: EnforcedStyle.
|
146
|
-
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
147
|
-
Layout/EmptyLinesAroundModuleBody:
|
148
|
-
Exclude:
|
149
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
150
|
-
- 'lib/reform/form/active_model/validations.rb'
|
151
|
-
|
152
|
-
# Offense count: 1
|
153
|
-
# Cop supports --auto-correct.
|
154
|
-
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
|
155
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
156
|
-
Layout/EndAlignment:
|
157
|
-
Exclude:
|
158
|
-
- 'test/active_model_test.rb'
|
159
|
-
|
160
|
-
# Offense count: 4
|
161
|
-
# Cop supports --auto-correct.
|
162
|
-
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
163
|
-
Layout/ExtraSpacing:
|
164
|
-
Exclude:
|
165
|
-
- 'test/active_model_test.rb'
|
166
|
-
|
167
|
-
# Offense count: 1
|
168
|
-
# Cop supports --auto-correct.
|
169
|
-
Layout/FirstHashElementLineBreak:
|
170
|
-
Exclude:
|
171
|
-
- 'test/form_builder_test.rb'
|
172
|
-
|
173
|
-
# Offense count: 1
|
174
|
-
# Cop supports --auto-correct.
|
175
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
176
|
-
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
177
|
-
Layout/IndentFirstArgument:
|
178
|
-
Exclude:
|
179
|
-
- 'test/form_builder_test.rb'
|
180
|
-
|
181
|
-
# Offense count: 10
|
182
|
-
# Cop supports --auto-correct.
|
183
|
-
# Configuration parameters: EnforcedStyle.
|
184
|
-
# SupportedStyles: normal, indented_internal_methods
|
185
|
-
Layout/IndentationConsistency:
|
186
|
-
Exclude:
|
187
|
-
- 'test/active_model_test.rb'
|
188
|
-
|
189
|
-
# Offense count: 7
|
190
|
-
# Cop supports --auto-correct.
|
191
|
-
# Configuration parameters: Width, IgnoredPatterns.
|
192
|
-
Layout/IndentationWidth:
|
193
|
-
Exclude:
|
194
|
-
- 'lib/reform/form/active_model/form_builder_methods.rb'
|
195
|
-
- 'test/active_model_test.rb'
|
196
|
-
|
197
|
-
# Offense count: 2
|
198
|
-
# Cop supports --auto-correct.
|
199
|
-
# Configuration parameters: AllowDoxygenCommentStyle.
|
200
|
-
Layout/LeadingCommentSpace:
|
201
|
-
Exclude:
|
202
|
-
- 'test/docs/**/*'
|
203
|
-
- 'test/activemodel_validation_test.rb'
|
204
|
-
|
205
|
-
# Offense count: 1
|
206
|
-
# Cop supports --auto-correct.
|
207
|
-
Layout/MultilineBlockLayout:
|
208
|
-
Exclude:
|
209
|
-
- 'test/active_model_custom_validation_translations_test.rb'
|
210
|
-
|
211
|
-
# Offense count: 1
|
212
|
-
# Cop supports --auto-correct.
|
213
|
-
# Configuration parameters: EnforcedStyle.
|
214
|
-
# SupportedStyles: symmetrical, new_line, same_line
|
215
|
-
Layout/MultilineMethodCallBraceLayout:
|
216
|
-
Exclude:
|
217
|
-
- 'test/form_builder_test.rb'
|
218
|
-
|
219
|
-
# Offense count: 1
|
220
|
-
# Cop supports --auto-correct.
|
221
|
-
Layout/SpaceAfterColon:
|
222
|
-
Exclude:
|
223
|
-
- 'test/activemodel_validation_test.rb'
|
224
|
-
|
225
|
-
# Offense count: 7
|
226
|
-
# Cop supports --auto-correct.
|
227
|
-
Layout/SpaceAfterComma:
|
228
|
-
Exclude:
|
229
|
-
- 'lib/reform/form/active_model/model_reflections.rb'
|
230
|
-
- 'lib/reform/form/active_model/validations.rb'
|
231
|
-
- 'test/activemodel_validation_test.rb'
|
232
|
-
- 'test/test_helper.rb'
|
233
|
-
|
234
|
-
# Offense count: 1
|
235
|
-
# Cop supports --auto-correct.
|
236
|
-
Layout/SpaceAfterNot:
|
237
|
-
Exclude:
|
238
|
-
- 'lib/reform/form/active_model/validations.rb'
|
239
|
-
|
240
|
-
# Offense count: 7
|
241
|
-
# Cop supports --auto-correct.
|
242
|
-
# Configuration parameters: EnforcedStyle.
|
243
|
-
# SupportedStyles: space, no_space
|
244
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
245
|
-
Exclude:
|
246
|
-
- 'lib/reform/form/active_model.rb'
|
247
|
-
- 'lib/reform/form/active_model/form_builder_methods.rb'
|
248
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
249
|
-
- 'lib/reform/form/active_model/validations.rb'
|
250
|
-
- 'lib/reform/form/active_record.rb'
|
251
|
-
- 'lib/reform/form/mongoid.rb'
|
252
|
-
|
253
|
-
# Offense count: 1
|
254
|
-
# Cop supports --auto-correct.
|
255
|
-
Layout/SpaceAroundKeyword:
|
256
|
-
Exclude:
|
257
|
-
- 'test/active_record_test.rb'
|
258
|
-
|
259
|
-
# Offense count: 26
|
260
|
-
# Cop supports --auto-correct.
|
261
|
-
# Configuration parameters: AllowForAlignment.
|
262
|
-
Layout/SpaceAroundOperators:
|
263
|
-
Exclude:
|
264
|
-
- 'test/active_model_test.rb'
|
265
|
-
- 'test/active_record_test.rb'
|
266
|
-
- 'test/activemodel_validation_test.rb'
|
267
|
-
- 'test/form_builder_test.rb'
|
268
|
-
- 'test/form_test.rb'
|
269
|
-
- 'test/multi_parameter_attributes_test.rb'
|
270
|
-
|
271
|
-
# Offense count: 1
|
272
|
-
# Cop supports --auto-correct.
|
273
|
-
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
274
|
-
# SupportedStyles: space, no_space
|
275
|
-
# SupportedStylesForEmptyBraces: space, no_space
|
276
|
-
Layout/SpaceBeforeBlockBraces:
|
277
|
-
Exclude:
|
278
|
-
- 'test/active_model_custom_validation_translations_test.rb'
|
279
|
-
|
280
|
-
# Offense count: 2
|
281
|
-
# Cop supports --auto-correct.
|
282
|
-
Layout/SpaceBeforeComment:
|
283
|
-
Exclude:
|
284
|
-
- 'test/activemodel_validation_test.rb'
|
285
|
-
|
286
|
-
# Offense count: 3
|
287
|
-
# Cop supports --auto-correct.
|
288
|
-
# Configuration parameters: AllowForAlignment.
|
289
|
-
Layout/SpaceBeforeFirstArg:
|
290
|
-
Exclude:
|
291
|
-
- 'test/active_model_test.rb'
|
292
|
-
- 'test/activemodel_validation_test.rb'
|
293
|
-
|
294
|
-
# Offense count: 19
|
295
|
-
# Cop supports --auto-correct.
|
296
|
-
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
297
|
-
# SupportedStyles: space, no_space
|
298
|
-
# SupportedStylesForEmptyBraces: space, no_space
|
299
|
-
Layout/SpaceInsideBlockBraces:
|
300
|
-
Exclude:
|
301
|
-
- 'test/activemodel_validation_test.rb'
|
302
|
-
- 'test/mongoid_test.rb'
|
303
|
-
|
304
|
-
# Offense count: 34
|
305
|
-
# Cop supports --auto-correct.
|
306
|
-
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
307
|
-
# SupportedStyles: space, no_space, compact
|
308
|
-
# SupportedStylesForEmptyBraces: space, no_space
|
309
|
-
Layout/SpaceInsideHashLiteralBraces:
|
310
|
-
Exclude:
|
311
|
-
- 'test/active_model_validation_for_property_named_format_test.rb'
|
312
|
-
- 'test/activemodel_validation_test.rb'
|
313
|
-
- 'test/form_test.rb'
|
314
|
-
- 'test/model_validations_test.rb'
|
315
|
-
- 'test/multi_parameter_attributes_test.rb'
|
316
|
-
- 'test/unique_test.rb'
|
317
|
-
|
318
|
-
# Offense count: 3
|
319
|
-
# Cop supports --auto-correct.
|
320
|
-
# Configuration parameters: EnforcedStyle.
|
321
|
-
# SupportedStyles: final_newline, final_blank_line
|
322
|
-
Layout/TrailingBlankLines:
|
323
|
-
Exclude:
|
324
|
-
- 'lib/reform/form/active_model/form_builder_methods.rb'
|
325
|
-
- 'test/active_record_test.rb'
|
326
|
-
- 'test/model_validations_test.rb'
|
327
|
-
|
328
|
-
# Offense count: 4
|
329
|
-
Lint/AmbiguousOperator:
|
330
|
-
Exclude:
|
331
|
-
- 'lib/reform/form/active_model.rb'
|
332
|
-
|
333
|
-
# Offense count: 1
|
334
|
-
# Configuration parameters: AllowSafeAssignment.
|
335
|
-
Lint/AssignmentInCondition:
|
336
|
-
Exclude:
|
337
|
-
- 'lib/reform/form/multi_parameter_attributes.rb'
|
338
|
-
|
339
|
-
# Offense count: 55
|
340
|
-
Lint/ParenthesesAsGroupedExpression:
|
341
|
-
Exclude:
|
342
|
-
- 'test/active_model_test.rb'
|
343
|
-
- 'test/active_record_test.rb'
|
344
|
-
- 'test/activemodel_validation_test.rb'
|
345
|
-
- 'test/form_builder_test.rb'
|
346
|
-
- 'test/model_reflections_test.rb'
|
347
|
-
- 'test/mongoid_test.rb'
|
348
|
-
- 'test/multi_parameter_attributes_test.rb'
|
349
|
-
- 'test/test_helper.rb'
|
350
|
-
- 'test/unique_test.rb'
|
351
|
-
|
352
|
-
# Offense count: 1
|
353
|
-
# Cop supports --auto-correct.
|
354
|
-
Lint/RedundantSplatExpansion:
|
355
|
-
Exclude:
|
356
|
-
- 'lib/reform/form/active_model.rb'
|
357
|
-
|
358
|
-
# Offense count: 1
|
359
|
-
# Configuration parameters: AllowKeywordBlockArguments.
|
360
|
-
Lint/UnderscorePrefixedVariableName:
|
361
|
-
Exclude:
|
362
|
-
- 'lib/reform/form/active_model.rb'
|
363
|
-
|
364
|
-
# Offense count: 3
|
365
|
-
# Cop supports --auto-correct.
|
366
|
-
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
367
|
-
Lint/UnusedBlockArgument:
|
368
|
-
Exclude:
|
369
|
-
- 'lib/reform/form/active_model/model_reflections.rb'
|
370
|
-
- 'lib/reform/form/orm.rb'
|
371
|
-
- 'test/activemodel_validation_test.rb'
|
372
|
-
|
373
|
-
# Offense count: 1
|
374
|
-
# Cop supports --auto-correct.
|
375
|
-
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
376
|
-
Lint/UnusedMethodArgument:
|
377
|
-
Exclude:
|
378
|
-
- 'lib/reform/form/active_model/validations.rb'
|
379
|
-
|
380
|
-
# Offense count: 1
|
381
|
-
Lint/UselessAssignment:
|
382
|
-
Exclude:
|
383
|
-
- 'test/unique_test.rb'
|
384
|
-
|
385
|
-
# Offense count: 1
|
386
|
-
Metrics/AbcSize:
|
387
|
-
Max: 26
|
388
|
-
|
389
|
-
# Offense count: 1
|
390
|
-
# Configuration parameters: CountComments.
|
391
|
-
Metrics/ClassLength:
|
392
|
-
Max: 152
|
393
|
-
|
394
|
-
# Offense count: 23
|
395
|
-
# Cop supports --auto-correct.
|
396
|
-
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
397
|
-
# URISchemes: http, https
|
398
|
-
Metrics/LineLength:
|
399
|
-
Max: 262
|
400
|
-
|
401
|
-
# Offense count: 1
|
402
|
-
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
403
|
-
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
404
|
-
Naming/MemoizedInstanceVariableName:
|
405
|
-
Exclude:
|
406
|
-
- 'lib/reform/form/active_model/validations.rb'
|
407
|
-
|
408
|
-
# Offense count: 2
|
409
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
410
|
-
# NamePrefix: is_, has_, have_
|
411
|
-
# NamePrefixBlacklist: is_, has_, have_
|
412
|
-
# NameWhitelist: is_a?
|
413
|
-
# MethodDefinitionMacros: define_method, define_singleton_method
|
414
|
-
Naming/PredicateName:
|
415
|
-
Exclude:
|
416
|
-
- 'spec/**/*'
|
417
|
-
- 'lib/reform/form/active_model/model_reflections.rb'
|
418
|
-
- 'test/model_reflections_test.rb'
|
419
|
-
|
420
|
-
# Offense count: 6
|
421
|
-
# Configuration parameters: EnforcedStyle.
|
422
|
-
# SupportedStyles: snake_case, normalcase, non_integer
|
423
|
-
Naming/VariableNumber:
|
424
|
-
Exclude:
|
425
|
-
- 'test/unique_test.rb'
|
426
|
-
|
427
|
-
# Offense count: 9
|
428
|
-
# Cop supports --auto-correct.
|
429
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
|
430
|
-
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
431
|
-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
432
|
-
# FunctionalMethods: let, let!, subject, watch
|
433
|
-
# IgnoredMethods: lambda, proc, it
|
434
|
-
Style/BlockDelimiters:
|
435
|
-
Exclude:
|
436
|
-
- 'test/active_model_test.rb'
|
437
|
-
- 'test/active_record_test.rb'
|
438
|
-
- 'test/form_builder_test.rb'
|
439
|
-
- 'test/mongoid_test.rb'
|
440
|
-
|
441
|
-
# Offense count: 21
|
442
|
-
# Cop supports --auto-correct.
|
443
|
-
# Configuration parameters: EnforcedStyle.
|
444
|
-
# SupportedStyles: braces, no_braces, context_dependent
|
445
|
-
Style/BracesAroundHashParameters:
|
446
|
-
Exclude:
|
447
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
448
|
-
- 'test/active_model_validation_for_property_named_format_test.rb'
|
449
|
-
- 'test/active_record_test.rb'
|
450
|
-
- 'test/activemodel_validation_test.rb'
|
451
|
-
- 'test/form_test.rb'
|
452
|
-
- 'test/mongoid_test.rb'
|
453
|
-
- 'test/unique_test.rb'
|
454
|
-
|
455
|
-
# Offense count: 8
|
456
|
-
Style/CommentedKeyword:
|
457
|
-
Exclude:
|
458
|
-
- 'lib/reform/form/active_model.rb'
|
459
|
-
- 'lib/reform/form/active_model/validations.rb'
|
460
|
-
- 'lib/reform/rails/railtie.rb'
|
461
|
-
- 'test/active_model_test.rb'
|
462
|
-
- 'test/activemodel_validation_test.rb'
|
463
|
-
|
464
|
-
# Offense count: 1
|
465
|
-
# Cop supports --auto-correct.
|
466
|
-
Style/Encoding:
|
467
|
-
Exclude:
|
468
|
-
- 'reform-rails.gemspec'
|
469
|
-
|
470
|
-
# Offense count: 1
|
471
|
-
# Cop supports --auto-correct.
|
472
|
-
Style/ExpandPathArguments:
|
473
|
-
Exclude:
|
474
|
-
- 'reform-rails.gemspec'
|
475
|
-
|
476
|
-
# Offense count: 2
|
477
|
-
# Configuration parameters: MinBodyLength.
|
478
|
-
Style/GuardClause:
|
479
|
-
Exclude:
|
480
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
481
|
-
- 'test/custom_validation_test.rb'
|
482
|
-
|
483
|
-
# Offense count: 2
|
484
|
-
Style/IdenticalConditionalBranches:
|
485
|
-
Exclude:
|
486
|
-
- 'lib/reform/form/active_model.rb'
|
487
|
-
|
488
|
-
# Offense count: 1
|
489
|
-
# Configuration parameters: AllowIfModifier.
|
490
|
-
Style/IfInsideElse:
|
491
|
-
Exclude:
|
492
|
-
- 'lib/reform/form/active_model.rb'
|
493
|
-
|
494
|
-
# Offense count: 7
|
495
|
-
# Cop supports --auto-correct.
|
496
|
-
Style/IfUnlessModifier:
|
497
|
-
Exclude:
|
498
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
499
|
-
- 'lib/reform/form/multi_parameter_attributes.rb'
|
500
|
-
- 'lib/reform/form/validation/unique_validator.rb'
|
501
|
-
- 'test/activemodel_validation_test.rb'
|
502
|
-
- 'test/custom_validation_test.rb'
|
503
|
-
|
504
|
-
# Offense count: 1
|
505
|
-
Style/ImplicitRuntimeError:
|
506
|
-
Exclude:
|
507
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
508
|
-
|
509
|
-
# Offense count: 2
|
510
|
-
# Cop supports --auto-correct.
|
511
|
-
# Configuration parameters: EnforcedStyle.
|
512
|
-
# SupportedStyles: line_count_dependent, lambda, literal
|
513
|
-
Style/Lambda:
|
514
|
-
Exclude:
|
515
|
-
- 'test/activemodel_validation_test.rb'
|
516
|
-
|
517
|
-
# Offense count: 2
|
518
|
-
Style/MethodCalledOnDoEndBlock:
|
519
|
-
Exclude:
|
520
|
-
- 'test/active_record_test.rb'
|
521
|
-
- 'test/mongoid_test.rb'
|
522
|
-
|
523
|
-
# Offense count: 3
|
524
|
-
# Cop supports --auto-correct.
|
525
|
-
# Configuration parameters: EnforcedStyle.
|
526
|
-
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
|
527
|
-
Style/MethodDefParentheses:
|
528
|
-
Exclude:
|
529
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
530
|
-
- 'test/custom_validation_test.rb'
|
531
|
-
|
532
|
-
# Offense count: 2
|
533
|
-
Style/MethodMissingSuper:
|
534
|
-
Exclude:
|
535
|
-
- 'lib/reform/form/active_model/validations.rb'
|
536
|
-
|
537
|
-
# Offense count: 1
|
538
|
-
# Configuration parameters: EnforcedStyle.
|
539
|
-
# SupportedStyles: if, case, both
|
540
|
-
Style/MissingElse:
|
541
|
-
Exclude:
|
542
|
-
- 'Gemfile'
|
543
|
-
|
544
|
-
# Offense count: 2
|
545
|
-
Style/MissingRespondToMissing:
|
546
|
-
Exclude:
|
547
|
-
- 'lib/reform/form/active_model/validations.rb'
|
548
|
-
|
549
|
-
# Offense count: 1
|
550
|
-
Style/MultilineTernaryOperator:
|
551
|
-
Exclude:
|
552
|
-
- 'lib/reform/form/multi_parameter_attributes.rb'
|
553
|
-
|
554
|
-
# Offense count: 1
|
555
|
-
# Cop supports --auto-correct.
|
556
|
-
# Configuration parameters: EnforcedStyle.
|
557
|
-
# SupportedStyles: literals, strict
|
558
|
-
Style/MutableConstant:
|
559
|
-
Exclude:
|
560
|
-
- 'lib/reform/rails/version.rb'
|
561
|
-
|
562
|
-
# Offense count: 5
|
563
|
-
# Cop supports --auto-correct.
|
564
|
-
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
|
565
|
-
# SupportedStyles: predicate, comparison
|
566
|
-
Style/NumericPredicate:
|
567
|
-
Exclude:
|
568
|
-
- 'spec/**/*'
|
569
|
-
- 'lib/reform/form/validation/unique_validator.rb'
|
570
|
-
- 'test/active_record_test.rb'
|
571
|
-
- 'test/mongoid_test.rb'
|
572
|
-
|
573
|
-
# Offense count: 3
|
574
|
-
# Configuration parameters: SuspiciousParamNames.
|
575
|
-
# SuspiciousParamNames: options, opts, args, params, parameters
|
576
|
-
Style/OptionHash:
|
577
|
-
Exclude:
|
578
|
-
- 'lib/reform/form/active_model.rb'
|
579
|
-
- 'lib/reform/form/active_record.rb'
|
580
|
-
- 'lib/reform/form/mongoid.rb'
|
581
|
-
|
582
|
-
# Offense count: 3
|
583
|
-
# Cop supports --auto-correct.
|
584
|
-
# Configuration parameters: PreferredDelimiters.
|
585
|
-
Style/PercentLiteralDelimiters:
|
586
|
-
Exclude:
|
587
|
-
- 'reform-rails.gemspec'
|
588
|
-
- 'test/form_builder_test.rb'
|
589
|
-
|
590
|
-
# Offense count: 3
|
591
|
-
# Cop supports --auto-correct.
|
592
|
-
# Configuration parameters: EnforcedStyle.
|
593
|
-
# SupportedStyles: short, verbose
|
594
|
-
Style/PreferredHashMethods:
|
595
|
-
Exclude:
|
596
|
-
- 'lib/reform/form/active_model/form_builder_methods.rb'
|
597
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
598
|
-
|
599
|
-
# Offense count: 1
|
600
|
-
# Cop supports --auto-correct.
|
601
|
-
Style/RedundantInterpolation:
|
602
|
-
Exclude:
|
603
|
-
- 'test/active_model_test.rb'
|
604
|
-
|
605
|
-
# Offense count: 2
|
606
|
-
# Cop supports --auto-correct.
|
607
|
-
Style/RedundantPercentQ:
|
608
|
-
Exclude:
|
609
|
-
- 'reform-rails.gemspec'
|
610
|
-
|
611
|
-
# Offense count: 1
|
612
|
-
# Cop supports --auto-correct.
|
613
|
-
# Configuration parameters: EnforcedStyle.
|
614
|
-
# SupportedStyles: return, return_nil
|
615
|
-
Style/ReturnNil:
|
616
|
-
Exclude:
|
617
|
-
- 'lib/reform/form/multi_parameter_attributes.rb'
|
618
|
-
|
619
|
-
# Offense count: 7
|
620
|
-
Style/Send:
|
621
|
-
Exclude:
|
622
|
-
- 'lib/reform/form/active_model/model_reflections.rb'
|
623
|
-
- 'lib/reform/form/active_model/validations.rb'
|
624
|
-
- 'lib/reform/form/orm.rb'
|
625
|
-
- 'lib/reform/form/validation/unique_validator.rb'
|
626
|
-
|
627
|
-
# Offense count: 1
|
628
|
-
# Cop supports --auto-correct.
|
629
|
-
# Configuration parameters: EnforcedStyle.
|
630
|
-
# SupportedStyles: only_raise, only_fail, semantic
|
631
|
-
Style/SignalException:
|
632
|
-
Exclude:
|
633
|
-
- 'lib/reform/form/active_model/model_validations.rb'
|
634
|
-
|
635
|
-
# Offense count: 133
|
636
|
-
# Cop supports --auto-correct.
|
637
|
-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
638
|
-
# SupportedStyles: single_quotes, double_quotes
|
639
|
-
Style/StringLiterals:
|
640
|
-
Enabled: false
|
641
|
-
|
642
|
-
# Offense count: 4
|
643
|
-
# Cop supports --auto-correct.
|
644
|
-
# Configuration parameters: MinSize.
|
645
|
-
# SupportedStyles: percent, brackets
|
646
|
-
Style/SymbolArray:
|
647
|
-
EnforcedStyle: brackets
|
648
|
-
|
649
|
-
# Offense count: 2
|
650
|
-
# Cop supports --auto-correct.
|
651
|
-
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
652
|
-
# SupportedStyles: percent, brackets
|
653
|
-
Style/WordArray:
|
654
|
-
Exclude:
|
655
|
-
- 'test/activemodel_validation_test.rb'
|
656
|
-
|
657
|
-
# Offense count: 2
|
658
|
-
# Cop supports --auto-correct.
|
659
|
-
Style/ZeroLengthPredicate:
|
660
|
-
Exclude:
|
661
|
-
- 'test/mongoid_test.rb'
|
data/.travis.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
before_install:
|
4
|
-
- gem update --system
|
5
|
-
- gem install bundler
|
6
|
-
rvm:
|
7
|
-
- 2.5.5
|
8
|
-
- 2.6.3
|
9
|
-
- 2.7
|
10
|
-
services:
|
11
|
-
- mongodb
|
12
|
-
env:
|
13
|
-
- "RAILS_VERSION=6.1.0"
|
14
|
-
- "RAILS_VERSION=6.0.0"
|
15
|
-
- "RAILS_VERSION=5.2.0"
|
16
|
-
- "RAILS_VERSION=5.1.0"
|
17
|
-
- "RAILS_VERSION=5.0.0"
|
18
|
-
matrix:
|
19
|
-
fast_finish: true
|