mail_address 1.2.16 → 1.2.18

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: 9444cdca2ba62456c8945411801b4dca251a7d44
4
- data.tar.gz: a939e18eaab3b80c2a1d826a834e8493ba0432cb
3
+ metadata.gz: 833d9b9134350751bddcf7ca4f6ca54eff8a38fd
4
+ data.tar.gz: 6c81de26be132ebb70e5c22c56c3cbe199992a7b
5
5
  SHA512:
6
- metadata.gz: fff818a9427ae13526871ba23b78c1bd1f5a91731a14bbee503a8c547df397ab8fda5dfd04d13f5e72cbd70488bce4d4ee51783c6a3c3f8e1f808bddd188a83f
7
- data.tar.gz: facfc66055775d9cd3393f9446591716386f9e82b9cc247ed210fe5bb02c51e3eb83ce956c8ed9dca02560982c30f9fa9ea78ea8508d7a3d49d3d8895cbac591
6
+ metadata.gz: 07c56ea14c1f38817800109bdada2f7d53e7573dc0a61dff0caa87ce9eb3074746198b6ff6f87f86a0d254d9e7fa7a4375a06f342050f4c43617b340d33a8cf3
7
+ data.tar.gz: db03e23d3749afceb5e2fb2c1a3293830b46e42bc89b85ac37f3e9a3f745103063063a89a6dc192282a9966073136ab538fa4497fa88db16d855fa74181fd182
@@ -10,7 +10,7 @@ module MailAddress
10
10
  line = lines.join('').strip
11
11
 
12
12
  # empty or <> or < or >
13
- if line.empty? || line.match(/\A[<>;, ]+\z/)
13
+ if line.empty? || line.match(/\A[<>;, \\]+\z/)
14
14
  return [ MailAddress::Address.new(line, nil, line) ]
15
15
  end
16
16
 
@@ -1,3 +1,3 @@
1
1
  module MailAddress
2
- VERSION = "1.2.16"
2
+ VERSION = "1.2.18"
3
3
  end
@@ -582,6 +582,16 @@ describe MailAddress do
582
582
  end
583
583
 
584
584
  it "includes backslash" do
585
+ line = '\\'
586
+ result = MailAddress.parse_first(line)
587
+ expect(result.format).to eq('\\')
588
+ expect(result.address).to be_nil
589
+ expect(result.name).to be_nil
590
+ expect(result.phrase).to eq('\\')
591
+ expect(result.host).to be_nil
592
+ expect(result.user).to eq('')
593
+ expect(result.original).to eq('\\')
594
+
585
595
  line = '\"jjjjjjjjjjjj\" <john_doe@example.com>'
586
596
  result = MailAddress.parse_first(line)
587
597
  expect(result.format).to eq('jjjjjjjjjjjj <john_doe@example.com>')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail_address
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.16
4
+ version: 1.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kizashi Nagata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-09 00:00:00.000000000 Z
11
+ date: 2020-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler