formalism-r18n_errors 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b95af648000ffca710f1e1d5b1297b3b875c5bfc76de300b288fb0f0fd60d96e
4
- data.tar.gz: 29b23d5f842309f4012a6b0328d0b4c245e0db2d222a7630275c2c036c4c0b5a
3
+ metadata.gz: 4bd528afaa6b0ac5bccc016b560a83df63704393e03aca533fc6be68ffa5fd71
4
+ data.tar.gz: f542d5e10e557484a85adfd3a4e079d820c01719df40d5e1ae9baeb04032ee1b
5
5
  SHA512:
6
- metadata.gz: 4494681e8f8f4d2da3ba860e93b32a9252c0ddd94711c90090c1cf2b8e3829dfc331c54091532b212700208c40e6d63ee2494e6c815a62c6799c5b86f86110a6
7
- data.tar.gz: 5856bb2b9bd9907dfa5c7c463ca1d4a4a18634fe3782883116437dfcf935adc910cc806dd384c41e962a814c80189f5664c2bf099fe861d73cb83cbb402d0f83
6
+ metadata.gz: 90b05ac0bbc88a3166e6b5ff7be2ee06f348ff9f03410963a9e0fe2d660946d7bb6b8622e896363de1917ed8bb37cecbc4a5dd0a1b4577c41a70f3d2159d491d
7
+ data.tar.gz: 207204369bb3bc6c9c6837d0a48205297a4a742fca687610e23fded93a8e8f63a0ba599ec1af4039abb48d4f34219b3d164ed7c1efef031fa554086e90c11120
data/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
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
+
19
+ ## 0.5.1 (2022-09-24)
20
+
21
+ * Allow `gorilla_patch` version 5.
22
+ * Improve CI.
23
+
5
24
  ## 0.5.0 (2022-09-24)
6
25
 
7
26
  * Update `formalism` to a new version.
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 UUID.validate public_send(validation_field)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Formalism
4
4
  module R18nErrors
5
- VERSION = '0.5.0'
5
+ VERSION = '0.6.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,43 +1,54 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formalism-r18n_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.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: 2022-09-23 00:00:00.000000000 Z
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.5.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
+ - - ">="
25
27
  - !ruby/object:Gem::Version
26
- version: 0.5.0
28
+ version: '0.5'
29
+ - - "<="
30
+ - !ruby/object:Gem::Version
31
+ version: '0.7'
27
32
  - !ruby/object:Gem::Dependency
28
33
  name: gorilla_patch
29
34
  requirement: !ruby/object:Gem::Requirement
30
35
  requirements:
31
- - - "~>"
36
+ - - ">="
32
37
  - !ruby/object:Gem::Version
33
38
  version: '4.0'
39
+ - - "<"
40
+ - !ruby/object:Gem::Version
41
+ version: '6'
34
42
  type: :runtime
35
43
  prerelease: false
36
44
  version_requirements: !ruby/object:Gem::Requirement
37
45
  requirements:
38
- - - "~>"
46
+ - - ">="
39
47
  - !ruby/object:Gem::Version
40
48
  version: '4.0'
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '6'
41
52
  - !ruby/object:Gem::Dependency
42
53
  name: r18n-core
43
54
  requirement: !ruby/object:Gem::Requirement
@@ -52,230 +63,6 @@ dependencies:
52
63
  - - "~>"
53
64
  - !ruby/object:Gem::Version
54
65
  version: '5.0'
55
- - !ruby/object:Gem::Dependency
56
- name: email_address
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.2.4
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.2.4
69
- - !ruby/object:Gem::Dependency
70
- name: net-smtp
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.3.1
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.3.1
83
- - !ruby/object:Gem::Dependency
84
- name: sequel
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '5.60'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '5.60'
97
- - !ruby/object:Gem::Dependency
98
- name: uuid
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '2.0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '2.0'
111
- - !ruby/object:Gem::Dependency
112
- name: pry-byebug
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '3.9'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '3.9'
125
- - !ruby/object:Gem::Dependency
126
- name: bundler
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '2.0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '2.0'
139
- - !ruby/object:Gem::Dependency
140
- name: bundler-audit
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: 0.9.1
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: 0.9.1
153
- - !ruby/object:Gem::Dependency
154
- name: gem_toys
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: 0.12.1
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: 0.12.1
167
- - !ruby/object:Gem::Dependency
168
- name: toys
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - "~>"
172
- - !ruby/object:Gem::Version
173
- version: 0.13.1
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - "~>"
179
- - !ruby/object:Gem::Version
180
- version: 0.13.1
181
- - !ruby/object:Gem::Dependency
182
- name: rspec
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '3.9'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '3.9'
195
- - !ruby/object:Gem::Dependency
196
- name: simplecov
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: 0.21.0
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - "~>"
207
- - !ruby/object:Gem::Version
208
- version: 0.21.0
209
- - !ruby/object:Gem::Dependency
210
- name: simplecov-cobertura
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: '2.1'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - "~>"
221
- - !ruby/object:Gem::Version
222
- version: '2.1'
223
- - !ruby/object:Gem::Dependency
224
- name: rubocop
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - "~>"
228
- - !ruby/object:Gem::Version
229
- version: 1.36.0
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - "~>"
235
- - !ruby/object:Gem::Version
236
- version: 1.36.0
237
- - !ruby/object:Gem::Dependency
238
- name: rubocop-performance
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - "~>"
242
- - !ruby/object:Gem::Version
243
- version: '1.0'
244
- type: :development
245
- prerelease: false
246
- version_requirements: !ruby/object:Gem::Requirement
247
- requirements:
248
- - - "~>"
249
- - !ruby/object:Gem::Version
250
- version: '1.0'
251
- - !ruby/object:Gem::Dependency
252
- name: rubocop-rspec
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - "~>"
256
- - !ruby/object:Gem::Version
257
- version: '2.2'
258
- type: :development
259
- prerelease: false
260
- version_requirements: !ruby/object:Gem::Requirement
261
- requirements:
262
- - - "~>"
263
- - !ruby/object:Gem::Version
264
- version: '2.2'
265
- - !ruby/object:Gem::Dependency
266
- name: rubocop-sequel
267
- requirement: !ruby/object:Gem::Requirement
268
- requirements:
269
- - - "~>"
270
- - !ruby/object:Gem::Version
271
- version: 0.3.4
272
- type: :development
273
- prerelease: false
274
- version_requirements: !ruby/object:Gem::Requirement
275
- requirements:
276
- - - "~>"
277
- - !ruby/object:Gem::Version
278
- version: 0.3.4
279
66
  description: 'Errors for Formalism via R18n.
280
67
 
281
68
  '
@@ -297,11 +84,10 @@ licenses:
297
84
  - MIT
298
85
  metadata:
299
86
  bug_tracker_uri: https://github.com/AlexWayfer/formalism-r18n_errors/issues
300
- changelog_uri: https://github.com/AlexWayfer/formalism-r18n_errors/blob/v0.5.0/CHANGELOG.md
87
+ changelog_uri: https://github.com/AlexWayfer/formalism-r18n_errors/blob/v0.6.0/CHANGELOG.md
301
88
  homepage_uri: https://github.com/AlexWayfer/formalism-r18n_errors
302
89
  rubygems_mfa_required: 'true'
303
90
  source_code_uri: https://github.com/AlexWayfer/formalism-r18n_errors
304
- post_install_message:
305
91
  rdoc_options: []
306
92
  require_paths:
307
93
  - lib
@@ -309,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
95
  requirements:
310
96
  - - ">="
311
97
  - !ruby/object:Gem::Version
312
- version: '2.6'
98
+ version: '3.0'
313
99
  - - "<"
314
100
  - !ruby/object:Gem::Version
315
101
  version: '4'
@@ -319,8 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
319
105
  - !ruby/object:Gem::Version
320
106
  version: '0'
321
107
  requirements: []
322
- rubygems_version: 3.3.7
323
- signing_key:
108
+ rubygems_version: 3.6.2
324
109
  specification_version: 4
325
110
  summary: Errors for Formalism via R18n
326
111
  test_files: []