directories_interface 0.0.6 → 0.0.7

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.
@@ -47,10 +47,11 @@ module DirectoriesInterface
47
47
 
48
48
  def result_available(result_xml)
49
49
  error_code = XmlParser.extract_error_code(result_xml)
50
+ error_description = XmlParser.extract_error_description(result_xml)
50
51
  case error_code
51
52
  when "200" then false
52
53
  when "0" then true
53
- else raise "Service has error: #{error_code}"
54
+ else raise "Service has error: #{error_code} - #{error_description}"
54
55
  end
55
56
  end
56
57
 
@@ -1,3 +1,3 @@
1
1
  module DirectoriesInterface
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -40,6 +40,10 @@ module DirectoriesInterface
40
40
  xml_res.xpath("//@ErrorCode").to_s
41
41
  end
42
42
 
43
+ def self.extract_error_description(xml_res)
44
+ xml_res.xpath("//@ErrorDescr").to_s
45
+ end
46
+
43
47
  def self.count_matches(xml_res)
44
48
  xml_res.xpath("//@MatchedEntries").to_s
45
49
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: directories_interface
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Nicola Pestalozzi
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-06-07 00:00:00 +02:00
13
+ date: 2012-08-06 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency