validates_timeliness 6.0.1 → 7.0.0.beta2

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: a72c9c656e7bb6b4987658858001d6654a591b12a2aa6322f2b38a932ef4c7b5
4
- data.tar.gz: b8449806435f41af895a80c61a7e641f42d4581aaee40183781a222ea027876a
3
+ metadata.gz: 291ec2c50666a8ce39654fb9c065ca22a27cc91413039a41faa1045e5143ee7e
4
+ data.tar.gz: 8ec042268f1524503c5daf4e0038769d64b0be9b0329281137a569579a5d991a
5
5
  SHA512:
6
- metadata.gz: 68e98f1017b315190106b17608ce8d5df1977f101154c91a89fea550b2546b10ec569b6ba79ff51ae4efd760bc61e91756e7561624b8e8da7ae281d407c012a4
7
- data.tar.gz: bda2a3e5f833ed1e3467e5e3ee2c2030d964187e9c23611c2afa1265c76096590332ae1739d8196c429eca57a2f8720a1c2e67cb87e75ba8a777f1c7f8939e56
6
+ metadata.gz: 0f7fd09d93f725dcbda325d6d681f1f68fd765ea75a5ae8d3206fe369fd9647f1ae6cb1be36d353c790482e310bd4f8cd4cc749fbb75a8aafc8b4653f7e76025
7
+ data.tar.gz: 433b16c8be0034ca7e9d8f6349ee9423a1437df4183e47efd623116b634287833f7b57f7f7a456bff06a1bbb9eb19df14c5cf73a0a6bb1e46d52f3ff112522df
@@ -7,18 +7,12 @@ jobs:
7
7
  fail-fast: false
8
8
  matrix:
9
9
  include:
10
- - gemfile: rails_6_0
11
- ruby: 2.6
12
- - gemfile: rails_6_0
10
+ - gemfile: rails_7_0
13
11
  ruby: 2.7
14
- - gemfile: rails_6_0
15
- ruby: 3.0
16
- - gemfile: rails_6_1
17
- ruby: 2.6
18
- - gemfile: rails_6_1
19
- ruby: 2.7
20
- - gemfile: rails_6_1
12
+ - gemfile: rails_7_0
21
13
  ruby: 3.0
14
+ - gemfile: rails_7_0
15
+ ruby: 3.1
22
16
 
23
17
  name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }}
24
18
  env:
data/README.md CHANGED
@@ -6,13 +6,13 @@
6
6
 
7
7
  ## Description
8
8
 
9
- Complete validation of dates, times and datetimes for Rails 6.x and
10
- ActiveModel.
9
+ Complete validation of dates, times and datetimes for Rails 7.x and ActiveModel.
11
10
 
12
- Old Rails versions:
11
+ Older Rails versions:
13
12
 
14
13
  - Rails 4.x: [https://github.com/adzap/validates_timeliness/tree/4-0-stable]
15
14
  - Rails 5.x: [https://github.com/adzap/validates_timeliness/tree/5-0-stable]
15
+ - Rails 6.x: [https://github.com/adzap/validates_timeliness/tree/6-0-stable]
16
16
 
17
17
 
18
18
  ## Features
@@ -30,7 +30,7 @@ Old Rails versions:
30
30
 
31
31
  In Gemfile
32
32
  ```ruby
33
- gem 'validates_timeliness', '~> 6.0.0'
33
+ gem 'validates_timeliness', '~> 7.0.0.beta1'
34
34
  ```
35
35
 
36
36
  Run bundler:
@@ -2,9 +2,9 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "~> 6.0.0"
5
+ gem "rails", "~> 7.0.0"
6
6
  gem "rspec"
7
- gem "rspec-rails", "~> 3.7"
7
+ gem "rspec-rails", "~> 6.0"
8
8
  gem "sqlite3"
9
9
  gem "byebug"
10
10
  gem "appraisal"
@@ -2,11 +2,10 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "~> 6.1.0"
5
+ gem "rails", git: "https://github.com/rails/rails.git", branch: "main"
6
6
  gem "rspec"
7
7
  gem "rspec-rails", "~> 3.7"
8
8
  gem "sqlite3"
9
- gem "timecop"
10
9
  gem "byebug"
11
10
  gem "appraisal"
12
11
  gem "nokogiri", "~> 1.8"
@@ -19,13 +19,12 @@ module ValidatesTimeliness
19
19
  when :date
20
20
  value.to_date
21
21
  when :datetime
22
- value.is_a?(Time) ? value : (time_zone_aware? ? value.in_time_zone : value.to_time)
22
+ value.is_a?(Time) ? value : value.to_time
23
23
  else
24
24
  value
25
25
  end
26
-
27
26
  if ignore_usec && value.is_a?(Time)
28
- value.change(usec: 0)
27
+ Timeliness::Parser.make_time(Array(value).reverse[4..9], (:current if time_zone_aware?))
29
28
  else
30
29
  value
31
30
  end
@@ -20,7 +20,7 @@ module ActiveModel
20
20
 
21
21
  def timeliness_validation_for(attr_names, type=nil)
22
22
  options = _merge_attributes(attr_names)
23
- options.update(type: type) if type
23
+ options.update(:type => type) if type
24
24
  validates_with TimelinessValidator, options
25
25
  end
26
26
  end
@@ -6,30 +6,54 @@ module ValidatesTimeliness
6
6
  module ClassMethods
7
7
  public
8
8
 
9
+ # Hook into bulk method definitions for non-attribute based methods validated.
9
10
  def define_attribute_methods(*attr_names)
10
- super.tap { define_timeliness_methods }
11
+ super.tap {
12
+ define_timeliness_methods
13
+ }
14
+ end
15
+
16
+ # Called when `attribute` methods is called and the timeliness overrides are defined here
17
+ def define_attribute_method(attr_name)
18
+ super.tap {
19
+ define_attribute_timeliness_methods(attr_name)
20
+ }
11
21
  end
12
22
 
13
23
  def undefine_attribute_methods
14
- super.tap { undefine_timeliness_attribute_methods }
24
+ super.tap {
25
+ undefine_timeliness_attribute_methods
26
+ }
15
27
  end
16
28
 
17
29
  def define_timeliness_methods(before_type_cast=false)
18
30
  return if timeliness_validated_attributes.blank?
31
+
19
32
  timeliness_validated_attributes.each do |attr_name|
20
- define_attribute_timeliness_methods(attr_name, before_type_cast)
33
+ unless timeliness_method_already_implemented?(attr_name)
34
+ define_attribute_timeliness_methods(attr_name, before_type_cast)
35
+ end
21
36
  end
22
37
  end
23
38
 
39
+ def define_timeliness_method(attr_name, before_type_cast=false)
40
+ define_attribute_timeliness_methods(attr_name, before_type_cast)
41
+ end
42
+
43
+ # Lazy instantiate module as container of timeliness methods included in the model
24
44
  def generated_timeliness_methods
25
45
  @generated_timeliness_methods ||= Module.new { |m|
26
46
  extend Mutex_m
27
47
  }.tap { |mod| include mod }
28
48
  end
29
49
 
50
+ def timeliness_method_already_implemented?(method_name)
51
+ generated_timeliness_methods.method_defined?(method_name)
52
+ end
53
+
30
54
  def undefine_timeliness_attribute_methods
31
55
  generated_timeliness_methods.module_eval do
32
- instance_methods.each { |m| undef_method(m) }
56
+ undef_method(*instance_methods)
33
57
  end
34
58
  end
35
59
 
@@ -44,7 +68,7 @@ module ValidatesTimeliness
44
68
  @timeliness_cache ||= {}
45
69
  @timeliness_cache['#{attr_name}'] = value
46
70
 
47
- @attributes['#{attr_name}'] = super
71
+ super
48
72
  end
49
73
  STR
50
74
  end
@@ -59,7 +83,7 @@ module ValidatesTimeliness
59
83
  end
60
84
 
61
85
  def read_timeliness_attribute_before_type_cast(attr_name)
62
- @timeliness_cache && @timeliness_cache[attr_name] || @attributes[attr_name]
86
+ @timeliness_cache && @timeliness_cache[attr_name] || @attributes[attr_name].value_before_type_cast
63
87
  end
64
88
 
65
89
  def _clear_timeliness_cache
@@ -2,7 +2,7 @@ module ValidatesTimeliness
2
2
  class Railtie < Rails::Railtie
3
3
  initializer "validates_timeliness.initialize_active_record", :after => 'active_record.initialize_timezone' do
4
4
  ActiveSupport.on_load(:active_record) do
5
- ValidatesTimeliness.default_timezone = ActiveRecord::Base.default_timezone
5
+ ValidatesTimeliness.default_timezone = ActiveRecord.default_timezone
6
6
  ValidatesTimeliness.extend_orms << :active_record
7
7
  ValidatesTimeliness.load_orms
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module ValidatesTimeliness
2
- VERSION = '6.0.1'
2
+ VERSION = '7.0.0.beta2'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -33,8 +33,6 @@ I18n.available_locales = ['en', 'es']
33
33
  # Extend TestModel as you would another ORM/ODM module
34
34
  module TestModelShim
35
35
  extend ActiveSupport::Concern
36
- include ValidatesTimeliness::AttributeMethods
37
- include ValidatesTimeliness::ORM::ActiveModel
38
36
 
39
37
  module ClassMethods
40
38
  # Hook into native time zone handling check, if any
@@ -46,18 +44,17 @@ end
46
44
 
47
45
  class Person
48
46
  include TestModel
47
+
49
48
  attribute :birth_date, :date
50
49
  attribute :birth_time, :time
51
50
  attribute :birth_datetime, :datetime
52
-
53
- define_attribute_methods model_attributes.keys
54
51
  end
55
52
 
56
53
  class PersonWithShim < Person
57
54
  include TestModelShim
58
55
  end
59
56
 
60
- ActiveRecord::Base.default_timezone = :utc
57
+ ActiveRecord.default_timezone = :utc
61
58
  ActiveRecord::Base.time_zone_aware_attributes = true
62
59
  ActiveRecord::Base.establish_connection({:adapter => 'sqlite3', :database => ':memory:'})
63
60
  ActiveRecord::Base.time_zone_aware_types = [:datetime, :time]
@@ -1,22 +1,29 @@
1
1
  module ModelHelpers
2
2
 
3
3
  # Some test helpers from Rails source
4
- def invalid!(attr_name, values, error = nil)
5
- with_each_person_value(attr_name, values) do |record, value|
6
- expect(record).to be_invalid
4
+ def invalid!(attr_name, values, error = nil, model_class = Person)
5
+ with_each_model_value(attr_name, values, model_class) do |record, value|
6
+ expect(record).to_not be_valid
7
7
  expect(record.errors[attr_name].size).to be >= 1
8
- expect(record.errors[attr_name].first).to eq(error) if error
8
+
9
+ return unless error
10
+
11
+ if error.is_a?(Regexp)
12
+ expect(record.errors[attr_name].first).to match(error)
13
+ else
14
+ expect(record.errors[attr_name].first).to eq(error)
15
+ end
9
16
  end
10
17
  end
11
18
 
12
- def valid!(attr_name, values)
13
- with_each_person_value(attr_name, values) do |record, value|
19
+ def valid!(attr_name, values, model_class = Person)
20
+ with_each_model_value(attr_name, values, model_class) do |record, value|
14
21
  expect(record).to be_valid
15
22
  end
16
23
  end
17
24
 
18
- def with_each_person_value(attr_name, values)
19
- record = Person.new
25
+ def with_each_model_value(attr_name, values, model_class)
26
+ record = model_class.new
20
27
  Array.wrap(values).each do |value|
21
28
  record.send("#{attr_name}=", value)
22
29
  yield record, value
@@ -1,61 +1,13 @@
1
1
  module TestModel
2
2
  extend ActiveSupport::Concern
3
- extend ActiveModel::Translation
3
+ include ActiveModel::Model
4
+ include ActiveModel::Attributes
4
5
  include ActiveModel::Validations
5
- include ActiveModel::AttributeMethods
6
+ include ValidatesTimeliness::AttributeMethods
7
+ include ValidatesTimeliness::ORM::ActiveModel
6
8
 
7
9
  included do
8
10
  attribute_method_suffix "="
9
- cattr_accessor :model_attributes
10
- end
11
-
12
- module ClassMethods
13
- def attribute(name, type)
14
- self.model_attributes ||= {}
15
- self.model_attributes[name] = type
16
- end
17
-
18
- def define_method_attribute=(attr_name, owner: nil)
19
- generated_attribute_methods.module_eval("def #{attr_name}=(new_value); @attributes['#{attr_name}']=self.class.type_cast('#{attr_name}', new_value); end", __FILE__, __LINE__)
20
- end
21
-
22
- def define_method_attribute(attr_name, owner: nil)
23
- generated_attribute_methods.module_eval("def #{attr_name}; @attributes['#{attr_name}']; end", __FILE__, __LINE__)
24
- end
25
-
26
- def type_cast(attr_name, value)
27
- return value unless value.is_a?(String)
28
- type_name = model_attributes[attr_name.to_sym]
29
- type = ActiveModel::Type.lookup(type_name)
30
- type.cast(value)
31
- end
32
- end
33
-
34
- def initialize(attributes = nil)
35
- @attributes = self.class.model_attributes.keys.inject({}) do |hash, column|
36
- hash[column.to_s] = nil
37
- hash
38
- end
39
- self.attributes = attributes unless attributes.nil?
40
- end
41
-
42
- def attributes
43
- @attributes
44
- end
45
-
46
- def attributes=(new_attributes={})
47
- new_attributes.each do |key, value|
48
- send "#{key}=", value
49
- end
50
- end
51
-
52
- def method_missing(method_id, *args, &block)
53
- if !matched_attribute_method(method_id.to_s).nil?
54
- self.class.define_attribute_methods self.class.model_attributes.keys
55
- send(method_id, *args, &block)
56
- else
57
- super
58
- end
59
11
  end
60
12
  end
61
13
 
@@ -44,9 +44,11 @@ RSpec.describe ValidatesTimeliness::AttributeMethods do
44
44
  class PersonWithParser
45
45
  include TestModel
46
46
  include TestModelShim
47
+
47
48
  attribute :birth_date, :date
48
49
  attribute :birth_time, :time
49
50
  attribute :birth_datetime, :datetime
51
+
50
52
  validates_date :birth_date
51
53
  validates_time :birth_time
52
54
  validates_datetime :birth_datetime
@@ -54,8 +56,10 @@ RSpec.describe ValidatesTimeliness::AttributeMethods do
54
56
 
55
57
  it 'should parse a string value' do
56
58
  expect(Timeliness::Parser).to receive(:parse)
59
+
57
60
  r = PersonWithParser.new
58
61
  r.birth_date = '2010-01-01'
62
+ r.birth_date # parsing happens on read not write
59
63
  end
60
64
 
61
65
  end
@@ -63,61 +63,30 @@ RSpec.describe ValidatesTimeliness::Converter do
63
63
 
64
64
  describe "for datetime type" do
65
65
  let(:type) { :datetime }
66
+ let(:time_zone_aware) { true }
66
67
 
67
- it 'should return nil for invalid value types' do
68
- expect(type_cast_value(12)).to eq(nil)
68
+ it "should return Date as Time value" do
69
+ expect(type_cast_value(Date.new(2010, 1, 1))).to eq(Time.local(2010, 1, 1, 0, 0, 0))
69
70
  end
70
71
 
71
- context "time zone aware" do
72
- let(:time_zone_aware) { true }
73
-
74
- around { |example|
75
- Time.use_zone("Perth", &example)
76
- }
77
-
78
- it "should return Date as Time value" do
79
- Time.use_zone('London') do
80
- result = type_cast_value(Date.new(2010, 1, 1))
81
- expected = Time.zone.local(2010, 1, 1, 0, 0, 0)
82
-
83
- expect(result).to eq(expected)
84
- expect(result.zone).to eq(expected.zone)
85
- end
86
- end
87
-
88
- it "should return same Time value" do
89
- value = Time.utc(2010, 1, 1, 12, 34, 56)
90
- expect(type_cast_value(value)).to eq(value)
91
- end
92
-
93
- it "should return as Time with same component values" do
94
- expect(type_cast_value(DateTime.civil_from_format(:utc, 2010, 1, 1, 12, 34, 56))).to eq(Time.utc(2010, 1, 1, 12, 34, 56))
95
- end
96
-
97
- it "should return same Time in correct zone if timezone aware" do
98
- value = Time.utc(2010, 1, 1, 12, 34, 56)
99
- result = type_cast_value(value)
100
-
101
- expect(result).to eq(Time.zone.local(2010, 1, 1, 20, 34, 56))
102
- expect(result.zone).to eq('AWST')
103
- end
72
+ it "should return same Time value" do
73
+ value = Time.utc(2010, 1, 1, 12, 34, 56)
74
+ expect(type_cast_value(Time.utc(2010, 1, 1, 12, 34, 56))).to eq(value)
104
75
  end
105
76
 
106
- context "not time zone aware" do
107
- let(:time_zone_aware) { false }
108
-
109
- it "should return Date as Time value" do
110
- expect(type_cast_value(Date.new(2010, 1, 1))).to eq(Time.local(2010, 1, 1, 0, 0, 0))
111
- end
77
+ it "should return as Time with same component values" do
78
+ expect(type_cast_value(DateTime.civil_from_format(:utc, 2010, 1, 1, 12, 34, 56))).to eq(Time.utc(2010, 1, 1, 12, 34, 56))
79
+ end
112
80
 
113
- it "should return same Time value" do
114
- value = Time.utc(2010, 1, 1, 12, 34, 56)
115
- expect(type_cast_value(Time.utc(2010, 1, 1, 12, 34, 56))).to eq(value)
116
- end
81
+ it "should return same Time in correct zone if timezone aware" do
82
+ value = Time.utc(2010, 1, 1, 12, 34, 56)
83
+ result = type_cast_value(value)
84
+ expect(result).to eq(Time.zone.local(2010, 1, 1, 23, 34, 56))
85
+ expect(result.zone).to eq('AEDT')
86
+ end
117
87
 
118
- it "should return as Time with same component values" do
119
- expect(type_cast_value(DateTime.civil_from_format(:utc, 2010, 1, 1, 12, 34, 56))).to eq(Time.utc(2010, 1, 1, 12, 34, 56))
120
- end
88
+ it 'should return nil for invalid value types' do
89
+ expect(type_cast_value(12)).to eq(nil)
121
90
  end
122
91
  end
123
92
 
@@ -0,0 +1,57 @@
1
+ RSpec.describe ValidatesTimeliness::Validator, ":format option" do
2
+ with_config(:use_plugin_parser, true)
3
+
4
+ describe "for date type" do
5
+ before do
6
+ Person.validates_date :birth_date, format: "yyyy-mm-dd"
7
+ end
8
+
9
+ it "should not be valid for string given in the wrong format" do
10
+ invalid!(:birth_date, '23/12/2023', /is not a valid date/)
11
+ end
12
+
13
+ it "should be valid for string given in the right format" do
14
+ valid!(:birth_date, '2023-12-23')
15
+ end
16
+
17
+ it "should be valid for date instance" do
18
+ valid!(:birth_date, Date.new(2022,12,23))
19
+ end
20
+ end
21
+
22
+ describe "for time type" do
23
+ before do
24
+ Person.validates_time :birth_time, format: "hh:nn:ss"
25
+ end
26
+
27
+ it "should not be valid for string given in the wrong format" do
28
+ invalid!(:birth_time, "00-00-00", /is not a valid time/)
29
+ end
30
+
31
+ it "should be valid for string given in the right format" do
32
+ valid!(:birth_time, "00:00:00")
33
+ end
34
+
35
+ it "should be valid for date instance" do
36
+ valid!(:birth_time, Time.new(2010, 1, 1, 0, 0, 0))
37
+ end
38
+ end
39
+
40
+ describe "for datetime type" do
41
+ before do
42
+ Person.validates_datetime :birth_datetime, format: "yyyy-mm-dd hh:nn:ss"
43
+ end
44
+
45
+ it "should not be valid for string given in the wrong format" do
46
+ invalid!(:birth_datetime, "01-01-2010 00-00-00", /is not a valid datetime/)
47
+ end
48
+
49
+ it "should be valid for string given in the right format" do
50
+ valid!(:birth_datetime, "2010-01-01 00:00:00")
51
+ end
52
+
53
+ it "should be valid for date instance" do
54
+ valid!(:birth_datetime, DateTime.new(2010, 1, 1, 0, 0, 0))
55
+ end
56
+ end
57
+ end
@@ -21,12 +21,13 @@ Gem::Specification.new do |s|
21
21
  s.extra_rdoc_files = ["README.md", "CHANGELOG.md", "LICENSE"]
22
22
 
23
23
  s.metadata = {
24
+ "rubygems_mfa_required" => "true",
24
25
  "bug_tracker_uri" => "#{github_url}/issues",
25
26
  "changelog_uri" => "#{github_url}/blob/master/CHANGELOG.md",
26
27
  "source_code_uri" => "#{github_url}",
27
28
  "wiki_uri" => "#{github_url}/wiki",
28
29
  }
29
30
 
30
- s.add_runtime_dependency("activemodel", [">= 6.0.0", "< 7"])
31
+ s.add_runtime_dependency("activemodel", [">= 7.0.0", "< 8"])
31
32
  s.add_runtime_dependency("timeliness", [">= 0.3.10", "< 1"])
32
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_timeliness
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 7.0.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Meehan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-12 00:00:00.000000000 Z
11
+ date: 2023-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 6.0.0
19
+ version: 7.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7'
22
+ version: '8'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 6.0.0
29
+ version: 7.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7'
32
+ version: '8'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: timeliness
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -66,8 +66,8 @@ files:
66
66
  - LICENSE
67
67
  - README.md
68
68
  - Rakefile
69
- - gemfiles/rails_6_0.gemfile
70
- - gemfiles/rails_6_1.gemfile
69
+ - gemfiles/rails_7_0.gemfile
70
+ - gemfiles/rails_edge.gemfile
71
71
  - init.rb
72
72
  - lib/generators/validates_timeliness/install_generator.rb
73
73
  - lib/generators/validates_timeliness/templates/en.yml
@@ -94,10 +94,12 @@ files:
94
94
  - spec/validates_timeliness/extensions/date_time_select_spec.rb
95
95
  - spec/validates_timeliness/extensions/multiparameter_handler_spec.rb
96
96
  - spec/validates_timeliness/helper_methods_spec.rb
97
+ - spec/validates_timeliness/orm/active_model_spec.rb
97
98
  - spec/validates_timeliness/orm/active_record_spec.rb
98
99
  - spec/validates_timeliness/railtie_spec.rb
99
100
  - spec/validates_timeliness/validator/after_spec.rb
100
101
  - spec/validates_timeliness/validator/before_spec.rb
102
+ - spec/validates_timeliness/validator/format_spec.rb
101
103
  - spec/validates_timeliness/validator/is_at_spec.rb
102
104
  - spec/validates_timeliness/validator/on_or_after_spec.rb
103
105
  - spec/validates_timeliness/validator/on_or_before_spec.rb
@@ -108,6 +110,7 @@ homepage: https://github.com/adzap/validates_timeliness
108
110
  licenses:
109
111
  - MIT
110
112
  metadata:
113
+ rubygems_mfa_required: 'true'
111
114
  bug_tracker_uri: https://github.com/adzap/validates_timeliness/issues
112
115
  changelog_uri: https://github.com/adzap/validates_timeliness/blob/master/CHANGELOG.md
113
116
  source_code_uri: https://github.com/adzap/validates_timeliness
@@ -123,9 +126,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
126
  version: '0'
124
127
  required_rubygems_version: !ruby/object:Gem::Requirement
125
128
  requirements:
126
- - - ">="
129
+ - - ">"
127
130
  - !ruby/object:Gem::Version
128
- version: '0'
131
+ version: 1.3.1
129
132
  requirements: []
130
133
  rubygems_version: 3.1.6
131
134
  signing_key:
@@ -142,10 +145,12 @@ test_files:
142
145
  - spec/validates_timeliness/extensions/date_time_select_spec.rb
143
146
  - spec/validates_timeliness/extensions/multiparameter_handler_spec.rb
144
147
  - spec/validates_timeliness/helper_methods_spec.rb
148
+ - spec/validates_timeliness/orm/active_model_spec.rb
145
149
  - spec/validates_timeliness/orm/active_record_spec.rb
146
150
  - spec/validates_timeliness/railtie_spec.rb
147
151
  - spec/validates_timeliness/validator/after_spec.rb
148
152
  - spec/validates_timeliness/validator/before_spec.rb
153
+ - spec/validates_timeliness/validator/format_spec.rb
149
154
  - spec/validates_timeliness/validator/is_at_spec.rb
150
155
  - spec/validates_timeliness/validator/on_or_after_spec.rb
151
156
  - spec/validates_timeliness/validator/on_or_before_spec.rb