oddb2xml 2.8.2 → 2.8.3

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
  SHA256:
3
- metadata.gz: d4ff8b8b33c1b2c3ea41660576b5f9d116e99640a56098d429e2525138d9c8a1
4
- data.tar.gz: 7ed3e2d40e97d0631119bd1c1e87f4d1de599939b21a95313487d7664cbc4a05
3
+ metadata.gz: 1b08f317299357e7ac742cf17126a08d8c8fb588e438a77800470b65ed085e7a
4
+ data.tar.gz: ff0beeb14aaba0ccf5ad431438570e352ecaa195ea19a61712c6f1d1c23f4116
5
5
  SHA512:
6
- metadata.gz: 0c3ca2d08823ffb6909f86c2b08c72334ff671126a8dcead06ac5872cc2fd17d9f175d0f1b65a28647e13847027215a02365a2d3beecfa7aa1ae8b24a896fd00
7
- data.tar.gz: 3880524ed3c9602c1f693b4b4d8d52f548c2c4e34561675b5954936de9fd746019fb5287cd46484c9797cf7f874a6ba053d03e4f43d43812c024b97a9f871443
6
+ metadata.gz: 9a0a1b952a83d5b9d62244f487460325577c415d15d755beda84f63258a60e4de04c2d665395b7efb522c45f5cd07328b28bf36745cc6649faa4a9010f2ccd8e
7
+ data.tar.gz: 785408cf96d8ff18f9de68fa5579c433cb317fb247ff5304400d747d2a7973070461f339c1e8ad16ef6574930dbbea11d759b7a5f7ee3de824389abaf6debe67
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oddb2xml (2.8.2)
4
+ oddb2xml (2.8.3)
5
5
  htmlentities
6
6
  httpi
7
7
  mechanize
data/lib/oddb2xml/cli.rb CHANGED
@@ -40,7 +40,7 @@ module Oddb2xml
40
40
  start_time = Time.now
41
41
  files2rm = Dir.glob(File.join(DOWNLOADS, "*"))
42
42
  FileUtils.rm_f(files2rm, verbose: true) if (files2rm.size > 0) && !Oddb2xml.skip_download?
43
- if @options[:calc] && !(@options[:extended])
43
+ if @options[:calc] && !(@options[:extended] || @options[:firstbase])
44
44
  threads << download(:package) # swissmedic
45
45
  elsif @options[:address]
46
46
  [:company, :person].each do |type|
@@ -106,9 +106,9 @@ module Oddb2xml
106
106
  private
107
107
 
108
108
  def build
109
- @the_files = {"calc" => "oddb_calc.xml"} if @options[:calc] && !(@options[:extended] || @options[:artikelstamm])
109
+ @the_files = {"calc" => "oddb_calc.xml"} if @options[:calc] && !(@options[:extended] || @options[:artikelstamm] || @options[:firstbase])
110
110
  builder = Builder.new(@options) do |builder|
111
- if @options[:calc] && !(@options[:extended] || @options[:artikelstamm])
111
+ if @options[:calc] && !(@options[:extended] || @options[:artikelstamm] || @options[:firstbase])
112
112
  builder.packs = @packs
113
113
  elsif @options[:address]
114
114
  builder.companies = @companies
@@ -343,7 +343,9 @@ module Oddb2xml
343
343
  def files
344
344
  unless @the_files
345
345
  @the_files = {}
346
- @the_files[:calc] = "oddb_calc.xml" if @options[:calc]
346
+ if @options[:calc]
347
+ @the_files[:calc] = "oddb_calc.xml"
348
+ end
347
349
  if @options[:artikelstamm]
348
350
  @the_files[:artikelstamm] = "artikelstamm_#{Date.today.strftime("%d%m%Y")}_v5.xml"
349
351
  elsif @options[:address]
@@ -55,6 +55,11 @@ module Oddb2xml
55
55
  @opts.delete(:increment)
56
56
  @opts[:nonpharma] = @opts[:append]
57
57
  @opts.delete(:append)
58
+ if @opts[:firstbase]
59
+ @opts[:nonpharma] = true
60
+ # https://github.com/zdavatz/oddb2xml/issues/76
61
+ @opts[:calc] = true
62
+ end
58
63
  if @opts[:extended]
59
64
  @opts[:nonpharma] = true
60
65
  @opts[:price] = :zurrose
@@ -64,10 +69,6 @@ module Oddb2xml
64
69
  @opts[:extended] = true
65
70
  @opts[:price] = :zurrose
66
71
  end
67
- if @opts[:firstbase]
68
- @opts[:nonpharma] = true
69
- @opts[:calc] = true
70
- end
71
72
  @opts[:price] = :zurrose if @opts[:price].is_a?(TrueClass)
72
73
  @opts[:price] = @opts[:price].to_sym if @opts[:price]
73
74
  @opts[:ean14] = @opts[:include]
@@ -1,3 +1,3 @@
1
1
  module Oddb2xml
2
- VERSION = "2.8.2"
2
+ VERSION = "2.8.3"
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.8.2
4
+ version: 2.8.3
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: 2023-11-05 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip