rails_validations 2.1 → 2.2

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
  SHA1:
3
- metadata.gz: 4e14ca9632fc4312e89f71840e14a69b532e9594
4
- data.tar.gz: 8c7ef056d35dce024b3f0af18917cce214a8612d
3
+ metadata.gz: e9545ab028a63ed14122cc93dcf59b23438c8a07
4
+ data.tar.gz: b3b5a568790b8fb935776d271747c4a7c4987fb0
5
5
  SHA512:
6
- metadata.gz: 00b644647c8b451122f71d79382645b8b48499e6f451e2813323e4fb47a3c0eabf8c9f85832302b5dde90de85e66e5c98bf9a894e48d45daf86673aa490fb097
7
- data.tar.gz: 659686ebbd5de412c2dd24b6c905540194c7729d75760a85cb396cd897bafa931e6ae4f603c3b86d091e5f764711a21321a6e073849e6b19ae6b6be7347f00c3
6
+ metadata.gz: f241b820fa07b76643469281c1f88e94c93ab06997022d703241261e030d35a8ca4f74da0369058a4a658281fdba34670cbc3af422d2b8c148676e1b5c2fc55f
7
+ data.tar.gz: 2b5549e98cf27b3aa21150da56e551644cafc0ad4beae5b3c5628bfec3576c91031d9a4cefe8a04b5ad9df2e3f7c0625709270dafa1e5770baacca262da2a9fb
data/README.markdown CHANGED
@@ -4,8 +4,7 @@
4
4
  [![Inline docs](http://inch-ci.org/github/bluerail/rails_validations.svg?branch=master)](http://inch-ci.org/github/bluerail/rails_validations)
5
5
 
6
6
 
7
- A few extra validations for Ruby on Rails. Works with Ruby 1.9 and newer, and
8
- Rails 3 and newer (including Rails 4).
7
+ A few extra validations for Ruby on Rails. Works with Ruby 2.1+ & Rails 4+.
9
8
 
10
9
  We try to do the sane thing by not being too strict, when in doubt, we accept
11
10
  input as being valid. We never want to reject valid input as invalid.
@@ -145,6 +144,12 @@ Currently implemented countries:
145
144
  ChangeLog
146
145
  =========
147
146
 
147
+ Version 2.2, 2017-08-28
148
+ -----------------------
149
+ - Fix deprecation warning on Fixnum by checking against Integer instead.
150
+ - Dropped Ruby 1.9 & 2.0 support
151
+ - Dropped Rails 3 support
152
+
148
153
  Version 2.0, 2015-08-19
149
154
  -----------------------
150
155
  - Don't depend on the `iban-tools` gem. If you want IBAN validations, then you
@@ -29,7 +29,7 @@ class DateValidator < ActiveModel::EachValidator
29
29
  def value_to_date raw_value
30
30
  # TODO: Do we need to do anything with timezones? Figure it out (rails has
31
31
  # ActiveSupport::TimeWithZone)...
32
- if raw_value.is_a? Fixnum
32
+ if raw_value.is_a? Integer
33
33
  time.at(raw_value).to_date
34
34
  elsif raw_value.respond_to? :to_date
35
35
  begin
@@ -64,7 +64,7 @@ class DateValidator < ActiveModel::EachValidator
64
64
  end
65
65
  elsif raw_option_value.is_a? Symbol
66
66
  value_to_date record.send(raw_option_value)
67
- elsif raw_option_value.is_a? Fixnum
67
+ elsif raw_option_value.is_a? Integer
68
68
  time.at(raw_option_value).to_date
69
69
  elsif raw_option_value.respond_to? :to_date
70
70
  raw_option_value.to_date
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.1'
4
+ version: '2.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Tournoij
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-19 00:00:00.000000000 Z
11
+ date: 2017-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>'
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: 4.2.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>'
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.0'
26
+ version: 4.2.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>'
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '4.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>'
38
+ - - ">"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '4.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '3.6'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '3.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: iban-tools
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
69
  description: 'Extra validations for rails: date, domain, email, iban, phone, postal_code,
@@ -74,6 +74,9 @@ executables: []
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
+ - MIT-LICENSE
78
+ - README.markdown
79
+ - Rakefile
77
80
  - config/locales/en.yml
78
81
  - config/locales/nl.yml
79
82
  - lib/rails_validations.rb
@@ -86,9 +89,6 @@ files:
86
89
  - lib/validators/phone_validator.rb
87
90
  - lib/validators/postal_code_validator.rb
88
91
  - lib/validators/vat_number_validator.rb
89
- - MIT-LICENSE
90
- - Rakefile
91
- - README.markdown
92
92
  - spec/spec_helper.rb
93
93
  - spec/validations/commerce_number_spec.rb
94
94
  - spec/validations/date_spec.rb
@@ -108,17 +108,17 @@ require_paths:
108
108
  - lib
109
109
  required_ruby_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - '>='
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
113
  version: '1.9'
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.0.14.1
121
+ rubygems_version: 2.6.12
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Extra validations for rails