net-receiver 1.2.0 → 1.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef9bf25b367b217a2f1f8a3da082c3edefcf8621
4
- data.tar.gz: 507779eff98d8a1c03d980824c37e8bd8e54416a
3
+ metadata.gz: c70623651d874318484c5abb5b914d30bd7d2c72
4
+ data.tar.gz: 123896fdb625e12835ae32bcfb809c98503a54c4
5
5
  SHA512:
6
- metadata.gz: c293edb6d7d16915411e33838781290137ab4b3fd3ac7ee14e48b8ac9dff01e174dc5baa412bdb046cac9c02554f5e54e89864c9e39b53df5f39b179bbc5b12e
7
- data.tar.gz: 89be49e4cfecfed76a66ec46ed80394b13f1b2db4887ac37a30888548ec594544cadfd13c0a10535662a7c4a73602e4cf8e69104ddc32c11c55a589b36d75e05
6
+ metadata.gz: d9c70d0c461a3726ccc165506fa40e68defd385745cc5aae6f8def402e1511f245f9b135754d900fa90280788bacc0eacf089140eb970d69e18f2af00d4ef0f3
7
+ data.tar.gz: 4296f6d5f98ba5a161f0ad52178608441c07c65f6d07a6b04ac852cb785dee78f80a74fcd687025d88606b355a524d091a7dfc4510234e168ac0d5e29ea3deb7
@@ -1,3 +1,27 @@
1
+ # v1.2.1
2
+ Changed the way the headers are stored in the data section of an ItemOfMail object. They are stored in a Hash, and each key is
3
+ made all lower case and hyphens are converted to underscores. Each value is the entire line of the original header, as is.
4
+
5
+ for example:
6
+
7
+ ```text
8
+ :data=>{
9
+ :accepted=>true,
10
+ :value=>"",
11
+ :headers=>{
12
+ :date=>"Date: Wed, 05 Oct 2016 14:02:38 -0700",
13
+ :to=>"To: abuse@example.com",
14
+ :from=>"From: admin@example.com",
15
+ :subject=>"Subject: test Wed, 05 Oct 2016 14:02:38 -0700",
16
+ :x_mailer=>"X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/"
17
+ },
18
+ :text=>[
19
+ "This is a test mailing",
20
+ ""
21
+ ]
22
+ }
23
+ ```
24
+
1
25
  # v1.2.0
2
26
  Simplified the send_text and recv_text by moving the error handling to the end of Receiver#receive, and removing redundent statements. Removed the code which handled those errors (SLAM and TIMEOUT) from the Patterns list, and removed the associated handler code.
3
27
 
@@ -374,9 +374,9 @@ module Net
374
374
  body[:accepted] = true
375
375
  break
376
376
  end
377
- m = text.match(/^(.+?):(.+)$/)
377
+ m = text.match(/^(.+?):.+$/)
378
378
  return "501 5.5.2 Malformed header" if m.nil?
379
- headers[m[1]] = m[2]
379
+ headers[m[1].downcase.gsub('-','_').to_sym] = text
380
380
  end
381
381
 
382
382
  # get the body into an array of strings
@@ -1,4 +1,4 @@
1
1
  module Net
2
- BUILD_VERSION = "1.2.0"
3
- BUILD_DATE = "2016-09-30"
2
+ BUILD_VERSION = "1.2.1"
3
+ BUILD_DATE = "2016-10-05"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-receiver
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael J. Welch, Ph.D.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-30 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby Net Receiver.
14
14
  email: