activerecord-databasevalidations 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -0
- data/CHANGELOG.md +4 -0
- data/activerecord-databasevalidations.gemspec +1 -1
- data/lib/active_model/validations/basic_multilingual_plane.rb +1 -1
- data/lib/active_model/validations/bytesize.rb +1 -1
- data/lib/active_model/validations/not_null.rb +1 -1
- data/lib/active_record/database_validations/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbf207cb2907bee539a88662d3db30dc5ed839798cbfd9cfd85825477c2eb239
|
4
|
+
data.tar.gz: daf34dab34b3d74bfc478c96f83fb49e6058a04fdd5351200fdb845707f87967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e9be16afadaa21e4954ef0f5cee4d3a890831e3b3b18b19b020363121d774138bd98063ba40334988825f4fd4821daf5ca495f6f76e5fa42a17155ec962d2d2
|
7
|
+
data.tar.gz: b4dbec89f5d44fd5a6235147fe8dd98a97cb6e4a37cca1e804d977091c80ea4054d781b7fcf61e9fb93a9bfcf02c191606ac2b751e20efe1a8aa75cdb0da62af
|
data/.travis.yml
CHANGED
@@ -7,10 +7,16 @@ services:
|
|
7
7
|
rvm:
|
8
8
|
- '2.5'
|
9
9
|
- '2.6'
|
10
|
+
- '2.7'
|
10
11
|
|
11
12
|
gemfile:
|
12
13
|
- gemfiles/Gemfile.activerecord52
|
13
14
|
- gemfiles/Gemfile.activerecord60
|
14
15
|
|
16
|
+
matrix:
|
17
|
+
exclude:
|
18
|
+
rvm: '2.7'
|
19
|
+
gemfile: gemfiles/Gemfile.activerecord52
|
20
|
+
|
15
21
|
before_script:
|
16
22
|
- mysql -e 'create database database_validations;'
|
data/CHANGELOG.md
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_runtime_dependency "activerecord", ">= 5.2"
|
24
24
|
spec.add_runtime_dependency "rejectu"
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler"
|
26
|
+
spec.add_development_dependency "bundler"
|
27
27
|
spec.add_development_dependency "rake"
|
28
28
|
spec.add_development_dependency "minitest"
|
29
29
|
spec.add_development_dependency "mysql2"
|
@@ -13,7 +13,7 @@ module ActiveModel
|
|
13
13
|
errors_options = options.except(:characters_outside_basic_multilingual_plane)
|
14
14
|
default_message = options[:characters_outside_basic_multilingual_plane]
|
15
15
|
errors_options[:message] ||= default_message if default_message
|
16
|
-
record.errors.add(attribute, :characters_outside_basic_multilingual_plane, errors_options)
|
16
|
+
record.errors.add(attribute, :characters_outside_basic_multilingual_plane, **errors_options)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -22,7 +22,7 @@ module ActiveModel
|
|
22
22
|
default_message = options[:too_many_bytes]
|
23
23
|
errors_options[:count] = options[:maximum]
|
24
24
|
errors_options[:message] ||= default_message if default_message
|
25
|
-
record.errors.add(attribute, :too_many_bytes, errors_options)
|
25
|
+
record.errors.add(attribute, :too_many_bytes, **errors_options)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -6,7 +6,7 @@ module ActiveModel
|
|
6
6
|
errors_options = options.except(:must_be_set)
|
7
7
|
default_message = options[:must_be_set]
|
8
8
|
errors_options[:message] ||= default_message if default_message
|
9
|
-
record.errors.add(attribute, :must_be_set, errors_options)
|
9
|
+
record.errors.add(attribute, :must_be_set, **errors_options)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-databasevalidations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willem van Bergen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
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: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
|
-
rubygems_version: 3.
|
157
|
+
rubygems_version: 3.1.2
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Add validations to your ActiveRecord models based on MySQL database constraints.
|