lite-validators 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/lite/validators.rb +2 -2
- data/{config → lib/lite/validators}/locales/en.yml +0 -0
- data/lib/lite/validators/railtie.rb +8 -10
- data/lib/lite/validators/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a90c7a1e51d3e078c5cf5e36cdf44b251c187c002af41c5f76a9a83674a6a3bd
|
4
|
+
data.tar.gz: dce78538eeddaeb62a4d78c9e81572418aab767e57861deacaad758272c702dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37ea1dd1ac042173502ea911c11d3eb56ffe597f988da8cbd03399823c484b5af729e8216f27918f9b390656ef2537dc9c53ef9122b840ac670f79d0066fab97
|
7
|
+
data.tar.gz: 8989d9ae3268a43769ac5aacea226da3b4617a46e060bc708dab898d74b091106fb35a54c20acbaf057d279b893415a3073851bbd9832967919531297451773d
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/lite/validators.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'active_model'
|
3
|
+
require 'active_model' unless defined?(ActiveModel)
|
4
4
|
|
5
|
+
require 'lite/validators/railtie' if defined?(Rails::Railtie)
|
5
6
|
require 'lite/validators/version'
|
6
|
-
require 'lite/validators/railtie' if defined?(Rails)
|
7
7
|
|
8
8
|
%w[
|
9
9
|
base alpha alpha_numeric base64 boolean compare coordinate credit_card currency cusip email ein
|
File without changes
|
@@ -1,20 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'rails/railtie'
|
4
|
-
|
5
3
|
module Lite
|
6
4
|
module Validators
|
7
|
-
class Railtie <
|
5
|
+
class Railtie < Rails::Railtie
|
8
6
|
|
9
|
-
initializer 'lite-validators' do |app|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
next if !File.file?(path) || I18n.load_path.include?(path)
|
7
|
+
initializer 'lite-validators.configure_locales' do |app|
|
8
|
+
Array(app.config.i18n.available_locales).each do |locale|
|
9
|
+
path = File.expand_path("../locales/#{locale}.yml", __FILE__)
|
10
|
+
next unless File.file?(path)
|
14
11
|
|
15
|
-
|
16
|
-
end
|
12
|
+
I18n.load_path << path
|
17
13
|
end
|
14
|
+
|
15
|
+
I18n.reload!
|
18
16
|
end
|
19
17
|
|
20
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lite-validators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -186,7 +186,6 @@ files:
|
|
186
186
|
- _config.yml
|
187
187
|
- bin/console
|
188
188
|
- bin/setup
|
189
|
-
- config/locales/en.yml
|
190
189
|
- docs/ALPHA.md
|
191
190
|
- docs/ALPHA_NUMERIC.md
|
192
191
|
- docs/BASE64.md
|
@@ -240,6 +239,7 @@ files:
|
|
240
239
|
- lib/lite/validators/ip_address_validator.rb
|
241
240
|
- lib/lite/validators/isbn_validator.rb
|
242
241
|
- lib/lite/validators/isin_validator.rb
|
242
|
+
- lib/lite/validators/locales/en.yml
|
243
243
|
- lib/lite/validators/mac_address_validator.rb
|
244
244
|
- lib/lite/validators/name_validator.rb
|
245
245
|
- lib/lite/validators/password_validator.rb
|