jangosmtp 0.1.2.1 → 0.1.2.2

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.
@@ -1,5 +1,6 @@
1
1
  require 'jangosmtp/version'
2
2
  require 'mechanize'
3
+ require 'xml_parser'
3
4
 
4
5
  module Jangosmtp
5
6
 
@@ -134,6 +135,7 @@ module Jangosmtp
134
135
  # Try max_attempts times before skipping
135
136
  while((attempt < max_attempts) && !response)
136
137
  begin
138
+ agent.pluggable_parser['text/xml'] = XmlParser
137
139
  response = agent.post( BASE_URL + action, options )
138
140
  rescue StandardError => e
139
141
  # If there was an error set success to false and try again in 3 seconds
@@ -1,3 +1,3 @@
1
1
  module Jangosmtp
2
- VERSION = "0.1.2.1"
2
+ VERSION = "0.1.2.2"
3
3
  end
@@ -0,0 +1,7 @@
1
+ class XmlParser < Mechanize::File
2
+ attr_reader :xml
3
+ def initialize(uri = nil, response = nil, body = nil, code = nil)
4
+ @xml = Nokogiri::XML(body)
5
+ super uri, response, body, code
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jangosmtp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.1
4
+ version: 0.1.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -42,6 +42,7 @@ files:
42
42
  - jangosmtp.gemspec
43
43
  - lib/jangosmtp.rb
44
44
  - lib/jangosmtp/version.rb
45
+ - lib/xml_parser.rb
45
46
  homepage: https://github.com/jbrennon/jangosmtp
46
47
  licenses: []
47
48
  post_install_message: