cardmagic-contacts 1.0.15 → 1.0.16

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/Rakefile CHANGED
@@ -10,7 +10,7 @@ PKG_VERSION = Contacts::VERSION
10
10
 
11
11
  PKG_FILES = FileList[
12
12
  "lib/**/*", "bin/*", "test/**/*", "[A-Z]*", "Rakefile", "doc/**/*", "examples/**/*"
13
- ]
13
+ ] - ["test/accounts.yml"]
14
14
 
15
15
  desc "Default Task"
16
16
  task :default => [ :test ]
data/lib/contacts/base.rb CHANGED
@@ -8,7 +8,7 @@ require "thread"
8
8
 
9
9
  class Contacts
10
10
  TYPES = {}
11
- VERSION = "1.0.15"
11
+ VERSION = "1.0.16"
12
12
 
13
13
  class Base
14
14
  def initialize(login, password)
@@ -34,8 +34,14 @@ class Contacts
34
34
  elsif code == '200'
35
35
  @contacts = []
36
36
  doc.elements.each('//contact') do |cont|
37
- name = cont.elements['fullName'].nil? ? cont.elements['displayName'].text : cont.elements['fullName'].text
38
- email = cont.elements['email1'].text
37
+ name = if cont.elements['fullName']
38
+ cont.elements['fullName'].text
39
+ elsif cont.elements['displayName']
40
+ cont.elements['displayName'].text
41
+ end
42
+ email = if cont.elements['email1']
43
+ cont.elements['email1'].text
44
+ end
39
45
  @contacts << [name, email]
40
46
  end.compact
41
47
  @contacts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cardmagic-contacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson