elibri_onix_generator 0.4.9 → 0.4.11

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
- SHA1:
3
- metadata.gz: ade85705e5f1ed20d48425132ac4d0bc7ec7fa3c
4
- data.tar.gz: bb417fe6dc1b5f09e5a0adc2ee176c978c9ee6b2
2
+ SHA256:
3
+ metadata.gz: 70c6c7e89746b99aeab718ef88928bd4408d53139d3c5998620cd472a0ae7ee0
4
+ data.tar.gz: 614d21bb48972e5b87adfbdaa6090cb8a7bb25b07ab47b1de8cb62af4dfe4696
5
5
  SHA512:
6
- metadata.gz: f45c80e37b0715c8d321199ea275afec591f1886fd93cd98c753731a16514d2ba3042a692ae6a96ba7ab8d31279d0e096f691c0be64bd263343c89c30c5bea52
7
- data.tar.gz: 47b4e97a62cef4160060fa4f2eb381b57f58be975ad0f3d2c207dc37a0affa0d54e4dc6c175329209a7be454ddfd31e32d8ff75d1cb3747ab8749f9a0011b849
6
+ metadata.gz: fdb088e0812fe65cb187962b98ca2882db6f2e5ef5651a733a3fa7e019e5dfd503ebcf51201da23f2cb72cf6ec4f9afa01f638686a9429c66fc2e87e8e4f6622
7
+ data.tar.gz: 8087f516dca618db91a939068eb136b31d5e8f3113c724e0aa1e700fc273652f15b3d1f26aab9635ef97ee9010866c9933bfc2c9ec5594ce2681a8feda725558
@@ -1,5 +1,6 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+
3
4
  require "elibri_onix_generator/version"
4
5
  require "elibri_onix_generator/model/product"
5
6
  require "elibri_onix_generator/model/contributor"
@@ -1,3 +1,3 @@
1
1
  module ElibriOnixGenerator
2
- VERSION = "0.4.9"
2
+ VERSION = "0.4.11"
3
3
  end
@@ -1,8 +1,5 @@
1
- # encoding: UTF-8
2
1
  require "elibri_onix_generator/version"
3
- require 'builder'
4
2
  require 'ostruct'
5
- require 'elibri_onix_dict'
6
3
 
7
4
  module Elibri
8
5
  module ONIX
@@ -344,7 +341,7 @@ module Elibri
344
341
 
345
342
  if product.product_form_onix_code
346
343
  comment_dictionary "Format produktu", :ProductFormCode, :indent => 10, :kind => [:onix_product_form]
347
- tag(:ProductForm, product.product_form_onix_code)
344
+ tag(:ProductForm, { "PODH" => "BB", "PODS" => "BC" }[product.product_form_onix_code] || product.product_form_onix_code)
348
345
  end
349
346
  end
350
347
 
@@ -1079,7 +1076,7 @@ module Elibri
1079
1076
  tag(:TaxRatePercent, price_info.vat)
1080
1077
  end
1081
1078
  tag(:CurrencyCode, price_info.currency_code)
1082
- if product.price_printed_on_product_onix_code
1079
+ if field_exists?(product, :price_printed_on_product_onix_code)
1083
1080
  comment_dictionary "Cena na okładce?", :PricePrintedOnProduct, :indent => 12
1084
1081
  tag(:PrintedOnProduct, product.price_printed_on_product_onix_code) #lista 174
1085
1082
  comment 'Zawsze 00 - Unknown / unspecified'
@@ -1129,7 +1126,7 @@ module Elibri
1129
1126
  tag("elibri:HyphenatedISBN", product.isbn.human_value)
1130
1127
  end
1131
1128
 
1132
- if product.respond_to?(:digital?) && product.digital?
1129
+ if product.respond_to?(:digital_or_pod?) && product.digital_or_pod?
1133
1130
  if product.excerpts.size > 0
1134
1131
  tag("elibri:excerpts") do
1135
1132
  product.excerpts.each do |excerpt|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elibri_onix_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Urbański
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-12-20 00:00:00.000000000 Z
12
+ date: 2019-04-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project: elibri_onix_generator
78
- rubygems_version: 2.4.5.2
78
+ rubygems_version: 2.7.9
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: XML Generator used by Elibri gems