missing_validators 0.7.1 → 0.7.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
  SHA1:
3
- metadata.gz: 0159cef9b69c14ee7dd355533505e1155a3aa165
4
- data.tar.gz: 22c6951ea90afc0a8241897dd5f32a118926beea
3
+ metadata.gz: 033cbbe718a1d580223dbb0adc271f1ed173b44f
4
+ data.tar.gz: d0d25453fc9461d621ac04bcb6cf0da3ac2525f5
5
5
  SHA512:
6
- metadata.gz: ed060b1d326b04e7e5d9e459c61b09dc3b13d5f5a47c4f91f05cfe4fe263f912011c34f44ea601a9290d30c790477aa72c56a59e879a5e40f976627093e5da91
7
- data.tar.gz: 81742ca17ed623845bdee2b20c432a3cfe83a5569f50af1855bcf6b298884632639cf4dd7be86dc269c60b5e8e7639c2743b168104e0dc8fa39bb40abad3ae18
6
+ metadata.gz: e85456bdc73b306b960706151d1c345f4d33cf5f35d6c7468c5ade014afabb61a6f77280848b2be0c14b2fc0848afd5fd5a6469143d1b8a7da822afc3ca5bbfc
7
+ data.tar.gz: d64609918b653ab0c5e6f2a269d1edc995860661a2b76cc525edff37e96e6d32959188c086d67eb8c7662559a1badb5ed0ba618423b14a391874d64efd4b23d6
@@ -21,12 +21,12 @@ class MacAddressValidator < ActiveModel::EachValidator
21
21
  end
22
22
 
23
23
  def self.validate_format(mac_address)
24
- !!(mac_address =~ /^([A-Fa-f0-9]{2}[:]){5}[A-Fa-f0-9]{2}?$/i) || # 08:00:2b:01:02:03
25
- !!(mac_address =~ /^([A-Fa-f0-9]{2}[-]){5}[A-Fa-f0-9]{2}?$/i) || # 08-00-2b-01-02-03
26
- !!(mac_address =~ /^([A-Fa-f0-9]{6}):[A-Fa-f0-9]{6}?$/i) || # 08002b:010203
27
- !!(mac_address =~ /^([A-Fa-f0-9]{6})-[A-Fa-f0-9]{6}?$/i) || # 08002b-010203
28
- !!(mac_address =~ /^([A-Fa-f0-9]{4}[\.]){2}[A-Fa-f0-9]{4}?$/i) || # 0800.2b01.0203
29
- !!(mac_address =~ /^[A-Fa-f0-9]{12}?$/i) # 08002b010203
24
+ !!(mac_address =~ /^([\h]{2}[:]){5}[\h]{2}?$/i) || # 08:00:2b:01:02:03
25
+ !!(mac_address =~ /^([\h]{2}[-]){5}[\h]{2}?$/i) || # 08-00-2b-01-02-03
26
+ !!(mac_address =~ /^([\h]{6}):[\h]{6}?$/i) || # 08002b:010203
27
+ !!(mac_address =~ /^([\h]{6})-[\h]{6}?$/i) || # 08002b-010203
28
+ !!(mac_address =~ /^([\h]{4}[\.]){2}[\h]{4}?$/i) || # 0800.2b01.0203
29
+ !!(mac_address =~ /^[\h]{12}?$/i) # 08002b010203
30
30
  end
31
31
 
32
32
  private
@@ -1,5 +1,5 @@
1
1
  # Provides a collection of custom validators that are often required in Rails applications.
2
2
  module MissingValidators
3
3
  # Gem version.
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: missing_validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Gridnev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-27 00:00:00.000000000 Z
11
+ date: 2014-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec