date_validator 0.9.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +52 -0
- data/Gemfile +5 -14
- data/Readme.md +1 -1
- data/{locales → config/locales}/af.yml +6 -6
- data/config/locales/ar.yml +9 -0
- data/config/locales/ca.yml +9 -0
- data/config/locales/de.yml +8 -0
- data/config/locales/en.yml +9 -0
- data/config/locales/es.yml +9 -0
- data/{locales → config/locales}/fr.yml +4 -4
- data/config/locales/it.yml +9 -0
- data/config/locales/ja.yml +9 -0
- data/config/locales/nl.yml +8 -0
- data/config/locales/pl.yml +8 -0
- data/config/locales/pt-BR.yml +8 -0
- data/config/locales/ru.yml +8 -0
- data/config/locales/tr.yml +9 -0
- data/config/locales/zh-CN.yml +9 -0
- data/date_validator.gemspec +8 -6
- data/lib/active_model/validations/date_validator.rb +4 -4
- data/lib/date_validator/engine.rb +0 -4
- data/lib/date_validator/version.rb +1 -1
- data/lib/date_validator.rb +1 -1
- data/test/date_validator_test.rb +2 -0
- data/test/test_helper.rb +2 -1
- metadata +34 -32
- data/.travis.yml +0 -13
- data/locales/ca.yml +0 -8
- data/locales/de.yml +0 -8
- data/locales/en.yml +0 -9
- data/locales/es.yml +0 -8
- data/locales/it.yml +0 -9
- data/locales/ja.yml +0 -9
- data/locales/nl.yml +0 -8
- data/locales/pl.yml +0 -8
- data/locales/pt-BR.yml +0 -8
- data/locales/ru.yml +0 -8
- data/locales/tr.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '0587958367007902f71aaa6c998355ccf98faa62af66f884a1df5b7ee36c9b62'
|
4
|
+
data.tar.gz: 2d51c0d4c8e29bde58cb4b442c49eadf6162b2a1c72a1b7e3d05ccdcd1b4d8ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24782d9c608c4308312e4392e860c09831f0c2a19f114916feb57631722f9a87c79905790c869b1a785e583951b57939c37ab6b6c9d24484d537b2176d46c193
|
7
|
+
data.tar.gz: 2e2bbb1eeba8557913259b678fb5d23f0981bfc2b54f634941d93d667dc6de4c99f3dc2647e11385350df8ccd488efc3987307af7cfc5d078a62fec2a13073e7
|
@@ -0,0 +1,52 @@
|
|
1
|
+
name: "Tests"
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- "*"
|
10
|
+
|
11
|
+
env:
|
12
|
+
CI: "true"
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
main:
|
16
|
+
name: Tests
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
strategy:
|
19
|
+
matrix:
|
20
|
+
ruby: [2.2, 2.3, 2.4, 2.5, 2.6, 2.7]
|
21
|
+
activemodel: [3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1]
|
22
|
+
include:
|
23
|
+
- ruby: 3.0
|
24
|
+
activemodel: 6.0
|
25
|
+
- ruby: 3.0
|
26
|
+
activemodel: 6.1
|
27
|
+
exclude:
|
28
|
+
- ruby: 2.2
|
29
|
+
activemodel: 6.0
|
30
|
+
- ruby: 2.3
|
31
|
+
activemodel: 6.0
|
32
|
+
- ruby: 2.4
|
33
|
+
activemodel: 6.0
|
34
|
+
- ruby: 2.2
|
35
|
+
activemodel: 6.1
|
36
|
+
- ruby: 2.3
|
37
|
+
activemodel: 6.1
|
38
|
+
- ruby: 2.4
|
39
|
+
activemodel: 6.1
|
40
|
+
fail-fast: true
|
41
|
+
env:
|
42
|
+
ACTIVE_MODEL_VERSION: ${{ matrix.activemodel }}
|
43
|
+
steps:
|
44
|
+
- uses: actions/checkout@v2.0.0
|
45
|
+
with:
|
46
|
+
fetch-depth: 1
|
47
|
+
- uses: ruby/setup-ruby@master
|
48
|
+
with:
|
49
|
+
ruby-version: ${{ matrix.ruby }}
|
50
|
+
- run: bundle install --jobs 4 --retry 3
|
51
|
+
name: Install Ruby deps
|
52
|
+
- run: bundle exec rake
|
data/Gemfile
CHANGED
@@ -1,21 +1,12 @@
|
|
1
|
-
source "
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
active_model_version = ENV['ACTIVE_MODEL_VERSION'] || 'default'
|
6
|
-
|
7
5
|
active_model_opts =
|
8
|
-
case
|
9
|
-
when 'master'
|
10
|
-
|
11
|
-
|
12
|
-
'~> 3'
|
13
|
-
else
|
14
|
-
"~> #{active_model_version}"
|
6
|
+
case version = ENV['ACTIVE_MODEL_VERSION'] || "master"
|
7
|
+
when 'master' then { github: 'rails/rails' }
|
8
|
+
when 'default' then '~> 3'
|
9
|
+
else "~> #{version}"
|
15
10
|
end
|
16
11
|
|
17
12
|
gem 'activemodel', active_model_opts
|
18
|
-
|
19
|
-
platforms :rbx do
|
20
|
-
gem 'rubysl', '~> 2.0'
|
21
|
-
end
|
data/Readme.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# date_validator [![Build Status](https://travis-ci.org/codegram/date_validator.png?branch=master)](https://travis-ci.org/codegram/date_validator)
|
2
2
|
|
3
3
|
|
4
|
-
A simple date validator for Rails. Should be compatible with all latest Rubies.
|
4
|
+
A simple date validator for Rails. Should be compatible with all latest Rubies (>2.2, includes Ruby 3.0).
|
5
5
|
|
6
6
|
|
7
7
|
```shell
|
@@ -4,9 +4,9 @@ af:
|
|
4
4
|
errors:
|
5
5
|
messages:
|
6
6
|
not_a_date: "is nie 'n datum nie"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
cannot_be_in_the_future: "kan nie in die toekoms wees nie"
|
7
|
+
date_after: "moet na %{date} wees"
|
8
|
+
date_after_or_equal_to: "moet na of op %{date} wees"
|
9
|
+
date_before: "moet voor %{date} wees"
|
10
|
+
date_before_or_equal_to: "moet voor of op %{date} wees"
|
11
|
+
date_equal_to: "moet gelyk aan %{date} wees"
|
12
|
+
cannot_be_in_the_future: "kan nie in die toekoms wees nie"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
ar:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "ليس بتاريخ"
|
5
|
+
date_after: "يجب أن يكون بعد %{date}"
|
6
|
+
date_after_or_equal_to: "يجب أن يكون مساوي أو بعد %{date}"
|
7
|
+
date_before: "يجب أن يكون قبل %{date}"
|
8
|
+
date_before_or_equal_to: "يجب أن يكون مساوي أو قبل %{date}"
|
9
|
+
date_equal_to: "يجب أن يساوي %{date}"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
ca:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "no és una data"
|
5
|
+
date_after: "ha de ser posterior a %{date}"
|
6
|
+
date_after_or_equal_to: "ha de ser posterior o igual a %{date}"
|
7
|
+
date_before: "ha de ser abans de %{date}"
|
8
|
+
date_before_or_equal_to: "ha de ser abans de o igual a %{date}"
|
9
|
+
date_equal_to: "ha de ser igual a %{date}"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
en:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "is not a date"
|
5
|
+
date_after: "must be after %{date}"
|
6
|
+
date_after_or_equal_to: "must be after or equal to %{date}"
|
7
|
+
date_before: "must be before %{date}"
|
8
|
+
date_before_or_equal_to: "must be before or equal to %{date}"
|
9
|
+
date_equal_to: "must be equal to %{date}"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
es:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "no es una fecha"
|
5
|
+
date_after: "tiene que ser posterior a %{date}"
|
6
|
+
date_after_or_equal_to: "tiene que ser posterior o igual a %{date}"
|
7
|
+
date_before: "tiene que ser antes de %{date}"
|
8
|
+
date_before_or_equal_to: "tiene que ser antes o igual a %{date}"
|
9
|
+
date_equal_to: "tiene que ser igual a %{date}"
|
@@ -5,7 +5,7 @@ fr:
|
|
5
5
|
errors:
|
6
6
|
messages:
|
7
7
|
not_a_date: "n'est pas une date"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
date_after: "doit être après %{date}"
|
9
|
+
date_after_or_equal_to: "doit être supérieur ou égal à %{date}"
|
10
|
+
date_before: "doit être avant %{date}"
|
11
|
+
date_before_or_equal_to: "doit être inférieur ou égal à %{date}"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
it:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "non è una data"
|
5
|
+
date_after: "deve essere successiva a %{date}"
|
6
|
+
date_after_or_equal_to: "deve essere successiva o uguale a %{date}"
|
7
|
+
date_before: "deve essere antecedente a %{date}"
|
8
|
+
date_before_or_equal_to: "deve essere antecedente o uguale a %{date}"
|
9
|
+
date_equal_to: "deve essere uguale a %{date}"
|
@@ -0,0 +1,8 @@
|
|
1
|
+
nl:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "is geen datum"
|
5
|
+
date_after: "moet na %{date} liggen"
|
6
|
+
date_after_or_equal_to: "moet gelijk zijn aan of na %{date} liggen"
|
7
|
+
date_before: "moet voor %{date} liggen"
|
8
|
+
date_before_or_equal_to: "moet gelijk zijn of voor %{date} liggen"
|
@@ -0,0 +1,8 @@
|
|
1
|
+
pt-BR:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "não é uma data válida"
|
5
|
+
date_after: "deve ser após %{date}"
|
6
|
+
date_after_or_equal_to: "deve ser após ou igual a %{date}"
|
7
|
+
date_before: "deve ser antes de %{date}"
|
8
|
+
date_before_or_equal_to: "deve ser antes ou igual a %{date}"
|
@@ -0,0 +1,8 @@
|
|
1
|
+
ru:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "не является датой"
|
5
|
+
date_after: "должна быть позднее чем %{date}"
|
6
|
+
date_after_or_equal_to: "должна равняться или быть позднее чем %{date}"
|
7
|
+
date_before: "должна быть ранее чем %{date}"
|
8
|
+
date_before_or_equal_to: "должна равняться или быть ранее чем %{date}"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
tr:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_a_date: "geçerli tarih değil"
|
5
|
+
date_after: "%{date} den ileri bir tarih olmalı"
|
6
|
+
date_after_or_equal_to: "%{date} ile aynı veya ileri bir tarih olmalı"
|
7
|
+
date_before: "%{date} den öncesi bir tarih olmalı"
|
8
|
+
date_before_or_equal_to: "%{date} ile aynı veya öncesi bir tarih olmalı"
|
9
|
+
date_equal_to: "%{date} ile aynı tarihte olmalı"
|
data/date_validator.gemspec
CHANGED
@@ -5,22 +5,24 @@ require "date_validator/version"
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "date_validator"
|
7
7
|
s.version = DateValidator::VERSION
|
8
|
-
s.platform = Gem::Platform::RUBY
|
9
8
|
s.authors = ["Oriol Gual", "Josep M. Bach", "Josep Jaume Rey"]
|
10
9
|
s.email = ["info@codegram.com"]
|
11
10
|
s.homepage = "http://github.com/codegram/date_validator"
|
12
|
-
s.
|
13
|
-
s.
|
11
|
+
s.license = "MIT"
|
12
|
+
s.summary = %q{A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails 3+, based on ActiveModel.}
|
13
|
+
s.description = %q{A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails 3+, based on ActiveModel. Currently supporting :after, :before, :after_or_equal_to and :before_or_equal_to options.}
|
14
14
|
|
15
15
|
s.rubyforge_project = "date_validator"
|
16
16
|
|
17
|
-
s.add_runtime_dependency 'activemodel'
|
18
|
-
s.add_runtime_dependency 'activesupport'
|
17
|
+
s.add_runtime_dependency 'activemodel', '>= 3'
|
18
|
+
s.add_runtime_dependency 'activesupport', '>= 3'
|
19
19
|
|
20
20
|
s.add_development_dependency 'minitest'
|
21
|
-
s.add_development_dependency 'rake'
|
21
|
+
s.add_development_dependency 'rake', '>= 12.3.3'
|
22
22
|
s.add_development_dependency 'tzinfo'
|
23
23
|
|
24
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
|
25
|
+
|
24
26
|
s.files = `git ls-files`.split("\n")
|
25
27
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
26
28
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
@@ -59,19 +59,19 @@ module ActiveModel
|
|
59
59
|
end
|
60
60
|
|
61
61
|
if value_before_type_cast.present? && value.nil?
|
62
|
-
record.errors.add(attr_name, :not_a_date, options)
|
62
|
+
record.errors.add(attr_name, :not_a_date, **options)
|
63
63
|
return
|
64
64
|
end
|
65
65
|
|
66
66
|
return if (value.nil? && options[:allow_nil]) || (value.blank? && options[:allow_blank])
|
67
67
|
|
68
68
|
unless value
|
69
|
-
record.errors.add(attr_name, :not_a_date, options)
|
69
|
+
record.errors.add(attr_name, :not_a_date, **options)
|
70
70
|
return
|
71
71
|
end
|
72
72
|
|
73
73
|
unless is_time?(value)
|
74
|
-
record.errors.add(attr_name, :not_a_date, options)
|
74
|
+
record.errors.add(attr_name, :not_a_date, **options)
|
75
75
|
return
|
76
76
|
end
|
77
77
|
|
@@ -94,7 +94,7 @@ module ActiveModel
|
|
94
94
|
end
|
95
95
|
|
96
96
|
unless is_time?(option_value) && value.to_i.send(CHECKS[option], option_value.to_i)
|
97
|
-
record.errors.add(attr_name, option, options.merge(
|
97
|
+
record.errors.add(attr_name, :"date_#{option}", **options.merge(
|
98
98
|
value: original_value,
|
99
99
|
date: (I18n.localize(original_option_value) rescue original_option_value)
|
100
100
|
))
|
data/lib/date_validator.rb
CHANGED
@@ -2,7 +2,7 @@ require 'active_model/validations/date_validator'
|
|
2
2
|
require 'active_support/i18n'
|
3
3
|
require 'date_validator/engine' if defined?(Rails)
|
4
4
|
|
5
|
-
# A simple date validator for Rails 3
|
5
|
+
# A simple date validator for Rails 3+.
|
6
6
|
#
|
7
7
|
# @example
|
8
8
|
# validates :expiration_date,
|
data/test/date_validator_test.rb
CHANGED
@@ -84,6 +84,8 @@ module ActiveModel
|
|
84
84
|
|
85
85
|
it "allows custom validation message to be handled by I18n" do
|
86
86
|
custom_message = 'Custom Date Message'
|
87
|
+
|
88
|
+
I18n.backend.eager_load! if I18n.backend.respond_to?(:eager_load!)
|
87
89
|
I18n.backend.store_translations('en', { errors: { messages: { not_a_date: custom_message }}})
|
88
90
|
|
89
91
|
TestRecord.validates :expiration_date, date: true
|
data/test/test_helper.rb
CHANGED
@@ -12,9 +12,10 @@ gem 'minitest'
|
|
12
12
|
require 'minitest/autorun'
|
13
13
|
|
14
14
|
require 'active_model'
|
15
|
+
require 'active_support/core_ext/time/zones'
|
15
16
|
require 'date_validator'
|
16
17
|
|
17
|
-
I18n.load_path += Dir[File.expand_path(File.join(File.dirname(__FILE__), '../locales', '*.yml')).to_s]
|
18
|
+
I18n.load_path += Dir[File.expand_path(File.join(File.dirname(__FILE__), '../config/locales', '*.yml')).to_s]
|
18
19
|
|
19
20
|
class TestRecord
|
20
21
|
include ActiveModel::Validations
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: date_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oriol Gual
|
8
8
|
- Josep M. Bach
|
9
9
|
- Josep Jaume Rey
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-07-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
28
|
+
version: '3'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: activesupport
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '3'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '3'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: minitest
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,14 +60,14 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
63
|
+
version: 12.3.3
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
70
|
+
version: 12.3.3
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: tzinfo
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
description: A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails
|
86
|
-
3
|
86
|
+
3+, based on ActiveModel. Currently supporting :after, :before, :after_or_equal_to
|
87
87
|
and :before_or_equal_to options.
|
88
88
|
email:
|
89
89
|
- info@codegram.com
|
@@ -93,37 +93,40 @@ extra_rdoc_files: []
|
|
93
93
|
files:
|
94
94
|
- ".document"
|
95
95
|
- ".gemtest"
|
96
|
+
- ".github/workflows/ci.yml"
|
96
97
|
- ".gitignore"
|
97
98
|
- ".rspec"
|
98
|
-
- ".travis.yml"
|
99
99
|
- Gemfile
|
100
100
|
- LICENSE
|
101
101
|
- Rakefile
|
102
102
|
- Readme.md
|
103
|
+
- config/locales/af.yml
|
104
|
+
- config/locales/ar.yml
|
105
|
+
- config/locales/ca.yml
|
106
|
+
- config/locales/de.yml
|
107
|
+
- config/locales/en.yml
|
108
|
+
- config/locales/es.yml
|
109
|
+
- config/locales/fr.yml
|
110
|
+
- config/locales/it.yml
|
111
|
+
- config/locales/ja.yml
|
112
|
+
- config/locales/nl.yml
|
113
|
+
- config/locales/pl.yml
|
114
|
+
- config/locales/pt-BR.yml
|
115
|
+
- config/locales/ru.yml
|
116
|
+
- config/locales/tr.yml
|
117
|
+
- config/locales/zh-CN.yml
|
103
118
|
- date_validator.gemspec
|
104
119
|
- lib/active_model/validations/date_validator.rb
|
105
120
|
- lib/date_validator.rb
|
106
121
|
- lib/date_validator/engine.rb
|
107
122
|
- lib/date_validator/version.rb
|
108
|
-
- locales/af.yml
|
109
|
-
- locales/ca.yml
|
110
|
-
- locales/de.yml
|
111
|
-
- locales/en.yml
|
112
|
-
- locales/es.yml
|
113
|
-
- locales/fr.yml
|
114
|
-
- locales/it.yml
|
115
|
-
- locales/ja.yml
|
116
|
-
- locales/nl.yml
|
117
|
-
- locales/pl.yml
|
118
|
-
- locales/pt-BR.yml
|
119
|
-
- locales/ru.yml
|
120
|
-
- locales/tr.yml
|
121
123
|
- test/date_validator_test.rb
|
122
124
|
- test/test_helper.rb
|
123
125
|
homepage: http://github.com/codegram/date_validator
|
124
|
-
licenses:
|
126
|
+
licenses:
|
127
|
+
- MIT
|
125
128
|
metadata: {}
|
126
|
-
post_install_message:
|
129
|
+
post_install_message:
|
127
130
|
rdoc_options: []
|
128
131
|
require_paths:
|
129
132
|
- lib
|
@@ -131,19 +134,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
134
|
requirements:
|
132
135
|
- - ">="
|
133
136
|
- !ruby/object:Gem::Version
|
134
|
-
version: '
|
137
|
+
version: '2.2'
|
135
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
139
|
requirements:
|
137
140
|
- - ">="
|
138
141
|
- !ruby/object:Gem::Version
|
139
142
|
version: '0'
|
140
143
|
requirements: []
|
141
|
-
|
142
|
-
|
143
|
-
signing_key:
|
144
|
+
rubygems_version: 3.2.22
|
145
|
+
signing_key:
|
144
146
|
specification_version: 4
|
145
|
-
summary: A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails 3
|
146
|
-
on ActiveModel.
|
147
|
+
summary: A simple, ORM agnostic, Ruby 1.9 compatible date validator for Rails 3+,
|
148
|
+
based on ActiveModel.
|
147
149
|
test_files:
|
148
150
|
- test/date_validator_test.rb
|
149
151
|
- test/test_helper.rb
|
data/.travis.yml
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# http://about.travis-ci.org/docs/user/build-configuration/
|
2
|
-
langauge: ruby
|
3
|
-
before_install:
|
4
|
-
- gem update bundler
|
5
|
-
env:
|
6
|
-
- ACTIVE_MODEL_VERSION=3.2
|
7
|
-
- ACTIVE_MODEL_VERSION=4.0
|
8
|
-
- ACTIVE_MODEL_VERSION=4.2
|
9
|
-
rvm:
|
10
|
-
- 1.9.3
|
11
|
-
- 2.2
|
12
|
-
- 2.3.0
|
13
|
-
- jruby-19mode
|
data/locales/ca.yml
DELETED
data/locales/de.yml
DELETED
data/locales/en.yml
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
not_a_date: "is not a date"
|
5
|
-
after: "must be after %{date}"
|
6
|
-
after_or_equal_to: "must be after or equal to %{date}"
|
7
|
-
before: "must be before %{date}"
|
8
|
-
before_or_equal_to: "must be before or equal to %{date}"
|
9
|
-
equal_to: "must be equal to %{date}"
|
data/locales/es.yml
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
es:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
not_a_date: "no es una fecha"
|
5
|
-
after: "tiene que ser posterior a %{date}"
|
6
|
-
after_or_equal_to: "tiene que ser posterior o igual a %{date}"
|
7
|
-
before: "tiene que ser antes de %{date}"
|
8
|
-
before_or_equal_to: "tiene que ser antes o igual a %{date}"
|
data/locales/it.yml
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
it:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
not_a_date: "non è una data"
|
5
|
-
after: "deve essere successiva a %{date}"
|
6
|
-
after_or_equal_to: "deve essere successiva o uguale a %{date}"
|
7
|
-
before: "deve essere antecedente a %{date}"
|
8
|
-
before_or_equal_to: "deve essere antecedente o uguale a %{date}"
|
9
|
-
equal_to: "deve essere uguale a %{date}"
|
data/locales/ja.yml
DELETED
data/locales/nl.yml
DELETED
data/locales/pl.yml
DELETED
data/locales/pt-BR.yml
DELETED
data/locales/ru.yml
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
ru:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
not_a_date: "не является датой"
|
5
|
-
after: "должна быть позднее чем %{date}"
|
6
|
-
after_or_equal_to: "должна равняться или быть позднее чем %{date}"
|
7
|
-
before: "должна быть ранее чем %{date}"
|
8
|
-
before_or_equal_to: "должна равняться или быть ранее чем %{date}"
|
data/locales/tr.yml
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
tr:
|
2
|
-
errors:
|
3
|
-
messages:
|
4
|
-
not_a_date: "geçerli tarih değil"
|
5
|
-
after: "%{date} den ileri bir tarih olmalı"
|
6
|
-
after_or_equal_to: "%{date} ile aynı veya ileri bir tarih olmalı"
|
7
|
-
before: "%{date} den öncesi bir tarih olmalı"
|
8
|
-
before_or_equal_to: "%{date} ile aynı veya öncesi bir tarih olmalı"
|
9
|
-
equal_to: "%{date} ile aynı tarihte olmalı"
|