lperichon-contacts 1.0 → 1.0.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.
Files changed (2) hide show
  1. data/lib/contacts/yahoo.rb +2 -0
  2. metadata +2 -1
@@ -56,6 +56,7 @@ module Contacts
56
56
 
57
57
  def parse_contacts(text)
58
58
  result = JSON.parse(text)
59
+ if result['contacts']
59
60
  result['contacts']['contact'].map do |contact_object|
60
61
  name, emails = nil, []
61
62
  contact_object['fields'].each do |field_object|
@@ -71,6 +72,7 @@ module Contacts
71
72
  next if emails.empty?
72
73
  Contact.new(name, emails)
73
74
  end.compact
75
+ end
74
76
  end
75
77
  end
76
78
  end
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- version: "1.0"
8
+ - 1
9
+ version: 1.0.1
9
10
  platform: ruby
10
11
  authors: []
11
12