troelskn-handsoap 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 0
4
4
  :minor: 2
@@ -14,8 +14,17 @@ module Utf8StringPatch
14
14
  self.serialize('UTF-8').gsub('&lt;', '<').gsub('&gt;', '>').gsub('&quot;', '"').gsub('&apos;', "'").gsub('&amp;', '&')
15
15
  end
16
16
  end
17
- Nokogiri::XML::Text.send :include, Utf8StringPatch
18
- Nokogiri::XML::Nodeset.send :include, Utf8StringPatch
17
+
18
+ module Nokogiri
19
+ module XML
20
+ class Text
21
+ include Utf8StringPatch
22
+ end
23
+ class Nodeset
24
+ include Utf8StringPatch
25
+ end
26
+ end
27
+ end
19
28
 
20
29
  module Handsoap
21
30
 
@@ -143,25 +152,25 @@ module Handsoap
143
152
  super
144
153
  end
145
154
  end
146
- def invoke(action, options = { :soap_action => :auto }, &block)
147
- if action
148
- if options.kind_of? String
149
- options = { :soap_action => options }
150
- end
151
- if options[:soap_action] == :auto
152
- options[:soap_action] = action.gsub(/^.+:/, "")
153
- elsif options[:soap_action] == :none
154
- options[:soap_action] = nil
155
- end
156
- doc = make_envelope do |body|
157
- body.add action
158
- end
159
- if block_given?
160
- yield doc.find(action)
161
- end
162
- dispatch(doc, options[:soap_action])
163
- end
164
- end
155
+ def invoke(action, options = { :soap_action => :auto }, &block)
156
+ if action
157
+ if options.kind_of? String
158
+ options = { :soap_action => options }
159
+ end
160
+ if options[:soap_action] == :auto
161
+ options[:soap_action] = action.gsub(/^.+:/, "")
162
+ elsif options[:soap_action] == :none
163
+ options[:soap_action] = nil
164
+ end
165
+ doc = make_envelope do |body|
166
+ body.add action
167
+ end
168
+ if block_given?
169
+ yield doc.find(action)
170
+ end
171
+ dispatch(doc, options[:soap_action])
172
+ end
173
+ end
165
174
  def on_before_dispatch
166
175
  end
167
176
  def on_fault(fault)
@@ -228,7 +237,7 @@ module Handsoap
228
237
  headers = {
229
238
  "Content-Type" => "#{self.class.request_content_type};charset=UTF-8"
230
239
  }
231
- headers["SOAPAction"] = action unless action.nil?
240
+ headers["SOAPAction"] = action unless action.nil?
232
241
  body = doc.to_s
233
242
  debug do |logger|
234
243
  logger.puts "==============="
data/lib/handsoap.rb CHANGED
@@ -1,11 +1,3 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'rubygems'
3
- require 'httpclient'
4
- require 'nokogiri'
5
- require 'curb'
6
- require 'time'
7
-
8
2
  require 'handsoap/xml_mason'
9
3
  require 'handsoap/service'
10
-
11
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: troelskn-handsoap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Troels Knak-Nielsen