formeze 5.0.0 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +3 -2
- data/formeze.gemspec +2 -2
- data/lib/formeze.rb +12 -4
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d48156472abef4843eb20d0f3a5fce2c17ae7551aeaf34d1fe0da1c8d6547cd2
|
4
|
+
data.tar.gz: 922345d41f4edd5b694156841e23c52c8b1a35cbbe476925430fef299470122a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19c9850c142de6097c31a52e8badb70e475e4342359dcd45787858775bbfec1c6e21a759e9628c8a08529513c2493ad92aee0331999fe303ef6162e08ed1b541
|
7
|
+
data.tar.gz: 6c2c2cfbab1abe61e814a8531ace2ed05edf3d00e8c4afbba048b862d02b8f3b351eee94c549ef80e22caa2cb51c351149728a5f6a82eef84d41c237b603e1fd
|
data/CHANGES.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -53,8 +53,9 @@ else
|
|
53
53
|
end
|
54
54
|
```
|
55
55
|
|
56
|
-
Formeze will
|
57
|
-
|
56
|
+
Formeze will exclude any parameters defined in `Formeze.exclude`, which by
|
57
|
+
default includes framework defined parameters like `_method`, `authenticity_token`,
|
58
|
+
`commit`, and `utf8`.
|
58
59
|
|
59
60
|
If you prefer not to inherit from the `Formeze::Form` class then you can
|
60
61
|
instead call the `Formeze.setup` method on your classes like this:
|
data/formeze.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'formeze'
|
3
|
-
s.version = '5.
|
3
|
+
s.version = '5.1.0'
|
4
4
|
s.license = 'LGPL-3.0'
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.authors = ['Tim Craft']
|
7
|
-
s.email = ['
|
7
|
+
s.email = ['email@timcraft.com']
|
8
8
|
s.homepage = 'https://github.com/readysteady/formeze'
|
9
9
|
s.description = 'Ruby gem for parsing and validating form data'
|
10
10
|
s.summary = 'See description'
|
data/lib/formeze.rb
CHANGED
@@ -88,10 +88,8 @@ module Formeze
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
-
|
92
|
-
form_data.delete(
|
93
|
-
form_data.delete('commit')
|
94
|
-
form_data.delete('utf8')
|
91
|
+
Formeze.exclude.each do |key|
|
92
|
+
form_data.delete(key)
|
95
93
|
end
|
96
94
|
|
97
95
|
unless form_data.empty?
|
@@ -140,6 +138,16 @@ module Formeze
|
|
140
138
|
alias_method :to_hash, :to_h
|
141
139
|
end
|
142
140
|
|
141
|
+
class << self
|
142
|
+
attr_accessor :exclude
|
143
|
+
end
|
144
|
+
|
145
|
+
if defined?(Rails)
|
146
|
+
self.exclude = %w[_method authenticity_token commit utf8]
|
147
|
+
else
|
148
|
+
self.exclude = %w[_method _csrf]
|
149
|
+
end
|
150
|
+
|
143
151
|
def self.label(field_name)
|
144
152
|
field_name.to_s.tr('_', ' ').capitalize
|
145
153
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formeze
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Craft
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rack
|
@@ -26,7 +25,7 @@ dependencies:
|
|
26
25
|
version: '3'
|
27
26
|
description: Ruby gem for parsing and validating form data
|
28
27
|
email:
|
29
|
-
-
|
28
|
+
- email@timcraft.com
|
30
29
|
executables: []
|
31
30
|
extensions: []
|
32
31
|
extra_rdoc_files: []
|
@@ -52,7 +51,6 @@ metadata:
|
|
52
51
|
source_code_uri: https://github.com/readysteady/formeze
|
53
52
|
bug_tracker_uri: https://github.com/readysteady/formeze/issues
|
54
53
|
changelog_uri: https://github.com/readysteady/formeze/blob/main/CHANGES.md
|
55
|
-
post_install_message:
|
56
54
|
rdoc_options: []
|
57
55
|
require_paths:
|
58
56
|
- lib
|
@@ -67,8 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
65
|
- !ruby/object:Gem::Version
|
68
66
|
version: '0'
|
69
67
|
requirements: []
|
70
|
-
rubygems_version: 3.
|
71
|
-
signing_key:
|
68
|
+
rubygems_version: 3.6.2
|
72
69
|
specification_version: 4
|
73
70
|
summary: See description
|
74
71
|
test_files: []
|