vcard_parser 0.0.3 → 0.0.4
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.
- data/ChangeLog +2 -0
- data/README.md +2 -1
- data/lib/vcard_parser/3.0/field.rb +1 -0
- data/lib/vcard_parser/version.rb +1 -1
- data/specs/unit/3.0/field_spec.rb +10 -0
- metadata +5 -5
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -18,7 +18,8 @@ This gem is tested against these ruby by travis-ci.org:
|
|
18
18
|
```ruby
|
19
19
|
require 'vcard_parser'
|
20
20
|
|
21
|
-
|
21
|
+
vcard = File.read('specs/data/vcard3.0.vcf')
|
22
|
+
cards = VCardParser::VCard.parse(vcard)
|
22
23
|
|
23
24
|
puts cards[0].fields
|
24
25
|
puts cards[0]['N']
|
data/lib/vcard_parser/version.rb
CHANGED
@@ -53,6 +53,16 @@ describe 'Field 3.0' do
|
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
56
|
+
should 'ignore parameters name case' do
|
57
|
+
f = VCardParser::V30::Field.parse("TEL;type=WORK;type=VOICE;Type=pref;tYPe=something:1234")
|
58
|
+
f.group.should == nil
|
59
|
+
f.name.should == "TEL"
|
60
|
+
f.value.should == "1234"
|
61
|
+
f.params.should == {
|
62
|
+
'type' => %w(WORK VOICE pref something)
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
56
66
|
should 'generate vcf line from data' do
|
57
67
|
line = "TEL;type=WORK;type=VOICE;type=pref:1234"
|
58
68
|
f = VCardParser::V30::Field.parse(line)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcard_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A vCard parser
|
15
15
|
email:
|
@@ -51,7 +51,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
51
|
version: '0'
|
52
52
|
segments:
|
53
53
|
- 0
|
54
|
-
hash:
|
54
|
+
hash: -891506393792489968
|
55
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
56
|
none: false
|
57
57
|
requirements:
|
@@ -60,10 +60,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
segments:
|
62
62
|
- 0
|
63
|
-
hash:
|
63
|
+
hash: -891506393792489968
|
64
64
|
requirements: []
|
65
65
|
rubyforge_project:
|
66
|
-
rubygems_version: 1.8.
|
66
|
+
rubygems_version: 1.8.24
|
67
67
|
signing_key:
|
68
68
|
specification_version: 3
|
69
69
|
summary: A simple vCard parser
|