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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c23ad09144021304d4c843e68e223d7071fa6f45
4
- data.tar.gz: 28469d65080b256c22ddece82312e8a580144dfa
3
+ metadata.gz: 548c524682d20936d0b0dbc19734159021f14b1f
4
+ data.tar.gz: 296253b38b02e80c06874f12eae3c8cdc48a3fdc
5
5
  SHA512:
6
- metadata.gz: 1741fd3f64f4b735062b4e456e4643b673cb5bf9a31ce4fad59737b95ac3102d35c13d804796947fbc2602f8940d2aa3fe5b46dcb6d886cfb349dc3279f5dc4f
7
- data.tar.gz: 6e75c9e2f02ef5811e2f6227bf5c82da6111b5d030aaa2bdbaeda1fd36220b4882d128075070670a7493cc444a60e8f2b39d72c285f11de51f7b69c7352898a5
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.5)
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.0)
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
@@ -1,3 +1,7 @@
1
+ === 2.1.6 / 10.06.2015
2
+
3
+ * Avoid error when Packungen.xlsx does not contain a name for a product (upstream error, missing Combizym, Dragées)
4
+
1
5
  === 2.1.5 / 03.06.2015
2
6
 
3
7
  * Give substances for lines starting with Solvens
@@ -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
- info = Calc.new(name, package_size, unit, active_substance, composition)
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
@@ -1,3 +1,3 @@
1
1
  module Oddb2xml
2
- VERSION = "2.1.5"
2
+ VERSION = "2.1.6"
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.1.5
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-03 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip