lite-validators 1.3.1 → 1.3.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: a90c7a1e51d3e078c5cf5e36cdf44b251c187c002af41c5f76a9a83674a6a3bd
4
- data.tar.gz: dce78538eeddaeb62a4d78c9e81572418aab767e57861deacaad758272c702dc
3
+ metadata.gz: 1c37efc593f813e90d3bdd6969673232ce5fb342e7bca15b149fd2315bc25926
4
+ data.tar.gz: e295cb6a4173f32d656a2ad209c2506afe12e21319f157fc414cb218338e1286
5
5
  SHA512:
6
- metadata.gz: 37ea1dd1ac042173502ea911c11d3eb56ffe597f988da8cbd03399823c484b5af729e8216f27918f9b390656ef2537dc9c53ef9122b840ac670f79d0066fab97
7
- data.tar.gz: 8989d9ae3268a43769ac5aacea226da3b4617a46e060bc708dab898d74b091106fb35a54c20acbaf057d279b893415a3073851bbd9832967919531297451773d
6
+ metadata.gz: 60a0f783a9c482a6dda7da03371c83707d9daa9589955dac3ba9e6de75cf3eafc88006d9320312bc5b4ffbdab071b3168232d8843cb7b424f88cbdb9ad159774
7
+ data.tar.gz: 97420a77ce746cca98d4cf074d700c6df49035a15c8416a87633823c1506428e8f8a23fd0f79aa8b47962db0a51531b132dbc3a2c632776672525cc0eeacad56
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.2] - 2021-07-22
10
+ ### Changed
11
+ - Improved setup
12
+
9
13
  ## [1.3.1] - 2021-07-21
10
14
  ### Changed
11
15
  - Improved Railtie support
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-validators (1.3.1)
4
+ lite-validators (1.3.2)
5
5
  activemodel
6
6
 
7
7
  GEM
@@ -4,11 +4,36 @@ require 'active_model' unless defined?(ActiveModel)
4
4
 
5
5
  require 'lite/validators/railtie' if defined?(Rails::Railtie)
6
6
  require 'lite/validators/version'
7
-
8
- %w[
9
- base alpha alpha_numeric base64 boolean compare coordinate credit_card currency cusip email ein
10
- file_content_type file_extension file_size csv hex imei ip_address isbn isin mac_address name
11
- password phone_number sedol slug ssn time_zone type url username uuid
12
- ].each do |name|
13
- require "lite/validators/#{name}_validator"
14
- end
7
+ require 'lite/validators/base_validator'
8
+ require 'lite/validators/alpha_validator'
9
+ require 'lite/validators/alpha_numeric_validator'
10
+ require 'lite/validators/base64_validator'
11
+ require 'lite/validators/boolean_validator'
12
+ require 'lite/validators/compare_validator'
13
+ require 'lite/validators/coordinate_validator'
14
+ require 'lite/validators/credit_card_validator'
15
+ require 'lite/validators/currency_validator'
16
+ require 'lite/validators/cusip_validator'
17
+ require 'lite/validators/email_validator'
18
+ require 'lite/validators/ein_validator'
19
+ require 'lite/validators/file_content_type_validator'
20
+ require 'lite/validators/file_extension_validator'
21
+ require 'lite/validators/file_size_validator'
22
+ require 'lite/validators/csv_validator'
23
+ require 'lite/validators/hex_validator'
24
+ require 'lite/validators/imei_validator'
25
+ require 'lite/validators/ip_address_validator'
26
+ require 'lite/validators/isbn_validator'
27
+ require 'lite/validators/isin_validator'
28
+ require 'lite/validators/mac_address_validator'
29
+ require 'lite/validators/name_validator'
30
+ require 'lite/validators/password_validator'
31
+ require 'lite/validators/phone_number_validator'
32
+ require 'lite/validators/sedol_validator'
33
+ require 'lite/validators/slug_validator'
34
+ require 'lite/validators/ssn_validator'
35
+ require 'lite/validators/time_zone_validator'
36
+ require 'lite/validators/type_validator'
37
+ require 'lite/validators/url_validator'
38
+ require 'lite/validators/username_validator'
39
+ require 'lite/validators/uuid_validator'
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'csv'
3
+ require 'csv' unless defined?(CSV)
4
4
 
5
5
  class CsvValidator < FileSizeValidator
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'resolv'
3
+ require 'resolv' unless defined?(Resolv)
4
4
 
5
5
  class IpAddressValidator < BaseValidator
6
6
 
@@ -6,7 +6,7 @@ module Lite
6
6
 
7
7
  initializer 'lite-validators.configure_locales' do |app|
8
8
  Array(app.config.i18n.available_locales).each do |locale|
9
- path = File.expand_path("../locales/#{locale}.yml", __FILE__)
9
+ path = File.expand_path("../../../locales/#{locale}.yml", __FILE__)
10
10
  next unless File.file?(path)
11
11
 
12
12
  I18n.load_path << path
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/time/zones'
3
+ require 'active_support/core_ext/time/zones' unless defined?(ActiveSupport)
4
4
 
5
5
  class TimeZoneValidator < BaseValidator
6
6
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'uri'
3
+ require 'uri' unless defined?(URI)
4
4
 
5
5
  class UrlValidator < BaseValidator
6
6
 
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Validators
5
5
 
6
- VERSION = '1.3.1'
6
+ VERSION = '1.3.2'
7
7
 
8
8
  end
9
9
  end
File without changes
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.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
@@ -239,7 +239,6 @@ files:
239
239
  - lib/lite/validators/ip_address_validator.rb
240
240
  - lib/lite/validators/isbn_validator.rb
241
241
  - lib/lite/validators/isin_validator.rb
242
- - lib/lite/validators/locales/en.yml
243
242
  - lib/lite/validators/mac_address_validator.rb
244
243
  - lib/lite/validators/name_validator.rb
245
244
  - lib/lite/validators/password_validator.rb
@@ -254,6 +253,7 @@ files:
254
253
  - lib/lite/validators/username_validator.rb
255
254
  - lib/lite/validators/uuid_validator.rb
256
255
  - lib/lite/validators/version.rb
256
+ - lib/locales/en.yml
257
257
  - lite-validators.gemspec
258
258
  homepage: http://drexed.github.io/lite-validators
259
259
  licenses: