oddb2xml 2.4.1 → 2.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e9bbe51b5e926b39ac2d60f3131cf854703eac9
4
- data.tar.gz: 27cd61843652cc26ce542615055bd39cd41a0cb3
3
+ metadata.gz: 8e843316fece7832e0a39b9ee486b2e1443a53c5
4
+ data.tar.gz: afe50f51c3876a86737dda382c68f9f5b736ac6f
5
5
  SHA512:
6
- metadata.gz: 2b0b479e5d411f4606bb6ce812d08fa772c35b768c1917cccc1eb2efb00eddb5ab1e8cb00757793bf7a1eb1ca9327810185b2a5d13cdfb422783e6ad8693889e
7
- data.tar.gz: 4e98bd8c9dac033feca963ce14a9259d4cddde04952a69ff600262ebde59f6583862f44b8c2bf152af0508c814adbbf77b2a1eee218b7bbfc23ac46eb5f8cc5e
6
+ metadata.gz: f3374d25d048992d8a0dac05eda9a8041c8801049a134110c26dae2acae50aae302d17da71904d95679fd050a3881edf5d8ef65919970db8e8d3ac614460ca0a
7
+ data.tar.gz: cc42b09f80d81c4d2e39348075c6044b96f17822f277dfbd9d8e5bcdebb6c0a95dfc7bca785941b03139d17359a25be8151303d23a5cf765c8b131f199d86e24
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ === 2.4.2 / 6.09.2017
2
+
3
+ * Ignore lines that cannot be converted from UTF-8 to ISO-8859-1
4
+ We found in refdata_NonPharma.xml some U+2013 (-) characters in SENSURA products
5
+
6
+ === 2.4.1 / 2.12.2016
7
+
8
+ * Update oddb2xml.gemspec to add GPL-3.0 as correct license for Rubygems as stated in LICENSE file
9
+ * Added a hack for 24 globulina equina which commas between brackets
10
+
1
11
  === 2.4.0 /25.08.2016
2
12
 
3
13
  * Remove transfer.zip in current directory. Added spec tests for downloaded files
data/lib/oddb2xml/cli.rb CHANGED
@@ -135,7 +135,17 @@ module Oddb2xml
135
135
  else
136
136
  output = builder.to_xml
137
137
  end
138
- File.open(File.join(WorkDir, file), 'w:utf-8'){ |fh| fh << output }
138
+ File.open(File.join(WorkDir, file), 'w:utf-8') do |fh|
139
+ output.split("\n").each do |line|
140
+ begin
141
+ # We want to ignore lines which are not really UTF-8 encoded
142
+ iso_8859_1 = line.encode('ISO-8859-1')
143
+ fh.puts(line)
144
+ rescue => error
145
+ puts "#{error}: #{file} Ignoring #{line}"
146
+ end
147
+ end
148
+ end
139
149
  if @options[:calc]
140
150
  FileUtils.cp(File.join(WorkDir, file), File.join(WorkDir, file.sub('.xml', '_'+Time.now.strftime("%d.%m.%Y_%H.%M")+'.xml')), :verbose => false)
141
151
  end
@@ -1,3 +1,3 @@
1
1
  module Oddb2xml
2
- VERSION = "2.4.1"
2
+ VERSION = "2.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oddb2xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhiro Asaka, Zeno R.R. Davatz, Niklaus Giger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-02 00:00:00.000000000 Z
11
+ date: 2017-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -386,7 +386,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
386
386
  version: '0'
387
387
  requirements: []
388
388
  rubyforge_project:
389
- rubygems_version: 2.4.5
389
+ rubygems_version: 2.6.8
390
390
  signing_key:
391
391
  specification_version: 4
392
392
  summary: oddb2xml creates xml files.
@@ -440,4 +440,3 @@ test_files:
440
440
  - spec/options_spec.rb
441
441
  - spec/parslet_spec.rb
442
442
  - spec/spec_helper.rb
443
- has_rdoc: