blackstack-core 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/functions.rb +13 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9592570e271e03c770578f608c104b7e558a100b0b91255f7f75cf5fab7e4444
4
- data.tar.gz: 6ed68ac325242d9322b245d0eb8bf2ab122e2382fd037fdd548d13803e5d0bbc
3
+ metadata.gz: ec4a7f0ff79d1a2d5b75fcfec7b550b0d1bc488cc5d53b5fa38a4c6c56e8988f
4
+ data.tar.gz: 0544bda4b8b7d0ee1c041c34244dfc77c775a45775c7b846cf5213f59cd14950
5
5
  SHA512:
6
- metadata.gz: 837d52cbacb341147b22bb6f7fee9788498aa9efebcbeaf27cd0040536b8d6c5c4a4fe2f7c0d59ddcbf4b782ebf733c5c6318b86a7875ca8735e1e1963e26613
7
- data.tar.gz: 4cb67494f9c10e06c72b465fc916076e7d1955fd552f0793505f5bab409fd8761cac90f5f8e4fabb0694653a9f0545a35cd3a66221754313d9ac02d0829bd9ba
6
+ metadata.gz: 74c684e58c57dac13ad568cad95e1319fb1bc7db9f0e247fd169bbf6862ac205db5ba9a759111ba62c9bb87c5988753e330dbd685a67368847ea7af4aa15290f
7
+ data.tar.gz: 3b51ad3b02c831291832e8e8ac5544ec71be93d52aa222840baf603b461019e25c6395441ade0d953224ade193c3692c3b71598111d2768312ceb81c0ccd1708
data/lib/functions.rb CHANGED
@@ -835,6 +835,19 @@ module BlackStack
835
835
  a.map { |d| d.split('.').last(2).join('.') }.uniq
836
836
  end
837
837
 
838
+ # raise an exception if `email` is not a valid email address.
839
+ # return if the email domain is gmail, hotmail, outlook, yahoo, comcast, aol, msn or sbcglobal.
840
+ def self.isPersonalEmail?(email)
841
+ value = email
842
+ # raise an exception if the data type is an email, but the email is not valid.
843
+ raise "Email #{value} is not valid" if !value.email?
844
+ # extract the domain from the email
845
+ domain = value.split('@').last
846
+ #
847
+ domain~=/gmail\.com/ || domain~=/hotmail\.com/ || domain~=/outlook\.com/ || domain~=/yahoo\.com/ || domain~=/comcast\.com/ || domain~=/aol\.com/ || domain~=/msn\.com/ || domain~=/sbcglobal\.net/
848
+ end
849
+
850
+
838
851
  end # module Netting
839
852
 
840
853
  end # module BlackStack
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackstack-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: content_spinning