oddb2xml 2.8.0 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/oddb2xml/builder.rb +25 -15
- 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: 7cc43d372c64564821c3594e837a93058f4b9aeb51bef7dd76036e694fed737a
|
4
|
+
data.tar.gz: 44e66c7136db33e6cbb656f070522cffe920f736a1a15ddfa2fa8363a79b3ca4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94d01ca34a3d6d535f14f873d377c5a46ae99a28c63330fe5fe14f886f416218d75df5ab3201fd05da9c607110de05666d6297fdfb9941a3b2f61a1a87517560
|
7
|
+
data.tar.gz: 6313c7015702732aa1be35b404b2b87a4230adc0b20bc8600bfa55d4c7e93ce8f16bab9cc13b6748927ce4ba13d0d97862ceabed64d81ae9baed397c436fd0ac
|
data/Gemfile.lock
CHANGED
data/lib/oddb2xml/builder.rb
CHANGED
@@ -172,15 +172,19 @@ module Oddb2xml
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
@firstbase.each do |ean13, obj|
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
175
|
+
description = obj[:trade_item_description_de]
|
176
|
+
if description.empty?
|
177
|
+
description = obj[:trade_item_description_en]
|
178
|
+
end
|
179
|
+
if (!description.empty? || !obj[:trade_item_description_fr].empty?) && @refdata[obj[:gtin]].nil?
|
180
|
+
entry = {
|
181
|
+
ean13: obj[:gtin],
|
182
|
+
desc_de: description,
|
183
|
+
desc_fr: obj[:trade_item_description_fr],
|
184
|
+
atc_code: "",
|
185
|
+
company_ean: obj[:gln],
|
186
|
+
firstbase: true
|
187
|
+
}
|
184
188
|
@articles << entry
|
185
189
|
end
|
186
190
|
end
|
@@ -595,12 +599,18 @@ module Oddb2xml
|
|
595
599
|
}
|
596
600
|
end
|
597
601
|
@firstbase.each do |ean13, obj|
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
602
|
+
description = obj[:trade_item_description_de]
|
603
|
+
if description.empty?
|
604
|
+
description = obj[:trade_item_description_en]
|
605
|
+
end
|
606
|
+
if !description.empty? || !obj[:trade_item_description_fr].empty?
|
607
|
+
xml.PRD("DT" => "") {
|
608
|
+
xml.GTIN obj[:gtin]
|
609
|
+
xml.CPT
|
610
|
+
xml.DSCRD description
|
611
|
+
xml.DSCRF obj[:trade_item_description_fr]
|
612
|
+
}
|
613
|
+
end
|
604
614
|
end
|
605
615
|
@products.sort.to_h.each do |ean13, obj|
|
606
616
|
next if /^Q/i.match?(obj[:atc])
|
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.1
|
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-10-
|
11
|
+
date: 2023-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|