vcard_parser 0.0.9 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6e163f43c16a755bc2431f450dae008e6ff4e1c
4
- data.tar.gz: 75caa1354c96992ae2d1bad66251dfcdd46094b3
3
+ metadata.gz: 7757928503f1a96c20a5a2702a6e82598c606ae4
4
+ data.tar.gz: cf11adf713c276a3364a5fad5172ed3556d3017d
5
5
  SHA512:
6
- metadata.gz: 361f3695db494bcbeae7581d46bb0eff68f3ee0f9903fb650d3074c2ffbb906e3e765a99b87ab64f4c089dcb2e1bb6c2389235aa07798d4ae2ca102ae9226ba9
7
- data.tar.gz: 41a04060d9549cf2103c6e658eba8dbf077e88d1f09ce7eb0aa459d3a212753ab66d3049272b5086c3f74c0adaac1f8378fd80875349196eab9c6fb1d5556468
6
+ metadata.gz: 3310d4a575db0de6a473e781542e2d994df6a5abab9e02f88ce3c69ea5fecffe0ddd1767f7b2a2f58277a775aee708efb72e900a2c0081208e04b1b27e24d681
7
+ data.tar.gz: 7a1bdef1cb665819652f3272fb8917d534a05a430a18d8c5627d0bd027e2271123804e2bd884c0d9f55ebb8aef30ad954cb68085bc0b6521a4041a7fff4a3078
@@ -36,7 +36,7 @@ module VCardParser
36
36
  key, version = version_line.split(':')
37
37
 
38
38
  new(version).tap do |card|
39
- lines.each do |line|
39
+ lines.reject{|str| str.strip.empty? }.each do |line|
40
40
  card.add_field_from_string(line)
41
41
  end
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module VcardParser
2
- VERSION = "0.0.9"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -0,0 +1,15 @@
1
+ BEGIN:VCARD
2
+ VERSION:3.0
3
+
4
+ PRODID:-//Apple Inc.//iOS 5.0.1//EN
5
+ N:Durand;Christophe;;;
6
+ FN:Christophe Durand
7
+ ORG:Op;
8
+ item1.TEL;type=pref:2 56 38 54
9
+ item2.TEL;type=pref:5 66
10
+ TEL;type=CELL;type=VOICE:3 55
11
+ item2.ADR;type=HOME;type=pref:;;3 rue du chat;Dris;;90880;FRANCE
12
+ BDAY;value=date:1900-01-01
13
+ REV:2012-10-31T16:08:22Z
14
+ UID:11
15
+ END:VCARD
@@ -22,6 +22,13 @@ describe 'VCard' do
22
22
  end
23
23
 
24
24
  describe 'vCard 3.0' do
25
+ should 'handle blank lines' do
26
+ vcards = VCardParser::VCard.parse( data_file('malformed3.0.vcf') )
27
+ vcards.size.should == 1
28
+
29
+ vcards[0].version.should == "3.0"
30
+ end
31
+
25
32
  should 'parse simple card' do
26
33
  vcards = VCardParser::VCard.parse( data_file('vcard3.0.vcf') )
27
34
  vcards.size.should == 1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcard_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Ammous
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-21 00:00:00.000000000 Z
11
+ date: 2015-05-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A vCard parser
14
14
  email:
@@ -29,6 +29,7 @@ files:
29
29
  - lib/vcard_parser/3.0/field.rb
30
30
  - lib/vcard_parser/vcard.rb
31
31
  - lib/vcard_parser/version.rb
32
+ - specs/data/malformed3.0.vcf
32
33
  - specs/data/two_vcard3.0.vcf
33
34
  - specs/data/vcard2.1.vcf
34
35
  - specs/data/vcard3.0.vcf