formalism-r18n_errors 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +0 -2
- data/lib/formalism/r18n_errors/validation_helpers.rb +1 -2
- data/lib/formalism/r18n_errors/version.rb +1 -1
- metadata +15 -236
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bd528afaa6b0ac5bccc016b560a83df63704393e03aca533fc6be68ffa5fd71
|
4
|
+
data.tar.gz: f542d5e10e557484a85adfd3a4e079d820c01719df40d5e1ae9baeb04032ee1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90b05ac0bbc88a3166e6b5ff7be2ee06f348ff9f03410963a9e0fe2d660946d7bb6b8622e896363de1917ed8bb37cecbc4a5dd0a1b4577c41a70f3d2159d491d
|
7
|
+
data.tar.gz: 207204369bb3bc6c9c6837d0a48205297a4a742fca687610e23fded93a8e8f63a0ba599ec1af4039abb48d4f34219b3d164ed7c1efef031fa554086e90c11120
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,20 @@
|
|
2
2
|
|
3
3
|
## Unreleased
|
4
4
|
|
5
|
+
## 0.6.0 (2025-01-06)
|
6
|
+
|
7
|
+
* Drop Ruby 2.6 and 2.7 support.
|
8
|
+
* Add Ruby 3.2, 3.3 and 3.4 support.
|
9
|
+
* Allow `formalism` version 0.6.
|
10
|
+
* Replace `uuid` gem with inline simple Regexp.
|
11
|
+
This gem is outdated, it's dependencies give warnings.
|
12
|
+
We used just 1 method for validation.
|
13
|
+
* Fix specs for Ruby 3.
|
14
|
+
* Update development dependencies.
|
15
|
+
* Resolve new RuboCop offenses.
|
16
|
+
* Move development dependencies from `gemspec` into `Gemfile`.
|
17
|
+
* Switch `email_address` development dependency to fork version.
|
18
|
+
|
5
19
|
## 0.5.1 (2022-09-24)
|
6
20
|
|
7
21
|
* Allow `gorilla_patch` version 5.
|
data/README.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
[![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/formalism-r18n_errors?style=flat-square)](https://cirrus-ci.com/github/AlexWayfer/formalism-r18n_errors)
|
4
4
|
[![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/formalism-r18n_errors/main.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/formalism-r18n_errors)
|
5
5
|
[![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/formalism-r18n_errors.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/formalism-r18n_errors)
|
6
|
-
[![Depfu](https://img.shields.io/depfu/AlexWayfer/benchmark_toys?style=flat-square)](https://depfu.com/repos/github/AlexWayfer/formalism-r18n_errors)
|
7
6
|
[![Inline docs](https://inch-ci.org/github/AlexWayfer/formalism-r18n_errors.svg?branch=main)](https://inch-ci.org/github/AlexWayfer/formalism-r18n_errors)
|
8
7
|
[![license](https://img.shields.io/github/license/AlexWayfer/formalism-r18n_errors.svg?style=flat-square)](LICENSE.txt)
|
9
8
|
[![Gem](https://img.shields.io/gem/v/formalism-r18n_errors.svg?style=flat-square)](https://rubygems.org/gems/formalism-r18n_errors)
|
@@ -121,7 +120,6 @@ module MyProject
|
|
121
120
|
## `errors.user.email.not_valid_email`
|
122
121
|
validate_email :email
|
123
122
|
|
124
|
-
## Requires `uuid` gem
|
125
123
|
## `errors.user.key.not_valid_uuid`
|
126
124
|
validate_uuid :key
|
127
125
|
|
@@ -76,12 +76,11 @@ module Formalism
|
|
76
76
|
valid
|
77
77
|
end
|
78
78
|
|
79
|
-
## Requires `uuid` gem
|
80
79
|
def validate_uuid(*validation_fields)
|
81
80
|
valid = true
|
82
81
|
validation_fields.flatten.each do |validation_field|
|
83
82
|
next unless field_changed?(validation_field)
|
84
|
-
next if
|
83
|
+
next if /\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/.match? public_send(validation_field)
|
85
84
|
|
86
85
|
valid = false
|
87
86
|
add_error validation_field, :not_valid_uuid
|
metadata
CHANGED
@@ -1,29 +1,34 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formalism-r18n_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-06 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: formalism
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0.5'
|
19
|
+
- - "<="
|
18
20
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
21
|
+
version: '0.7'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
23
25
|
requirements:
|
24
|
-
- - "
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0.5'
|
29
|
+
- - "<="
|
25
30
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
31
|
+
version: '0.7'
|
27
32
|
- !ruby/object:Gem::Dependency
|
28
33
|
name: gorilla_patch
|
29
34
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,230 +63,6 @@ dependencies:
|
|
58
63
|
- - "~>"
|
59
64
|
- !ruby/object:Gem::Version
|
60
65
|
version: '5.0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: email_address
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: 0.2.4
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: 0.2.4
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: net-smtp
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: 0.3.1
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 0.3.1
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: sequel
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '5.60'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '5.60'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: uuid
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '2.0'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '2.0'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: pry-byebug
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - "~>"
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '3.9'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - "~>"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '3.9'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: bundler
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '2.0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '2.0'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: bundler-audit
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - "~>"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: 0.9.1
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - "~>"
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: 0.9.1
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: gem_toys
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - "~>"
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: 0.12.1
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: 0.12.1
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: toys
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: 0.13.1
|
180
|
-
type: :development
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - "~>"
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: 0.13.1
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: rspec
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - "~>"
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '3.9'
|
194
|
-
type: :development
|
195
|
-
prerelease: false
|
196
|
-
version_requirements: !ruby/object:Gem::Requirement
|
197
|
-
requirements:
|
198
|
-
- - "~>"
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '3.9'
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: simplecov
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - "~>"
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: 0.21.0
|
208
|
-
type: :development
|
209
|
-
prerelease: false
|
210
|
-
version_requirements: !ruby/object:Gem::Requirement
|
211
|
-
requirements:
|
212
|
-
- - "~>"
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: 0.21.0
|
215
|
-
- !ruby/object:Gem::Dependency
|
216
|
-
name: simplecov-cobertura
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - "~>"
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '2.1'
|
222
|
-
type: :development
|
223
|
-
prerelease: false
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - "~>"
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
version: '2.1'
|
229
|
-
- !ruby/object:Gem::Dependency
|
230
|
-
name: rubocop
|
231
|
-
requirement: !ruby/object:Gem::Requirement
|
232
|
-
requirements:
|
233
|
-
- - "~>"
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
version: 1.36.0
|
236
|
-
type: :development
|
237
|
-
prerelease: false
|
238
|
-
version_requirements: !ruby/object:Gem::Requirement
|
239
|
-
requirements:
|
240
|
-
- - "~>"
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: 1.36.0
|
243
|
-
- !ruby/object:Gem::Dependency
|
244
|
-
name: rubocop-performance
|
245
|
-
requirement: !ruby/object:Gem::Requirement
|
246
|
-
requirements:
|
247
|
-
- - "~>"
|
248
|
-
- !ruby/object:Gem::Version
|
249
|
-
version: '1.0'
|
250
|
-
type: :development
|
251
|
-
prerelease: false
|
252
|
-
version_requirements: !ruby/object:Gem::Requirement
|
253
|
-
requirements:
|
254
|
-
- - "~>"
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
version: '1.0'
|
257
|
-
- !ruby/object:Gem::Dependency
|
258
|
-
name: rubocop-rspec
|
259
|
-
requirement: !ruby/object:Gem::Requirement
|
260
|
-
requirements:
|
261
|
-
- - "~>"
|
262
|
-
- !ruby/object:Gem::Version
|
263
|
-
version: '2.2'
|
264
|
-
type: :development
|
265
|
-
prerelease: false
|
266
|
-
version_requirements: !ruby/object:Gem::Requirement
|
267
|
-
requirements:
|
268
|
-
- - "~>"
|
269
|
-
- !ruby/object:Gem::Version
|
270
|
-
version: '2.2'
|
271
|
-
- !ruby/object:Gem::Dependency
|
272
|
-
name: rubocop-sequel
|
273
|
-
requirement: !ruby/object:Gem::Requirement
|
274
|
-
requirements:
|
275
|
-
- - "~>"
|
276
|
-
- !ruby/object:Gem::Version
|
277
|
-
version: 0.3.4
|
278
|
-
type: :development
|
279
|
-
prerelease: false
|
280
|
-
version_requirements: !ruby/object:Gem::Requirement
|
281
|
-
requirements:
|
282
|
-
- - "~>"
|
283
|
-
- !ruby/object:Gem::Version
|
284
|
-
version: 0.3.4
|
285
66
|
description: 'Errors for Formalism via R18n.
|
286
67
|
|
287
68
|
'
|
@@ -303,11 +84,10 @@ licenses:
|
|
303
84
|
- MIT
|
304
85
|
metadata:
|
305
86
|
bug_tracker_uri: https://github.com/AlexWayfer/formalism-r18n_errors/issues
|
306
|
-
changelog_uri: https://github.com/AlexWayfer/formalism-r18n_errors/blob/v0.
|
87
|
+
changelog_uri: https://github.com/AlexWayfer/formalism-r18n_errors/blob/v0.6.0/CHANGELOG.md
|
307
88
|
homepage_uri: https://github.com/AlexWayfer/formalism-r18n_errors
|
308
89
|
rubygems_mfa_required: 'true'
|
309
90
|
source_code_uri: https://github.com/AlexWayfer/formalism-r18n_errors
|
310
|
-
post_install_message:
|
311
91
|
rdoc_options: []
|
312
92
|
require_paths:
|
313
93
|
- lib
|
@@ -315,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
315
95
|
requirements:
|
316
96
|
- - ">="
|
317
97
|
- !ruby/object:Gem::Version
|
318
|
-
version: '
|
98
|
+
version: '3.0'
|
319
99
|
- - "<"
|
320
100
|
- !ruby/object:Gem::Version
|
321
101
|
version: '4'
|
@@ -325,8 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
325
105
|
- !ruby/object:Gem::Version
|
326
106
|
version: '0'
|
327
107
|
requirements: []
|
328
|
-
rubygems_version: 3.
|
329
|
-
signing_key:
|
108
|
+
rubygems_version: 3.6.2
|
330
109
|
specification_version: 4
|
331
110
|
summary: Errors for Formalism via R18n
|
332
111
|
test_files: []
|