elibri_onix 0.5.7 → 0.5.14

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
  SHA256:
3
- metadata.gz: ff669eaa352e69ad1d7bc7e8261db9a2f478793a2f9fc0a2c9bd07efc665ccd2
4
- data.tar.gz: f7a6a113cf206e37fbf8e135d3fc8367c6959a1c93f60c1c2a4d0db99f25c814
3
+ metadata.gz: dfc49b1d70bb6f2b9845bdf86cbb50ab1c3a17b4cbb833d720ed2d8e5f7c641c
4
+ data.tar.gz: 8f36e62235c9ceb753dea48729cf95d33171a1bef06f4895f09d279ff6e217ed
5
5
  SHA512:
6
- metadata.gz: f9d76b9732944ec1e3835e12cc4f8ffff8c9e988d9105b45d6fd3d1982bc0935b22db900e595a492330149c144a41570ca5baeebd1220bb4710e0d4554041a21
7
- data.tar.gz: efa8683c0d127665652caa2abc96d4091c2653267125796d2c3d066e4b2d9d1f85adfc43e2d4ad55621e78ead2925ae9d8c1dc36f73b9d7db0576b79893751d8
6
+ metadata.gz: 6c3195abd309afe4d00b8d399a62a52e36f6a3c711900f2e3615483944d437153cf583602be6c726af4b03acc2451c1422c8df6748b75ac772e554aa4ed0ec10
7
+ data.tar.gz: 250a4a7957ae090d5984816dc91e862a807442f1ee3b48df96d6962e4bb89e23822a7460706120fa7bb688df205b90ce1fe3a50649dbe4698f8591fa6d39c955
@@ -7,7 +7,7 @@ module Elibri
7
7
  include ExternalId
8
8
  include ExternalTimestamp
9
9
  include Inspector
10
-
10
+
11
11
  #from ONIX documentation:
12
12
  #Authorship and other forms of contribution are described by repeats of the <Contributor> composite,
13
13
  #within which the recommended form of representation of a person name is the structured data element
@@ -16,20 +16,20 @@ module Elibri
16
16
  #for example if a contributor is referenced both by their real name and by a pseudonym,
17
17
  #or by the name given on the title page and by an authority-controlled name.
18
18
  #In addition, more than one representation of the same name may be sent.
19
-
19
+
20
20
  #:nodoc:
21
21
  ATTRIBUTES =
22
22
  [
23
23
  :number, :role, :person_name, :from_language, :titles_before_names, :names_before_key, :prefix_to_key,
24
24
  :key_names, :names_after_key, :biographical_note, :unnamed_persons, :role_name
25
25
  ]
26
-
26
+
27
27
  #:nodoc:
28
28
  RELATIONS =
29
29
  [
30
30
  :inspect_include_fields
31
31
  ]
32
-
32
+
33
33
  #:nodoc:
34
34
  attr_reader :number
35
35
 
@@ -41,6 +41,9 @@ module Elibri
41
41
  #pełne imię i nazwisko - to pole jest zawsze uzupełnione
42
42
  attr_reader :person_name
43
43
 
44
+ #jednak czasami, nie ma :person_name, jest za to :person_name_inverted - e-isbn
45
+ attr_reader :person_name_inverted
46
+
44
47
  #w przypadku tłumacza kod języka oryginału, lista języków dostępna pod adresem
45
48
  #https://github.com/elibri/elibri_onix_dict/blob/master/lib/elibri_onix_dict/onix_3_0/serialized/LanguageCode.yml
46
49
  attr_reader :from_language
@@ -56,7 +59,7 @@ module Elibri
56
59
 
57
60
  #nazwisko lub nazwiska
58
61
  attr_reader :key_names
59
-
62
+
60
63
  #dodatkowe oznaczenia, np. OHP (zakon)
61
64
  attr_reader :names_after_key
62
65
 
@@ -65,16 +68,20 @@ module Elibri
65
68
 
66
69
  #:nodoc:
67
70
  attr_reader :unnamed_persons
68
-
71
+
72
+ attr_reader :corporate_name
73
+ attr_reader :corporate_name_inverted
74
+
69
75
  #reprezentacja danych w xml-u
70
76
  attr_reader :to_xml
71
-
77
+
72
78
 
73
79
  def initialize(data)
74
80
  @to_xml = data.to_s
75
81
  @number = data.at_css('SequenceNumber').try(:text).try(:to_i)
76
82
  @role = data.at_css('ContributorRole').try(:text)
77
83
  @person_name = data.at_css('PersonName').try(:text)
84
+ @person_name_inverted = data.at_css('PersonNameInverted').try(:text)
78
85
  @from_language = data.at_css('FromLanguage').try(:text)
79
86
  @titles_before_names = data.at_css('TitlesBeforeNames').try(:text)
80
87
  @names_before_key = data.at_css('NamesBeforeKey').try(:text)
@@ -83,18 +90,20 @@ module Elibri
83
90
  @names_after_key = data.at_css('NamesAfterKey').try(:text)
84
91
  @biographical_note = data.at_css('BiographicalNote').try(:text)
85
92
  @unnamed_persons = data.at_css('UnnamedPersons').try(:text)
93
+ @corporate_name = data.at_css('CorporateName').try(:text)
94
+ @corporate_name_inverted = data.at_css('CorporateNameInverted').try(:text)
86
95
  set_eid(data)
87
96
  set_datestamp(data)
88
97
  end
89
98
 
90
99
  def role_name
91
- Elibri::ONIX::Dict::Release_3_0::ContributorRole.find_by_onix_code(@role).const_name.downcase
100
+ Elibri::ONIX::Dict::Release_3_0::ContributorRole.find_by_onix_code(@role).const_name.downcase rescue nil
92
101
  end
93
102
 
94
103
  def inspect_include_fields
95
104
  [:role_name, :person_name]
96
105
  end
97
-
106
+
98
107
  end
99
108
 
100
109
  end
@@ -5,23 +5,23 @@ module Elibri
5
5
  module Release_3_0
6
6
 
7
7
  class Language
8
-
8
+
9
9
  #from ONIX documentation:
10
10
  #An optional and repeatable group of data elements which together represent a language, and specify its role and,
11
11
  #where required, whether it is a country variant.
12
-
12
+
13
13
  include Inspector
14
14
 
15
15
  #:nodoc:
16
16
  ATTRIBUTES = [
17
17
  :role, :code, :role_name, :language
18
18
  ]
19
-
19
+
20
20
  #:nodoc:
21
21
  RELATIONS = [
22
22
  :inspect_include_fields
23
23
  ]
24
-
24
+
25
25
  #:doc:
26
26
  #kod onix roli, np. '01'
27
27
  #pełna lista ról: https://github.com/elibri/elibri_onix_dict/blob/master/lib/elibri_onix_dict/onix_3_0/serialized/LanguageRole.yml
@@ -33,7 +33,7 @@ module Elibri
33
33
 
34
34
  #reprezentacja w xml
35
35
  attr_reader :to_xml
36
-
36
+
37
37
  def initialize(data)
38
38
  @to_xml = data.to_s
39
39
  @role = data.at_css('LanguageRole').try(:text)
@@ -44,10 +44,12 @@ module Elibri
44
44
  def role_name
45
45
  Elibri::ONIX::Dict::Release_3_0::LanguageRole.find_by_onix_code(@role).const_name.downcase
46
46
  end
47
-
47
+
48
48
  #język, np. 'polski'
49
49
  def language
50
- Elibri::ONIX::Dict::Release_3_0::LanguageCode.find_by_onix_code(@code).name(:pl).downcase
50
+ Elibri::ONIX::Dict::Release_3_0::LanguageCode.find_by_onix_code(@code).name(:pl).downcase rescue nil
51
+ rescue
52
+
51
53
  end
52
54
 
53
55
  def inspect_include_fields
@@ -27,7 +27,7 @@ module Elibri
27
27
  end
28
28
 
29
29
  def type_name
30
- Elibri::ONIX::Dict::Release_3_0::MeasureType.find_by_onix_code(@type).const_name.downcase
30
+ Elibri::ONIX::Dict::Release_3_0::MeasureType.find_by_onix_code(@type).try(:const_name).try(:downcase)
31
31
  end
32
32
 
33
33
  def inspect_include_fields
@@ -11,15 +11,17 @@ module Elibri
11
11
  #:nodoc:
12
12
  ATTRIBUTES =
13
13
  [
14
- :height, :width, :thickness, :weight, :ean, :isbn13, :number_of_pages, :duration,
15
- :file_size, :publisher_name, :publisher_id, :imprint_name, :current_state, :reading_age_from, :reading_age_to,
14
+ :height, :width, :thickness, :weight, :ean, :isbn13, :number_of_pages, :duration,
15
+ :file_size, :publisher_name, :publisher_id, :imprint_name, :current_state, :reading_age_from, :reading_age_to,
16
16
  :table_of_contents, :description, :reviews, :excerpts, :series, :title, :subtitle, :collection_title,
17
17
  :collection_part, :full_title, :original_title, :trade_title, :parsed_publishing_date, :record_reference,
18
- :deletion_text, :cover_type, :cover_price, :vat, :pkwiu, :additional_info, :product_composition,
18
+ :deletion_text, :cover_type, :cover_price, :vat, :pkwiu, :additional_info, :product_composition,
19
19
  :publisher, :product_form, :no_contributor, :edition_statement, :edition_type_onix_code, :number_of_illustrations, :publishing_status,
20
20
  :publishing_date, :premiere, :front_cover, :series_names, :city_of_publication,
21
21
  :preview_exists, :short_description, :sale_restricted_to_poland,
22
- :technical_protection_onix_code, :unlimited_licence, :hyphenated_isbn, :preorder_embargo_date, :additional_trade_information
22
+ :technical_protection_onix_code, :unlimited_licence, :hyphenated_isbn, :preorder_embargo_date, :additional_trade_information,
23
+ :number_of_pieces, :players_number_from, :players_number_to, :playing_time_from, :playing_time_to
24
+
23
25
  ]
24
26
 
25
27
  #:nodoc:
@@ -27,7 +29,7 @@ module Elibri
27
29
  [
28
30
  :contributors, #IMPORTANT
29
31
  :related_products, :languages, :measures, :supply_details, :measures, :title_details,
30
- :collections, :extents, :thema_subjects, :audience_ranges,
32
+ :collections, :extents, :thema_subjects, :publisher_subjects, :audience_ranges,
31
33
  :text_contents, #IMPORTANT
32
34
  :supporting_resources, #for example: cover
33
35
  :sales_restrictions, :authors,
@@ -149,7 +151,7 @@ module Elibri
149
151
  #AdditionalInfo
150
152
  attr_reader :additional_info
151
153
 
152
- #kod ONIX typu produktu, np. 'BA' - lista dostępna pod adresem
154
+ #kod ONIX typu produktu, np. 'BA' - lista dostępna pod adresem
153
155
  #https://github.com/elibri/elibri_onix_dict/blob/master/lib/elibri_onix_dict/onix_3_0/serialized/ProductFormCode.yml
154
156
  attr_reader :product_form
155
157
 
@@ -190,6 +192,21 @@ module Elibri
190
192
  #dodatkowa informacja handlowa
191
193
  attr_reader :additional_trade_information
192
194
 
195
+ #ilość elementów (puzzle, gry planszowe)
196
+ attr_reader :number_of_pieces
197
+
198
+ #min. ilość graczy - gry planszowe
199
+ attr_reader :players_number_from
200
+
201
+ #max. ilość graczy - gry planszowe
202
+ attr_reader :players_number_to
203
+
204
+ #min. czas gry - gry planszowe
205
+ attr_reader :playing_time_from
206
+
207
+ #max. czas gry - gry planszowe
208
+ attr_reader :playing_time_to
209
+
193
210
  #:nodoc:
194
211
  attr_reader :text_contents
195
212
  attr_reader :file_size
@@ -207,6 +224,7 @@ module Elibri
207
224
  attr_reader :collections
208
225
  attr_reader :extents
209
226
  attr_reader :thema_subjects
227
+ attr_reader :publisher_subjects
210
228
  attr_reader :audience_ranges
211
229
  attr_reader :supply_details
212
230
  attr_reader :identifiers
@@ -234,6 +252,7 @@ module Elibri
234
252
  @languages = []
235
253
  @extents = []
236
254
  @thema_subjects = []
255
+ @publisher_subjects = []
237
256
  @audience_ranges = []
238
257
  ##publishing_details
239
258
  @sales_restrictions = []
@@ -246,7 +265,7 @@ module Elibri
246
265
  @deletion_text = data.at_css('DeletionText').try(:text)
247
266
 
248
267
  if data.namespaces.values.any? { |uri| uri =~ /elibri/ }
249
- @cover_type = data.at_xpath('elibri:CoverType').try(:text)
268
+ @cover_type = data.at_xpath('elibri:CoverType').try(:text)
250
269
  @pkwiu = data.at_xpath('elibri:PKWiU').try(:text)
251
270
  @hyphenated_isbn = data.at_xpath('elibri:HyphenatedISBN').try(:text)
252
271
  @pdw_exclusiveness = data.at_xpath('elibri:PDWExclusiveness').try(:text)
@@ -269,8 +288,8 @@ module Elibri
269
288
  @cover_price = BigDecimal(data.at_xpath('elibri:CoverPrice').try(:text)) if data.at_xpath('elibri:CoverPrice')
270
289
  @vat = data.at_xpath('elibri:Vat').try(:text).try(:to_i)
271
290
  else
272
- price_sd = @supply_details.find { |sd| sd.supplier.role == Elibri::ONIX::Dict::Release_3_0::SupplierRole::PUB_TO_RET }
273
- if price_sd && price_sd.price && price_sd.price && price_sd.price.type == Elibri::ONIX::Dict::Release_3_0::PriceTypeCode::RRP_WITH_TAX
291
+ price_sd = @supply_details.find { |sd| sd.supplier && sd.supplier.role == Elibri::ONIX::Dict::Release_3_0::SupplierRole::PUB_TO_RET }
292
+ if price_sd && price_sd.price && price_sd.price && price_sd.price.type == Elibri::ONIX::Dict::Release_3_0::PriceTypeCode::RRP_WITH_TAX
274
293
  @vat = price_sd.price.tax_rate_percent.to_i
275
294
  @cover_price = price_sd.price.amount
276
295
  @additional_trade_information = price_sd.additional_trade_information
@@ -286,6 +305,7 @@ module Elibri
286
305
  @preview_exists = @supporting_resources.find { |sr| sr.content_type_name == "widget" && sr.link =~ /p.elibri.com.pl/ }.present?
287
306
  end
288
307
 
308
+ product_form_features_setup(data.css("ProductFormFeature"))
289
309
 
290
310
  publishing_details_setup(data.at_css('PublishingDetail')) if data.at_css('PublishingDetail')
291
311
  licence_information_setup(data)
@@ -313,15 +333,14 @@ module Elibri
313
333
  elsif date = data.at_xpath("elibri:SaleRestrictedTo").try(:text)
314
334
  @unlimited_licence = false
315
335
  @licence_limited_to_before_type_cast = date
316
- @licence_limited_to = Date.new(date[0...4].to_i, date[4...6].to_i, date[6...8].to_i)
336
+ @licence_limited_to = _parse_date(date)
317
337
  end
318
338
  else
319
- daten = data.css('PublishingDate').find { |d| d.at_css("PublishingDateRole").text == Elibri::ONIX::Dict::Release_3_0::PublishingDateRole::OUT_OF_PRINT_DATE }
339
+ daten = data.css('PublishingDate').find { |d| d.at_css("PublishingDateRole") && d.at_css("PublishingDateRole").text == Elibri::ONIX::Dict::Release_3_0::PublishingDateRole::OUT_OF_PRINT_DATE }
320
340
  if daten
321
-
322
341
  date = daten.at_css('Date').text
323
342
  @licence_limited_to_before_type_cast = date
324
- @licence_limited_to = Date.new(date[0...4].to_i, date[4...6].to_i, date[6...8].to_i)
343
+ @licence_limited_to = _parse_date(date)
325
344
  @unlimited_licence = false
326
345
  else
327
346
  @unlimited_licence = true
@@ -330,16 +349,45 @@ module Elibri
330
349
  end
331
350
  end
332
351
 
352
+ def product_form_features_setup(data)
353
+ data.each do |feature|
354
+ ftype = feature.at_css("ProductFormFeatureType").inner_text
355
+ v1, v2 = feature.at_css("ProductFormFeatureValue, ProductFormFeatureDescription").inner_text.split("-").map(&:to_i)
356
+
357
+ if ftype == Elibri::ONIX::Dict::Release_3_0::ProductFormFeatureType::NUMBER_OF_GAME_PIECES
358
+ @number_of_pieces = v1
359
+ elsif ftype == Elibri::ONIX::Dict::Release_3_0::ProductFormFeatureType::GAME_PLAYERS
360
+ @players_number_from = v1
361
+ @players_number_to = v2
362
+ elsif ftype == Elibri::ONIX::Dict::Release_3_0::ProductFormFeatureType::GAME_PLAY_TIME
363
+ @playing_time_from = v1
364
+ @playing_time_to = v2
365
+ end
366
+ end
367
+ end
368
+
333
369
  def descriptive_details_setup(data)
334
370
  @product_composition = data.at_css('ProductComposition').try(:text)
335
- @product_form = data.at_css('ProductForm').text
336
- if @product_form.starts_with?("B") && !@cover_type
337
- @cover_type = Elibri::ONIX::Dict::CoverType.determine_cover_type(@product_form, data.at_css('ProductFormDetail').try(:text))
338
- end
339
- if Elibri::ONIX::Dict::Release_3_0::ProductFormCode::find_by_onix_code(@product_form)
340
- @product_form_name = Elibri::ONIX::Dict::Release_3_0::ProductFormCode::find_by_onix_code(@product_form).name(:en).downcase
371
+ @product_form = data.at_css('ProductForm').try(:text)
372
+ if @product_form
373
+ if @product_form.starts_with?("B") && !@cover_type
374
+ @cover_type = Elibri::ONIX::Dict::CoverType.determine_cover_type(@product_form, data.at_css('ProductFormDetail').try(:text))
375
+ end
376
+ if Elibri::ONIX::Dict::Release_3_0::ProductFormCode::find_by_onix_code(@product_form)
377
+ @product_form_name = Elibri::ONIX::Dict::Release_3_0::ProductFormCode::find_by_onix_code(@product_form).name(:en).downcase
378
+ end
379
+
380
+ simplified_product_form = @product_form.starts_with?("B") ? "BA" : @product_form
381
+ if Elibri::ONIX::Dict::Release_3_0::ProductFormCode::find_by_onix_code(simplified_product_form).try!(:digital?)
382
+ @digital_formats = []
383
+ data.css("ProductFormDetail").each do |format|
384
+ format_name = Elibri::ONIX::Dict::Release_3_0::ProductFormDetail::find_by_onix_code(format.text).try(:name)
385
+ @digital_formats << format_name.upcase.gsub("MOBIPOCKET", "MOBI") if format_name
386
+ end
387
+ end
388
+
341
389
  end
342
- if classification = data.css('ProductClassification').find { |cl|
390
+ if classification = data.css('ProductClassification').find { |cl|
343
391
  cl.at_css('ProductClassificationType').text == Elibri::ONIX::Dict::Release_3_0::ProductClassificationType::PKWIU }
344
392
  @pkwiu = classification.at_css('ProductClassificationCode').text
345
393
  end
@@ -350,19 +398,13 @@ module Elibri
350
398
  @no_contributor = !!data.at_css('NoContributor')
351
399
  @languages = data.css('Language').map { |language_data| Language.new(language_data) }
352
400
  @extents = data.css('Extent').map { |extent_data| Extent.new(extent_data) }
353
- @thema_subjects = data.css('Subject').find_all { |sd|
401
+
402
+ @publisher_subjects = data.css('Subject').find_all { |sd|
403
+ %w{24}.include?(sd.at_css('SubjectSchemeIdentifier').try(:text)) }.map { |sd| PublisherSubject.new(sd) }
404
+ @thema_subjects = data.css('Subject').find_all { |sd|
354
405
  %w{93 94 95 96 97 98 99}.include?(sd.at_css('SubjectSchemeIdentifier').try(:text)) }.map { |sd| ThemaSubject.new(sd) }
355
406
  @audience_ranges = data.css('AudienceRange').map { |audience_data| AudienceRange.new(audience_data) }
356
407
 
357
- simplified_product_form = @product_form.starts_with?("B") ? "BA" : @product_form
358
- if Elibri::ONIX::Dict::Release_3_0::ProductFormCode::find_by_onix_code(simplified_product_form).try!(:digital?)
359
- @digital_formats = []
360
- data.css("ProductFormDetail").each do |format|
361
- format_name = Elibri::ONIX::Dict::Release_3_0::ProductFormDetail::find_by_onix_code(format.text).try(:name)
362
- @digital_formats << format_name.upcase.gsub("MOBIPOCKET", "MOBI") if format_name
363
- end
364
- end
365
-
366
408
  #zabezpiecznie pliku
367
409
  if protection = data.at_css("EpubTechnicalProtection").try(:text)
368
410
  @technical_protection = Elibri::ONIX::Dict::Release_3_0::EpubTechnicalProtection::find_by_onix_code(protection).try(:name)
@@ -394,7 +436,7 @@ module Elibri
394
436
  preorder_embargo_date_as_object = publication_dates.find { |date| date.role == Elibri::ONIX::Dict::Release_3_0::PublishingDateRole::PREORDER_EMBARGO_DATE }
395
437
  @preorder_embargo_date = Date.new(*preorder_embargo_date_as_object.parsed) if preorder_embargo_date_as_object
396
438
 
397
- @sales_restrictions = data.css('SalesRestriction').map { |restriction_data| SalesRestriction.new(restriction_data) }
439
+ @sales_restrictions = data.css('SalesRestriction').map { |restriction_data| SalesRestriction.new(restriction_data) }
398
440
  #ograniczenia terytorialne
399
441
  if data.at_css("CountriesIncluded").try(:text) == "PL"
400
442
  @sale_restricted_to_poland = true
@@ -420,7 +462,7 @@ module Elibri
420
462
 
421
463
  #flaga - true, jeśli produkt nie ma żadnego autora
422
464
  def no_contributor?
423
- @no_contributor
465
+ @no_contributor
424
466
  end
425
467
 
426
468
  #flaga, czy książka to praca zbiorowa?
@@ -437,7 +479,7 @@ module Elibri
437
479
  unnamed_persons? ? ["praca zbiorowa"] : @contributors.find_all { |c| c.role_name == "author" }.map(&:person_name)
438
480
  end
439
481
 
440
- [:ghostwriter, :scenarist, :originator, :illustrator, :photographer, :author_of_preface, :drawer, :cover_designer,
482
+ [:ghostwriter, :scenarist, :originator, :illustrator, :photographer, :author_of_preface, :drawer, :cover_designer,
441
483
  :inked_or_colored_by, :editor, :revisor, :translator, :editor_in_chief, :read_by].each do |role|
442
484
  define_method "#{role}s" do
443
485
  @contributors.find_all { |c| c.role_name == role.to_s }.map(&:person_name)
@@ -463,6 +505,8 @@ module Elibri
463
505
  #data premiery, jako instancja Date (tylko wtedy, gdy dokładna data jest znana)
464
506
  def premiere
465
507
  Date.new(*parsed_publishing_date) if parsed_publishing_date.size == 3
508
+ rescue ArgumentError
509
+ nil
466
510
  end
467
511
 
468
512
  def related_products_record_references
@@ -470,7 +514,7 @@ module Elibri
470
514
  end
471
515
 
472
516
  #:nodoc:
473
- def proprietary_identifiers
517
+ def proprietary_identifiers
474
518
  @identifiers.find_all { |i| i.identifier_type == "proprietary" }.inject({}) { |res, ident| res[ident.type_name] = ident.value; res }
475
519
  end
476
520
 
@@ -534,24 +578,32 @@ module Elibri
534
578
 
535
579
 
536
580
  def compute_state!
537
- if @notification_type == "01"
538
- @current_state = :announced
539
- elsif @notification_type == "02"
540
- @current_state = :preorder
541
- elsif @notification_type == "05"
542
- @current_state = :deleted
543
- else
544
- if @publishing_status == "04"
545
- @current_state = :published
546
- elsif @publishing_status == "07"
547
- @current_state = :out_of_print
548
- elsif @notification_type == "03"
549
- @current_state = :published
581
+ if @notification_type || @publishing_status
582
+ if @notification_type == "01"
583
+ @current_state = :announced
584
+ elsif @notification_type == "02"
585
+ @current_state = :preorder
586
+ elsif @notification_type == "05"
587
+ @current_state = :deleted
550
588
  else
551
- raise "cannot determine the state of the product #{@record_reference}"
589
+ if @publishing_status == "04"
590
+ @current_state = :published
591
+ elsif @publishing_status == "07"
592
+ @current_state = :out_of_print
593
+ elsif @notification_type == "03"
594
+ @current_state = :published
595
+ else
596
+ raise "cannot determine the state of the product #{@record_reference}"
597
+ end
552
598
  end
553
599
  end
554
600
  end
601
+
602
+ def _parse_date(string)
603
+ Date.new(string[0...4].to_i, string[4...6].to_i, string[6...8].to_i)
604
+ rescue ArgumentError
605
+ raise "Invalid date '#{string}' when parsing date for #{@record_reference}"
606
+ end
555
607
  end
556
608
 
557
609
  end
@@ -0,0 +1,32 @@
1
+
2
+ module Elibri
3
+ module ONIX
4
+ module Release_3_0
5
+
6
+ class PublisherSubject
7
+
8
+ include HashId
9
+
10
+ ATTRIBUTES = [
11
+ :code, :heading_text
12
+ ]
13
+
14
+ RELATIONS = [
15
+ :inspect_include_fields
16
+ ]
17
+
18
+ attr_accessor :code, :heading_text, :to_xml
19
+
20
+ def initialize(data)
21
+ @to_xml = data.to_s
22
+ @code = data.at_css('SubjectCode').try(:text)
23
+ @heading_text = data.at_css('SubjectHeadingText').try(:text)
24
+ end
25
+
26
+ def inspect_include_fields
27
+ [:code]
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -6,26 +6,26 @@ module Elibri
6
6
  module Release_3_0
7
7
 
8
8
  class PublishingDate
9
-
9
+
10
10
  #from ONIX documentation:
11
11
  #A repeatable group of data elements which together specify a date associated with the publishing of the product.
12
12
  #Optional, but a date of publication must be specified either or in <MarketPublishingDetail> (P.25).
13
13
  #Other dates related to the publishing of a product can be sent in further repeats.
14
14
 
15
15
  include HashId
16
-
16
+
17
17
  ATTRIBUTES = [
18
18
  :role, :format, :date, :parsed
19
19
  ]
20
-
20
+
21
21
  RELATIONS = []
22
-
22
+
23
23
  attr_accessor :role, :format, :date, :to_xml
24
-
24
+
25
25
  def initialize(data)
26
26
  @to_xml = data.to_s
27
27
  @role = data.at_css('PublishingDateRole').try(:text)
28
- @format = data.at_css('DateFormat').try(:text)
28
+ @format = data.at_css('DateFormat').try(:text) || data.at_css('Date')['dateformat'] || '00'
29
29
  @date = data.at_css('Date').try(:text)
30
30
  end
31
31
 
@@ -4,7 +4,7 @@
4
4
  sender header product_identifier measure title_element title_detail collection contributor
5
5
  language extent audience_range text_content supporting_resource imprint publisher publishing_date
6
6
  sales_restriction related_product supplier_identifier stock_quantity_coded price supplier supply_detail
7
- product onix_message excerpt_info file_info thema_subject
7
+ product onix_message excerpt_info file_info thema_subject publisher_subject
8
8
  }.each do |file_name|
9
9
  require File.join(File.dirname(__FILE__), "onix_3_0", file_name)
10
10
  end
@@ -2,7 +2,7 @@ module Elibri
2
2
  module ONIX
3
3
  z = $VERBOSE
4
4
  $VERBOSE = nil
5
- VERSION = "0.5.7"
5
+ VERSION = "0.5.14"
6
6
  Version = VERSION
7
7
  $VERBOSE = z
8
8
  end
@@ -0,0 +1,20 @@
1
+ require 'helper'
2
+
3
+ describe Elibri::ONIX::Release_3_0::ONIXMessage do
4
+
5
+ it "should be able to parse number of pieces info" do
6
+ product = load_fixture("onix_puzzle_example.xml")
7
+
8
+ assert_equal 25, product.number_of_pieces
9
+ end
10
+
11
+ it "should be able to parse playing time and number of players" do
12
+ product = load_fixture("onix_board_game_example.xml")
13
+
14
+ assert_equal 2, product.players_number_from
15
+ assert_equal 5, product.players_number_to
16
+ assert_equal 20, product.playing_time_from
17
+ assert_nil product.playing_time_to
18
+ end
19
+
20
+ end
@@ -25,6 +25,12 @@ describe Elibri::ONIX::Release_3_0::ONIXMessage do
25
25
  assert_equal "Kwalifikatory chronologiczne / od ok. 1500 do dzisiaj / XX wiek (ok. 1900–1999) " +
26
26
  "/ 1. poł. XX wieku (ok. 1900–1950) / Dwudziestolecie międzywojenne (ok. 1919–1939) / ok. 1920–1929", s3.heading_text
27
27
 
28
+ assert_equal 1, product.publisher_subjects.count
29
+
30
+ p1 = product.publisher_subjects[0]
31
+
32
+ assert_equal "191", p1.code
33
+ assert_equal "Beletrystyka: Horror", p1.heading_text
28
34
  end
29
35
 
30
36
  end
@@ -0,0 +1,163 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ONIXMessage xmlns="http://ns.editeur.org/onix/3.0/reference" release="3.0">
3
+ <Header>
4
+ <Sender>
5
+ <SenderName>Elibri.com.pl</SenderName>
6
+ <ContactName>Tomasz Meka</ContactName>
7
+ <EmailAddress>kontakt@elibri.com.pl</EmailAddress>
8
+ </Sender>
9
+ <SentDateTime>20200118</SentDateTime>
10
+ </Header>
11
+ <Product>
12
+ <RecordReference>76843e73500beb04ddf8</RecordReference>
13
+ <!--NotificationType: CONFIRMED_ON_PUBLICATION--><NotificationType>03</NotificationType>
14
+ <ProductIdentifier>
15
+ <!--ProductIDType: EAN--><ProductIDType>03</ProductIDType>
16
+ <IDValue>5902719470332</IDValue>
17
+ </ProductIdentifier>
18
+ <DescriptiveDetail>
19
+ <!--ProductComposition: SINGLE_COMPONENT_RETAIL_PRODUCT--><ProductComposition>00</ProductComposition>
20
+ <!--ProductFormCode: GAME--><ProductForm>ZE</ProductForm>
21
+ <ProductFormFeature>
22
+ <!--ProductFormFeatureType: GAME_PLAYERS--><ProductFormFeatureType>23</ProductFormFeatureType>
23
+ <ProductFormFeatureDescription>2-5 graczy</ProductFormFeatureDescription>
24
+ </ProductFormFeature>
25
+ <ProductFormFeature>
26
+ <!--ProductFormFeatureType: GAME_PLAY_TIME--><ProductFormFeatureType>24</ProductFormFeatureType>
27
+ <ProductFormFeatureValue>20</ProductFormFeatureValue>
28
+ </ProductFormFeature>
29
+ <ProductClassification>
30
+ <!--ProductClassificationType: PKWIU--><ProductClassificationType>12</ProductClassificationType>
31
+ <ProductClassificationCode>32.40.39.0</ProductClassificationCode>
32
+ </ProductClassification>
33
+ <Collection>
34
+ <!--CollectionType: PUBLISHER_COLLECTION--><CollectionType>10</CollectionType>
35
+ <TitleDetail>
36
+ <!--TitleType: DISTINCTIVE_TITLE--><TitleType>01</TitleType>
37
+ <TitleElement>
38
+ <!--TitleElementLevel: COLLECTION--><TitleElementLevel>02</TitleElementLevel>
39
+ <TitleText>Gry planszowe</TitleText>
40
+ </TitleElement>
41
+ </TitleDetail>
42
+ </Collection>
43
+ <TitleDetail>
44
+ <!--TitleType: DISTINCTIVE_TITLE--><TitleType>01</TitleType>
45
+ <TitleElement>
46
+ <!--TitleElementLevel: PRODUCT--><TitleElementLevel>01</TitleElementLevel>
47
+ <TitleText>Jamniki</TitleText>
48
+ </TitleElement>
49
+ </TitleDetail>
50
+ <TitleDetail>
51
+ <!--TitleType: DISTRIBUTORS_TITLE--><TitleType>10</TitleType>
52
+ <TitleElement>
53
+ <!--TitleElementLevel: PRODUCT--><TitleElementLevel>01</TitleElementLevel>
54
+ <TitleText>JAMNIKI</TitleText>
55
+ </TitleElement>
56
+ </TitleDetail>
57
+ <Contributor sourcename="contributorid:201641" datestamp="20200118T2047">
58
+ <SequenceNumber>1</SequenceNumber>
59
+ <!--ContributorRole: AUTHOR--><ContributorRole>A01</ContributorRole>
60
+ <PersonName>David Short</PersonName>
61
+ <NamesBeforeKey>David</NamesBeforeKey>
62
+ <KeyNames>Short</KeyNames>
63
+ </Contributor>
64
+ <Contributor sourcename="contributorid:201642" datestamp="20200118T2047">
65
+ <SequenceNumber>2</SequenceNumber>
66
+ <!--ContributorRole: ILLUSTRATOR--><ContributorRole>A12</ContributorRole>
67
+ <PersonName>Maciej Szymanowicz</PersonName>
68
+ <NamesBeforeKey>Maciej</NamesBeforeKey>
69
+ <KeyNames>Szymanowicz</KeyNames>
70
+ </Contributor>
71
+ <Language>
72
+ <!--LanguageRole: LANGUAGE_OF_TEXT--><LanguageRole>01</LanguageRole>
73
+ <!--LanguageCode: Polish--><LanguageCode>pol</LanguageCode>
74
+ </Language>
75
+ <Subject>
76
+ <!--SubjectSchemeIdentifier: PROPRIETARY--><SubjectSchemeIdentifier>24</SubjectSchemeIdentifier>
77
+ <SubjectSchemeName>Nasza Księgarnia</SubjectSchemeName>
78
+ <SubjectCode>871</SubjectCode>
79
+ <SubjectHeadingText>Gry planszowe</SubjectHeadingText>
80
+ </Subject>
81
+ <AudienceRange>
82
+ <!--AudienceRangeQualifier: READING_AGE--><AudienceRangeQualifier>18</AudienceRangeQualifier>
83
+ <!--AudienceRangePrecision: FROM--><AudienceRangePrecision>03</AudienceRangePrecision>
84
+ <AudienceRangeValue>6</AudienceRangeValue>
85
+ </AudienceRange>
86
+ <AudienceRange>
87
+ <!--AudienceRangeQualifier: READING_AGE--><AudienceRangeQualifier>18</AudienceRangeQualifier>
88
+ <!--AudienceRangePrecision: TO--><AudienceRangePrecision>04</AudienceRangePrecision>
89
+ <AudienceRangeValue>106</AudienceRangeValue>
90
+ </AudienceRange>
91
+ </DescriptiveDetail>
92
+ <CollateralDetail>
93
+ <TextContent sourcename="textid:109999" datestamp="20200118T2047">
94
+ <!--OtherTextType: MAIN_DESCRIPTION--><TextType>03</TextType>
95
+ <!--ContentAudience: UNRESTRICTED--><ContentAudience>00</ContentAudience>
96
+ <Text>
97
+ <![CDATA[<p>
98
+ <strong>UBIERZ JAMNIKA W KUBRACZEK!</strong></p>
99
+ <p>
100
+ Podczas gry Twój jamnik będzie rósł, musisz więc ubierać go w coraz większy kubraczek. Staraj się, aby na kubraczku było jak najwięcej symboli kostek – zdobędziesz za nie punkty! Dodatkowe punkty dostaniesz za kolory kubraczka.</p>
101
+ ]]>
102
+ </Text>
103
+ </TextContent>
104
+ </CollateralDetail>
105
+ <PublishingDetail>
106
+ <Publisher>
107
+ <PublishingRole>01</PublishingRole>
108
+ <PublisherIdentifier>
109
+ <PublisherIDType>01</PublisherIDType>
110
+ <IDTypeName>ElibriPublisherCode</IDTypeName>
111
+ <IDValue>41</IDValue>
112
+ </PublisherIdentifier>
113
+ <PublisherName>Nasza Księgarnia</PublisherName>
114
+ </Publisher>
115
+ <CityOfPublication>Warszawa</CityOfPublication>
116
+ <!--PublishingStatusCode: ACTIVE--><PublishingStatus>04</PublishingStatus>
117
+ <PublishingDate>
118
+ <!--PublishingDateRole: PUBLICATION_DATE--><PublishingDateRole>01</PublishingDateRole>
119
+ <!--DateFormat: YYYYMMDD--><DateFormat>00</DateFormat>
120
+ <Date dateformat="00">20180919</Date>
121
+ </PublishingDate>
122
+ <PublishingDate>
123
+ <!--PublishingDateRole: PREORDER_EMBARGO_DATE--><PublishingDateRole>27</PublishingDateRole>
124
+ <!--DateFormat: YYYYMMDD--><DateFormat>00</DateFormat>
125
+ <Date dateformat="00">20180905</Date>
126
+ </PublishingDate>
127
+ <SalesRights>
128
+ <!--SalesRightsType: FOR_SALE_WITH_EXLUSIVE_RIGHTS--><SalesRightsType>01</SalesRightsType>
129
+ <Territory>
130
+ <CountriesIncluded>PL</CountriesIncluded>
131
+ </Territory>
132
+ </SalesRights>
133
+ </PublishingDetail>
134
+ <ProductSupply>
135
+ <SupplyDetail>
136
+ <Supplier>
137
+ <!--SupplierRole: PUB_TO_RET--><SupplierRole>01</SupplierRole>
138
+ <SupplierIdentifier>
139
+ <!--SupplierIDType: VAT_IDENTITY_NUMBER--><SupplierIDType>23</SupplierIDType>
140
+ <IDValue>PL5260205285</IDValue>
141
+ </SupplierIdentifier>
142
+ <SupplierName>Nasza Księgarnia</SupplierName>
143
+ </Supplier>
144
+ <!--ProductAvailabilityType: IN_STOCK--><ProductAvailability>21</ProductAvailability>
145
+ <Stock>
146
+ <OnHand>200</OnHand>
147
+ <!--Proximity: MORE_THAN--><Proximity>07</Proximity>
148
+ </Stock>
149
+ <PackQuantity>12</PackQuantity>
150
+ <Price>
151
+ <!--PriceTypeCode: RRP_WITH_TAX--><PriceType>02</PriceType>
152
+ <PriceAmount>59.9</PriceAmount>
153
+ <Tax>
154
+ <!--TaxType: VAT--><TaxType>01</TaxType>
155
+ <TaxRatePercent>23</TaxRatePercent>
156
+ </Tax>
157
+ <CurrencyCode>PLN</CurrencyCode>
158
+ <!--PricePrintedOnProduct: NO--><PrintedOnProduct>01</PrintedOnProduct>
159
+ </Price>
160
+ </SupplyDetail>
161
+ </ProductSupply>
162
+ </Product>
163
+ </ONIXMessage>
@@ -0,0 +1,148 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ONIXMessage xmlns="http://ns.editeur.org/onix/3.0/reference" release="3.0">
3
+ <Header>
4
+ <Sender>
5
+ <SenderName>Elibri.com.pl</SenderName>
6
+ <ContactName>Tomasz Meka</ContactName>
7
+ <EmailAddress>kontakt@elibri.com.pl</EmailAddress>
8
+ </Sender>
9
+ <SentDateTime>20200118</SentDateTime>
10
+ </Header>
11
+ <Product>
12
+ <RecordReference>85b3ad798e01c3b5ee67</RecordReference>
13
+ <!--NotificationType: CONFIRMED_ON_PUBLICATION--><NotificationType>03</NotificationType>
14
+ <ProductIdentifier>
15
+ <!--ProductIDType: EAN--><ProductIDType>03</ProductIDType>
16
+ <IDValue>5902719471810</IDValue>
17
+ </ProductIdentifier>
18
+ <DescriptiveDetail>
19
+ <!--ProductComposition: SINGLE_COMPONENT_RETAIL_PRODUCT--><ProductComposition>00</ProductComposition>
20
+ <!--ProductFormCode: JIGSAW--><ProductForm>ZJ</ProductForm>
21
+ <ProductFormFeature>
22
+ <!--ProductFormFeatureType: NUMBER_OF_GAME_PIECES--><ProductFormFeatureType>22</ProductFormFeatureType>
23
+ <ProductFormFeatureValue>25</ProductFormFeatureValue>
24
+ </ProductFormFeature>
25
+ <ProductClassification>
26
+ <!--ProductClassificationType: PKWIU--><ProductClassificationType>12</ProductClassificationType>
27
+ <ProductClassificationCode>32.40.32</ProductClassificationCode>
28
+ </ProductClassification>
29
+ <Collection>
30
+ <!--CollectionType: PUBLISHER_COLLECTION--><CollectionType>10</CollectionType>
31
+ <TitleDetail>
32
+ <!--TitleType: DISTINCTIVE_TITLE--><TitleType>01</TitleType>
33
+ <TitleElement>
34
+ <!--TitleElementLevel: COLLECTION--><TitleElementLevel>02</TitleElementLevel>
35
+ <TitleText>Puzzle</TitleText>
36
+ </TitleElement>
37
+ </TitleDetail>
38
+ </Collection>
39
+ <TitleDetail>
40
+ <!--TitleType: DISTINCTIVE_TITLE--><TitleType>01</TitleType>
41
+ <TitleElement>
42
+ <!--TitleElementLevel: PRODUCT--><TitleElementLevel>01</TitleElementLevel>
43
+ <TitleText>Pucio. Puzzle: Co tu pasuje?</TitleText>
44
+ </TitleElement>
45
+ </TitleDetail>
46
+ <TitleDetail>
47
+ <!--TitleType: DISTRIBUTORS_TITLE--><TitleType>10</TitleType>
48
+ <TitleElement>
49
+ <!--TitleElementLevel: PRODUCT--><TitleElementLevel>01</TitleElementLevel>
50
+ <TitleText>PUCIO. PUZZLE: CO TU PASUJE?</TitleText>
51
+ </TitleElement>
52
+ </TitleDetail>
53
+ <Contributor sourcename="contributorid:210002" datestamp="20190116T1724">
54
+ <SequenceNumber>1</SequenceNumber>
55
+ <!--ContributorRole: AUTHOR--><ContributorRole>A01</ContributorRole>
56
+ <PersonName>Marta Galewska-Kustra</PersonName>
57
+ <NamesBeforeKey>Marta</NamesBeforeKey>
58
+ <KeyNames>Galewska-Kustra</KeyNames>
59
+ </Contributor>
60
+ <Contributor sourcename="contributorid:210003" datestamp="20190116T1724">
61
+ <SequenceNumber>2</SequenceNumber>
62
+ <!--ContributorRole: ILLUSTRATOR--><ContributorRole>A12</ContributorRole>
63
+ <PersonName>Joanna Kłos</PersonName>
64
+ <NamesBeforeKey>Joanna</NamesBeforeKey>
65
+ <KeyNames>Kłos</KeyNames>
66
+ </Contributor>
67
+ <Language>
68
+ <!--LanguageRole: LANGUAGE_OF_TEXT--><LanguageRole>01</LanguageRole>
69
+ <!--LanguageCode: Polish--><LanguageCode>pol</LanguageCode>
70
+ </Language>
71
+ </DescriptiveDetail>
72
+ <CollateralDetail>
73
+ <TextContent sourcename="textid:115723" datestamp="20190116T1724">
74
+ <!--OtherTextType: MAIN_DESCRIPTION--><TextType>03</TextType>
75
+ <!--ContentAudience: UNRESTRICTED--><ContentAudience>00</ContentAudience>
76
+ <Text>
77
+ <![CDATA[<p>
78
+ <strong>Wreszcie są! Długo wyczekiwane, mądre i piękne zabawki z PUCIEM!</strong></p>
79
+ <p>
80
+ Uwielbiany przez dzieci i rodziców bohater bestsellerowej serii Marty Galewskiej-Kustry, fenomenalnie ilustrowanej przez Joannę Kłos, w końcu wykracza poza karty książek i pojawia się także na puzzlach! Zapraszamy do wspólnej zabawy i nauki!</p>
81
+ <p>
82
+ Puzzle przeznaczone dla dzieci od 2 lat. Składają się z 5 obrazków głównych oraz 20 uzupełniających. Na obrazkach głównych jest Pucio w znanych dziecku codziennych sytuacjach (np. jedzenie posiłku, poranna toaleta, ubieranie się). Elementy uzupełniające przedstawiają pojedyncze obiekty zaprezentowane także na obrazku głównym (np. kanapka, szczoteczka do zębów, czapka). Dziecko ma się przyjrzeć obrazkowi głównemu, odnaleźć pasujące do niego elementy uzupełniające i dołączyć je do obrazka głównego.</p>
83
+ <p>
84
+ To na pozór proste zadanie wymaga skupienia uwagi na ilustracji, rozwija spostrzegawczość i mowę, ale przede wszystkim pobudza do myślenia. Mimo niedużej liczby elementów puzzle dają okazję do wielu zabaw o różnym stopniu trudności. </p>
85
+ <p>
86
+ Wyprodukowano w Polsce.</p>
87
+ ]]>
88
+ </Text>
89
+ </TextContent>
90
+ </CollateralDetail>
91
+ <PublishingDetail>
92
+ <Publisher>
93
+ <PublishingRole>01</PublishingRole>
94
+ <PublisherIdentifier>
95
+ <PublisherIDType>01</PublisherIDType>
96
+ <IDTypeName>ElibriPublisherCode</IDTypeName>
97
+ <IDValue>41</IDValue>
98
+ </PublisherIdentifier>
99
+ <PublisherName>Nasza Księgarnia</PublisherName>
100
+ </Publisher>
101
+ <CityOfPublication>Warszawa</CityOfPublication>
102
+ <!--PublishingStatusCode: ACTIVE--><PublishingStatus>04</PublishingStatus>
103
+ <PublishingDate>
104
+ <!--PublishingDateRole: PUBLICATION_DATE--><PublishingDateRole>01</PublishingDateRole>
105
+ <!--DateFormat: YYYYMMDD--><DateFormat>00</DateFormat>
106
+ <Date dateformat="00">20190227</Date>
107
+ </PublishingDate>
108
+ <PublishingDate>
109
+ <!--PublishingDateRole: PREORDER_EMBARGO_DATE--><PublishingDateRole>27</PublishingDateRole>
110
+ <!--DateFormat: YYYYMMDD--><DateFormat>00</DateFormat>
111
+ <Date dateformat="00">20190213</Date>
112
+ </PublishingDate>
113
+ <SalesRights>
114
+ <!--SalesRightsType: FOR_SALE_WITH_EXLUSIVE_RIGHTS--><SalesRightsType>01</SalesRightsType>
115
+ <Territory>
116
+ <CountriesIncluded>PL</CountriesIncluded>
117
+ </Territory>
118
+ </SalesRights>
119
+ </PublishingDetail>
120
+ <ProductSupply>
121
+ <SupplyDetail>
122
+ <Supplier>
123
+ <!--SupplierRole: PUB_TO_RET--><SupplierRole>01</SupplierRole>
124
+ <SupplierIdentifier>
125
+ <!--SupplierIDType: VAT_IDENTITY_NUMBER--><SupplierIDType>23</SupplierIDType>
126
+ <IDValue>PL5260205285</IDValue>
127
+ </SupplierIdentifier>
128
+ <SupplierName>Nasza Księgarnia</SupplierName>
129
+ </Supplier>
130
+ <!--ProductAvailabilityType: NOT_AVAILABLE--><ProductAvailability>40</ProductAvailability>
131
+ <Stock>
132
+ <OnHand>0</OnHand>
133
+ <!--Proximity: EXACTLY--><Proximity>03</Proximity>
134
+ </Stock>
135
+ <Price>
136
+ <!--PriceTypeCode: RRP_WITH_TAX--><PriceType>02</PriceType>
137
+ <PriceAmount>24.9</PriceAmount>
138
+ <Tax>
139
+ <!--TaxType: VAT--><TaxType>01</TaxType>
140
+ <TaxRatePercent>23</TaxRatePercent>
141
+ </Tax>
142
+ <CurrencyCode>PLN</CurrencyCode>
143
+ <!--PricePrintedOnProduct: NO--><PrintedOnProduct>01</PrintedOnProduct>
144
+ </Price>
145
+ </SupplyDetail>
146
+ </ProductSupply>
147
+ </Product>
148
+ </ONIXMessage>
@@ -25,21 +25,6 @@
25
25
  <TitleText>Nielegalni</TitleText>
26
26
  </TitleElement>
27
27
  </TitleDetail>
28
- <Subject>
29
- <MainSubject/>
30
- <SubjectSchemeIdentifier>24</SubjectSchemeIdentifier>
31
- <SubjectSchemeName>elibri.com.pl</SubjectSchemeName>
32
- <SubjectSchemeVersion>1.0</SubjectSchemeVersion>
33
- <SubjectCode>1110</SubjectCode>
34
- <SubjectHeadingText>Historia / II Wojna Światowa / Ruch oporu</SubjectHeadingText>
35
- </Subject>
36
- <Subject>
37
- <SubjectSchemeIdentifier>24</SubjectSchemeIdentifier>
38
- <SubjectSchemeName>elibri.com.pl</SubjectSchemeName>
39
- <SubjectSchemeVersion>1.0</SubjectSchemeVersion>
40
- <SubjectCode>491</SubjectCode>
41
- <SubjectHeadingText>Szkoła i nauczanie / Lektury szkolne z opracowaniami</SubjectHeadingText>
42
- </Subject>
43
28
  <Subject>
44
29
  <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier>
45
30
  <SubjectSchemeVersion>1.3</SubjectSchemeVersion>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elibri_onix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Urbanski
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-12-30 00:00:00.000000000 Z
12
+ date: 2021-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -187,6 +187,7 @@ files:
187
187
  - lib/elibri_onix/onix_3_0/product.rb
188
188
  - lib/elibri_onix/onix_3_0/product_identifier.rb
189
189
  - lib/elibri_onix/onix_3_0/publisher.rb
190
+ - lib/elibri_onix/onix_3_0/publisher_subject.rb
190
191
  - lib/elibri_onix/onix_3_0/publishing_date.rb
191
192
  - lib/elibri_onix/onix_3_0/related_product.rb
192
193
  - lib/elibri_onix/onix_3_0/sales_restriction.rb
@@ -217,6 +218,7 @@ files:
217
218
  - test/elibri_onix_message_attributes_test.rb
218
219
  - test/elibri_onix_release_3_0_onix_message_test.rb
219
220
  - test/elibri_onix_test.rb
221
+ - test/elibri_product_form_features_test.rb
220
222
  - test/elibri_product_form_test.rb
221
223
  - test/elibri_publisher_info_test.rb
222
224
  - test/elibri_publishing_status_test.rb
@@ -236,6 +238,7 @@ files:
236
238
  - test/fixtures/onix_audience_range_example.xml
237
239
  - test/fixtures/onix_audiobook_example.xml
238
240
  - test/fixtures/onix_audiobook_extent_example.xml
241
+ - test/fixtures/onix_board_game_example.xml
239
242
  - test/fixtures/onix_collective_work_example.xml
240
243
  - test/fixtures/onix_contributors_example.xml
241
244
  - test/fixtures/onix_ebook_extent_example.xml
@@ -252,6 +255,7 @@ files:
252
255
  - test/fixtures/onix_published_group_product_example.xml
253
256
  - test/fixtures/onix_published_product_example.xml
254
257
  - test/fixtures/onix_publisher_info_example.xml
258
+ - test/fixtures/onix_puzzle_example.xml
255
259
  - test/fixtures/onix_record_identifiers_example.xml
256
260
  - test/fixtures/onix_related_products_example.xml
257
261
  - test/fixtures/onix_removed_elibri_extensions.xml
@@ -284,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
288
  - !ruby/object:Gem::Version
285
289
  version: '0'
286
290
  requirements: []
287
- rubygems_version: 3.0.3
291
+ rubygems_version: 3.0.6
288
292
  signing_key:
289
293
  specification_version: 4
290
294
  summary: EDItEUR ONIX format subset implementation used in Elibri publication system