active_dry_form 1.2.1 → 1.3.0

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: d1617a05c5aafd73c384b8648854bb63ec91d0ee67bde7839fc3066f99405094
4
- data.tar.gz: b38b427a933750e6ba71f8e8b7f73b961f016018e9d61937db5f4c20297debd7
3
+ metadata.gz: 15d861e2d174e5e5bc2e8421cd3f7b296f2c96b89f027d9d198eea87db381817
4
+ data.tar.gz: 43a47d22a351611b2774e5306044c300c3b14edf77e67e56036011a889d0ba77
5
5
  SHA512:
6
- metadata.gz: d87bf0612c714715464887c085b8878fbc28a83c9229301afaaafaa513d214acb7e47b3f65e908439e5ccc6908f8dbc3ec5376c0b6386e8e4d3e275f7a11b2b8
7
- data.tar.gz: '098529ead554b1a0182a31053e7476c7cef292b6301da279733727d916d5e4ed9417e9eb92ca3b2d7bca1a519138bc137dd5fbad9f3856b6914f548bd3730490'
6
+ metadata.gz: 91988dad5e0770df970e20c128a6f73fb1a00fa3f69cb0a1dcc40f50951815ed0b7f181f7d4d158d78b1db8d43ca4cc03e7c571a468133fbe6e871d1323d4655
7
+ data.tar.gz: bc82ac23230c20789b1eb1bfcfb43c216406f7fd98b71efa7996cd8ad7bb765470b4ccd3d23b767a1b5827b4cb4b9a0122fb4f709023e3bc2f4ed532318f2ffd
data/Gemfile.lock CHANGED
@@ -1,6 +1,6 @@
1
1
  GIT
2
2
  remote: https://github.com/corp-gp/rubocop-gp.git
3
- revision: 867f7e1351c3730897cacdc20ce2d727604de245
3
+ revision: e5bd900ce4b10077cf8f4ae88a5a6e32e7861b65
4
4
  specs:
5
5
  rubocop-gp (0.0.4)
6
6
  rubocop
@@ -37,70 +37,64 @@ PATH
37
37
  GEM
38
38
  remote: https://rubygems.org/
39
39
  specs:
40
- actionpack (7.2.2.1)
41
- actionview (= 7.2.2.1)
42
- activesupport (= 7.2.2.1)
40
+ actionpack (7.1.3.4)
41
+ actionview (= 7.1.3.4)
42
+ activesupport (= 7.1.3.4)
43
43
  nokogiri (>= 1.8.5)
44
44
  racc
45
- rack (>= 2.2.4, < 3.2)
45
+ rack (>= 2.2.4)
46
46
  rack-session (>= 1.0.1)
47
47
  rack-test (>= 0.6.3)
48
48
  rails-dom-testing (~> 2.2)
49
49
  rails-html-sanitizer (~> 1.6)
50
- useragent (~> 0.16)
51
- actionview (7.2.2.1)
52
- activesupport (= 7.2.2.1)
50
+ actionview (7.1.3.4)
51
+ activesupport (= 7.1.3.4)
53
52
  builder (~> 3.1)
54
53
  erubi (~> 1.11)
55
54
  rails-dom-testing (~> 2.2)
56
55
  rails-html-sanitizer (~> 1.6)
57
- activemodel (7.2.2.1)
58
- activesupport (= 7.2.2.1)
59
- activerecord (7.2.2.1)
60
- activemodel (= 7.2.2.1)
61
- activesupport (= 7.2.2.1)
56
+ activemodel (7.1.3.4)
57
+ activesupport (= 7.1.3.4)
58
+ activerecord (7.1.3.4)
59
+ activemodel (= 7.1.3.4)
60
+ activesupport (= 7.1.3.4)
62
61
  timeout (>= 0.4.0)
63
- activesupport (7.2.2.1)
62
+ activesupport (7.1.3.4)
64
63
  base64
65
- benchmark (>= 0.3)
66
64
  bigdecimal
67
- concurrent-ruby (~> 1.0, >= 1.3.1)
65
+ concurrent-ruby (~> 1.0, >= 1.0.2)
68
66
  connection_pool (>= 2.2.5)
69
67
  drb
70
68
  i18n (>= 1.6, < 2)
71
- logger (>= 1.4.2)
72
69
  minitest (>= 5.1)
73
- securerandom (>= 0.3)
74
- tzinfo (~> 2.0, >= 2.0.5)
70
+ mutex_m
71
+ tzinfo (~> 2.0)
75
72
  ast (2.4.2)
76
73
  base64 (0.2.0)
77
- benchmark (0.4.0)
78
- bigdecimal (3.1.9)
74
+ bigdecimal (3.1.8)
79
75
  builder (3.3.0)
80
- concurrent-ruby (1.3.4)
81
- connection_pool (2.5.0)
76
+ concurrent-ruby (1.3.3)
77
+ connection_pool (2.4.1)
82
78
  crass (1.0.6)
83
79
  diff-lcs (1.5.1)
84
80
  drb (2.2.1)
85
- dry-configurable (1.3.0)
86
- dry-core (~> 1.1)
81
+ dry-configurable (1.2.0)
82
+ dry-core (~> 1.0, < 2)
87
83
  zeitwerk (~> 2.6)
88
- dry-core (1.1.0)
84
+ dry-core (1.0.1)
89
85
  concurrent-ruby (~> 1.0)
90
- logger
91
86
  zeitwerk (~> 2.6)
92
- dry-inflector (1.2.0)
93
- dry-initializer (3.2.0)
94
- dry-logic (1.6.0)
95
- bigdecimal
87
+ dry-inflector (1.1.0)
88
+ dry-initializer (3.1.1)
89
+ dry-logic (1.5.0)
96
90
  concurrent-ruby (~> 1.0)
97
- dry-core (~> 1.1)
91
+ dry-core (~> 1.0, < 2)
98
92
  zeitwerk (~> 2.6)
99
- dry-monads (1.7.0)
93
+ dry-monads (1.6.0)
100
94
  concurrent-ruby (~> 1.0)
101
- dry-core (~> 1.1)
95
+ dry-core (~> 1.0, < 2)
102
96
  zeitwerk (~> 2.6)
103
- dry-types (1.8.0)
97
+ dry-types (1.7.2)
104
98
  bigdecimal (~> 3.0)
105
99
  concurrent-ruby (~> 1.0)
106
100
  dry-core (~> 1.0)
@@ -113,97 +107,94 @@ GEM
113
107
  dry-initializer (~> 3.0)
114
108
  dry-schema (>= 1.12, < 2)
115
109
  zeitwerk (~> 2.6)
116
- erubi (1.13.1)
117
- i18n (1.14.6)
110
+ erubi (1.13.0)
111
+ i18n (1.14.5)
118
112
  concurrent-ruby (~> 1.0)
119
- json (2.9.1)
113
+ json (2.7.2)
120
114
  language_server-protocol (3.17.0.3)
121
- logger (1.6.5)
122
- loofah (2.24.0)
115
+ loofah (2.22.0)
123
116
  crass (~> 1.0.2)
124
117
  nokogiri (>= 1.12.0)
125
- mini_portile2 (2.8.8)
126
- minitest (5.25.4)
127
- nokogiri (1.18.1)
128
- mini_portile2 (~> 2.8.2)
118
+ minitest (5.24.1)
119
+ mutex_m (0.2.0)
120
+ nokogiri (1.16.6-arm64-darwin)
129
121
  racc (~> 1.4)
130
- nokogiri (1.18.1-arm64-darwin)
122
+ nokogiri (1.16.6-x86_64-linux)
131
123
  racc (~> 1.4)
132
- parallel (1.26.3)
133
- parser (3.3.6.0)
124
+ parallel (1.25.1)
125
+ parser (3.3.3.0)
134
126
  ast (~> 2.4.1)
135
127
  racc
136
- racc (1.8.1)
137
- rack (3.1.8)
138
- rack-session (2.1.0)
139
- base64 (>= 0.1.0)
128
+ racc (1.8.0)
129
+ rack (3.1.6)
130
+ rack-session (2.0.0)
140
131
  rack (>= 3.0.0)
141
- rack-test (2.2.0)
132
+ rack-test (2.1.0)
142
133
  rack (>= 1.3)
143
134
  rails-dom-testing (2.2.0)
144
135
  activesupport (>= 5.0.0)
145
136
  minitest
146
137
  nokogiri (>= 1.6)
147
- rails-html-sanitizer (1.6.2)
138
+ rails-html-sanitizer (1.6.0)
148
139
  loofah (~> 2.21)
149
- nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
140
+ nokogiri (~> 1.14)
150
141
  rainbow (3.1.1)
151
142
  rake (13.2.1)
152
- regexp_parser (2.10.0)
143
+ regexp_parser (2.9.2)
144
+ rexml (3.3.1)
145
+ strscan
153
146
  rspec (3.13.0)
154
147
  rspec-core (~> 3.13.0)
155
148
  rspec-expectations (~> 3.13.0)
156
149
  rspec-mocks (~> 3.13.0)
157
- rspec-core (3.13.2)
150
+ rspec-core (3.13.0)
158
151
  rspec-support (~> 3.13.0)
159
- rspec-expectations (3.13.3)
152
+ rspec-expectations (3.13.1)
160
153
  diff-lcs (>= 1.2.0, < 2.0)
161
154
  rspec-support (~> 3.13.0)
162
- rspec-mocks (3.13.2)
155
+ rspec-mocks (3.13.1)
163
156
  diff-lcs (>= 1.2.0, < 2.0)
164
157
  rspec-support (~> 3.13.0)
165
- rspec-support (3.13.2)
166
- rubocop (1.70.0)
158
+ rspec-support (3.13.1)
159
+ rubocop (1.64.1)
167
160
  json (~> 2.3)
168
161
  language_server-protocol (>= 3.17.0)
169
162
  parallel (~> 1.10)
170
163
  parser (>= 3.3.0.2)
171
164
  rainbow (>= 2.2.2, < 4.0)
172
- regexp_parser (>= 2.9.3, < 3.0)
173
- rubocop-ast (>= 1.36.2, < 2.0)
165
+ regexp_parser (>= 1.8, < 3.0)
166
+ rexml (>= 3.2.5, < 4.0)
167
+ rubocop-ast (>= 1.31.1, < 2.0)
174
168
  ruby-progressbar (~> 1.7)
175
- unicode-display_width (>= 2.4.0, < 4.0)
176
- rubocop-ast (1.37.0)
169
+ unicode-display_width (>= 2.4.0, < 3.0)
170
+ rubocop-ast (1.31.3)
177
171
  parser (>= 3.3.1.0)
178
172
  rubocop-capybara (2.21.0)
179
173
  rubocop (~> 1.41)
180
174
  rubocop-factory_bot (2.26.1)
181
175
  rubocop (~> 1.61)
182
- rubocop-performance (1.23.1)
176
+ rubocop-performance (1.21.1)
183
177
  rubocop (>= 1.48.1, < 2.0)
184
178
  rubocop-ast (>= 1.31.1, < 2.0)
185
- rubocop-rails (2.28.0)
179
+ rubocop-rails (2.25.1)
186
180
  activesupport (>= 4.2.0)
187
181
  rack (>= 1.1)
188
- rubocop (>= 1.52.0, < 2.0)
182
+ rubocop (>= 1.33.0, < 2.0)
189
183
  rubocop-ast (>= 1.31.1, < 2.0)
190
- rubocop-rspec (3.3.0)
184
+ rubocop-rspec (3.0.2)
191
185
  rubocop (~> 1.61)
192
186
  rubocop-rspec_rails (2.30.0)
193
187
  rubocop (~> 1.61)
194
188
  rubocop-rspec (~> 3, >= 3.0.1)
195
189
  ruby-progressbar (1.13.0)
196
- securerandom (0.4.1)
197
190
  sqlite3 (1.7.3-arm64-darwin)
198
191
  sqlite3 (1.7.3-x86_64-linux)
199
- timeout (0.4.3)
192
+ strscan (3.1.0)
193
+ timeout (0.4.1)
200
194
  tzinfo (2.0.6)
201
195
  concurrent-ruby (~> 1.0)
202
- unicode-display_width (3.1.3)
203
- unicode-emoji (~> 4.0, >= 4.0.4)
204
- unicode-emoji (4.0.4)
205
- useragent (0.16.11)
206
- zeitwerk (2.6.18)
196
+ unicode-display_width (2.5.0)
197
+ zeitwerk (2.6.16)
207
198
 
208
199
  PLATFORMS
209
200
  arm64-darwin-21
@@ -98,19 +98,12 @@ module ActiveDryForm
98
98
  self
99
99
  end
100
100
 
101
- def to_key
102
- key = id
103
- [key] if key
104
- end
105
-
106
- # hidden field for nested association
107
- def id
108
- record&.id
109
- end
101
+ delegate :to_key, :id, to: :record, allow_nil: true
110
102
 
111
103
  # используется при генерации URL, когда record.persisted?
112
104
  def to_param
113
- id.to_s
105
+ # подмодель может быть Hash, например сохраняется в json атрибут
106
+ record.is_a?(Hash) ? '' : record.to_param
114
107
  end
115
108
 
116
109
  def validate
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveDryForm
4
4
 
5
- VERSION = '1.2.1'
5
+ VERSION = '1.3.0'
6
6
 
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_dry_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ermolaev Andrey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-13 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  requirements: []
134
- rubygems_version: 3.3.17
134
+ rubygems_version: 3.3.7
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: Form validation for Rails with Dry-Validation