email_signature_parser 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
  SHA256:
3
- metadata.gz: 6008ad813f969cfb3b8b8b8c2dec4d99e2c083c75aa2a119130619f11d4ff63e
4
- data.tar.gz: 9af9028a049eacc2c58b665764fd422e1da98aec84a6ea7cec1b9138ac43abb7
3
+ metadata.gz: 1bfc690817d76870045cb565082894471ff91b530c1ca0d29b0f8932a485f3a0
4
+ data.tar.gz: e8a0d00b64d50b77c8ea8a43c449e4ae03e6dc7e94d78e6c22bf6ff26c87ab9e
5
5
  SHA512:
6
- metadata.gz: 594f404dacc0c455a2bf1abe13647789e3207ba9bd3f515a7b2b511a5e64d97a88b24a55e9f60d53d810b839e77ac70b00a898bada86ded1d723c04b0b70ecb8
7
- data.tar.gz: 51942c0490ab2f46a21226f676b23830c2d6a97ba3dd0295490c71e485fd55fea60b5def06b3e1f08b80cbf52f9631a696c08eef1571d9b354aa3c4918e38035
6
+ metadata.gz: 0ff3f082a7d0366b6953db51ab0139fe5482ca2216c773f255547f4c51634946c3419e112c70a70cbfcfaba51e5f492312013aca4527050d063005deef73d95f
7
+ data.tar.gz: 1069582d064cff2b58898f5bdb01a86d6478e0f38a20c2cb63437382871624502c5062c3cf84ea9444b8771dbbfb2ba8dd217b51cc90c8636825301cb1baeff9
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # EmailSignatureParser
2
2
 
3
- A Ruby gem for parsing email signatures. The gem tries to find the signature based on the name, if available, or email address and try to extract as much information as it can from the
3
+ A Ruby gem for parsing email signatures. The gem tries to find the signature based on the name, if available, or email address and try to extract as much information as it can
4
4
 
5
5
  ## Prerequisites
6
6
 
@@ -92,8 +92,8 @@ It will return a hash with whatever could be extracted from the signature
92
92
  ]
93
93
  },
94
94
  "job_title": {
95
- "title": "",
96
- "acronym": "CEO"
95
+ "titles": ["Sales Marketing VP"],
96
+ "acronyms": ["CEO"]
97
97
  },
98
98
  "text": "Text of the signature",
99
99
  "company_name": "TestCompany Ltd"
@@ -843,7 +843,11 @@ module EmailSignatureParser
843
843
  unless !email_html_body.nil? && !email_html_body.empty?
844
844
  raise InvalidEmailError, "No email body provided"
845
845
  end
846
-
846
+
847
+ if from.downcase.include?("reply") || from.downcase.include?("mailer-daemon")
848
+ raise InvalidFromError, "No valid From address"
849
+ end
850
+
847
851
 
848
852
  name, email_address = extract_name_and_email(from)
849
853
  parsed_text = parse_email_html(email_html_body)
@@ -862,6 +866,10 @@ module EmailSignatureParser
862
866
  raise InvalidFromError, "No from provided"
863
867
  end
864
868
 
869
+ if from.downcase.include?("reply") || from.downcase.include?("mailer-daemon")
870
+ raise InvalidFromError, "No valid From address"
871
+ end
872
+
865
873
  if meeting_email?(email_body)
866
874
  raise InvalidEmailError, "Email appears to be a meeting invite"
867
875
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email_signature_parser
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
  - Guillermo Molini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-17 00:00:00.000000000 Z
11
+ date: 2025-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby_postal