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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa69377873f2ee0d6ef14558b29db5fc92da777468505e75414b49d60a7b64b0
4
- data.tar.gz: 455b5668ab8b970df14d560bdf2a3bf1ce2c816e05437007e043c75ea4623878
3
+ metadata.gz: a90c7a1e51d3e078c5cf5e36cdf44b251c187c002af41c5f76a9a83674a6a3bd
4
+ data.tar.gz: dce78538eeddaeb62a4d78c9e81572418aab767e57861deacaad758272c702dc
5
5
  SHA512:
6
- metadata.gz: b8929cf7229fb4e634de7b436227c0b034ee63eecb03567466fa523f7456b714b478f7ad7393edd8c295df3d3eecde246e35214f9145c140ab01e1bdfe6fa900
7
- data.tar.gz: 035152f46aa9d2d9125e9dbf3b305bfcf6a15977c2f1b049d785dc489ed9ea4c54e2e1baeaa85ea14fca12eeb187828c2810fd5366fb35bf9d413c5461f16a1f
6
+ metadata.gz: 37ea1dd1ac042173502ea911c11d3eb56ffe597f988da8cbd03399823c484b5af729e8216f27918f9b390656ef2537dc9c53ef9122b840ac670f79d0066fab97
7
+ data.tar.gz: 8989d9ae3268a43769ac5aacea226da3b4617a46e060bc708dab898d74b091106fb35a54c20acbaf057d279b893415a3073851bbd9832967919531297451773d
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.3.1] - 2021-07-21
10
+ ### Changed
11
+ - Improved Railtie support
12
+
9
13
  ## [1.3.0] - 2021-07-19
10
14
  ### Added
11
15
  - Added Ruby 3.0 support
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-validators (1.3.0)
4
+ lite-validators (1.3.1)
5
5
  activemodel
6
6
 
7
7
  GEM
@@ -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 < ::Rails::Railtie
5
+ class Railtie < Rails::Railtie
8
6
 
9
- initializer 'lite-validators' do |app|
10
- Lite::Validators::Railtie.instance_eval do
11
- Array(app.config.i18n.available_locales).each do |locale|
12
- path = File.expand_path("../../../config/locales/#{locale}.yml", __FILE__)
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
- I18n.load_path << path
16
- end
12
+ I18n.load_path << path
17
13
  end
14
+
15
+ I18n.reload!
18
16
  end
19
17
 
20
18
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Validators
5
5
 
6
- VERSION = '1.3.0'
6
+ VERSION = '1.3.1'
7
7
 
8
8
  end
9
9
  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.0
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-20 00:00:00.000000000 Z
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