treecard 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -67,6 +67,12 @@ class TreeCard
67
67
  attr.value if attr
68
68
  end
69
69
 
70
+ def url
71
+ attr = attributes['url']
72
+ attr &&= attr.first
73
+ attr.value if attr
74
+ end
75
+
70
76
  # VCards automatically wrap lines longer than 75 characters. Wrapped
71
77
  # lines are signified by leading whitespace.
72
78
  def self.unfold_lines(data)
@@ -17,6 +17,7 @@ class TreeCardTest < Test::Unit::TestCase
17
17
  assert_equal "(925) 930-6000", @vcard.phone
18
18
  assert_equal "(925) 934-5377", @vcard.fax
19
19
  assert_equal "Youngman, Ericsson & Low, LLP", @vcard.company
20
+ assert_equal "www.example.com", @vcard.url
20
21
  assert_equal "1981 N. Broadway, Suite 300\nWalnut Creek\nCA\n94596-3841\nUnited States of America", @vcard.address
21
22
  end
22
23
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: treecard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
4
+ hash: 27
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 3
10
- version: 0.0.3
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Weiss
@@ -15,11 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-21 00:00:00 -07:00
18
+ date: 2011-06-28 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: treetop
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
@@ -33,9 +32,9 @@ dependencies:
33
32
  - 8
34
33
  version: 1.4.8
35
34
  type: :runtime
35
+ name: treetop
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- name: shoulda
39
38
  prerelease: false
40
39
  requirement: &id002 !ruby/object:Gem::Requirement
41
40
  none: false
@@ -49,6 +48,7 @@ dependencies:
49
48
  - 3
50
49
  version: 2.10.3
51
50
  type: :development
51
+ name: shoulda
52
52
  version_requirements: *id002
53
53
  description:
54
54
  email: jweiss@avvo.com
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  requirements: []
99
99
 
100
100
  rubyforge_project:
101
- rubygems_version: 1.3.7
101
+ rubygems_version: 1.6.2
102
102
  signing_key:
103
103
  specification_version: 3
104
104
  summary: A simple vcard parser using Treetop