oddb2xml 2.1.2 → 2.1.3

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: fcd2bcecb959ae01393d121cc9df70f8f6edacea
4
- data.tar.gz: c7c703884fd6a15a85482e121f9bb754f7798b2e
3
+ metadata.gz: 12904cf51c69c49aecda97c93bdb269532b7d7ea
4
+ data.tar.gz: dccb51dcc69f94ba4ccff505abd35c2a47fc37d3
5
5
  SHA512:
6
- metadata.gz: 29158f982e6bb02096eaad7c05fb1928338df4d7aef0db02336baca454486d661c062caf4e15338cf0ee8ddb559d9886255999dd0b87a44da068d551bb372720
7
- data.tar.gz: b55dcb60e96a34f0c8bd8911fb27b20d035d2299c4fe2d2f4ad1eed042fcadeabeb646934c49af8db8516d184c95392dedb4d2c577db56060430699e39465774
6
+ metadata.gz: 4b955af367c78f85b7ec1599f603d5120c0ecfa601ef1adb0183fab34096934f8225b3751c439056dbf33b6ea4c77ffd31a4f04ab019fc25b4f0b8ce21d27694
7
+ data.tar.gz: aa8139d20ac1c3fccb7d7c3b0374afcea22f2a6f9229006d26e4ce95af48a1d2ae5289916774dcf1a0495246c3405352742f47453f332044529509b2bc2a9212
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oddb2xml (2.1.1)
4
+ oddb2xml (2.1.3)
5
5
  archive-tar-minitar (~> 0.5.2)
6
6
  mechanize (~> 2.5.1)
7
7
  nokogiri (~> 1.5.10)
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.1.3 / 02.06.2015
2
+
3
+ * Fix Caverjet by eliminatins semantically wrong leading "Solvens:"
4
+
1
5
  === 2.1.2 / 13.05.2015
2
6
 
3
7
  * Fix parslet_spec.rb
@@ -366,6 +366,7 @@ class ParseComposition
366
366
  / U\.: (excipiens) / => ' U. \1 ',
367
367
  / U\.: (alnus|betula|betula|betulae) / => ' U., \1 ',
368
368
  /^(acari allergeni extractum (\(acarus siro\)|).+\s+U\.\:)/ => 'A): \1',
369
+ 'Solvens: alprostadilum' => 'alprostadilum',
369
370
  }
370
371
  @@errorHandler = ParseUtil::HandleSwissmedicErrors.new( ErrorsToFix )
371
372
 
@@ -396,15 +397,15 @@ class ParseComposition
396
397
  puts "ParseComposition.new cleaned #{cleaned}" if VERBOSE_MESSAGES and not cleaned.eql?(stripped)
397
398
  CompositionTransformer.clear_substances
398
399
  result = ParseComposition.new(cleaned)
399
- parser3 = CompositionParser.new
400
- transf3 = CompositionTransformer.new
400
+ parser = CompositionParser.new
401
+ transf = CompositionTransformer.new
401
402
  begin
402
403
  if defined?(RSpec)
403
- ast = transf3.apply(parser3.parse_with_debug(cleaned))
404
+ ast = transf.apply(parser.parse_with_debug(cleaned))
404
405
  puts "#{File.basename(__FILE__)}:#{__LINE__}: ==> " if VERBOSE_MESSAGES
405
406
  pp ast if VERBOSE_MESSAGES
406
407
  else
407
- ast = transf3.apply(parser3.parse(cleaned))
408
+ ast = transf.apply(parser.parse(cleaned))
408
409
  end
409
410
  rescue Parslet::ParseFailed => error
410
411
  @@errorHandler.nrParsingErrors += 1
@@ -1,3 +1,3 @@
1
1
  module Oddb2xml
2
- VERSION = "2.1.2"
2
+ VERSION = "2.1.3"
3
3
  end
data/spec/calc_spec.rb CHANGED
@@ -141,6 +141,7 @@ Corresp. 5300 kJ.",
141
141
  }
142
142
  )
143
143
 
144
+ if RunAllTests
144
145
  context 'handle E substances correctly' do
145
146
  e_200_examples =
146
147
  {
@@ -163,7 +164,6 @@ Corresp. 5300 kJ.",
163
164
  }
164
165
  end
165
166
 
166
- if RunAllTests
167
167
  context 'should return correct value for liquid' do
168
168
  pkg_size_L = '1 x 5 x 200'
169
169
  einheit_M = 'ml'
@@ -369,6 +369,10 @@ if RunAllTests
369
369
 
370
370
  XPath.match( doc, "//ARTICLE[GTIN='7680589430011']/NAME").first.text.should eq 'Apligraf'
371
371
  XPath.match( doc, "//ARTICLE[GTIN='7680589430011']/GALENIC_FORM").last.text.should eq 'Unbekannt' # TODO?? 'Scheibe(n)/disque(s)'
372
+
373
+ XPath.match( doc, "//ARTICLE[GTIN='7680556740075']/NAME").first.text.should eq "Caverject DC 20, Injektionspräparat"
374
+ XPath.match( doc, "//ARTICLE[GTIN='7680556740075']/COMPOSITIONS/COMPOSITION/SUBSTANCES/SUBSTANCE").size.should eq 5
375
+ XPath.match( doc, "//ARTICLE[GTIN='7680556740075']/COMPOSITIONS/COMPOSITION/EXCIPIENS/SUBSTANCE_NAME").first.text.should eq "aqua ad iniectabilia q.s. ad solutionem"
372
376
  end
373
377
  end
374
378
 
@@ -691,4 +695,4 @@ Die HILFSSTOFFE sind Aqua ad iniectabilia und Natrii chloridum.
691
695
  end
692
696
  end
693
697
  end
694
- end
698
+ 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.2
4
+ version: 2.1.3
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-05-13 00:00:00.000000000 Z
11
+ date: 2015-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip