xmlconv 1.1.3 → 1.1.4

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: 132a524daba12cd229c004baff161ecc1aeeb566
4
- data.tar.gz: d123c9b0db154412052e9e136ca2fe17a7503b81
3
+ metadata.gz: f84eef111da78dc0fd56004f4e72484f72140c8b
4
+ data.tar.gz: ac6e7523fbfb16cb7791d9ac19433caaf724386b
5
5
  SHA512:
6
- metadata.gz: af6d05768520e257ee7a071f2ba8a79d2319031a80c8e3a55129b0d48e21c4e34efc2a14f394cd69e4a3b6aa0c41204ebe51374b781621bad95fe6a0164fd891
7
- data.tar.gz: b04037fe973ab119a22e84791af39e6eccfd106340bb3b4aa21cd510c6c70fe843b9511628305b3b839c022d137f11de1072da9ee17429b29e867b6fa977fba2
6
+ metadata.gz: 52a6367572def652ed84ebedb47d02310c95124ee0b384ccefe14e833ec999ccdf4e8dbe7d1f1f325f7d1ebbee3a4fe57d09d11aa3f6637d15135c78af18ca1a
7
+ data.tar.gz: ba3d970f48c00d7a381ace1977b123f16905a052623b0059059f9bfe9b8e7fb691d42e7b6975157f03f473cf82ebbaf8f01b79b0c30de29c1030833d1a5e9b46
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.1.4 / 13.06.2017
2
+
3
+ * Avoid UTF-8 encoding errors
4
+ * Return correct response for transaction
5
+ * Fix running unit tests
6
+
1
7
  === 1.1.3 / 12.06.2017
2
8
 
3
9
  * Fix processing mail and postprocess of sandoz.xmlconv
@@ -4,6 +4,7 @@
4
4
  require 'sbsm/state'
5
5
  require 'xmlconv/view/login'
6
6
  require 'xmlconv/state/transactions'
7
+ require 'stringio'
7
8
 
8
9
  module XmlConv
9
10
  module State
@@ -24,10 +25,21 @@ module XmlConv
24
25
  transaction.origin = session.remote_ip
25
26
  transaction.postprocs.push(['Soap', 'update_partner'])
26
27
  transaction.postprocs.push(['Bbmb2', 'inject', XmlConv::CONFIG.bbmb_url, 'customer_id'])
28
+ @transaction = transaction
27
29
  res = session.app.execute_with_response(transaction)
28
30
  end
29
31
  end
30
32
  super
33
+ end
34
+ def to_html(context)
35
+ if @session.request_method.eql?('POST')
36
+ string = StringIO.new
37
+ @transaction.response.write(string, 2)
38
+ string.rewind
39
+ string.read
40
+ else
41
+ super(context)
42
+ end
31
43
  end
32
44
  def login
33
45
  if(@session.login)
File without changes
@@ -23,7 +23,7 @@ module Mail
23
23
  }
24
24
  ::Mail.defaults do
25
25
  delivery_method :smtp, options
26
- end
26
+ end unless ::Mail.delivery_method.is_a?(::Mail::TestMailer)
27
27
  mail = ::Mail.deliver do
28
28
  from XmlConv::CONFIG.mail_from
29
29
  to recipients
@@ -26,7 +26,11 @@ module XmlConv
26
26
  reader_instance = Conversion.const_get(@reader)
27
27
  writer_instance = Conversion.const_get(@writer)
28
28
  @start_time = Time.now
29
- @input = encode(@input)
29
+ if !@input.valid_encoding?
30
+ @input = @input.encode("UTF-8", :invalid=>:replace, :replace=>"?")
31
+ else
32
+ @input = @input.encode("UTF-8")
33
+ end
30
34
  @input.gsub!(/\t+|\s+/, ' ')
31
35
  input_model = reader_instance.parse(@input)
32
36
  @arguments ||= []
@@ -1,3 +1,3 @@
1
1
  module XmlConv
2
- VERSION = '1.1.3'
2
+ VERSION = '1.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmlconv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-12 00:00:00.000000000 Z
11
+ date: 2017-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: odba