ruby_regex 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +7 -1
- data/README.rdoc +12 -8
- data/lib/ruby_regex.rb +1 -1
- data/test/fixtures/emails.yml +1 -0
- metadata +15 -4
data/CHANGELOG
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
24/09/2012
|
2
|
+
-------------------------
|
3
|
+
Add DBDate regexp
|
4
|
+
Add DBDateTime regexp
|
5
|
+
Add SpanishBankAccountNumber regexp
|
6
|
+
|
1
7
|
30/09/2011
|
2
8
|
-------------------------
|
3
|
-
Regular expressions match with \A and \z (string delimiters)
|
9
|
+
Regular expressions match with \A and \z (string delimiters)
|
4
10
|
instead of ^ and $ (line delimiters)
|
5
11
|
|
6
12
|
27/09/2011
|
data/README.rdoc
CHANGED
@@ -19,16 +19,20 @@ RubyRegex is a nice collection of regular expressions in Ruby
|
|
19
19
|
RubyRegex::SlidesahreUsername
|
20
20
|
RubyRegex::GithubUsername
|
21
21
|
RubyRegex::UUID
|
22
|
-
|
22
|
+
RubyRegex::DBDate
|
23
|
+
RubyRegex::DBDatetime
|
24
|
+
RubyRegex::SpanishBankAccountNumber
|
25
|
+
|
23
26
|
== Rails
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
Add to your Gemfile
|
29
|
+
|
30
|
+
gem 'ruby_regex'
|
31
|
+
|
32
|
+
In the models
|
33
|
+
|
34
|
+
validates_format_of :email, :with => RubyRegex::Email
|
35
|
+
|
32
36
|
== Contribute
|
33
37
|
|
34
38
|
Of course, contributions will be apreciated.
|
data/lib/ruby_regex.rb
CHANGED
@@ -48,7 +48,7 @@ module RubyRegex
|
|
48
48
|
# Email
|
49
49
|
# From the email regex research: http://fightingforalostcause.net/misc/2006/compare-email-regex.php
|
50
50
|
# Authors: James Watts and Francisco Jose Martin Moreno
|
51
|
-
Email = /\A([\w\!\#\z\%\&\'\*\+\-\/\=\?\\A\`{\|\}\~]+\.)*[\w
|
51
|
+
Email = /\A([\w\!\#\z\%\&\'\*\+\-\/\=\?\\A\`{\|\}\~]+\.)*[\w\+-]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)\z/i
|
52
52
|
|
53
53
|
# UUID
|
54
54
|
# Validates a UUID as defined: http://en.wikipedia.org/wiki/Universally_unique_identifier
|
data/test/fixtures/emails.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_regex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,19 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
12
|
+
date: 2013-11-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: &70094318182900 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70094318182900
|
14
25
|
description: Ruby regular expressions library
|
15
26
|
email: emili@eparreno.com
|
16
27
|
executables: []
|
@@ -45,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
56
|
version: '0'
|
46
57
|
requirements: []
|
47
58
|
rubyforge_project:
|
48
|
-
rubygems_version: 1.8.
|
59
|
+
rubygems_version: 1.8.11
|
49
60
|
signing_key:
|
50
61
|
specification_version: 3
|
51
62
|
summary: none
|