civicrm 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 143b0aefa1019de0e853e547d89fbaf371fab98c
4
- data.tar.gz: df819c01e2da40b91474212f2d6ba5a2b4519268
3
+ metadata.gz: bbe6f59cb6fc11c4e85ca5073ef1c6ef1e66abb0
4
+ data.tar.gz: 14a8dde7bd765bb9c7d98275b9fc6313ffb52867
5
5
  SHA512:
6
- metadata.gz: 8531df4d6d31486fba83848a8578c6025c81248d66eaf4409021fef2e26550d051c7687701a440d86b5571451271cedd85d75662647a541fb19460dce565696e
7
- data.tar.gz: ffec48ab95b8f5cc0ba5dc2d1584a317e9ff151a37ee8a0401e6d61c978e54b579fdfa9fd995d825c4c6f0e49ee67bcda8a79a84943ef9b0e375060d6506e4ff
6
+ metadata.gz: b35e8244019544a13e2f78b9815ac5cdf631e708f8cfa4ddd2c5053a37fa435b7eef42f9d545ebcf873b22a55b6072502b3a5e09ebabccd7b07739b0ec684205
7
+ data.tar.gz: a52d8f160cf41f3b6f49d4581d825d63a56de7b9153bf42921b77e039f41ef4b12349733cf41c84e10a49fa0eb3ae44518d5454c797ac61aad9ae51b6d490bdf
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- civicrm (1.0.3)
4
+ civicrm (1.0.4)
5
5
  activemodel
6
6
  activesupport
7
7
  nokogiri
@@ -1,3 +1,3 @@
1
1
  module CiviCrm
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
@@ -2,9 +2,13 @@ module CiviCrm
2
2
  class XML
3
3
  class << self
4
4
  def parse(text)
5
+ # CiviCRM <Result>s sometimes contain weird elements
6
+ # like <preferred_communication_method><0></0></ ...
7
+ # that Nokogiri::XML can't hang with. Get rid of them before
8
+ # parsing.
5
9
  fixed_text = text.to_s.
6
10
  gsub("\n", "").
7
- gsub(/<\d+><\/\d+>/, "")
11
+ gsub(/<(\w|_)+>\s*<\d+><\/\d+>\s*<\/(\w|_)+>/, "")
8
12
 
9
13
  doc = Nokogiri::XML.parse(fixed_text)
10
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civicrm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Haziev