aeden-contacts 0.2.16 → 0.2.18

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/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 2
3
- :patch: 16
3
+ :patch: 18
4
4
  :major: 0
@@ -249,7 +249,7 @@ module Contacts
249
249
  content_node = entry / 'atom:content'
250
250
 
251
251
  service_id = id_node ? id_node.inner_text : nil
252
- name = title_node ? title_node.inner_text : nil
252
+ name = title_node ? title_node.inner_html : nil
253
253
 
254
254
  contact = Contact.new(nil, name)
255
255
  contact.service_id = service_id
@@ -268,13 +268,13 @@ module Contacts
268
268
  end
269
269
  phone_nodes.each do |n|
270
270
  contact.phones << {
271
- 'value' => n.inner_text,
271
+ 'value' => n.inner_html,
272
272
  'type' => (type_map[n['rel']] || 'other').to_s
273
273
  }
274
274
  end
275
275
  address_nodes.each do |n|
276
276
  contact.addresses << {
277
- 'formatted' => n.inner_text,
277
+ 'formatted' => n.inner_html,
278
278
  'type' => (type_map[n['rel']] || 'other').to_s
279
279
  }
280
280
  end
@@ -287,14 +287,14 @@ module Contacts
287
287
 
288
288
  contact.organizations << {
289
289
  'type' => 'job',
290
- 'name' => org_name ? org_name.inner_text : '',
291
- 'title' => org_title ? org_title.inner_text : '',
292
- 'department' => org_department ? org_department.inner_text : '',
293
- 'description' => org_description ? org_description.inner_text : ''
290
+ 'name' => org_name ? org_name.inner_html : '',
291
+ 'title' => org_title ? org_title.inner_html : '',
292
+ 'department' => org_department ? org_department.inner_html : '',
293
+ 'description' => org_description ? org_description.inner_html : ''
294
294
  }
295
295
  end
296
296
  end
297
- contact.note = content_node ? content_node.inner_text : ''
297
+ contact.note = content_node ? content_node.inner_html : ''
298
298
 
299
299
  contacts_found << contact
300
300
  end
@@ -50,7 +50,7 @@ module Contacts
50
50
  #
51
51
  class WindowsLive
52
52
  CONFIG_FILE = File.dirname(__FILE__) + '/../config/contacts.yml'
53
-
53
+ attr_accessor :wll
54
54
  # Initialize a new WindowsLive object.
55
55
  #
56
56
  # ==== Paramaters
@@ -90,6 +90,10 @@ module Contacts
90
90
  @consent_token = @wll.processConsent(consent)
91
91
  end
92
92
 
93
+ def process_consent_token(consent_token)
94
+ @wll.processConsentToken consent_token
95
+ end
96
+
93
97
  # This method return the user's contacts inside an Array in the following
94
98
  # format:
95
99
  #
@@ -104,7 +108,11 @@ module Contacts
104
108
  # the redirection POST from Windows Live
105
109
  #
106
110
  def contacts(consent)
107
- process_consent(consent)
111
+ if consent.is_a? WindowsLiveLogin::ConsentToken
112
+ @consent_token = consent
113
+ else
114
+ process_consent(consent)
115
+ end
108
116
  contacts_xml = access_live_contacts_api()
109
117
  contacts_list = WindowsLive.parse_xml(contacts_xml)
110
118
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aeden-contacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Mislav Marohni\xC6\x92\xC3\xA1"