validates_timeliness 6.0.0.alpha1 → 6.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +1 -1
- data/lib/validates_timeliness/validator.rb +3 -3
- data/lib/validates_timeliness/version.rb +1 -1
- data/validates_timeliness.gemspec +2 -1
- metadata +23 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b584b13fcefa901798be0f9d6e1cf51eaf80a3f0d64c6c97c63289abb4b98352
|
4
|
+
data.tar.gz: 5f5fa790ca28e6a0f94ddc487987e27aa8a74a5607e549aa71beefd1f12e87e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54c496a3f7275eb0a8c037b5e1fb22cc17debfcbaf35c6821209b900dcf6e9efdda11f7eb5f8083372feaed9ae5936119cb483a139d3c1d78de67e52d1bd7afc
|
7
|
+
data.tar.gz: fc6279b210ef3e43b357b49540f4dc201778239cce5507589677c45fb72155f95430b13f07fb95950f112f9efa13750f4fb008a7f9689ffc9e4d929e351bafe6
|
data/CHANGELOG.rdoc
CHANGED
@@ -85,12 +85,12 @@ module ValidatesTimeliness
|
|
85
85
|
|
86
86
|
def add_error(record, attr_name, message, value=nil)
|
87
87
|
value = format_error_value(value) if value
|
88
|
-
message_options = { :
|
89
|
-
record.errors.add(attr_name, message,
|
88
|
+
message_options = { message: options.fetch(:"#{message}_message", options[:message]), restriction: value }
|
89
|
+
record.errors.add(attr_name, message, message_options)
|
90
90
|
end
|
91
91
|
|
92
92
|
def format_error_value(value)
|
93
|
-
format = I18n.t(@type, :
|
93
|
+
format = I18n.t(@type, default: DEFAULT_ERROR_VALUE_FORMATS[@type], scope: 'validates_timeliness.error_value_formats')
|
94
94
|
value.strftime(format)
|
95
95
|
end
|
96
96
|
|
@@ -17,5 +17,6 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
18
|
s.extra_rdoc_files = ["README.rdoc", "CHANGELOG.rdoc", "LICENSE"]
|
19
19
|
|
20
|
-
s.add_runtime_dependency(
|
20
|
+
s.add_runtime_dependency("activemodel", [">= 6.0.0", "< 7"])
|
21
|
+
s.add_runtime_dependency("timeliness", [">= 0.3.10", "< 1"])
|
21
22
|
end
|
metadata
CHANGED
@@ -1,15 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: validates_timeliness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.0.
|
4
|
+
version: 6.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Meehan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activemodel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.0.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 6.0.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7'
|
13
33
|
- !ruby/object:Gem::Dependency
|
14
34
|
name: timeliness
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
123
|
- !ruby/object:Gem::Version
|
104
124
|
version: 1.3.1
|
105
125
|
requirements: []
|
106
|
-
rubygems_version: 3.0.3
|
126
|
+
rubygems_version: 3.0.3.1
|
107
127
|
signing_key:
|
108
128
|
specification_version: 4
|
109
129
|
summary: Date and time validation plugin for Rails which allows custom formats
|