oddb2xml 2.8.2 → 2.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/oddb2xml/cli.rb +6 -4
- data/lib/oddb2xml/options.rb +5 -4
- data/lib/oddb2xml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b08f317299357e7ac742cf17126a08d8c8fb588e438a77800470b65ed085e7a
|
4
|
+
data.tar.gz: ff0beeb14aaba0ccf5ad431438570e352ecaa195ea19a61712c6f1d1c23f4116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a0a1b952a83d5b9d62244f487460325577c415d15d755beda84f63258a60e4de04c2d665395b7efb522c45f5cd07328b28bf36745cc6649faa4a9010f2ccd8e
|
7
|
+
data.tar.gz: 785408cf96d8ff18f9de68fa5579c433cb317fb247ff5304400d747d2a7973070461f339c1e8ad16ef6574930dbbea11d759b7a5f7ee3de824389abaf6debe67
|
data/Gemfile.lock
CHANGED
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
|
-
|
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]
|
data/lib/oddb2xml/options.rb
CHANGED
@@ -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]
|
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.8.
|
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-
|
11
|
+
date: 2023-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|