regxlib 0.1.2 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 640d06de923e1c2204044bfd6b3a3b89c25a4e1f
4
- data.tar.gz: 3685c798ea2f5a1046824bce2f02692370d0b547
3
+ metadata.gz: 1f9f22c57a3a645ee32d64fbffd2c335fb2cdf51
4
+ data.tar.gz: 1e8c356843e6cf3eaca5c2f92c903afd22a2bcff
5
5
  SHA512:
6
- metadata.gz: 661630c18ee2b3dc568aac13453e7254edbeaba9d26645528fbc60cc7c7a21baf7773228f064c4c0b1724d37b9d93641ebf06df563bd6d30e2cf2499fac088ca
7
- data.tar.gz: e480457b43635773b1edf9c28d8a33aec07abfcdf29d46150818144931e24e25804e33978cc44d62ccb593c75955af0ac4caf33cf686c449f3550a57e95fffd0
6
+ metadata.gz: 4c6f24d57d67f915bdb8b009596b87193cfd65fca87f82c6047e5f7483a6f8644f7b3dfbe6a245f1ec3ef15a51ecb4beb15953c03618f87e4afa9200f15c4462
7
+ data.tar.gz: 3ab584fa5dc9b243fcacb5c5415eb55b75aafff986ad1b4fa69fff6d378f3f33013a0a9db2711417bdd2ef13e1d3c906b0fe832aa685bc73d6da624ee55bf40f
data/Gemfile.lock CHANGED
@@ -1,35 +1,35 @@
1
- PATH
2
- remote: .
3
- specs:
4
- regxlib (0.1.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- diff-lcs (1.3)
10
- rake (10.5.0)
11
- rspec (3.8.0)
12
- rspec-core (~> 3.8.0)
13
- rspec-expectations (~> 3.8.0)
14
- rspec-mocks (~> 3.8.0)
15
- rspec-core (3.8.0)
16
- rspec-support (~> 3.8.0)
17
- rspec-expectations (3.8.2)
18
- diff-lcs (>= 1.2.0, < 2.0)
19
- rspec-support (~> 3.8.0)
20
- rspec-mocks (3.8.0)
21
- diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.8.0)
23
- rspec-support (3.8.0)
24
-
25
- PLATFORMS
26
- x86-mingw32
27
-
28
- DEPENDENCIES
29
- bundler (~> 2.0)
30
- rake (~> 10.0)
31
- regxlib!
32
- rspec (~> 3.0)
33
-
34
- BUNDLED WITH
35
- 2.0.1
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ regxlib (0.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.3)
10
+ rake (10.5.0)
11
+ rspec (3.8.0)
12
+ rspec-core (~> 3.8.0)
13
+ rspec-expectations (~> 3.8.0)
14
+ rspec-mocks (~> 3.8.0)
15
+ rspec-core (3.8.0)
16
+ rspec-support (~> 3.8.0)
17
+ rspec-expectations (3.8.2)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.8.0)
20
+ rspec-mocks (3.8.0)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.8.0)
23
+ rspec-support (3.8.0)
24
+
25
+ PLATFORMS
26
+ x86-mingw32
27
+
28
+ DEPENDENCIES
29
+ bundler (~> 2.0)
30
+ rake (~> 10.0)
31
+ regxlib!
32
+ rspec (~> 3.0)
33
+
34
+ BUNDLED WITH
35
+ 2.0.1
data/README.md CHANGED
@@ -16,7 +16,9 @@ The gem is available as open source under the terms of the [MIT License](https:/
16
16
 
17
17
  ### Username
18
18
  * [Regxlib::Username.standard](/docs/regex_library/username/regxlib_username_standard.md)
19
+ * [Regxlib::Username.standard_nonum](/docs/regex_library/username/regxlib_username_standard_nonum.md)
19
20
  * [Regxlib::Username.strict](/docs/regex_library/username/regxlib_username_strict.md)
21
+ * [Regxlib::Username.strict_nonum](/docs/regex_library/username/regxlib_username_strict_nonum.md)
20
22
 
21
23
  ### Email
22
24
  * [Regxlib::Email.standard](/docs/regex_library/email/regxlib_email_standard.md)
@@ -1,5 +1,7 @@
1
1
  ## Regxlib::Email.co_uk
2
2
 
3
+ Regular expression that checks the email ends with .co.uk
4
+
3
5
  Regex Pattern: /\A[\w+-.]+@[a-z\d\-.]+\.[c]+[o]+\.[u]+[k]+\z/i
4
6
 
5
7
  | Example | Result |
@@ -1,5 +1,7 @@
1
1
  ## Regxlib::Email.com
2
2
 
3
+ Regular expression that checks the email ends with .com
4
+
3
5
  Regex Pattern: /\A[\w+-.]+@[a-z\d\-.]+\.[c]+[o]+[m]+\z/i
4
6
 
5
7
  | Example | Result |
@@ -1,5 +1,7 @@
1
1
  ## Regxlib::Email.edu
2
2
 
3
+ Regular expression that checks the email ends with .edu
4
+
3
5
  Regex Pattern: /\A[\w+-.]+@[a-z\d\-.]+\.[e]+[d]+[u]+\z/i
4
6
 
5
7
  | Example | Result |
@@ -1,5 +1,7 @@
1
1
  ## Regxlib::Email.org
2
2
 
3
+ Regular expression that checks the email ends with .org
4
+
3
5
  Regex Pattern: /\A[\w+-.]+@[a-z\d\-.]+\.[o]+[r]+[g]+\z/i
4
6
 
5
7
  | Example | Result |
@@ -1,5 +1,7 @@
1
1
  ## Regxlib::Email.standard
2
2
 
3
+ Standard email regular expression that allows some flexibility in the final email address.
4
+
3
5
  Regex Pattern: `/\A[\w+-.]+@[a-z\d\-.]+\.[a-z]+\z/i`
4
6
 
5
7
  | Example | Result |
@@ -1,5 +1,9 @@
1
1
  ## Regxlib::Username.standard
2
2
 
3
+ Standard username regular expression match that allows some flexibility.
4
+ Dashes, hyphens, and underscores are allowed, but
5
+ can not be placed at the start or end of a username.
6
+
3
7
  Regex Pattern: /\A[a-zA-Z1234567890]+[a-zA-Z-_1234567890]+[a-zA-Z1234567890]\z/i
4
8
 
5
9
  | Example | Result |
@@ -0,0 +1,18 @@
1
+ ## Regxlib::Username.standard_nonum
2
+
3
+ Standard username regular expression match that allows some flexibility.
4
+ Dashes, hyphens, and underscores are allowed, but
5
+ can not be placed at the start or end of a username, and numbers are not allowed.
6
+
7
+ Regex Pattern: /\A[a-zA]+[a-zA-Z-_]+[a-zA]\z/i
8
+
9
+ | Example | Result |
10
+ |-|-|
11
+ | username | Pass |
12
+ | UserName | Pass |
13
+ | user_name | Pass |
14
+ | username99 | Fail |
15
+ | user-name | Pass |
16
+ | username_ | Fail |
17
+ | username- | Fail |
18
+ | user.name | Fail |
@@ -1,5 +1,7 @@
1
1
  ## Regxlib::Username.strict
2
2
 
3
+ restrictive regex that only allows alphabetical characters and numbers.
4
+
3
5
  Regex Pattern: /\A[a-zA-Z1234567890]+[a-zA-Z1234567890]+[a-zA-Z1234567890]\z/i
4
6
 
5
7
  | Example | Result |
@@ -0,0 +1,16 @@
1
+ ## Regxlib::Username.strict
2
+
3
+ Restrictive regular expression that only allows alphabetical characters.
4
+
5
+ Regex Pattern: /\A[a-zA]+[a-zA]+[a-zA]\z/i
6
+
7
+ | Example | Result |
8
+ |-|-|
9
+ | username | Pass |
10
+ | UserName | Pass |
11
+ | user_name | Fail |
12
+ | username99 | Fail |
13
+ | user-name | Fail |
14
+ | username_ | Fail |
15
+ | username- | Fail |
16
+ | user.name | Fail |
data/lib/regxlib.rb CHANGED
@@ -12,11 +12,21 @@ module Regxlib
12
12
  /\A[a-zA-Z1234567890]+[a-zA-Z-_1234567890]+[a-zA-Z1234567890]\z/i
13
13
  end
14
14
 
15
+ # Regxlib::Username.standard_nonum
16
+ def self.standard_nonum
17
+ /\A[a-zA]+[a-zA-Z-_]+[a-zA]\z/i
18
+ end
19
+
15
20
  # Regxlib::Username.strict
16
21
  def self.strict
17
22
  /\A[a-zA-Z1234567890]+[a-zA-Z1234567890]+[a-zA-Z1234567890]\z/i
18
23
  end
19
24
 
25
+ # Regxlib::Username.strict_no_num
26
+ def self.strict_nonum
27
+ /\A[a-zA]+[a-zA]+[a-zA]\z/i
28
+ end
29
+
20
30
  end
21
31
  # [START] Regxlib::Username ###########
22
32
 
@@ -1,3 +1,3 @@
1
1
  module Regxlib
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regxlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Speight
@@ -75,7 +75,9 @@ files:
75
75
  - docs/regex_library/email/regxlib_email_org.md
76
76
  - docs/regex_library/email/regxlib_email_standard.md
77
77
  - docs/regex_library/username/regxlib_username_standard.md
78
+ - docs/regex_library/username/regxlib_username_standard_nonum.md
78
79
  - docs/regex_library/username/regxlib_username_strict.md
80
+ - docs/regex_library/username/regxlib_username_strict_nonum.md
79
81
  - lib/regxlib.rb
80
82
  - lib/regxlib/version.rb
81
83
  - regxlib.gemspec