lite-validators 1.0.1 → 1.0.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
  SHA256:
3
- metadata.gz: 457ae01657eae20eb4616d1ab54cea423c743469f571a37b4d0ccaddb8f60582
4
- data.tar.gz: 2c05ea3dafb533e96251cc9b63947dbf1bdc868fa6a7bf824785fb09a66755fa
3
+ metadata.gz: 52d4e3879099bb18f74ab8655b7b991bac25e53d8962293b801ee6dfc33959aa
4
+ data.tar.gz: 6e0c40b97a41c659cb5c2e11a29d3ef526c90c255199d4cfa3ca9b1d570a2908
5
5
  SHA512:
6
- metadata.gz: b65070d22d816fe59211851cb4ad2c0f9513e471e6bcfe60eb28469aa4e1c2dc208ceb46f478be160f74035be164643031afa2b2f4e667306cbedf983978635a
7
- data.tar.gz: 8cbb7ba5a58f1e612117d642737ce9037c63642b9dedfa326630378fc6b948cd973a648b46f9cdea5c31c6a4d90f9228d2cc5f71e3bcd57a61f0bf6ff2794f85
6
+ metadata.gz: 643b24bee5ab8aec7986b6ab2d0ed964698896ea38e290fa1aaea18d4e528ba88f4ccfde8a8958e972677dc608478ec741d738881ded14b5addbeaa59ef140d5
7
+ data.tar.gz: 421ae434b7f4180221813cd72644e44e8a9a5c9314f4bc22647d64ac9c8760643a6f9d6067c62f56a688890ffbc25592cc912fb554208eadad74a4d6ad53e446
@@ -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.0.2] - 2019-07-01
10
+ ### Added
11
+ - Add railtie
12
+
9
13
  ## [1.0.1] - 2019-07-01
10
14
  ### Added
11
15
  - Add EIN validator
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-validators (1.0.1)
4
+ lite-validators (1.0.2)
5
5
  activemodel
6
6
 
7
7
  GEM
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'active_model'
4
+
4
5
  require 'lite/validators/version'
6
+ require 'lite/validators/railtie' if defined?(Rails)
5
7
 
6
8
  %w[
7
9
  base alpha alpha_numeric base64 boolean compare coordinate credit_card currency cusip email ein
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lite
4
+ module Validators
5
+ class Railtie < ::Rails::Railtie
6
+
7
+ initializer 'lite-validators' do |app|
8
+ Lite::Validators::Railtie.instance_eval do
9
+ [app.config.i18n.available_locales].flatten.each do |locale|
10
+ path = File.expand_path("../../../config/locales/#{locale}.yml", __FILE__)
11
+ next if !File.file?(path) || I18n.load_path.include?(path)
12
+
13
+ I18n.load_path << path
14
+ end
15
+ end
16
+ end
17
+
18
+ end
19
+ end
20
+ end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Validators
5
5
 
6
- VERSION ||= '1.0.1'
6
+ VERSION ||= '1.0.2'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
@@ -230,6 +230,7 @@ files:
230
230
  - lib/lite/validators/name_validator.rb
231
231
  - lib/lite/validators/password_validator.rb
232
232
  - lib/lite/validators/phone_number_validator.rb
233
+ - lib/lite/validators/railtie.rb
233
234
  - lib/lite/validators/sedol_validator.rb
234
235
  - lib/lite/validators/slug_validator.rb
235
236
  - lib/lite/validators/ssn_validator.rb