oddb2xml 2.1.5 → 2.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -2
- data/History.txt +4 -0
- data/lib/oddb2xml/builder.rb +8 -4
- data/lib/oddb2xml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 548c524682d20936d0b0dbc19734159021f14b1f
|
4
|
+
data.tar.gz: 296253b38b02e80c06874f12eae3c8cdc48a3fdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0199e288fd594f3f084c78b08289ffe7495ac7ec4ce239f79a797faa90f606b5ebc26e6990892cfa147200f87b0a40bc532ce47fb4826c06581f3a193de14024
|
7
|
+
data.tar.gz: 68104c147630445ab5c2a1a493bacab6c1a53c8bfae15f8f3a3903a865026164bfce8f1704812959450869bb522eeb82cc89a89cb3c1c6408ced64babf50e134
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
oddb2xml (2.1.
|
4
|
+
oddb2xml (2.1.6)
|
5
5
|
archive-tar-minitar (~> 0.5.2)
|
6
6
|
mechanize (~> 2.5.1)
|
7
7
|
nokogiri (~> 1.5.10)
|
@@ -65,7 +65,7 @@ GEM
|
|
65
65
|
pry-debugger (0.2.3)
|
66
66
|
debugger (~> 1.3)
|
67
67
|
pry (>= 0.9.10, < 0.11.0)
|
68
|
-
rack (1.6.
|
68
|
+
rack (1.6.1)
|
69
69
|
rake (10.4.2)
|
70
70
|
rdoc (4.2.0)
|
71
71
|
json (~> 1.4)
|
@@ -125,3 +125,6 @@ DEPENDENCIES
|
|
125
125
|
rdoc
|
126
126
|
rspec
|
127
127
|
webmock
|
128
|
+
|
129
|
+
BUNDLED WITH
|
130
|
+
1.10.3
|
data/History.txt
CHANGED
data/lib/oddb2xml/builder.rb
CHANGED
@@ -680,7 +680,7 @@ module Oddb2xml
|
|
680
680
|
$stdout.flush
|
681
681
|
end
|
682
682
|
no8 = sprintf('%05d',row.cells[0].value.to_i) + sprintf('%03d',row.cells[10].value.to_i)
|
683
|
-
name = row.cells[2].value
|
683
|
+
name = row.cells[2] ? row.cells[2].value : nil
|
684
684
|
atc_code = row.cells[5] ? row.cells[5].value : nil
|
685
685
|
list_code = row.cells[6] ? row.cells[6].value : nil
|
686
686
|
package_size = row.cells[11] ? row.cells[11].value : nil
|
@@ -691,8 +691,12 @@ module Oddb2xml
|
|
691
691
|
# skip veterinary product
|
692
692
|
next if atc_code and /^Q/i.match(atc_code)
|
693
693
|
next if list_code and /Tierarzneimittel/.match(list_code)
|
694
|
-
|
695
|
-
|
694
|
+
begin
|
695
|
+
info = Calc.new(name, package_size, unit, active_substance, composition)
|
696
|
+
rescue
|
697
|
+
puts "#{Time.now}: #{row_nr} iksnr #{iksnr} rescue from Calc.new"
|
698
|
+
info = nil
|
699
|
+
end
|
696
700
|
ean12 = '7680' + no8
|
697
701
|
ean13 = (ean12 + Oddb2xml.calc_checksum(ean12))
|
698
702
|
items[ean13] = info
|
@@ -724,7 +728,7 @@ module Oddb2xml
|
|
724
728
|
}
|
725
729
|
}
|
726
730
|
}
|
727
|
-
} if info.compositions
|
731
|
+
} if info and info.compositions
|
728
732
|
end
|
729
733
|
}
|
730
734
|
end
|
data/lib/oddb2xml/version.rb
CHANGED
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.1.
|
4
|
+
version: 2.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yasuhiro Asaka, Zeno R.R. Davatz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|